arXiv:2610.00983cs.CLOct 2026

Manuscript Offprint

arXiv:2610.00983

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

Chao Li, Shigeng Wang, Anbang Yao

ABSTRACT

Post-training quantization (PTQ) methods typically quantize a pre-trained large language model (LLM) sequentially using a small set of calibration samples, achieving high data and computational efficiency. Specifically, the model is partitioned into a series of units, such as 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, thereby mitigating the impact of outliers and reducing quantization errors. In learning-based PTQ, 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, model families, model scales, architectures, and quantization settings, 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. Our analysis reveals 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) naturally realizes this principle through implicit gradient normalization, thereby enabling balanced optimization across quantization stages. Moreover, RMSE can be naturally defined over different feature groupings, yielding four variants at the sample, channel, token, and element levels. As a drop-in replacement for MSE, RMSE consistently improves quantization performance across language modeling, commonsense reasoning, mathematical reasoning, and coding tasks, with all four variants outperforming MSE and the gains becoming increasingly pronounced under more aggressive quantization. Code will be available at https://github.com/IntelChina-AI/RMSE.

1 INTRODUCTION

Large language models (LLMs) (Vaswani et al., 2017; Brown et al., 2020; Achiam et al., 2023; Anil et al., 2023; Touvron et al., 2023; Grattafiori et al., 2024; Liu et al., 2024; Guo et al., 2025; Qwen Team, 2026) have achieved remarkable success across language understanding, generation, and reasoning tasks, yet their growing memory and computational demands pose a major obstacle to practical deployment. Post-training quantization (PTQ) offers an efficient solution by converting pre-trained high-precision models into low-bit replacements using a small

  • Corresponding author.

Sequential quantization

Quantization pipeline

Stage 1

Stage 2

Stage 3

Feature reconstruction

High-precision

Quantized

Xi+1X_{i+1}

X^i+1\widehat{X}_{i+1}

Fi(Wi,Xi)F_i(W_i, X_i)

(fixed)

F^i(W^i,X^i;Θi)\widehat{F}_i(\widehat{W}_i, \widehat{X}_i; \Theta_i)

(trainable)

K units

XiX_i

X^i\widehat{X}_i

Quantized unit (optimized & frozen)

Unquantized unit

MSE Loss

LMSE=1N∥X^i+1−Xi+1∥F2\mathcal{L}_{\text{MSE}} = \frac{1}{N} \left\| \widehat{X}_{i+1} - X_{i+1} \right\|_{F}^2

Output-space gradient magnitude

∥∂LMSE∂X^i+1∥F∝∥X^i+1−Xi+1∥F\left\| \frac{\partial \mathcal{L}_{\text{MSE}}}{\partial \widehat{X}_{i+1}} \right\|_{F} \propto \left\| \widehat{X}_{i+1} - X_{i+1} \right\|_{F}

Train with

or

RMSE Loss

LRMSE=LMSE\mathcal{L}_{\text{RMSE}} = \sqrt{\mathcal{L}_{\text{MSE}}}

Output-space gradient magnitude

∥∂LRMSE∂X^i+1∥F=1N\left\| \frac{\partial \mathcal{L}_{\text{RMSE}}}{\partial \widehat{X}_{i+1}} \right\|_{F} = \frac{1}{\sqrt{N}}

MSE

RMSE

Loss

Optimization behavior across stages

Output-space

gradient magnitude

Parameter-space

gradient magnitude

Relative

parameter update

Figure

MSE

RMSE

Uneven

Uneven

Loss-dependent

Constant

Imbalanced

Balanced

Imbalanced

Balanced

Figure 1: Illustration of Optimization Imbalance in learning-based PTQ and its mitigation via RMSE. Learning-based PTQ methods predominantly use MSE as the reconstruction loss function for each stage in sequential quantization. By tracking optimization dynamics from the first stage to the last, we observe that reconstruction loss magnitudes vary dramatically across quantization stages. Our analysis reveals that MSE translates these differences into highly uneven gradients and parameter updates, giving rise to Optimization Imbalance. RMSE breaks this loss-dependent coupling through implicit gradient normalization, enabling more balanced optimization across quantization stages. Statistics are collected using OmniQuant on Qwen3.5-9B under W4A4 quantization.

calibration set, without the costly full-parameter retraining required by quantization-aware training (Zafrir et al., 2019; Ma et al., 2024; Xu et al., 2024). To efficiently quantize LLMs, PTQ methods generally partition the model into a sequence of units (e.g., transformer blocks) and quantize them in a stage-wise manner, processing one unit at each stage while keeping previously quantized units fixed. We refer to this popular stage-wise PTQ paradigm as sequential quantization.

Under sequential quantization, existing PTQ methods differ primarily in how they perform feature (i.e., output) reconstruction to quantize each unit. Many methods employ carefully designed analytical or statistics-driven schemes for effective reconstruction, including second-order error compensation, activation-aware scaling, equivalent transformations, and fixed rotations. Representative methods include GPTQ (Frantar et al., 2023), AWQ (Lin et al., 2024b), SmoothQuant (Xiao et al., 2023), QuaRot (Ashkboos et al., 2024), and others (Li et al., 2025; Sanjeet et al., 2026; Chen et al., 2026; Li et al., 2026). By contrast, learning-based PTQ brings gradient descent into the feature reconstruction process without full-parameter retraining. At each quantization stage, the pre-trained weights remain frozen, while only a small set of auxiliary quantization parameters is optimized through feature reconstruction. This learning-based concept is adopted by most top-performing PTQ methods, which primarily differ in their learnable parameterizations and reconstruction schemes. OmniQuant (Shao et al., 2024) learns scaling factors and clipping thresholds, DuQuant (Lin et al., 2024a) optimizes orthogonal rotations and permutations, FlatQuant (Sun et al., 2025) learns affine transformations, and SliderQuant (Wang et al., 2026) combines scaling and low-rank adaptation with sliding-window reconstruction. Other recent methods further explore related learnable design choices (Liu et al., 2025; Ding et al., 2025; van Breugel et al., 2026; Liang et al., 2026). Despite differences in their formulations, we observe that nearly all learning-based PTQ methods use mean squared error (MSE) as the reconstruction loss function, with the exception of LRQuant (Zhao et al., 2024), which augments MSE with a cosine-similarity-based term in its proposed learnable smoothing strategy to address outliers. Although learning-based PTQ has advanced considerably, the optimization behav-ior induced by MSE throughout sequential quantization remains largely unexplored. Additionally, sequential quantization implicitly assumes that every unit receives sufficient optimization, yet this assumption has not been systematically examined.

Motivated by these two largely overlooked perspectives, we take a holistic view of the sequential learning-based PTQ process, tracking how reconstruction losses, gradients, and parameter updates evolve from the first quantization stage to the last. Our empirical studies cover representative learning-based PTQ methods (OmniQuant, DuQuant, FlatQuant, and SliderQuant), model families (LLaMA2, LLaMA3.1, and Qwen3.5), model scales (7B, 8B, 9B, 27B, and 35B-A3B), architectures (dense and MoE), and quantization settings (W4A16, W3A16, W2A16, W2A16G128, and W4A4). Across this broad testing spectrum, we consistently uncover Optimization Imbalance, as illustrated in Fig. 1: reconstruction loss magnitudes span an unexpectedly large cross-stage range, which we term the reconstruction loss scale, with the largest often exceeding the smallest by more than 10,000×10,000\times. Under MSE, this broad loss scale is accompanied by highly uneven gradients and parameter updates across quantization stages. This imbalance is consequential in sequential quantization because quantization errors propagate and accumulate across stages, meaning that insufficient optimization at one stage can negatively affect the quantization of all subsequent units.

Our analysis identifies MSE as the fundamental source of Optimization Imbalance, revealing that it inherently couples optimization strength with reconstruction loss magnitude. Specifically, MSE translates the unexpectedly large reconstruction loss scale into large differences in output-space gradient magnitude, which are further reflected in parameter-space gradients and ultimately manifest as highly uneven parameter updates across quantization stages. This loss-dependent coupling directly explains the observed Optimization Imbalance and suggests a general principle for improving learning-based PTQ: optimization strength across quantization stages should be decoupled from the reconstruction loss scale. This principle naturally leads to root mean squared error (RMSE). As a square-root transformation of MSE, RMSE preserves the gradient direction and relative magnitudes among gradient elements while implicitly normalizing the overall output-space gradient magnitude to a constant. RMSE therefore breaks the loss-dependent coupling of MSE and enables more balanced optimization across quantization stages. RMSE can be naturally defined over different feature groupings, yielding a unified family of four variants operating at the sample, channel, token, and element levels. These variants preserve the same cross-stage balancing property while applying gradient normalization within different feature groups at each stage.

Extensive experiments demonstrate the generality and practical benefits of replacing MSE with RMSE in learning-based PTQ: (1) RMSE consistently improves quantization performance in language modeling, commonsense reasoning, mathematical reasoning, and coding tasks across representative learning-based PTQ methods, model families, model scales, architectures, and quantization settings, with all four RMSE variants outperforming MSE; (2) the gains generally become more pronounced under aggressive quantization, with absolute average accuracy improvements ranging from 5.44% to 10.83% under W2A16 and from 0.75% to 8.05% under W4A4; and (3) as a drop-in replacement for MSE, RMSE requires no additional trainable parameters or hyperparameters while introducing negligible runtime and memory overhead. More importantly, our analysis and experimental results establish Optimization Imbalance as a previously overlooked phenomenon arising from the loss-dependent gradient scaling of MSE in sequential quantization and highlight optimization behavior as a fundamental design consideration for learning-based PTQ.

References (39)