arXiv:2610.09877cs.LGOct 2026

Manuscript Offprint

arXiv:2610.09877

Layerwise Error Attribution for Fast and Robust Mixed-Precision Post-Training Quantization

Samy Houache, Yann Traonmilin, Jean-François Aujol

ABSTRACT

Mixed-precision post-training quantization is a network compression method that assigns bits layer by layer, under a global memory budget using a small calibration set. The main difficulties are to overcome the combinatorial nature of the allocation problem and to manage the sensitivity to small, potentially corrupted databases. Hence, an efficient allocation method should be fast to compute and preserve model quality when calibration data are corrupted. To design such a method, we derive a layerwise probabilistic analysis of the quantization error that separates propagated error from the local perturbation introduced at a given layer. We use this local term to build a separable score for a simple allocation algorithm, that requires no external solver. The probabilistic nature of our approach brings robustness to corrupted data. On denoising tasks with DRUNet, with an average budget of 4 bits per weight, our method matches or improves state-of-the-art mixed-precision baselines under clean calibration, and is more robust to corrupted calibration, with PSNR gains of up to 7.5 dB under the tested corruptions. Experiments show bit-allocation speed-ups from 28×28\times to 2,570×2,570\times over the studied baselines. For quantized diffusion models, our experiments show that a direct application of our framework also improves the state-of-the-art.

1 INTRODUCTION

Large neural networks can exceed the memory and energy budgets of embedded hardware (Choukroun et al., 2019). This is a major bottleneck for embedded vision systems, including autonomous vehicles and avionics, where models must run with limited onboard resources. On the one hand, reducing model size and numerical precision lowers storage and memory traffic. On compatible hardware, it can also reduce computation and energy use (Wang et al., 2019). But on the other hand, such a compression step deteriorates the quality of the networks. This is the reason why, for such applications, there is a need to find an optimal trade-off between the accuracy of a network and its memory/energy budget. The goal of this paper is to propose a complete post-training quantization (PTQ) framework that tackles this problem.

Post-training quantization compresses a trained network by lowering the precision of its weights, using a small calibration set. Most PTQ pipelines use the same bit-width for every layer. This can be suboptimal because layers have different sensitivities to quantization leading to different effects on the network output. Mixed-precision PTQ addresses this by assigning a varying bit-width to each layer under a memory budget. In consequence an algorithm for mixed-precision PTQ must decide which layers need more precision. This flexibility can improve the quality–memory trade-off at a fixed budget (Dong et al., 2020; Ma et al., 2023). However, choosing these layerwise bit-width configurations jointly is difficult. For example, consider a network with 36 quantized layers and six candidate bit-widths per layer, from 3 to 8 bits. There are then 636≈10286^{36} \approx 10^{28} possible assignments before applying the memory constraint. Exhaustive evaluation is therefore impractical.

A practical alternative to exhaustive search must also meet two requirements. First, the quantized model should retain its quality when calibration inputs are degraded. This matters when calibration samples are acquired from sensors affected by noise, missing measurements, or acquisition faults. Second, selection should be fast enough to repeat when the model, calibration set, candidate precisions, or memory budget changes. This cost matters during design exploration, where many settings may need to be tested. To avoid evaluating every configuration, mixed-precision methods estimate layer sensitivity on calibration data. Existing scores use Hessian information (Dong et al., 2019; 2020; Yao et al., 2021), block reconstruction and second-order loss information (Li et al., 2021), network orthogonality (Ma et al., 2023), pairwise cross-layer loss terms (Deng et al., 2025), or a learned predictor (Mills et al., 2025). The bit-width assignment is then obtained by learned search (Wang et al., 2019), Pareto search (Pandey et al., 2023), linear programming (Ma et al., 2023), or integer programming (Yao et al., 2021; Deng et al., 2025). The main drawback of these methods is that they can require repeated network evaluations, pairwise interactions, or an external solver, which make the allocation stage slow and computationally expensive. Their scores are also estimated from a small calibration set, whose quality and composition affect the final quantized model (Yuan et al., 2023; Williams & Aletras, 2024).

Theoretical analyses of quantization error can also guide the choice of sensitivity measure. Gonon et al. (2023) derive a global deterministic error bound for PTQ controlled by a worst-case norm quantity. Houache et al. (2026) provide a finer analysis by using layer dependent operator norms, yielding tighter bounds that better follow the behavior of PTQ observed in practice. This suggests that keeping the layer error information is useful for mixed-precision decisions. Note that while they offer important qualitative insight on how error is propagated, such deterministic results are pessimistic in nature, as worst-case scenarios are not likely to occur in practical settings.

Contributions. We propose a probabilistic layerwise analysis of quantization error for a simple, yet fast and robust, mixed-precision post-training quantization algorithm. Our contributions are:

• A probabilistic layerwise analysis. We give probabilistic upper bounds of mixed-precision quantization error. We separate the error propagated from earlier layers from the perturbation introduced at the current layer (Section 4.2). This keeps the source of each quantization error visible and generalize previous worst-case deterministic analysis. We also derive a global bound for modern architectures, including self-attention (Appendix A.3).

• A separable, solver-free allocation algorithm. Using the theoretical insight from Section 4.2, we propose a fast and robust mixed-precision PTQ algorithm. It computes separable local scores from one full-precision pass per calibration image, then assigns bit-widths with a simple greedy rule and no external solver.

• Fast and robust bit-width allocation. On image denoising tasks with a DRUNet, our method combines competitive quality under clean calibration with stable PSNR under both tested calibration corruptions, at target budgets (Section 6.3). Bit-width allocation is 28×28 \times to 2,570×2,570 \times faster than the studied baselines in matched timing comparisons (Section 6.4). The same score and greedy rule also transfer to latent diffusion, where our method gives competitive FID and the highest mean PSNR to FP32 in the paired comparison (Section 6.5).