Introduction
Deploying deep learning models in real-world scenarios presents a dual challenge: maintaining robustness against domain shifts (e.g., varying weather conditions for autonomous vehicles) and ensuring efficiency for low-power edge devices. While techniques like Sharpness-Aware Minimization (SAM) improve generalization by finding flat minima in the loss landscape, they are typically designed for full-precision training. Applying these methods to Quantization-Aware Training (QAT) often leads to significant performance degradation, sometimes as high as 28%.
The Gradient Tug-of-War
The primary cause of this collapse is a conflict between two competing objectives: the Task Loss, which aims for accuracy, and the Smoothness Loss, which seeks a flat minimum. In low-precision regimes (e.g., 3-bit or 4-bit), the learnable scaling factors—parameters that map floating-point weights to discrete integers—become highly sensitive.
As shown in the figure above, the gradients from these two objectives often point in opposite directions, creating a "tug-of-war" that traps the scaling factors in sub-optimal states, preventing the model from achieving the desired flatness and robustness.
Methodology: GAQAT
To resolve this conflict, researchers from Tsinghua University and CUHK proposed GAQAT (Gradient-Adaptive Quantization-Aware Training). The framework introduces a "selective freezing" strategy based on a novel metric called Gradient Disorder ($\delta$).
The GAQAT process involves two main components:
- Gradient Disorder Metric: This metric quantifies the inconsistency or conflict between gradient directions. High disorder indicates that the scaling factor is caught in an oscillatory or stuck state due to competing losses.
- Dynamic Selective Freezing: Every $K$ training steps, GAQAT evaluates the gradient disorder for each layer. If a conflict is detected, the algorithm dynamically freezes the task-related gradient ($g_{task}$) for that layer's scaling factor. This allows the smoothness gradient ($g_{smooth}$) to guide the model toward a flatter minimum without interference.
Experimental Results
GAQAT was evaluated on the PACS and DomainNet benchmarks, demonstrating superior performance across various bit-widths:
- PACS: At 4-bit precision, GAQAT achieved 61.33% accuracy, outperforming standard QAT (LSQ) by 2.3% and naive DG+QAT integration by 4.4%.
- DomainNet: GAQAT reached 40.74% accuracy at 4-bit, nearly matching the full-precision model's performance of 40.95%.
- 3-Bit Efficiency: The framework maintained robustness even under extreme 3-bit compression, significantly outperforming baselines.
Conclusion
GAQAT effectively bridges the gap between model robustness and edge efficiency. By identifying and mitigating gradient conflicts through dynamic selective freezing, it enables the deployment of highly robust, low-precision models on resource-constrained devices. Future work may explore conflicts with other smoothing objectives and the relationship between specific domain characteristics and scaling factor behavior.
Summary updated