Disentangled Loss for Low-Bit Quantization-Aware Training

Thibault Allenet, David Briand, Olivier Bichler, Olivier SentieysWorkshops @ CVPR 2022

Introduction

Deploying deep learning models on edge devices requires aggressive compression to meet memory and power constraints. Quantization—reducing precision from 32-bit floating point to ultra-low bit-widths (e.g., 2-bit or binary)—is a primary strategy. However, this often leads to a significant "quantization tax" in the form of reduced accuracy. This paper introduces DL-QAT (Disentangled Loss Quantization-Aware Training), a method that leverages specialized loss functions to create a feature space robust enough to withstand the noise introduced by low-bit quantization.

The Challenge of Low-Bit Quantization

Standard Quantization-Aware Training (QAT) typically relies on Cross Entropy Loss (CEL). While CEL is effective for classification, it does not explicitly ensure that class features are well-separated in the latent space. When bit-precision is slashed, the resulting rounding errors act as noise, causing features from different classes to overlap and "smear" together, leading to misclassification. The authors argue that for low-bit hardware, the absolute separation of features in the output space is the most critical factor for resilience.

Proposed Method: DL-QAT

The authors propose replacing CEL with "disentangled" loss functions that force the network to learn more organized, distinct feature clusters. Two primary functions are explored:

  1. Additive Margin Softmax (AMS): This adds a "margin" to the decision boundary, forcing the network to push features closer to their class centers and further from the boundaries.
  2. Gaussian Mixture Loss (GML): This treats each class as a Gaussian distribution, explicitly minimizing the distance between a feature and its class mean while maximizing the distance between different class means.

By integrating these losses with Scaled Adjust Training (SAT), the model achieves "disentanglement," where class clusters are tight and widely separated before quantization noise is even applied.

Visualizing Feature Robustness

The impact of these loss functions is most evident when visualizing the feature space using t-SNE plots.

t-SNE visualization of feature spaces under different loss functions.

As shown in the visualizations above, standard CEL (a, b) results in significant cluster spreading and ambiguity when moving from full-precision to 2-bit quantization. In contrast, GML (e, f) maintains highly compact and separated clusters even at 2-bit precision, effectively creating a buffer that absorbs the quantization noise.

Experimental Results

The researchers evaluated DL-QAT across CIFAR-10, CIFAR-100, and ImageNet benchmarks, showing consistent gains in the most aggressive quantization settings.

Performance comparison on CIFAR-10 and CIFAR-100.

The "Better than Full-Precision" Phenomenon

A standout result occurred on the CIFAR-100 dataset. A ResNet-18 model using binary weights and 2-bit activations trained with GML achieved 71.3% accuracy. Remarkably, this outperformed the full-precision (32-bit) baseline trained with standard Cross Entropy, which only reached 66.2%. This suggests that superior loss functions can more than compensate for the information loss inherent in quantization.

Large-Scale Benchmarking

On ImageNet, DL-QAT continued to show gains. In a "Binary Weights / 2-bit Activations" configuration, DL-QAT (GML) achieved 64.0% top-1 accuracy, surpassing the baseline SAT method's 63.1%. Furthermore, the accuracy drop between full-precision and 2-bit models was significantly mitigated; for CIFAR-10, the drop was reduced from 12.9% (CEL) to just 1.7% (GML).

Conclusion

DL-QAT demonstrates that the choice of loss function is critical for low-bit neural network training. By prioritizing feature disentanglement through GML or AMS, researchers can produce quantized models that are not only efficient for edge deployment but also surprisingly resilient—sometimes even exceeding the performance of their high-precision counterparts.

Summary updated

BibTeX
@inproceedings{allenet2022disentangled,
  author = {Thibault Allenet and David Briand and Olivier Bichler and Olivier Sentieys},
  title = {{Disentangled Loss for Low-Bit Quantization-Aware Training}},
  booktitle = {Workshops @ CVPR},
  year = {2022},
  doi = {10.1109/cvprw56347.2022.00315},
}
Figure