Abstract
Low precision deep neural network (DNN) training is one of the most effective techniques for boosting DNNs' training efficiency, as it trims down the training cost from the finest bit level. While existing works mostly fix the model precision during the whole training process, a few pioneering works have shown that dynamic precision schedules help DNNs converge to a better accuracy while leading to a lower training cost than their static precision training counterparts. However, existing dynamic low precision training methods rely on manually designed precision schedules to achieve advantageous efficiency and accuracy trade-offs, limiting their more comprehensive practical applications and achievable performance. To this end, we propose LDP, a Learnable Dynamic Precision DNN training framework that can automatically learn a temporally and spatially dynamic precision schedule during training towards optimal accuracy and efficiency trade-offs. It is worth noting that LDP-trained DNNs are by nature efficient during inference. Furthermore, we visualize the resulting temporal and spatial precision schedule and distribution of LDP trained DNNs on different tasks to better understand the corresponding DNNs' characteristics at different training stages and DNN layers both during and after training, drawing insights for promoting further innovations. Extensive experiments and ablation studies (seven networks, five datasets, and three tasks) show that the proposed LDP consistently outperforms state-of-the-art (SOTA) low precision DNN training techniques in terms of training efficiency and achieved accuracy trade-offs. For example, in addition to having the advantage of being automated, our LDP achieves a 0.31% higher accuracy with a 39.1% lower computational cost when training ResNet-20 on CIFAR-10 as compared with the best SOTA method.
Introduction
Training modern Deep Neural Networks (DNNs) is computationally expensive and energy-intensive. Low-precision training, where weights and activations are represented using fewer bits (e.g., 4-bit or 8-bit), is a common solution. However, most existing methods use a "static" approach—fixing the precision for the entire training process—or rely on manually designed "dynamic" schedules. These manual schedules are difficult to tune, layer-agnostic, and rarely generalize across different model architectures or tasks.
LDP (Learnable Dynamic Precision) addresses these limitations by automatically learning a temporally and spatially dynamic precision schedule during training. By treating precision as a differentiable parameter, LDP optimizes for both accuracy and efficiency simultaneously, replacing human guesswork with an automated system.
Methods
The core innovation of LDP is making the precision of each layer differentiable, allowing the model to "learn" its own bit-width schedule via backpropagation.
- Learnable Quantization Step: Instead of picking a bit-width directly, LDP introduces a continuous learnable parameter ($\beta^l$) for each layer. This parameter controls the quantization step size ($s^l$), making the precision settings updateable just like weights.
- Dual-Objective Loss Function: The training objective balances Task Loss ($L_{task}$) for accuracy and Cost Loss ($L_{cost}$) to penalize computational costs (measured in BitOPs) exceeding a target budget ($T$).
- Gradient Balancing: A balancing factor ($\alpha$) normalizes the gradients to ensure training remains stable even as the model aggressively adjusts its own precision.
Key Results
The authors evaluated LDP across a diverse range of tasks including image classification (CIFAR, ImageNet), super-resolution, and language modeling. LDP consistently outperformed state-of-the-art (SOTA) methods like SBM, PFQ, and CPT.
- Efficiency vs. Accuracy: On ResNet-20 (CIFAR-10), LDP achieved 0.31% higher accuracy while using 39.1% less computational cost than the best SOTA method.
- Inference Speedup: Because LDP optimizes for efficiency during training, the final model is naturally optimized for low-precision inference. For ResNet-74, LDP reduced the inference cost by 49.8% compared to standard low-precision baselines.
- Scalability: On ImageNet, LDP reduced the training cost of DeiT-Tiny by 10.6% and inference cost by 30.2% while maintaining accuracy.
Discussion and Insights
LDP reveals that "not all layers are created equal." The model automatically discovered that some layers require high precision only at the start of training, while others (typically deeper layers) need higher precision later to refine complex abstractions. Notably, LDP learned to assign significantly higher precision to downsampling layers, identifying them as critical "bottlenecks" for information flow.
While LDP removes the need to tune bit-schedules, it introduces a target budget parameter ($T$). Furthermore, realizing these theoretical BitOP speedups in the real world requires hardware that supports flexible, mixed-precision arithmetic. Future work may explore even finer-grained precision (e.g., channel-wise) to squeeze out even more efficiency.
Summary updated