TexQ: Zero-shot Network Quantization with Texture Feature Distribution Calibration

Xinrui Chen, Yizhi Wang, Renao Yan, Yiqing Liu, Tian Guan, Yonghong He

TL;DR

TexQ is a novel zero-shot network quantization (ZSQ) method that significantly boosts the performance of compressed models by closing the "texture gap" in synthetic data. By calibrating synthetic images to match the complex texture distributions of real-world data, TexQ achieves a staggering 12.18% accuracy increase on 3-bit ImageNet models compared to previous state-of-the-art methods.

What Problem Does This Paper Address?

Deep neural networks are notoriously resource-hungry, making them difficult to deploy on edge devices like smartphones. Quantization—the process of converting 32-bit floating-point weights into low-bit integers (like 4-bit or 3-bit)—is a primary solution for model compression.

However, most quantization methods require access to the original training dataset to fine-tune the model. In many industries (medical, legal, or proprietary business), this data is off-limits due to privacy and security concerns. Zero-Shot Quantization (ZSQ) attempts to solve this by using a "generator" to create synthetic images based on the statistics stored within the pre-trained model.

The problem? Conventional synthetic images are "texture-poor." While they might satisfy the model's internal statistics, they lack the rich, diverse textures (edges, ripples, spots) found in real-world images. Since Convolutional Neural Networks (CNNs) are heavily biased toward texture when making decisions, training on these "smooth" synthetic images leads to poor performance, especially at ultra-low bit-widths.

Methods

The authors introduce TexQ, which focuses on Texture Feature Distribution Calibration. Their approach consists of four main stages:

TexQ framework overview showing the calibration center, generator, and mixup knowledge distillation.
  1. Texture Calibration with LAWS Filters: The researchers used LAWS texture energy filters to quantify 16 different texture elements (like "waves," "spots," and "edges"). They discovered that real images typically contain about 9 dominant texture elements, whereas standard synthetic images often contain only one.
  2. Calibration Center Generation: Instead of just asking a generator to "make an image," TexQ first optimizes a specific "calibration image" for each class. From these, they extract Calibration Centers—refined Batch Normalization Statistics (BNS) that specifically capture the preferred texture energy of that class.
  3. Guided Synthesis & Layered Constraints: These calibration centers guide a generator to produce more diverse samples. They also use a "Layered BNS" approach: applying loose constraints on shallow layers (where texture is processed) to allow for more visual variety, and tight constraints on deep layers to ensure the class-specific information remains accurate.
  4. Mixup Knowledge Distillation (MKD): To further diversify the training data, they use a "Mixup" strategy. However, unlike standard Mixup which blends labels, they discard the blended labels (which can be misleading in ZSQ) and instead use the full-precision "teacher" model to guide the quantized "student" model using only the blended images.

Key Insights and Ideas

  • The Texture Bias Proof: The authors conducted an exploratory experiment where they stripped images of color and texture (turning them into binary or edge-only images).
Comparison of top-1 accuracy on original, greyscale, binary, and edge images, demonstrating the model's reliance on texture.

They found that quantized models are far more sensitive to the loss of texture than full-precision models, proving that texture-rich synthetic data is a requirement, not a luxury.

  • Homogeneity is the Enemy: Most ZSQ methods produce very similar-looking images for a single class. By forcing the generator to match a complex texture distribution (the "calibration center"), TexQ breaks this homogeneity, providing the model with a much richer "textbook" to learn from during fine-tuning.
  • Label Discarding in Mixup: A subtle but important insight was that in zero-shot settings, the "mixed" labels generated by standard data augmentation are often inaccurate. By ignoring these labels and relying entirely on Knowledge Distillation (KD) from the teacher model, they avoided "misleading" the quantized model.

Datasets and Key Results

The authors evaluated TexQ on standard computer vision benchmarks, including CIFAR-10/100 and ImageNet (using ResNet-18, MobileNetV2, and ResNet-50). TexQ consistently outperformed existing ZSQ methods (like GDFQ, IntraQ, and AdaDFQ), particularly in the difficult 3-bit (W3A3) category:

  • ImageNet (ResNet-18, 3-bit): TexQ achieved 50.28% top-1 accuracy. The previous best (AdaDFQ) was only 38.10%.
  • ImageNet (ResNet-50, 3-bit): TexQ reached 25.27%, while competitors struggled to even break 18%.
  • CIFAR-10 (ResNet-20, 4-bit): Remarkably, TexQ achieved 92.68% accuracy, which actually surpassed the performance of the model fine-tuned with real data (91.52%). This suggests that the synthetic texture-calibrated data can sometimes be even more "efficient" for quantization than raw real-world samples.

Limitations and Future Work

  • Manual Filter Selection: The method currently relies on LAWS filters, which are hand-designed. The authors suggest that future iterations could involve learning the texture filters to better adapt to different types of data.
  • Modality Constraints: The paper focuses entirely on 2D images. It is currently unclear how well this texture-calibration logic would translate to other modalities like 1D audio signals or 3D point clouds.
  • The 2-bit Wall: While 3-bit performance saw a massive jump, the authors acknowledge that ultra-low bit-widths (1 or 2-bit) remain a significant challenge for zero-shot methods.

Summary updated

BibTeX
@inproceedings{chen2023texq,
  author = {Xinrui Chen and Yizhi Wang and Renao Yan and Yiqing Liu and Tian Guan and Yonghong He},
  title = {{TexQ: Zero-shot Network Quantization with Texture Feature Distribution Calibration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=r8LYNleLf9},
}
Figure