Abstract
Model quantization is a critical technique for deploying deep neural networks on resource-constrained edge devices. However, traditional quantization-aware training (QAT) and post-training quantization (PTQ) methods are typically tied to a specific target bit-width. Adjusting precision often requires time-consuming fine-tuning or retraining. This paper introduces "One Model for All Quantization" (OMAQ), a framework that supports diverse bit-widths (from 8-bit down to 1-bit) within a single model. By leveraging wavelet decomposition and reconstruction to enhance weight diversity and employing bit-width-specific batch normalization, OMAQ enables "hot-swappable" precision adjustments at runtime. Experimental results on ImageNet and COCO demonstrate that OMAQ achieves performance comparable to dedicated models, significantly outperforming existing robust quantization methods at ultra-low bit-widths.
The Challenge of Static Quantization
Quantization reduces the precision of a neural network's weights and activations (e.g., from 32-bit floating point to 4-bit integers) to accelerate inference and reduce power consumption. Traditionally, this is a static process: a model trained for 8-bit precision cannot simply be switched to 2-bit without its accuracy collapsing.
Existing "robust quantization" methods attempt to provide flexibility, but they often struggle when pushed to ultra-low bit-widths (1-3 bits). Currently, adapting to changing hardware constraints or battery levels requires a "cold-swap"—pausing the application to load and fine-tune a new model specific to the target precision. OMAQ addresses this by creating a single, flexible model capable of maintaining high performance across the entire bit-width spectrum.
Methodology: Multiscale Quantization
The OMAQ framework relies on a Multiscale Quantization approach characterized by three core components:
- Wavelet-Based Weight Diversity: To bridge the "distribution gap" between high-bit and low-bit requirements, OMAQ uses Discrete Wavelet Transform (DWT). It decomposes weights into low-frequency "coarse" and high-frequency "fine" components. During inference, the model reconstructs these weights using learnable scale factors ($\alpha$) tailored to the active bit-width. This allows the model to dynamically "reshape" its weight distribution.
- Dynamic Quantization Training: The training pipeline involves a "warm-up" phase for Batch Normalization (BN) and quantization parameters, followed by a dynamic training loop. During this loop, the bit-width is randomly adjusted at each step, forcing the shared weights to remain functional across all target precisions.
- Bit-Width Specific BN Layers: Because activation distributions shift dramatically between 8-bit and 1-bit, OMAQ maintains separate BN layers for different bit-width candidates to stabilize feature maps.
Key Insights and Results
The primary innovation of OMAQ is the realization that a single static weight matrix cannot satisfy the divergent needs of high-bit and low-bit quantization. By using wavelets as a generative tool, the authors create bit-width-specific weight distributions from a shared parameter set with negligible memory overhead.
Performance Benchmarks
The authors evaluated OMAQ on ImageNet (classification) and COCO (object detection/segmentation):
- Superior Ultra-Low Bit Accuracy: On ResNet-18 (ImageNet), OMAQ achieved 69.1% Top-1 accuracy at 3-bit, surpassing the previous state-of-the-art "KURE" method by 11.8%. At 2-bit, OMAQ reached 71.9% accuracy on ResNet-50, outperforming "Any-Precision DNNs" by 6.7%.
- Parity with Dedicated Models: Across most bit-widths, the single OMAQ model performed nearly as well as "dedicated" models trained exclusively for one precision.
- Practical Hot-Swapping: The transition between bit-widths takes approximately 1.2 seconds on a standard CPU for ResNet-50, making it viable for real-time application adjustments based on device state.
Conclusion and Future Directions
OMAQ provides a robust solution for deploying flexible, energy-efficient neural networks on edge devices. While the transition to 1-bit (binary) quantization still presents a performance gap compared to higher precisions, the use of wavelet-based reconstruction significantly mitigates this issue. Future work will explore different wavelet bases, such as Daubechies, and aim to further reduce the latency of bit-width adjustments to enable even more seamless hot-swapping.
Summary updated