Learning from Loss Landscape: Generalizable Mixed-Precision Quantization via Adaptive Sharpness-Aware Gradient Aligning
Lianbo Ma, Jianlun Ma, Yuee Zhou, Guoyang Xie, Qiang He, Zhichao Lu
TL;DR
This work tackles the high search cost of mixed-precision quantization (MPQ) by learning transferable MPQ policies on small proxy datasets and generalizing them to large-scale targets. It introduces Adaptive Sharpness-Aware Gradient Aligning (ASGA), which combines sharpness-aware minimization, implicit gradient alignment, and an adaptive perturbation radius to produce flatter loss landscapes and better cross-domain generalization. The authors provide theoretical guarantees for generalization and convergence and demonstrate that proxy-based MPQ policy search achieves ImageNet-equivalent accuracy with up to 150% faster search and strong results on ImageNet and VOC across multiple architectures. By exploiting loss landscape information for transferability, the approach reduces MPQ search cost while maintaining or improving accuracy, enabling more practical deployment on diverse hardware and datasets.
Abstract
Mixed Precision Quantization (MPQ) has become an essential technique for optimizing neural network by determining the optimal bitwidth per layer. Existing MPQ methods, however, face a major hurdle: they require a computationally expensive search for quantization policies on large-scale datasets. To resolve this issue, we introduce a novel approach that first searches for quantization policies on small datasets and then generalizes them to large-scale datasets. This approach simplifies the process, eliminating the need for large-scale quantization fine-tuning and only necessitating model weight adjustment. Our method is characterized by three key techniques: sharpness-aware minimization for enhanced quantization generalization, implicit gradient direction alignment to handle gradient conflicts among different optimization objectives, and an adaptive perturbation radius to accelerate optimization. Both theoretical analysis and experimental results validate our approach. Using the CIFAR10 dataset (just 0.5\% the size of ImageNet training data) for MPQ policy search, we achieved equivalent accuracy on ImageNet with a significantly lower computational cost, while improving efficiency by up to 150% over the baselines.
