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

Focused Quantization for Sparse CNNs

Yiren Zhao, Xitong Gao, Daniel Bates, Robert D. Mullins, Cheng-Zhong Xu · DOI

Abstract

Deep convolutional neural networks (CNNs) are powerful tools for a wide range of vision tasks, but the enormous amount of memory and compute resources required by CNNs pose a challenge in deploying them on constrained devices. Existing compression techniques, while excelling at reducing model sizes, struggle to be computationally friendly. In this paper, we attend to the statistical properties of sparse CNNs and present focused quantization, a novel quantization strategy based on power-of-two values, which exploits the weight distributions after fine-grained pruning. The proposed method dynamically discovers the most effective numerical representation for weights in layers with varying sparsities, significantly reducing model sizes. Multiplications in quantized CNNs are replaced with much cheaper bit-shift operations for efficient inference. Coupled with lossless encoding, we built a compression pipeline that provides CNNs with high compression ratios (CR), low computation cost and minimal loss in accuracy. In ResNet-50, we achieved a 18.08x CR with only 0.24% loss in top-5 accuracy, outperforming existing compression methods. We fully compressed a ResNet-18 and found that it is not only higher in CR and top-5 accuracy, but also more hardware efficient as it requires fewer logic gates to implement when compared to other state-of-the-art quantization methods assuming the same throughput.

Introduction

Deep Convolutional Neural Networks (CNNs) have revolutionized computer vision but remain notoriously resource-heavy, complicating deployment on "edge" devices like smartphones or IoT sensors. To mitigate this, researchers typically employ Pruning (removing redundant connections) and Quantization (reducing numerical precision). However, these techniques often conflict. Heavy pruning creates a "holey" weight distribution where values cluster away from zero. Standard quantization methods, designed for dense distributions centered at zero, waste precision on these empty regions, leading to accuracy loss or hardware inefficiency.

The Statistical Gap in Sparse CNNs

Pruning fundamentally alters the weight distribution of a network. While dense layers typically exhibit a Gaussian-like distribution centered at zero, sparse layers—after fine-grained pruning—often show a bimodal distribution where weights are pushed away from the origin. This creates a statistical "gap" that standard linear or shift quantization fails to exploit efficiently.

Comparison of weight distributions in dense vs. sparse layers and the resulting quantization levels.

Focused Quantization (FQ) Methodology

Focused Quantization (FQ) treats quantization as a distribution-matching problem. The core innovation is the "Focus" mechanism, which ensures bit-levels are concentrated where weights actually reside. The pipeline consists of:

  1. Fine-Grained Pruning: Utilizing Dynamic Network Surgery to create a sparse model.
  2. Recentralized Quantization: FQ fits a Gaussian Mixture Model (GMM) to the weights of each layer using an Expectation-Maximization (EM) algorithm. This identifies two high-probability regions (peaks) where weights are concentrated.
  3. Focusing and Shifting: Weights are "recentralized" based on these peaks and quantized to powers-of-two. This allows the hardware to replace expensive multiplications with simple, energy-efficient bit-shift operations.
  4. Wasserstein Separation: To maintain efficiency, the system uses the 2-Wasserstein distance to measure cluster distinctness. If clusters overlap significantly, it defaults to standard shift quantization to save bits.
Illustration of the represented values and the focus mechanism clustering weights into two distinct regions.

Key Results and Hardware Efficiency

The FQ pipeline, finalized with Huffman encoding, achieves state-of-the-art compression ratios with minimal accuracy impact on the ImageNet dataset:

  • ResNet-50: Achieved an 18.08× compression ratio with only a 0.24% drop in top-5 accuracy.
  • ResNet-18: Compressed by 16.33× with a negligible 0.22% drop in top-5 accuracy.
  • MobileNet-V2: Even on this optimized architecture, FQ achieved an 8.14× compression ratio, reducing the model to just 1.71 MB.

Beyond storage, FQ offers significant hardware advantages. By forcing weights to be powers-of-two, inference relies on bit-shifting rather than multiplication. In custom hardware simulations, FQ required fewer logic gates than competitors like ABC-Net and LQ-Net for the same throughput, as it avoids the complex multi-binary accumulation required by other low-bit methods.

Conclusion

Focused Quantization successfully bridges the gap between pruning and quantization by adapting to the unique statistical properties of sparse networks. While it introduces some training overhead due to the EM-based fine-tuning stage, the resulting models are exceptionally hardware-friendly. Future work may involve fusing scaling factors into Batch Normalization layers to further streamline the inference process on custom ASICs and FPGAs.

Summary updated

BibTeX
@inproceedings{zhao2019focused,
  author = {Yiren Zhao and Xitong Gao and Daniel Bates and Robert D. Mullins and Cheng-Zhong Xu},
  title = {{Focused Quantization for Sparse CNNs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  doi = {10.17863/cam.51914},
}
Figure