Robustness-Guided Image Synthesis for Data-Free Quantization

Jianhong Bai, Yuchen Yang, Huanpeng Chu, Hualiang Wang, Zuozhu Liu, Ruizhe Chen, Xiaoxuan He, Lianrui Mu, Chengfei Cai, Haoji Hu

Abstract

Data-free quantization (DFQ) is a critical technique for deploying deep learning models on edge devices when original training data is inaccessible due to privacy or security constraints. However, existing DFQ methods often generate synthetic data that lacks semantic richness and diversity, leading to significant accuracy drops in low-bit scenarios. We present Robustness-Guided Image Synthesis (RIS), a framework that improves synthetic data quality by enforcing robustness to input and model perturbations—a characteristic inherent to real-world data. By optimizing for stability and label diversity, RIS achieves state-of-the-art results, notably improving 4-bit ImageNet accuracy by over 10%.

The Challenge of Data-Free Quantization

Quantization reduces model size and latency by converting 32-bit weights to low-precision formats (e.g., 4-bit). Typically, this requires a calibration dataset to mitigate accuracy loss. In sensitive domains like medicine or defense, the original data is often unavailable.

Existing DFQ methods use a generator to synthesize data, but these images often suffer from "low semantics"—they look like colorful noise that happens to trigger a high-confidence prediction. Furthermore, generators often fall into "homogenization," producing nearly identical samples for a given class, which fails to provide the diverse feature set needed for robust quantization.

Methods: Robustness-Guided Image Synthesis (RIS)

The RIS training pipeline involves a generator producing synthetic images $x$ that are subjected to input and weight perturbations to ensure stable teacher and student predictions.

The RIS framework operates on two primary pillars to bridge the gap between synthetic and real-world data distributions:

1. Robustness-Guided Optimization

Real-world images are inherently robust; a slight rotation or a minor change in model weights should not fundamentally alter the model's perception. RIS forces the generator to produce images that maintain consistency under perturbations at two levels:

  • Feature Level: Ensuring internal representations remain stable using cosine distance.
  • Prediction Level: Ensuring the final output distribution remains consistent using $L_1$ distance.

2. Diversity-Aware Synthesis

To combat homogenization, RIS moves away from standard one-hot labels. Instead, it optimizes a set of pre-computed soft labels with minimal correlation. This encourages the generator to explore various "prototypes" within a single class, such as different breeds of dogs or varying backgrounds, providing a more comprehensive training signal for the quantized model.

Key Insights: Stability as a Proxy for Realism

Comparison of the loss landscapes for real-world vs. synthetic images. Real data resides in stable "valleys," while previous synthetic methods produce data on fragile "peaks" that shift drastically under perturbation.

The core intuition behind RIS is that the "smoothness" of the loss landscape serves as a signal for image quality. High-quality, realistic data occupies stable regions of the manifold. By optimizing for robustness, the generator is naturally guided toward creating images that occupy the same stable manifold as real data. This suggests that classification confidence alone is a "trap"; a model can be highly confident about noise, but it will not be robust to perturbations on that noise.

Experimental Results

RIS was evaluated across CIFAR-10, CIFAR-100, and ImageNet using architectures like ResNet and MobileNetV2. Key findings include:

  • Superior Accuracy: On ImageNet (ResNet-50) with 4-bit quantization (W4A4), RIS improved the GDFQ baseline by 10.04%, achieving 62.16% accuracy.
  • Visual Fidelity: Using the Fréchet Inception Distance (FID), RIS achieved a score of 10.4 on CIFAR-10, a massive improvement over GDFQ's 120.91, indicating much higher visual coherence.
  • Plug-and-Play Versatility: RIS consistently improved every baseline method it was integrated with, including AIT and ARC.

Limitations and Future Work

While RIS sets a new benchmark for DFQ, it currently relies on a generator network, adding computational overhead during the synthesis phase. Future research may explore "generator-free" synthesis that applies these robustness principles directly to pixels. Additionally, explicitly modeling out-of-distribution (OOD) data during synthesis could further enhance the resilience of quantized models in real-world deployments.

Summary updated

BibTeX
@inproceedings{bai2024robustness,
  author = {Jianhong Bai and Yuchen Yang and Huanpeng Chu and Hualiang Wang and Zuozhu Liu and Ruizhe Chen and Xiaoxuan He and Lianrui Mu and Chengfei Cai and Haoji Hu},
  title = {{Robustness-Guided Image Synthesis for Data-Free Quantization}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i10.28972},
}
Figure