NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ZeroQ: A Novel Zero Shot Quantization Framework

Yaohui Cai, Zhewei Yao, Zhen Dong, Amir Gholami, Michael W. Mahoney, Kurt Keutzer

Introduction

Deep Neural Networks (NNs) are essential for modern AI tasks but are notoriously resource-intensive, complicating deployment on edge devices like smartphones and IoT sensors. Quantization—reducing weight and activation precision from 32-bit floating point to lower-bit integers (e.g., 8-bit or 4-bit)—is a primary strategy to reduce model size and accelerate inference.

However, standard quantization techniques typically require access to the original training data for recalibration or fine-tuning to prevent significant accuracy loss. In many real-world scenarios, this data is inaccessible due to privacy regulations (e.g., medical records), proprietary concerns, or logistical constraints in Machine Learning as a Service (MLaaS) environments. ZeroQ addresses these challenges by providing a "zero-shot" quantization framework that requires no original training or validation data.

Methodology

ZeroQ introduces a two-stage pipeline to achieve high-accuracy quantization without data access: Distilled Data Generation and Pareto Frontier Optimization.

Distilled Data Generation

Since the original training data is unavailable, ZeroQ "distills" synthetic data directly from the pre-trained model. This process leverages the Batch Normalization (BN) layers, which store the mean and variance statistics of the original training distribution. By optimizing a batch of random noise to match these stored BN statistics, ZeroQ generates synthetic data that effectively mimics the internal activations of the original dataset.

Mixed-Precision and Sensitivity Analysis

Not all layers in a neural network are equally sensitive to quantization. Some layers can be compressed to 4 bits with minimal impact, while others require 8 bits to maintain performance. ZeroQ performs a layer-wise sensitivity analysis using the Distilled Data to quantify the impact of quantization on each layer.

The ZeroQ framework illustrates the sensitivity analysis process, where a layer (e.g., conv8) is quantized and compared against the original model to determine its impact on the final output.

Pareto Frontier for Mixed-Precision Optimization

To find the optimal bit-width for each layer, ZeroQ uses a dynamic programming approach to identify the Pareto frontier. This frontier represents the set of configurations that minimize total accuracy loss (approximated by overall sensitivity) for a given target model size. This allows the framework to automatically allocate more bits to sensitive layers and fewer bits to robust ones, maximizing compression efficiency.

The Pareto frontier shows the trade-off between model size and overall sensitivity. The blue dots represent various mixed-precision configurations, while the red and orange markers highlight optimal configurations for specific size targets.

Experimental Results

The researchers evaluated ZeroQ across diverse architectures and tasks, including ImageNet classification and COCO object detection. Key findings include:

  • Superior Accuracy: On MobileNetV2, ZeroQ achieved 1.71% higher accuracy than previous state-of-the-art zero-shot methods like DFQ. For ResNet50, it reached 75.80% accuracy at a ~12MB model size, even outperforming some methods that utilize training data.
  • Unprecedented Speed: ZeroQ is highly efficient; the entire quantization process for a ResNet50 model (including data distillation and optimization) takes less than 30 seconds on a standard GPU—roughly 0.5% of the time required for a single training epoch.
  • Complex Task Support: ZeroQ is the first zero-shot method to demonstrate strong results on object detection, matching full-precision baselines on the COCO dataset with 8-bit quantization (36.4 mAP).

Conclusion and Future Work

ZeroQ represents a significant advancement in data-free model compression, combining synthetic data distillation with automated mixed-precision optimization. While highly effective for CNNs with Batch Normalization, future work may explore adapting the distillation loss for architectures using different normalization techniques (e.g., LayerNorm in Transformers) and accounting for layer inter-dependencies during sensitivity analysis to further refine the Pareto optimization.

Summary updated

BibTeX
@inproceedings{cai2020zeroq,
  author = {Yaohui Cai and Zhewei Yao and Zhen Dong and Amir Gholami and Michael W. Mahoney and Kurt Keutzer},
  title = {{ZeroQ: A Novel Zero Shot Quantization Framework}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.01318},
}
Figure