Abstract
Data-Free Quantization (DFQ) has emerged as a critical technique for deploying Deep Neural Networks on resource-constrained edge devices without compromising data privacy. However, traditional DFQ methods often suffer from a "blind generator" problem, where synthetic data is generated based solely on the teacher model, ignoring the specific learning needs of the quantized student. This paper introduces AdaSG (Adaptability-aware Sample Generation), a novel framework that reformulates DFQ as a competitive zero-sum game. By optimizing a generator to exploit the weaknesses of the quantized network, AdaSG achieves significant accuracy improvements, particularly in ultra-low-bit (3-bit) scenarios where conventional methods often fail to converge.
1. Introduction
Quantization is a fundamental technique for model compression, reducing the precision of weights and activations (e.g., from 32-bit floating point to 3-bit integers) to minimize memory footprint and latency. In many real-world scenarios, the original training data is inaccessible due to privacy regulations or security concerns, necessitating Data-Free Quantization (DFQ).
Standard DFQ approaches typically employ a generator to produce synthetic samples that mimic the distribution of the original data by matching the statistics of a pre-trained full-precision teacher model. However, these generators are often decoupled from the quantized student model. This lack of feedback results in synthetic data that may be redundant or irrelevant to the student's current errors. AdaSG addresses this by treating the generator and the quantized model as adversaries in a zero-sum game, ensuring that the generated data is always "adaptability-aware."
2. Methodology: The Zero-Sum Game
AdaSG shifts the DFQ paradigm from passive data generation to an active, competitive process involving two primary players:
2.1 The Generator (G) and Sample Adaptability
The generator's objective is to maximize "sample adaptability." In this context, adaptability refers to the degree of disagreement between the teacher model (P) and the quantized student model (Q). By utilizing information entropy as a metric, the generator identifies the "blind spots" of the quantized model. It specifically targets regions of the input space where the student is most confused or inaccurate compared to the teacher, effectively creating a targeted curriculum of "hard" samples.
2.2 The Quantized Network (Q)
Conversely, the quantized network aims to minimize the disagreement with the teacher. By training on the adversarial samples produced by the generator, the student model is forced to resolve its specific errors and close the performance gap with the full-precision teacher.
2.3 Stability and the Balance Gap (BG)
Training zero-sum games, such as Generative Adversarial Networks (GANs), is notoriously unstable. To prevent the generator from creating samples that are too difficult for the student to learn from, the authors introduce the Balance Gap (BG). The BG acts as a theoretical regulator, ensuring the game remains in a state of equilibrium. Additionally, a Dual-Sample Strategy is employed, where the generator simultaneously produces "disagreement samples" to challenge the model and "agreement samples" to maintain training stability, governed by a hinge loss function.
3. Experimental Results
The effectiveness of AdaSG was evaluated on standard benchmarks, including CIFAR-10, CIFAR-100, and ImageNet (ILSVRC2012), across various architectures such as ResNet and MobileNetV2.
3.1 Performance in Ultra-Low-Bit Scenarios
The most significant contributions of AdaSG are observed at 3-bit precision, a regime where traditional DFQ methods typically experience a sharp drop in accuracy.
- ImageNet (ResNet-18): AdaSG achieved an accuracy of 37.04%, representing a massive improvement over previous state-of-the-art methods like GDFQ (20.23%) and Qimera (1.17%).
- MobileNetV2: While previous methods often failed to converge at 3-bit precision (e.g., GDFQ at 1.46%), AdaSG reached 26.90% accuracy.
- CIFAR-10: AdaSG reached 84.14% accuracy, outperforming existing benchmarks by nearly 10%.
3.2 Qualitative Analysis
Similarity matrix visualizations confirm that AdaSG generates a more diverse and informative set of samples. Unlike traditional methods that tend to produce redundant data, the adversarial nature of AdaSG ensures that the synthetic data continuously evolves to address the remaining weaknesses in the quantized model.
4. Discussion and Limitations
While AdaSG sets a new benchmark for DFQ, it introduces certain trade-offs. The iterative maximization-minimization process inherent in zero-sum games increases computational overhead compared to simpler, one-way generation methods. Furthermore, the framework relies on several hyperparameters (α, β, γ) to balance the adversarial loss, which may require careful tuning across different architectures.
Future work could explore the application of AdaSG to non-convolutional architectures, such as Vision Transformers (ViTs), and investigate automated methods for hyperparameter optimization to improve the framework's generalizability.
5. Conclusion
By rethinking Data-Free Quantization as a zero-sum game, AdaSG overcomes the limitations of "blind" data generation. The introduction of sample adaptability and the Balance Gap allows for the creation of a targeted, adversarial training environment that significantly boosts the performance of quantized models, particularly in the challenging 3-bit precision regime. This approach paves the way for more efficient deployment of high-performance AI on edge hardware.
Summary updated