arXiv:2610.08358cs.CVOct 2026

Manuscript Offprint

arXiv:2610.08358

Test-Time Adaptation of Quantized ViTs via Single-Pass Quantizer-Aligned Recalibration

Hyeongheon Cha, Young D. Kwon, Sung-Ju Lee

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Post-training quantization is a standard route to fitting vision transformers (ViTs) into edge compute and memory budgets, yet quantized models become especially brittle under distribution shift. Test-time adaptation (TTA) addresses such shifts without labels, but most existing approaches are poorly aligned with the constraints of quantized inference. Prevailing TTA methods recover accuracy through backpropagation, while backprop-free methods often still incur overhead from extra forward passes or parameter updates, and lightweight feature- or logit-level methods recover only part of the loss. Across these approaches, a quantization-specific failure mode that amplifies the drop is not directly targeted: under shift, activations occupy frozen quantizers' calibrated ranges differently, distorting their code distribution. We propose Quantizer-Aligned Recalibration (QuAR), a single-pass TTA method tailored to quantized ViTs that neither backpropagates nor updates any model parameters. QuAR recalibrates activations at the input to a frozen quantizer, mapping the test stream's running per-channel statistics back toward the source calibration. On ImageNet-C with ViT-B, QuAR achieves the highest mean accuracy among state-of-the-art backprop-free TTA methods at 3-, 4-, 6- and 8-bit weight/activation precision, outperforming the strongest baseline by 2.28 points at 8 bits and 4.00 at 3 bits, with 46% lower latency and a memory overhead of only 0.17 MB (0.01% of peak inference memory). Analysis and diagnostics trace the gain to a reduced per-channel mismatch at these quantizers, which restores the code distribution the baselines leave unchanged or distort further. A single fixed configuration remains ahead across continual streams, non-i.i.d. label shift, seven out-of-distribution suites, and three other backbones.

1 INTRODUCTION

Vision transformers (ViTs) (Dosovitskiy et al., 2021) are the backbone of many vision systems, but their compute and memory cost makes them impractical to run at full precision on edge devices. Post-training quantization (PTQ) (Yuan et al., 2022; Wu et al., 2024) is a standard remedy. From a label-free calibration set it fixes weights and activation quantizers to low bit-widths with no retraining, so inference can better fit edge budgets. The deployed quantized model pays for that efficiency with rigidity, its quantizers frozen and its activation ranges tuned to the calibration distribution.

This rigidity becomes a liability at test time. When the input distribution shifts under corruption or domain change, the calibrated activation ranges no longer match it, causing a substantial accuracy drop. The drop is amplified by quantization, 1.7×1.7 \times at W3A3 (Appendix P), leaving the unadapted model at 28.4 top-1 where full precision holds 55.6 (Figure 1a; WnAm denotes n-bit weights and m-bit activations). The cause is concrete. Under shift, the per-channel activation statistics entering the quantizers drift from their calibration values (Figure 2a). Those quantizers are frozen and per-tensor, so they cannot follow that drift. They map the activations onto a part of their range they were never calibrated for, distorting their code distribution: the discrete levels the activations are mapped to. These per-interface distortions accumulate along the frozen path to the logits, where they meet a decision margin the shift has already narrowed. The quantization error does not grow under shift, but the same error now flips more labels. It flips more of them the coarser the step, which is why quantization amplifies the drop (Section 3.5). A fifth of the channels at those quantizers forfeit at least half a bit of code resolution to that drift (Figure 2b). Recovering accuracy therefore requires correcting this intermediate, quantizer-level mismatch, not only the final prediction.

(a) Quantization erodes OOD acc.

Figure

(b) Quantizer code distribution restored

Figure

Figure 1: Quantization makes activation drift costlier; QuAR acts on the quantization path to undo it. (a) ViT-B accuracy on ImageNet-C by precision: unadapted accuracy falls from 55.6 to 28.4 at W3A3, while QuAR's gain grows as precision drops, from +3.8 to over +6 at every quantized setting. (b) At the recalibrated quantizer inputs (W6A6), corruption drifts the code distribution off its source calibration; bars show the fraction removed (Wasserstein-1 between code histograms, Appendix P). Only QuAR recovers much of that drift, ∼9×\sim9\times the best baseline.

Test-time adaptation (TTA) addresses distribution shift without labels (Wang et al., 2021; 2022; Niu et al., 2023; Iwasawa & Matsuo, 2021), and a recent line of work targets the quantized setting specifically (Deng et al., 2025). These methods recover accuracy, but quantized deployment asks for two things they do not provide. First is the cost. Entropy- or discrepancy-minimizing methods backpropagate through the network and update some or all of its parameters, while FOA (Niu et al., 2024), ZOA (Deng et al., 2025), and FOZO (Wang & Wang, 2026) avoid backprop but still require extra forward passes per batch and update parameters at test time; each extra forward pass through a quantized graph and each model parameter update is what quantized deployment is designed to avoid. Second is placement. These methods act on either side of the quantizer inputs rather than at them, downstream at the feature or logit level and upstream on prompts or model parameters. We confirm this directly: the compared methods leave that code distribution unchanged or move it further from the source, whereas only ours recovers much of that drift (Figure 1b).

We argue that for quantized ViTs the right intervention is not to re-optimize the model but to recalibrate its activations back toward the statistics the quantizers were calibrated on. We introduce Quantizer-Aligned Recalibration (QuAR), a single-pass, quantization-native TTA method built from parameter-free affine recalibrations, each applied at the input to a frozen quantizer. The local branch, QuAR's quantizer-level core, acts at every intermediate activation interface in the late blocks, mapping the running per-channel mean and standard deviation of the test stream back toward the source calibration statistics. The global branch, a complementary correction, applies the same recalibration to the CLS representation at the head input. Both branches use source-initialized running target moments, perform no backpropagation, update no model parameters, and store no past samples; the method adds a single multiply-add per recalibrated activation inside one forward pass.

On ImageNet-C with quantized ViT-B, QuAR attains the highest mean accuracy among state-of-the-art backprop-free TTA methods at every evaluated precision, W3A3, W4A4, W6A6 and W8A8, ahead of the strongest baseline by +2.28 at W8A8 and +4.00 at W3A3, at one forward pass and no parameter updates, 46% less latency than ZOA and FOZO (Section 4.1). One fixed configuration keeps that lead on long-term continual streams, non-i.i.d. online label shift, seven further out-of-distribution benchmarks (ImageNet-R/Sketch/C/3DCC, CIFAR-10/100-C, and DomainNet-126), and three other backbones, the transformers DeiT-B and ViT-S, and a convolutional ResNet-50 (Sections 4.2 and 4.3). QuAR is also the most accurate method that fits an 8 GB Jetson Orin Nano (NVIDIA, 2026) at batch 64, where the backprop-based methods run out of memory (Section 4.6).

We make the following contributions:

• We propose QuAR, a single-pass TTA method tailored to quantized ViTs that recalibrates activations at frozen quantizer inputs, targeting the distortion of their code distribution, a quantization-specific failure mode that existing TTA does not directly address.

• We trace the gain to a per-channel mismatch at the quantizer inputs, using a mismatch measurement, a precision sweep and a placement ablation.

• We give a first-order account linking activation-moment drift, frozen-grid code resolution, and margin-sensitive prediction changes, and measure the quantities the account depends on.

(a) Code resolution at a frozen quantizer input

Figure

(b) Prevalence across recalibrated channels

Figure

Figure 2: Code resolution lost under shift (W6A6 ViT-B, ImageNet-C sev. 5). (a) Both rows carry the same nine positions, one grid step apart, against the same frozen grid: the shift moves and narrows it, so distinct values collapse onto one code (Proposition 1), and the same contraction would be free in full precision, where resolution is relative rather than absolute. Both magnitudes are measured 99th percentiles of their per-channel distributions. (b) Fraction of all 21,504 channels at the frozen quantizers forfeiting at least a given resolution; other baselines in Appendix U.

References (100)

Couldn't load all references. Reload the page to try again.