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

Loss Aware Post-training Quantization

Yury Nahshan, Brian Chmiel, Chaim Baskin, Evgenii Zheltonozhskii, Ron Banner, Alexander M. Bronstein, Avi Mendelson

Abstract

Neural network quantization enables the deployment of large models on resource-constrained devices. Current post-training quantization methods fall short in terms of accuracy for INT4 (or lower) but provide reasonable accuracy for INT8 (or above). In this work, we study the effect of quantization on the structure of the loss landscape. Additionally, we show that the structure is flat and separable for mild quantization, enabling straightforward post-training quantization methods to achieve good results. We show that with more aggressive quantization, the loss landscape becomes highly non-separable with steep curvature, making the selection of quantization parameters more challenging. Armed with this understanding, we design a method that quantizes the layer parameters jointly, enabling significant accuracy improvement over current post-training quantization methods.

Introduction

Deep Neural Networks (DNNs) have revolutionized fields from computer vision to natural language processing, but their deployment on edge devices remains a challenge due to high memory and computational requirements. Quantization—the process of representing weights and activations with low-precision integers—is a key technique for model compression. While Post-Training Quantization (PTQ) is efficient and requires minimal data, it has historically struggled to maintain accuracy at 4-bit precision or lower. This paper introduces Loss Aware Post-training Quantization (LAPQ), a method that bridges this gap by accounting for the global loss landscape.

The Separability Gap in Low-Bit Quantization

The primary failure mode of traditional PTQ methods at low bit-widths is the assumption of layer independence. At 8-bit precision, the loss landscape is relatively flat and "separable," meaning that errors in one layer do not significantly impact the optimal quantization parameters of another. However, as precision drops to 4-bit or 2-bit, the landscape becomes steep and highly non-separable.

Loss landscapes for 2, 3, and 4-bit quantization showing increasing complexity and non-separability at lower bit-widths.

As shown in the figure above, the "low loss" region (darker areas) shrinks and becomes more irregular as the bit-width decreases. This cross-layer dependency means that local error minimization (e.g., minimizing MSE for a single layer) is no longer sufficient for global accuracy. The authors identify this as the "Separability Gap."

The LAPQ Methodology

LAPQ addresses these challenges through a three-stage optimization process that moves from local heuristics to global loss minimization:

  1. Layer-wise Optimization: The process begins by finding candidate "clipping" values for each layer. Instead of relying solely on Mean Squared Error (MSE), the authors explore various $L_p$ norms to find optimal thresholds.
  2. Quadratic Approximation: Using the candidates from the first stage, the method performs a quadratic interpolation of the loss surface to find a robust starting point for joint optimization.
  3. Joint Optimization (Powell’s Method): The core of LAPQ is the simultaneous adjustment of quantization parameters across all layers using Powell’s method, a gradient-free optimizer. This stage uses a small calibration set (e.g., 512 images) to minimize the actual cross-entropy loss of the network.
The relationship between different Lp norms and the quantization error across various clipping ranges.

The choice of $L_p$ norm is critical. As illustrated above, the optimal clipping range—the point where the error is minimized—varies significantly depending on the value of $p$. The authors found that for certain layers, higher-order norms (like $L_{3.5}$) outperform the standard $L_2$ (MSE) norm in terms of final model accuracy.

Key Results

LAPQ demonstrates state-of-the-art performance on challenging benchmarks, particularly in the difficult 4-bit regime:

  • ImageNet: A 4-bit ResNet-18 model quantized with LAPQ achieved 60.3% accuracy, a massive improvement over the 43.6% achieved by standard MSE-based methods. For ResNet-50, LAPQ reached 70.0% accuracy, nearing the full-precision (FP32) baseline of 76.1%.
  • Recommendation Systems: On the NCF-1B task, LAPQ maintained a 51.2% hit rate at 8-bit, while standard approaches dropped significantly.

Conclusion

By modeling the complex, non-separable loss landscapes inherent in low-precision quantization, LAPQ makes 4-bit inference a practical reality for post-training scenarios. It offers a powerful alternative to expensive Quantization-Aware Training, enabling high-performance deployment on resource-constrained hardware with minimal data and compute overhead.

Summary updated

BibTeX
@article{nahshan2021loss,
  author = {Yury Nahshan and Brian Chmiel and Chaim Baskin and Evgenii Zheltonozhskii and Ron Banner and Alexander M. Bronstein and Avi Mendelson},
  title = {{Loss Aware Post-training Quantization}},
  journal = {Machine Learning},
  year = {2021},
  doi = {10.1007/s10994-021-06053-z},
}
Figure