Abstract
Reduced numerical precision is a common technique to reduce computational cost in many Deep Neural Networks (DNNs). While it has been observed that DNNs are resilient to small errors and noise, no general result exists that is capable of predicting a given DNN system architecture's sensitivity to reduced precision. In this project, we emulate arbitrary bit-width using a specified floating-point representation with a truncation method, which is applied to the neural network after each batch. We explore the impact of several model parameters on the network's training accuracy and show results on the MNIST dataset. We then present a preliminary theoretical investigation of the error scaling in both forward and backward propagations. We end with a discussion of the implications of these results as well as the potential for generalization to other network architectures.
Introduction
Training and deploying deep neural networks is computationally expensive and memory-intensive, largely because standard frameworks use 32-bit single-precision floating-point numbers. While researchers know intuitively that DNNs are "resilient" to noise, there is a lack of concrete theoretical analysis regarding numerical stability. This study seeks to move beyond purely empirical observations to understand which specific model parameters—such as layer count, batch size, and initialization—are most sensitive to reduced precision and how round-off errors propagate through the network during training.
Methodology
The researchers developed a method to emulate arbitrary bit-widths within a standard 32-bit floating-point environment by truncating bits from the mantissa. They compared two primary rounding schemes:
- Truncation: Simply cutting off digits, which always results in a smaller-than-original number.
- Stochastic Rounding: A probabilistic approach where a number has a higher chance of rounding to the nearest value but retains a small chance of rounding the other way. This effectively "averages out" the truncation error across many weights.
The study primarily used a Convolutional Neural Network (CNN) framework implemented in Theano, featuring two convolutional/pooling layers followed by a dense layer, tested primarily on the MNIST dataset.
Key Insights and Results
The 12-Bit Precision Threshold
For the specific MNIST architecture tested, 12 bits acted as a hard threshold or "cliff." As illustrated in Figure 1, at 10 bits or lower, the network failed to exceed 40% accuracy; at 12 bits or higher, it successfully climbed to 80%+ accuracy.
Layer Depth vs. Precision
There is a direct trade-off between network depth and numerical stability. Because round-off error accumulates as data passes through each layer, deeper networks are significantly more sensitive to bit-truncation. Experimental results shown in Figure 2 demonstrate that while shallower networks converge at 16-bit precision, a 5-layer dense network fails to train entirely.
Rounding and Convergence
Stochastic rounding improved the rate of convergence by approximately 25% compared to simple truncation. By preventing a systematic downward bias in weight values, it allows the network to converge at lower bit sizes. Additionally, larger batch sizes were found to lead to slower convergence in low-precision settings because the network performs more operations per layer, allowing more error to accumulate before an update.
Theoretical Error Scaling
Theoretical analysis suggests that error scales linearly with weight matrix dimensions during forward propagation. The authors conclude that forward propagation error actually dominates the sensitivity of reduced precision, rather than backpropagation.
Limitations and Future Work
The conclusions are largely based on MNIST, and the 12-bit "turning point" did not generalize to the more complex CIFAR-10 dataset. Furthermore, the study emulated low precision on 32-bit hardware via "truncation by batch" rather than simulating hardware that performs basic operations natively in low precision. Future work is needed to see if these linear error-scaling rules hold for modern architectures like ResNets or Transformers.
Summary updated