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

Compressing Deep Convolutional Networks using Vector Quantization

Yunchao Gong, Liu Liu, Ming Yang, Lubomir D. BourdevarXiv 2014

Abstract

Deep Convolutional Neural Networks (CNNs) have achieved state-of-the-art performance in computer vision but require significant storage, often exceeding 200MB. This paper investigates vector quantization (VQ) methods to compress the memory-intensive dense layers. Results show that Product Quantization (PQ) can reduce storage requirements by 16–24x with only a ~1% loss in accuracy, facilitating deployment on mobile and embedded devices.

Introduction

The deployment of high-performance CNNs on mobile devices is hindered by their massive parameter counts. A typical model can easily exceed 200MB, creating hurdles for mobile app stores with download limits (e.g., 20MB at the time of publication). The authors observe a lopsided distribution in CNN resource usage: convolutional layers account for ~90% of computation time but little storage, while dense (fully connected) layers account for ~90% of storage but little computation. To address this, the authors propose using vector quantization to exploit the redundancy in dense layers, shrinking the model size without significantly compromising predictive power.

Methodology

The researchers evaluated several quantization strategies, moving beyond traditional matrix factorization like Singular Value Decomposition (SVD). While SVD is effective for speeding up computation, it is sub-optimal for storage as it requires storing two smaller matrices of floating-point numbers. In contrast, VQ is more efficient because it stores small integer indices and a tiny lookup table (codebook).

The primary focus was Product Quantization (PQ), where the weight matrix is divided into sub-vectors, each quantized into a cluster center. This method captures local dependencies between weights better than scalar quantization. Other methods tested included:

  • Binarization: Weights are reduced to ±1, offering 32x compression but often resulting in significant accuracy loss.
  • Scalar Quantization: Individual weight values are clustered into $k$ centers using k-means.
  • Residual Quantization (RQ): An iterative approach that quantizes the weights, calculates the residual error, and then quantizes that error to refine the approximation.

Experimental Results

The methods were tested on the ILSVRC2012 (ImageNet) dataset for classification and the Holidays dataset for image retrieval to ensure the compressed features generalized well.

Comparison of PQ compression with aligned segment size for accuracy@1.

As shown in Figure 1, the classification error increases as the compression rate rises or segment size increases. The study found that dense layers are highly over-parameterized; on ImageNet, a 16–24x compression of dense layers resulted in only a ~1% drop in top-5 accuracy. This reduces a 200MB model to approximately 10MB, fitting within standard mobile deployment limits.

A key insight was the "sweet spot" for the number of clusters. While using more clusters ($k=16$ or higher) can improve precision, the size of the codebook itself starts to eat into compression gains. The authors found that using 8 centers ($k=8$, or 3 bits per segment) often provided the optimal balance. Furthermore, the compressed models performed robustly on the Holidays dataset, proving that the network learns generalized features rather than just memorizing labels.

Conclusion

Vector quantization, particularly Product Quantization, provides a robust framework for compressing large-scale CNNs for storage. While these techniques target storage rather than inference speed—as weights must be decompressed via lookup tables during execution—they are essential for bringing advanced vision models to resource-constrained environments. Future research may extend these methods to convolutional layers and explore hardware-level optimizations for direct computation on quantized weights without explicit decompression.

Summary updated

BibTeX
@misc{gong2014compressing,
  author = {Yunchao Gong and Liu Liu and Ming Yang and Lubomir D. Bourdev},
  title = {{Compressing Deep Convolutional Networks using Vector Quantization}},
  year = {2014},
  eprint = {1412.6115},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1412.6115},
}
Figure