Mr.BiQ: Post-Training Non-Uniform Quantization based on Minimizing the Reconstruction Error

Yongkweon Jeon, Chungman Lee, Eulrang Cho, Yeonju Ro

Introduction

The deployment of large-scale neural networks, particularly Transformers and deep CNNs, on resource-constrained edge devices necessitates aggressive model compression. Quantization, which reduces the precision of weights and activations, is a standard approach. While Quantization-Aware Training (QAT) maintains high accuracy, its computational cost and requirement for full datasets often make it impractical. Post-Training Quantization (PTQ) offers a faster alternative using minimal calibration data but typically suffers significant accuracy degradation at ultra-low bit-widths (e.g., 2-bit).

Mr.BiQ addresses this by introducing a non-uniform quantization framework specifically designed to handle the sensitive weight distributions of modern architectures. By optimizing for reconstruction error rather than simple weight approximation, Mr.BiQ enables high-performance 2-bit quantization for both vision and language models.

Methodology: Multi-level Binarization

The core of Mr.BiQ is Multi-level Binarization (BiQ). Instead of a linear integer grid, weights are represented as a weighted sum of binary bases: $w \approx \sum_{i=1}^{q} \alpha_i b_i$, where $\alpha_i$ are scaling factors and $b_i \in \{-1, 1\}^n$ are binary codes.

Bottom-Up Optimization

Unlike traditional PTQ methods that follow a "top-down" approach—starting with full-precision weights and projecting them onto a quantized grid—Mr.BiQ adopts a bottom-up strategy. It treats the scaling factors and binary codes as primary learnable parameters, optimizing them directly to minimize the output discrepancy of network blocks.

Comparison of Top-down and Bottom-up quantization approaches.

Softbit Reformulation

A major challenge in optimizing binary codes is their discrete nature, which prevents standard gradient-based optimization. Mr.BiQ overcomes this via Softbit Reformulation. By introducing a continuous "softbit" variable ($sb \in [0, 1]$) as a proxy for the discrete bits, the framework allows gradients to flow through the quantization process. This enables the simultaneous optimization of scaling factors and bit assignments.

The softbit reformulation allows for differentiable optimization of non-uniform quantization levels.

Reconstruction Error Minimization

Mr.BiQ minimizes the squared error between the activations of the original (teacher) block and the quantized (student) block. This "knowledge distillation" objective ensures that the functional behavior of the model is preserved, even under extreme compression.

Experimental Results

The framework was evaluated using only 1,000 unlabeled calibration samples across diverse benchmarks:

  • Computer Vision: On ImageNet, Mr.BiQ achieved a 5.35 percentage point (p.p.) accuracy improvement over the state-of-the-art BRECQ method for 2-bit RegNetX-3.2GF. For Vision Transformers (DeiT-S), it improved 2-bit performance by 4.23 p.p.
  • Natural Language Processing: In NLP tasks, Mr.BiQ demonstrated remarkable robustness. On the SQuAD 1.1 benchmark for DistilBERT, it outperformed existing PTQ methods by 3.37 F1 points. Notably, on some GLUE tasks like MRPC, the quantized model slightly outperformed the full-precision baseline, suggesting a beneficial regularization effect.

Conclusion

Mr.BiQ demonstrates that PTQ can achieve near-QAT performance at ultra-low bit-widths by leveraging non-uniform multi-level binarization and differentiable softbit optimization. This framework paves the way for deploying state-of-the-art Transformers and CNNs on edge hardware with 16x theoretical memory reduction compared to standard 32-bit floats. Future work will focus on hardware-efficient kernels and extending non-uniformity to activation quantization.

Summary updated

BibTeX
@inproceedings{jeon2022mr,
  author = {Yongkweon Jeon and Chungman Lee and Eulrang Cho and Yeonju Ro},
  title = {{Mr.BiQ: Post-Training Non-Uniform Quantization based on Minimizing the Reconstruction Error}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.01201},
}
Figure