Test-Time Adaptation of Quantized ViTs via Single-Pass Quantizer-Aligned Recalibration
Organizations: KAIST · Samsung AI Center-Cambridge · University of Cambridge
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.
Figures & tables
| ImageNet-C accuracy (%), bit-width | Test-time cost | Mechanism | |||||||
| Method | W3A3 | W4A4 | W6A6 | W8A8 | #FP | Upd. par. | Lat. (ms) | Code dist. | Closed |
| Full precision | No Adapt , Ours (W32A32) | 1 | 0 | n/a | n/a | n/a | |||
| No Adapt | 1 | 0 | 6.0 | 0 / 0 | n/a | ||||
| T3A | 1 | 0 | 8.2 | 0 / 0 | yes | ||||
| FOA | 2 | 2.3K | 13.0 | 1 / 48 | no | ||||
| ZOA | 2 | 25K | 12.3 | 2 / 25 | no | ||||
| BW | Method | #FP | R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 | R9 | R10 | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No Adapt | 1 | 28.35 | 28.35 | 28.35 | 28.35 | 28.35 | 28.35 | 28.35 | 28.35 | 28.35 | 28.35 | ||
| ZOA | 2 | 31.27 | 31.61 | 31.31 | 32.10 | 32.06 | 32.08 | 32.10 | 32.15 | 32.34 | 32.40 | ||
| NEO-Continual | 1 | 31.69 | 31.64 | 31.69 | 31.66 | 31.67 | 31.69 | 31.66 | 31.67 | 31.69 | 31.63 | ||
| W3A3 | QuAR | 1 | 35.66 | 35.64 | 35.64 | 35.66 | 35.67 | 35.70 | 35.75 | 35.70 | 35.63 | 35.65 | |
| No Adapt | 1 | 47.68 | 47.68 | 47.68 | 47.68 | 47.68 | 47.68 | 47.68 | 47.68 | 47.68 | 47.68 | ||
| ZOA | 2 | 51.59 | 52.24 | 52.62 | 52.67 | 52.63 | 52.85 | 52.95 | 53.27 | 53.29 | 53.23 |
| Setting | W4A4 | W6A6 | Trailing-block depth | W4A4 | W6A6 |
|---|---|---|---|---|---|
| Modules (blocks 8–11) | 1 block (11) | ||||
| attn.qkv + attn.proj | 2 blocks (10–11) | ||||
| + mlp.fc1 | 3 blocks (9–11) | ||||
| + mlp.fc2 | 4 blocks (8–11) | ||||
| Block position (4 blocks) | 5 blocks (7–11) | ||||
| early (blocks 0–3) | 6 blocks (6–11) | ||||
Appendix figures & tables36 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | W3A3 | W4A4 | W6A6 | W8A8 |
|---|---|---|---|---|
| No Adapt | 28.26 | 47.24 | 47.60 | 54.21 |
| T3A | ||||
| FOA | ||||
| ZOA | ||||
| NEO | ||||
| FOZO |
| BW | Method | Gauss | Shot | Impul. | Defoc. | Glass | Motion | Zoom | Snow | Frost | Fog | Bright. | Contr. | Elastic | Pixel | JPEG | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| No Adapt | 14.52 | 13.42 | 13.76 | 27.42 | 18.56 | 27.20 | 27.90 | 25.60 | 35.30 | 37.82 | 63.76 | 4.78 | 28.90 | 35.30 | 51.02 | 28.35 | |
| T3A | 14.36 | 13.32 | 13.86 | 27.24 | 18.40 | 27.50 | 28.00 | 26.18 | 35.56 | 38.62 | 63.84 | 4.72 | 29.14 | 35.50 | 51.20 | 28.50 | |
| FOA | 16.74 | 15.06 | 15.66 | 30.20 | 20.66 | 31.48 | 31.40 | 31.46 | 38.48 | 44.92 | 64.98 | 8.40 | 32.70 | 37.76 | 52.88 | 31.52 | |
| ZOA | 16.56 | 15.34 | 16.12 | 29.48 | 20.92 | 30.64 | 31.24 | 32.58 | 37.90 | 43.86 | 64.94 | 7.90 | 33.20 | 38.30 | 52.04 | 31.40 | |
| NEO | 16.98 | 16.16 | 16.52 | 30.84 | 20.98 | 31.14 | 31.26 | 31.98 | 39.12 | 45.04 | 65.02 | 8.00 | 33.80 | 38.30 | 53.38 | 31.90 | |
| FOZO | 17.72 | 16.32 | 16.92 | 28.78 | 21.40 | 31.90 | 32.14 | 33.18 | 39.94 | 43.20 | 65.24 | 7.40 | 34.90 | 39.54 | 53.70 | 32.15 |
| Method | Gauss | Shot | Impul. | Defoc. | Glass | Motion | Zoom | Snow | Frost | Fog | Bright. | Contr. | Elastic | Pixel | JPEG | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Local-only | 46.48 | 45.06 | 47.24 | 43.98 | 39.68 | 48.98 | 45.12 | 61.82 | 63.14 | 63.72 | 76.44 | 33.80 | 54.24 | 63.38 | 68.46 | 53.44 |
| Global-only | 45.40 | 44.30 | 46.00 | 42.02 | 34.42 | 45.92 | 39.28 | 57.92 | 62.70 | 66.64 | 75.60 | 36.26 | 43.66 | 61.36 | 65.92 | 51.16 |
| QuAR | 46.80 | 45.74 | 47.26 | 44.88 | 40.64 | 49.60 | 46.00 | 62.36 | 64.04 | 66.32 | 76.90 | 37.46 | 55.26 | 63.56 | 68.68 | 54.37 |
| Variance match | 0 | 0.1 | 0.3 | 0.5 | 0.7 | 1.0 |
|---|---|---|---|---|---|---|
| Mean top-1 (%) | ||||||
| Batch size | 1 | 4 | 8 | 16 | 64 | 128 |
| Mean top-1 (%) | ||||||
| Source-stat batches | 16 | 32 | 64 | 128 | 200 | 256 |
| Mean top-1 (%) |
| i.i.d. stream | class-sorted stream | |||
|---|---|---|---|---|
| Batch | ||||
| Local est. | Global est. | bs | bs |
|---|---|---|---|
| cumulative | cumulative | ||
| Welford | Welford | ||
| Welford | cumulative | ||
| cumulative | Welford |
| i.i.d. stream | label shift | |||
|---|---|---|---|---|
| Local target moments | bs | bs | ||
| Current batch only | ||||
| Running, cumulative (deployed) | ||||
| Converged over an extra pass | ||||
| i.i.d. stream | label shift | |||||
|---|---|---|---|---|---|---|
| Design | full ( ) | bs 1 | ||||
| Deployed (global inclusive, local lagged) | 51.11 | 53.33 | 54.35 | 54.72 | 54.82 | 54.31 |
| Global branch also lagged | 48.51 | 52.59 | 54.31 | 54.75 | 54.97 | 54.30 |
| Local branch also inclusive | 53.09 | 53.47 | 54.33 | 53.88 | 51.96 | 54.24 |
| Local | Global | bs | bs |
|---|---|---|---|
| off | off | 47.68 | 47.75 |
| mean | off | ||
| mean+var | off | ||
| off | mean | ||
| off | mean+var | ||
| mean | mean |
| Trailing blocks | w/o fc2 | with fc2 | |
|---|---|---|---|
| 1 (block 11) | 49.08 | 48.55 | |
| 2 (blocks 10–11) | 50.88 | 51.48 | |
| 3 (blocks 9–11) | 51.34 | 52.59 | |
| 4 (blocks 8–11) | 51.85 | 53.44 | |
| 5 (blocks 7–11) | 52.10 | 53.39 | |
| 6 (blocks 6–11) | 51.79 | 53.31 |
| Setting | W3A3 | W4A4 | W6A6 | W8A8 |
|---|---|---|---|---|
| No Adapt | ||||
| Modules (blocks 8–11) | ||||
| attn.qkv + attn.proj | ||||
| + mlp.fc1 | ||||
| + mlp.fc2 | ||||
| Block position (4 blocks, all modules) | ||||
| Method | W3A3 | W4A4 | W6A6 | W8A8 |
|---|---|---|---|---|
| (ImageNet- ) | ||||
| No Adapt | ||||
| T3A | ||||
| FOA | ||||
| ZOA | ||||
| NEO | ||||
| Method | W3A3 | W4A4 | W6A6 | W8A8 |
|---|---|---|---|---|
| No Adapt | ||||
| T3A | ||||
| FOA | ||||
| ZOA | ||||
| NEO | ||||
| FOZO |
| Method | W3A3 | W4A4 | W6A6 | W8A8 |
|---|---|---|---|---|
| CIFAR-10-C | ||||
| No Adapt | ||||
| T3A | ||||
| FOA | ||||
| ZOA | ||||
| NEO | ||||
| Method | W3A3 | W4A4 | W6A6 | W8A8 |
|---|---|---|---|---|
| ImageNet-C | ||||
| FOA ( ) | ||||
| FOA ( ) | ||||
| QuAR | ||||
| (ImageNet- ) | ||||
| FOA ( ) | ||||
| Batch size | ||||
|---|---|---|---|---|
| No Adapt | 47.75 | 47.69 | 47.69 | 47.68 |
| AQR ( Mehrbod et al., 2026 ) (our impl.) | ||||
| QuAR |
| Method | |||||
|---|---|---|---|---|---|
| No Adapt | |||||
| T3A | |||||
| FOA | |||||
| ZOA | |||||
| NEO | |||||
| FOZO | |||||
| W3A3 | W4A4 | W6A6 | W8A8 | |
|---|---|---|---|---|
| No Adapt | ||||
| QuAR | ||||
| (QuAR No Adapt) |
| Method | W3A3 | W4A4 | W6A6 | W8A8 | ||||
|---|---|---|---|---|---|---|---|---|
| AdaLog | PTQ4ViT | AdaLog | PTQ4ViT | AdaLog | PTQ4ViT | AdaLog | PTQ4ViT | |
| No Adapt | 28.35 | 0.35 | 47.30 | 18.93 | 54.79 | 47.69 | 53.91 | 54.36 |
| T3A | 28.50 | 0.42 | 47.42 | 18.95 | 55.05 | 47.80 | 53.54 | 54.17 |
| FOA | 31.49 | 0.71 | 50.33 | 22.75 | 57.83 | 50.40 | 56.96 | 57.88 |
| ZOA | 31.40 | 0.79 | 50.78 | 23.44 | 57.93 | 51.35 | 57.30 | 58.21 |
| NEO | 31.90 | 0.84 | 50.29 | 23.59 | 58.24 | 51.36 | 57.40 | 58.10 |
| Method | W4A4 | W4A8 | W8A8 |
|---|---|---|---|
| No Adapt | 47.30 | 54.12 | 54.36 |
| T3A | |||
| FOA | |||
| ZOA | |||
| FOZO | |||
| NEO |
| FP (W32) | W8A8 | W6A6 | W4A4 | W3A3 | |
|---|---|---|---|---|---|
| Clean | |||||
| ImageNet-C | |||||
| Gap (clean corrupt) |
| Method | Acc. | Mean Mis. | Std Mis. | Comb. | Reduction (%) |
|---|---|---|---|---|---|
| No Adapt | 47.69 | 0.235 | 0.112 | 0.347 | 0.0 |
| Local-only | 53.35 | 0.095 | 0.057 | 0.153 | 56.0 |
| Global-only | 51.16 | 0.235 | 0.112 | 0.347 | 0.0 |
| QuAR | 54.36 | 0.095 | 0.057 | 0.153 | 56.0 |
| NEO | 51.36 | 0.235 | 0.112 | 0.347 | 0.0 |
| clipped (%) | harmful flips (%) | |||||
|---|---|---|---|---|---|---|
| clean | corrupt | clean | corrupt | clean | corrupt | |
| W8A8 | ||||||
| W6A6 | ||||||
| W4A4 | ||||||
| W3A3 | ||||||
| Precision | No Adapt | Global-only | Local-only | QuAR | Local Gain | Marg. Local Gain |
|---|---|---|---|---|---|---|
| W8A8 | 54.36 | 58.10 | 59.11 | 60.44 | +4.75 | +2.34 |
| W6A6 | 47.68 | 51.20 | 53.42 | 54.35 | +5.74 | +3.15 |
| W4A4 | 47.30 | 50.21 | 52.87 | 53.58 | +5.57 | +3.37 |
| W3A3 | 28.35 | 31.43 | 35.30 | 35.98 | +6.95 | +4.55 |
| Placement | W3A3 | W4A4 | W6A6 | W8A8 |
|---|---|---|---|---|
| No Adapt | ||||
| Before the quantizer, input side (QuAR) | ||||
| After the quantizer, output side | ||||
| Block output, residual stream | ||||
| Global-only (Table 1 ) |
| Method | #FP | GFLOPs/img | Peak mem (MB) | Latency (ms/img) |
|---|---|---|---|---|
| No Adapt | 1 | 35.2 | 1601 | 6.0 |
| T3A | 1 | 35.2 | 1627 | 8.2 ∗ |
| FOA | 2 | 71.4 | 1619 | 13.0 |
| ZOA | 2 | 70.3 | 1606 | 12.3 |
| NEO | 1 | 35.2 | 1602 | 6.0 |
| FOZO | 2 | 71.4 | 1619 | 12.3 |
| TITAN RTX | Orin Nano | ||
|---|---|---|---|
| Method | batch | batch | batch |
| No Adapt | |||
| NEO | |||
| QuAR | |||
| T3A | |||
| ZOA | |||
| Batch | Device | No Adapt | Buffered | In place | Residual |
|---|---|---|---|---|---|
| TITAN RTX | |||||
| Orin Nano | |||||
| Orin Nano |
| Method | Backprop | Updates params | Passes/batch | Frozen-quant deployable |
|---|---|---|---|---|
| TENT / EATA / SAR | yes | LN affine | 1F + 1B | no |
| ActMAD | yes | all params | 1F + 1B | no |
| TTT++ | yes | feature extractor | 1F + 1B | no |
| No Adapt | no | none | 1F | yes |
| T3A / NEO | no | none | 1F | yes |
| FOA / FOZO | no | prompt (grad-free) | 2F | yes |
| No Adapt | SAR | TENT | EATA | SPA | QuAR | |
|---|---|---|---|---|---|---|
| Mean top-1 |
| local interfaces ( channels) | head ( ) | |||||
| mean | 99th pct. | worst | mean | |||
| No Adapt | ||||||
| T3A | ||||||
| FOA | ||||||
| FOZO | ||||||
| ZOA | ||||||
| No Adapt | QuAR | ||||
|---|---|---|---|---|---|
| Interface group | channels | mean | mean | ||
| attn.proj , mlp.fc2 (no preceding norm) | |||||
| attn.qkv , mlp.fc1 (post-LayerNorm) | |||||
| head input (post-LayerNorm) | |||||
| Corruption | T3A | FOA | FOZO | ZOA | NEO | QuAR (cum.) |
|---|---|---|---|---|---|---|
| Gaussian noise | ||||||
| Shot noise | ||||||
| Impulse noise | ||||||
| Defocus blur | ||||||
| Glass blur | ||||||
| Motion blur |