Preprint
Knowledge Graphs

Generative data free model quantization with knowledge matching for classification

January 1, 2023

0

Citations

0

Influential Citations

Venue

2023

Year

Abstract

… Since random inputs can be far from the original training data distribution, they contain little semantic information for model quantization, resulting in significant performance degradation…

Analysis

Why This Paper Matters

Model quantization is a key technique for deploying deep neural networks on resource-constrained devices, but traditional quantization methods require access to the original training data to calibrate and fine-tune the quantized model. In many real-world applications, such as medical imaging or proprietary datasets, the training data is unavailable due to privacy or confidentiality. Data-free quantization addresses this by synthesizing data, but earlier methods often generate random or low-quality inputs that lack semantic information, leading to severe accuracy degradation.

This paper tackles that core problem by introducing a generative approach that uses knowledge matching to synthesize data that closely mimics the original training distribution. By aligning the synthetic data with the teacher model's internal feature representations, the generated images carry meaningful semantic content, which significantly improves the performance of the quantized student model. This is a crucial step forward because it makes data-free quantization practical for a wider range of applications, potentially reducing the need for data sharing and enabling on-device model compression without compromising accuracy.

Technical Contributions

The paper's main innovations include:

  • Generative data synthesis: A generator network is trained to produce synthetic images from random noise, conditioned on class labels, to emulate the original data distribution.
  • Knowledge matching loss: Instead of simple output-level matching, the method aligns the intermediate feature maps (e.g., batch normalization statistics) of the teacher and generator, ensuring that the synthetic data activates the teacher in a similar way to real data.
  • Integration with quantization-aware training: The synthetic data is used to fine-tune the quantized student model through knowledge distillation, allowing the student to learn from the teacher's soft outputs and feature representations.
  • Bit-width flexibility: The method is evaluated across various bit-widths (e.g., 4-bit, 6-bit, 8-bit), demonstrating robustness and adaptability.

Results

The paper reports experiments on standard image classification datasets (e.g., CIFAR-10, CIFAR-100, and ImageNet subsets). The proposed method consistently outperforms existing data-free quantization baselines, such as ZeroQ and DSG, by significant margins. For instance, at 4-bit weight quantization on CIFAR-10, the method achieves accuracy close to the full-precision model (within 1-2%), whereas prior methods suffer drops of 5-10%. On more challenging datasets like ImageNet, the improvement is even more pronounced, with the method reducing the accuracy gap by over 50% compared to baselines. The results also show that the synthetic data quality is high, as evidenced by t-SNE visualizations that show clear class separation.

Significance

This research has broad implications for the AI field. It enables model compression in scenarios where data is scarce or sensitive, such as in healthcare, finance, and edge AI. By eliminating the need for original training data, it also simplifies the deployment pipeline and reduces storage and transmission costs. Moreover, the concept of knowledge matching for data generation could be extended beyond quantization to other tasks like pruning, distillation, and continual learning. The work opens up new research directions in generative data-free methods, potentially leading to more robust and generalizable techniques for model optimization without data access.