Rounding Methods for Neural Networks with Low Resolution Synaptic Weights

Lorenz K. Müller, Giacomo IndiveriarXiv 2015 · OpenReview

Abstract

Neural network algorithms simulated on standard computing platforms typically make use of high resolution weights, with floating-point notation. However, for dedicated hardware implementations of such algorithms, fixed-point synaptic weights with low resolution are preferable. The basic approach of reducing the resolution of the weights in these algorithms by standard rounding methods incurs drastic losses in performance. To reduce the resolution further, in the extreme case even to binary weights, more advanced techniques are necessary. To this end, we propose two methods for mapping neural network algorithms with high resolution weights to corresponding algorithms that work with low resolution weights and demonstrate that their performance is substantially better than standard rounding. We further use these methods to investigate the performance of three common neural network algorithms under fixed memory size of the weight matrix with different weight resolutions. We show that dedicated hardware systems, whose technology dictates very low weight resolutions (be they electronic or biological) could in principle implement the algorithms we study.

Introduction

Standard neural network training relies on high-precision 32-bit or 64-bit floating-point weights. However, deploying these models on specialized hardware—such as FPGAs, neuromorphic chips, or memristive systems—often requires low-resolution fixed-point weights to minimize memory footprint and power consumption. Naive rounding of high-precision weights to the nearest discrete value typically results in a "performance cliff," where model accuracy collapses. This paper explores advanced rounding strategies to bridge the gap between continuous mathematical gradients and discrete hardware constraints.

Proposed Mapping Strategies

The authors investigate two primary strategies to maintain performance at low bit depths:

  1. Randomized Rounding (Online): Instead of rounding a weight to the nearest grid point, this method rounds it probabilistically. If a weight update falls between two discrete values, it has a higher probability of jumping to the closer value. This preserves the expected value of the gradient update over time, allowing the network to learn effectively even with extremely coarse weights. A variant, Coarse p, uses limited resolution for the rounding probabilities themselves to further accommodate hardware limitations.
  2. K-Means Clustering (Offline): In this approach, a network is first trained using high-resolution parameters. Subsequently, k-means clustering groups the weights into a small number of "mean intensities," effectively compressing the weight matrix into a discrete set of values.

These methods are benchmarked against Online Rounding, a naive approach that rounds weights to the nearest grid point at every step of gradient descent.

Performance and Graceful Degradation

The study evaluated these methods across multiple architectures, including Multi-Layer Perceptrons (MLP) and Neural Autoregressive Distribution Encoders (NADE), using the MNIST and "dna" datasets.

Comparison of rounding methods on test error across different bit resolutions.

As illustrated in Figure 1, both Randomized Rounding (online stochastic) and K-Means significantly outperform naive online rounding. While performance naturally improves with higher resolution, it follows a plateau model. By 6 bits, the performance of randomized rounding is nearly indistinguishable from high-resolution baselines. Even at the "2-bit floor"—representing excitatory, inhibitory, or inactive states—the models maintain functional performance, aligning with observations of biological synaptic resolution.

Randomization as Regularization

An interesting insight from the study is the regularizing effect of randomized rounding. At very low resolutions, the gap between training and cross-validation error is minimized, as shown in Figure 2.

Training and cross-validation error over epochs, demonstrating the regularizing effect of randomized rounding.

The noise injected by the probabilistic rounding process acts as a high-bias regularizer, preventing the model from overfitting to the training data. This suggests that low-resolution hardware may inherently possess beneficial regularization properties.

Conclusion

The proposed rounding methods provide a robust framework for implementing neural networks on hardware with limited synaptic resolution. While K-Means offers superior offline compression, Randomized Rounding is more versatile for "on-the-fly" learning. Future implementations may leverage memristive synapses, which exhibit natural probabilistic switching, to implement these algorithms directly in hardware without the need for complex random number generators.

Summary updated

Abstract

Neural network algorithms simulated on standard computing platforms typically make use of high resolution weights, with floating-point notation. However, for dedicated hardware implementations of such algorithms, fixed-point synaptic weights with low resolution are preferable. The basic approach of reducing the resolution of the weights in these algorithms by standard rounding methods incurs drastic losses in performance. To reduce the resolution further, in the extreme case even to binary weights, more advanced techniques are necessary. To this end, we propose two methods for mapping neural network algorithms with high resolution weights to corresponding algorithms that work with low resolution weights and demonstrate that their performance is substantially better than standard rounding. We further use these methods to investigate the performance of three common neural network algorithms under fixed memory size of the weight matrix with different weight resolutions. We show that dedicated hardware systems, whose technology dictates very low weight resolutions (be they electronic or biological) could in principle implement the algorithms we study.
BibTeX
@misc{muller2015rounding,
  author = {Lorenz K. Müller and Giacomo Indiveri},
  title = {{Rounding Methods for Neural Networks with Low Resolution Synaptic Weights}},
  year = {2015},
  eprint = {1504.05767},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1504.05767},
}
Figure