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

Cluster Regularized Quantization for Deep Networks Compression

Yiming Hu, Jianquan Li, Xianlei Long, Shenhua Hu, Jiagang Zhu, Xingang Wang, Qingyi Gu

TL;DR

Cluster Regularized Quantization (CRQ) is a new method for compressing deep neural networks by nudging weights toward ternary values (specifically $-\alpha$, $0$, and $+\alpha$) during the training process. By adding a specialized "cluster regularization" term to the loss function, the authors achieve a smoother transition from full-precision to low-bit models, often outperforming existing quantization techniques and sometimes even surpassing the accuracy of the original full-precision models.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are notoriously "heavy," requiring significant memory and computational power, which makes deploying them on mobile or embedded devices (like FPGAs) difficult. Quantization—reducing the precision of weights from 32-bit floats to just a few bits—is a popular solution.

However, the authors identify a major flaw in current methods like XNOR-Net or Ternary Weight Networks (TWN). These methods typically try to minimize the "reconstruction error" (the mathematical distance between the original weights and the quantized ones). The problem is that a small change in weight values can sometimes lead to a massive jump in the actual classification loss. Simply "cutting" or "snapping" weights to the nearest allowed value causes a "disturbance" that hurts accuracy.

Methods

The authors propose Cluster Regularized Quantization (CRQ). Instead of quantizing as a post-processing step or a hard projection, they treat quantization as a regularization problem during the re-training phase.

  1. The Cluster Regularization Term: They introduce a new term, $J(Z, \alpha)$, into the standard loss function. This term measures how far the current full-precision weights are from three "cluster centers": $\{-\alpha, 0, +\alpha\}$.
  2. Alternating Optimization: To minimize this new loss, they use an alternating strategy:
  3. Fix $\alpha$, solve for $Z$: They determine which of the three values each weight is currently closest to.
  4. Fix $Z$, solve for $\alpha$: They calculate the optimal scaling factor ($\alpha$) based on the current weight distribution.
  5. Smooth Transition: Because this term is part of the SGD (Stochastic Gradient Descent) update, the weights "naturally concentrate" around the target ternary values over time. This creates a "smooth transition" rather than a sudden, lossy jump to low precision.
  6. Fine-tuning: After the weights have clustered, they perform a final round of quantization and fine-tuning to lock in the performance.

Datasets

The researchers evaluated CRQ on two gold-standard computer vision benchmarks:

  • ImageNet (ILSVRC-12): Used to test AlexNet and ResNet-18.
  • CIFAR-10: Used to test smaller ResNet variants (ResNet-20, 32, and 44).

Key Insights and Ideas

  • Regularization over Reconstruction: The biggest "aha" moment is that explicitly regularizing weights to want to be ternary is more effective than forcing them to be ternary after the fact. It allows the network to adapt its internal logic to the constraints of low precision.
  • The "Free Lunch" of Regularization: In several tests, the CRQ ternary model actually performed better than the full-precision reference model. This suggests that the cluster regularization acts as a form of "weight decay" or noise reduction that prevents overfitting.
  • Faster Convergence: The paper shows that CRQ reaches high accuracy in fewer training epochs compared to other ternary methods like TWN or TTQ, and its training curve is significantly "smoother" (less volatile).

Key Results

  • AlexNet on ImageNet: CRQ achieved a 42.02% Top-1 error, which is 0.75% better than the full-precision reference model and significantly better than TWN (45.50%).
  • ResNet-18 on ImageNet: CRQ reached a 32.88% Top-1 error, outperforming both TWN and TTQ (Trained Ternary Quantization) by roughly 1-2%.
  • ResNet-44 on CIFAR-10: The ternary CRQ model achieved a 6.95% error rate, beating the full-precision model's 7.21%.
  • Efficiency: By reducing weights to ternary values, the model size is drastically reduced, and the complex multiplications usually required for inference can be replaced with simpler additions and subtractions.

Limitations and Future Work

While the results are impressive, the paper leaves a few stones unturned:

  • Bit-Width Flexibility: The study focuses almost exclusively on ternary quantization (log2(3) bits). It is unclear how well this specific clustering logic scales to 2-bit (4 values) or 4-bit (16 values) quantization.
  • Hardware Implementation: While the authors mention that ternary values are great for FPGAs, they do not provide benchmarks for actual power consumption or latency on specific hardware targets.
  • Hyperparameter Sensitivity: The method introduces a balancing coefficient ($\lambda$). While the authors used 0.001 for their tests, the paper doesn't deeply explore how sensitive the model is to changes in this value across different architectures.

Summary updated

BibTeX
@inproceedings{hu2019cluster,
  author = {Yiming Hu and Jianquan Li and Xianlei Long and Shenhua Hu and Jiagang Zhu and Xingang Wang and Qingyi Gu},
  title = {{Cluster Regularized Quantization for Deep Networks Compression}},
  booktitle = {ICIP},
  year = {2019},
  url = {https://openreview.net/forum?id=NFeHWgnXbEf},
}
Figure