[Paper Review] Neural gradients are lognormally distributed: understanding sparse and quantized training.
This paper reveals that neural gradients follow a lognormal distribution, enabling two novel compression techniques: stochastic gradient pruning (achieving up to 85% sparsity without accuracy drop on ResNet18/ImageNet) and optimized low-precision floating-point formats (e.g., FP8), which improve training efficiency by reducing memory and computation overhead while explaining prior observations on numerical precision and scaling.
Neural gradient compression remains a main bottleneck in improving training efficiency, as most existing neural network compression methods (e.g., pruning or quantization) focus on weights, activations, and weight gradients. However, these methods are not suitable for compressing neural gradients, which have a very different distribution. Specifically, we find that the neural gradients follow a lognormal distribution. Taking this into account, we suggest two methods to reduce the computational and memory burdens of neural gradients. The first one is stochastic gradient pruning, which can accurately set the sparsity level -- up to 85% gradient sparsity without hurting validation accuracy (ResNet18 on ImageNet). The second method determines the floating-point format for low numerical precision gradients (e.g., FP8). Our results shed light on previous findings related to local scaling, the optimal bit-allocation for the mantissa and exponent, and challenging workloads for which low-precision floating-point arithmetic has reported to fail. Reference implementation accompanies the paper.
Motivation & Objective
- To address the inefficiency of existing compression methods that focus on weights and activations but overlook gradients, which have unique statistical properties.
- To understand the underlying distribution of neural gradients, which has been overlooked in prior compression research.
- To develop practical gradient compression techniques that reduce memory and computational costs during deep learning training.
- To explain long-standing observations in low-precision training, such as the need for local scaling and optimal bit allocation in mantissa and exponent.
Proposed method
- Identify the lognormal distribution of neural gradients through empirical analysis across multiple models and datasets.
- Propose stochastic gradient pruning that leverages the lognormal tail behavior to set sparsity levels accurately, up to 85% without accuracy degradation.
- Design a floating-point format selection strategy based on the lognormal distribution to optimize bit allocation between exponent and mantissa for low-precision gradients (e.g., FP8).
- Use the lognormal model to derive optimal scaling factors and numerical ranges for gradient representations, improving stability in low-precision training.
- Validate the methods on ResNet18 with ImageNet, demonstrating robustness across different sparsity and precision levels.
Experimental results
Research questions
- RQ1Why do existing gradient compression methods fail to achieve high sparsity or low precision without accuracy drops?
- RQ2What statistical distribution underlies the magnitude of neural gradients during backpropagation?
- RQ3How can gradient sparsity be controlled precisely without degrading model performance?
- RQ4What is the optimal bit allocation between exponent and mantissa for low-precision gradient representations?
- RQ5How do the findings explain the success of local scaling and failure of low-precision arithmetic in certain workloads?
Key findings
- Neural gradients are empirically shown to follow a lognormal distribution across multiple deep learning models and datasets.
- Stochastic gradient pruning achieves up to 85% sparsity in gradients without compromising validation accuracy on ResNet18 trained on ImageNet.
- The lognormal distribution enables precise control over gradient sparsity, allowing systematic exploration of compression levels.
- Optimal low-precision formats such as FP8 can be derived using the lognormal model, improving numerical stability and efficiency.
- The findings explain why local scaling is necessary in low-precision training and clarify the sensitivity of certain workloads to precision loss.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.