Abstract
Deep neural networks are increasingly deployed on resource-constrained devices, necessitating efficient compression techniques like quantization. However, standard quantization requires access to original training data for calibration, which is often restricted due to privacy concerns. This paper presents Generative Zero-shot Network Quantization (GZNQ), a novel framework that synthesizes high-quality calibration data by inverting the statistics stored in Batch Normalization (BN) layers. By employing an ensemble of compressed models as a pseudo-label generator and a distribution matching loss, GZNQ achieves state-of-the-art performance in 4-bit quantization without any real data.
Introduction
The computational and memory demands of modern deep learning models hinder their deployment in edge computing environments. Quantization—reducing precision from 32-bit floating point to low-bit integers—is a primary solution. The challenge arises in "zero-shot" scenarios where the original training set is unavailable. Existing data-free methods often produce low-quality synthetic images that fail to capture the complex distribution of the original data, leading to significant accuracy degradation at aggressive bit-widths (e.g., 4-bit). GZNQ addresses this by treating data synthesis as a generative modeling task guided by the network's internal priors.
Methodology
GZNQ operates in two distinct stages: high-quality data synthesis followed by training-aware quantization.
1. Generative Modeling of BN Statistics
The core idea is that Batch Normalization layers act as "data reservoirs," storing the mean and variance of the training distribution. GZNQ introduces a Distribution Matching Loss ($L_{DM}$) derived from maximum likelihood estimation. Instead of matching statistics as point estimates, it treats synthetic images as parameters optimized to align their feature distributions with the priors captured in the pre-trained model's BN layers.
2. Ensemble Pseudo-label Generator
To improve the diversity and difficulty of synthetic images, GZNQ utilizes an ensemble of differently compressed versions of the original model (quantized, pruned, and low-rank). This ensemble provides a robust "voting" mechanism for generating pseudo-labels, preventing the generator from overfitting to the artifacts of a single compressed architecture.
3. Channel Gating
To further enhance semantic meaningfulness, a learnable binary gating mask is applied to the final convolutional layer using the Gumbel-Softmax trick. This encourages the model to focus on category-specific features, reducing neural redundancy in the synthetic output.
Experimental Results
GZNQ was evaluated on CIFAR-10/100 and ImageNet (ILSVRC 2012). The method demonstrates a significant leap over previous state-of-the-art (SOTA) methods like ZeroQ and GDFQ.
On the challenging ImageNet benchmark using a ResNet-18 model quantized to 4-bit (both weights and activations), GZNQ achieved 64.5% Top-1 accuracy. In contrast, ZeroQ only reached 26.0%. Furthermore, the visual quality of GZNQ's synthetic images is remarkably high, achieving an Inception Score (IS) of 84.7, compared to DeepInversion's 60.6 and ZeroQ's 2.8.
Discussion and Insights
The success of GZNQ highlights that BN layers are more than just normalization tools; they are compressed representations of the training data. By leveraging an ensemble of models, the framework ensures that the synthesized data is robust across different network perturbations. This "Images as Parameters" approach allows for backpropagation directly into pixel space, bypassing the need for a separate GAN-based generator.
Conclusion
Generative Zero-shot Network Quantization provides a robust path for deploying highly compressed models in data-sensitive environments. While the optimization-based synthesis introduces some computational overhead, the gains in accuracy and visual fidelity at low bit-widths are substantial. Future work may involve extending these statistical matching techniques to non-BN architectures like Vision Transformers.
Summary updated