Learnable Companding Quantization for Accurate Low-Bit Neural Networks

Kohei YamamotoCVPR 2021

Abstract

Learnable Companding Quantization (LCQ) addresses the significant accuracy degradation typically observed in low-bit neural networks. By treating quantization levels as learnable parameters through a piecewise linear "companding" function, LCQ enables models to automatically discover optimal non-linear spacing for weights and activations. This approach effectively matches the bell-shaped distributions common in deep learning parameters. Experimental results demonstrate that LCQ allows a 2-bit ResNet-50 on ImageNet to achieve 75.1% top-1 accuracy, narrowing the gap to full-precision performance to just 1.7%.

1. Introduction

Deploying Deep Neural Networks (DNNs) on edge devices remains a challenge due to high memory and computational requirements. Quantization—the process of reducing precision from 32-bit floating point to low-bit integers—is a standard solution. However, conventional uniform quantization, which uses equally spaced discrete steps, often fails to capture the information density of neural network weights and activations, which typically follow Gaussian or Laplace distributions. This mismatch leads to substantial information loss, particularly at ultra-low bit-widths (2-4 bits).

2. Learnable Companding Quantization (LCQ)

LCQ introduces a non-uniform quantization framework inspired by "companding" (compressing and expanding) techniques from telecommunications. The method consists of several key components:

  1. Learnable Companding Function: Instead of fixed quantization levels, LCQ employs a learnable piecewise linear function. This function "compresses" input values into a uniform space for rounding and then "expands" them back. Because the slopes of this function are learnable, the network adaptively places denser quantization levels in high-density regions of the data distribution.
  2. Joint Optimization: Weights, clipping thresholds ($\alpha$), and companding parameters ($\Theta$) are optimized simultaneously via backpropagation using a Straight-Through Estimator (STE) to handle non-differentiable rounding.
  3. Limited Weight Normalization (LWN): To stabilize training, LWN standardizes weights (mean 0, std 1) specifically within the quantizer's scope. This prevents the "moving target" problem of weight scales, allowing the learnable parameters to converge effectively.
Overview of the LCQ pipeline, showing the transformation from a continuous distribution to a non-uniformly quantized distribution through learnable companding.

3. Efficient Inference via LUTs

A common critique of non-uniform quantization is its potential hardware complexity. LCQ bypasses this by utilizing Lookup Tables (LUTs). During deployment, weights and activations are encoded into indices. These indices serve as pointers to a pre-computed LUT containing the non-linear values, allowing for efficient integer-based arithmetic in the accumulator.

The LUT-based inference process allows non-uniform quantization to remain computationally efficient on hardware.

4. Experimental Results

LCQ was evaluated across several benchmarks, setting new state-of-the-art (SOTA) records for low-bit models:

  • ImageNet Classification: A 2-bit ResNet-50 achieved 75.1% top-1 accuracy, outperforming previous non-uniform methods like APoT (73.4%) and uniform methods like LSQ (73.7%).
  • Compact Architectures: On MobileNet-V2, which is notoriously difficult to quantize, LCQ reached 70.8% accuracy at 4-bits, a 3% improvement over competitive baselines.
  • Object Detection: Testing on MS COCO with RetinaNet backbones (ResNet-18, 34, 50) showed consistent gains over uniform quantization schemes.

5. Conclusion

Learnable Companding Quantization provides a robust framework for achieving high accuracy in ultra-low-bit neural networks. By making the quantization levels flexible and learnable, it bridges the gap between the theoretical benefits of non-uniform quantization and the practical requirements of hardware efficiency. Future work will focus on implementing these LUT-based operations on dedicated hardware accelerators like FPGAs or ASICs to further validate the real-world utility of LCQ for edge AI.

Summary updated

BibTeX
@inproceedings{yamamoto2021learnable,
  author = {Kohei Yamamoto},
  title = {{Learnable Companding Quantization for Accurate Low-Bit Neural Networks}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.00499},
}
Figure