The Devil Is in the Reconstruction Loss Scale: Rethinking Optimization in LLM Quantization

Chao Li, Shigeng Wang, Anbang YaoarXiv 2026

TL;DR

Learning-based post-training quantization (PTQ) for Large Language Models (LLMs) suffers from "Optimization Imbalance" because the standard Mean Squared Error (MSE) loss couples gradient strength to the magnitude of reconstruction error. By simply switching to Root Mean Squared Error (RMSE), researchers can decouple these factors, achieving balanced optimization across all model layers and significantly boosting performance in aggressive low-bit quantization settings.

What Problem Does This Paper Address?

Quantizing LLMs—reducing the precision of their weights and activations to save memory—is essential for deployment but notoriously difficult. State-of-the-art methods use Post-Training Quantization (PTQ), which processes the model sequentially, block by block (e.g., one Transformer layer at a time). These methods typically optimize auxiliary parameters (like scaling factors or clipping thresholds) using gradient descent to minimize a reconstruction loss—the difference between the original high-precision block output and the new quantized output.

The industry standard for this loss is Mean Squared Error (MSE). However, the authors discovered a fundamental flaw: in sequential quantization, the magnitude of the reconstruction loss varies wildly—often by more than 10,000x—from the first layer to the last. Because the gradient of MSE is proportional to the square root of the loss, this "reconstruction loss scale" creates an Optimization Imbalance. Early layers, which have smaller initial errors but the greatest impact on downstream results, receive very weak updates, while later layers receive disproportionately strong ones.

Methods

The authors propose a deceptively simple fix: replace MSE with Root Mean Squared Error (RMSE).

Mathematically, the gradient magnitude of RMSE is constant (normalized by the number of elements), regardless of the loss magnitude. This provides implicit gradient normalization, ensuring that every block in the model receives a comparable "strength" of optimization during the quantization process.

The sequential quantization pipeline and the mathematical comparison between MSE and RMSE gradients.

Beyond a simple global RMSE, the authors introduced a unified family of four RMSE variants based on how feature elements are grouped:

  • RMSE-Sample: Normalizes per calibration sample.
  • RMSE-Channel: Normalizes per feature channel.
  • RMSE-Token: Normalizes per token.
  • RMSE-Element: Normalizes per individual element (equivalent to L1 loss).

These variants allow for fine-tuning the normalization behavior based on the specific architecture of the LLM being quantized.

Datasets

The researchers evaluated their approach across a wide range of models and tasks:

  • Calibration: 128 samples from WikiText2.
  • Language Modeling: Perplexity (PPL) on WikiText2.
  • Common Sense Reasoning: PIQA, ARC-Easy, ARC-Challenge, Winogrande, HellaSwag, and BoolQ.
  • Mathematical Reasoning: GSM8K and MATH-500.
  • Coding Tasks: HumanEval and MBPP.

Key Insights and Ideas

  • The Scale Problem: The "reconstruction loss scale" is a previously overlooked phenomenon where errors accumulate and output magnitudes shift as you move deeper into a model during sequential quantization.
  • Coupling is the Enemy: MSE inherently couples optimization strength to the error magnitude. In a sequential setting, this means the "budget" for learning is distributed unfairly across layers.
  • RMSE as a Stabilizer: RMSE acts as a drop-in replacement that requires no new hyperparameters or extra memory. It preserves the gradient direction of MSE but fixes the magnitude, leading to the "Balanced" optimization shown in the authors' tracking of parameter updates.
Figure 2: Optimization statistics under MSE and RMSE across quantization settings and diverse LLMs. The horizontal axis represents the quantization stages from early to late. For each stage, loss, output-space gradient, parameter-space gradient, and relative parameter update are averaged over all optimization steps. Parameter-space gradients and parameter updates are computed over trainable parameters only.
  • Model-Specific Preferences: Interestingly, different model families prefer different RMSE groupings. LLaMA-based models generally perform best with RMSE-Token, while Qwen-based models favor RMSE-Channel.

Key Results

The switch to RMSE yielded consistent, significant gains, particularly in "aggressive" quantization regimes (like 2-bit weights or 4-bit weights/activations):

  • Accuracy Boosts: In W2A16 quantization for Qwen3.5-27B, RMSE improved average downstream accuracy from 60.45% to 70.96% and slashed perplexity from 37.51 to 22.20.
  • Generalization: The benefits were observed across four different state-of-the-art PTQ frameworks (OmniQuant, DuQuant, FlatQuant, and SliderQuant), proving the issue lies with the loss function, not the specific quantization algorithm.
  • Efficiency: As shown in the results table below, RMSE variants consistently outperform MSE across almost every model scale and bit-width configuration.
Table 1: Generalization of RMSE under OmniQuant across diverse LLMs and quantization set- tings. Acc denotes the average accuracy over PIQA, ARC-Easy, ARC-Challenge, Winogrande, HellaSwag, and BoolQ.

Limitations and Future Work

While RMSE provides a massive boost, it is not a silver bullet for the most extreme quantization settings. For instance, in the W2A16G128 setting (2-bit weights with group-wise scaling), while RMSE improved results, the models still suffered significant performance degradation compared to their original versions. This suggests that for ultra-low-bit regimes, better optimization must be paired with more advanced quantization designs.

Additionally, the paper notes that the optimal feature grouping (Token vs. Channel) is model-dependent. Future work could investigate automated ways to determine the best grouping strategy or explore adaptive loss functions that combine multiple normalization scales.

Summary updated

Abstract

Post-training quantization (PTQ) methods typically use sequential quantization that partitions a pre-trained LLM into a series of units (e.g., transformer blocks), with one unit quantized at each stage. State-of-the-art PTQ methods are predominantly learning-based, optimizing auxiliary quantization parameters (e.g., scaling factors, rotation matrices, clipping thresholds, and adapters) via gradient descent to minimize a reconstruction loss. A common practice is to use mean squared error (MSE) as the reconstruction loss function, yet its induced optimization behavior remains largely unexplored. In this work, we take a holistic view of sequential quantization and systematically investigate how optimization evolves from the first quantization stage to the last, aiming for a deep understanding of optimization in learning-based PTQ schemes. Through extensive empirical studies spanning representative learning-based PTQ methods, LLM families, model scales, architectures, quantization settings and various tasks, we consistently uncover Optimization Imbalance: reconstruction loss magnitudes vary dramatically across stages, accompanied by highly uneven gradient magnitudes and parameter updates under MSE. We term the cross-stage range of loss magnitudes the reconstruction loss scale, and reveal that MSE translates the unexpectedly large reconstruction loss scale into highly uneven gradient magnitudes, which in turn lead to uneven optimization strength across quantization stages. This finding suggests a general principle for improving learning-based PTQ: optimization strength across stages should be decoupled from the reconstruction loss scale. Theoretically, we show that root mean squared error (RMSE) variants defined at the sample, channel, token, and element levels naturally realize this principle through implicit gradient normalization, outperforming MSE significantly as a drop-in replacement.
BibTeX
@misc{li2026devil,
  author = {Chao Li and Shigeng Wang and Anbang Yao},
  title = {{The Devil Is in the Reconstruction Loss Scale: Rethinking Optimization in LLM Quantization}},
  year = {2026},
  eprint = {2610.00983},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.00983},
}
Figure