Research
Buffer layers for Test-Time Adaptation
Overview Research area: Test-Time Adaptation (TTA) — adapting a pretrained deep network to a shifted target distribution during inference, without labels and without source data. Technical level: Inte
- arXiv
- 2510.21271
- Published
- 2025-10-24
- Authors
- Hyeongyu Kim, Geonhui Han, Dosik Hwang
AI summary
Overview
- Research area: Test-Time Adaptation (TTA) — adapting a pretrained deep network to a shifted target distribution during inference, without labels and without source data.
- Technical level: Intermediate. The paper assumes familiarity with batch normalization, domain shift, and standard TTA objectives such as entropy minimization, but its central idea (an added auxiliary module) is conceptually simple.
- Scope in one sentence: The paper proposes a lightweight, modular "Buffer" layer that is inserted alongside a frozen pretrained backbone and updated instead of normalization layers, and evaluates it across CIFAR10-C, CIFAR-10-W, CIFAR100-C, and ImageNet-C.
What This Paper Is About
Most test-time adaptation methods work by updating normalization layers, especially BatchNorm (BN), on the unlabeled test stream. That approach breaks down when test batches are small (batch statistics become unreliable) and it perturbs the pretrained backbone in ways that can cause catastrophic forgetting. The paper's goal is to move the adaptation target away from normalization layers entirely and into a separate, trainable side module — the Buffer layer — so the pretrained backbone stays untouched while the model still adapts to the target domain.
Key Contributions
- A modular, plug-and-play adaptation unit. The Buffer layer is inserted in parallel into any pretrained architecture without altering the original network, and can be optimized with any standard TTA objective (e.g., entropy minimization or consistency regularization).
- Broad compatibility with existing TTA methods. The authors keep each baseline's original update rule ("how to update") and only swap the update target from BN (@BN) to the Buffer layer (@Buffer), showing consistent gains across TENT, EATA, SAR, DeYo, CMF, and ROID, plus optional joint updating (@BN+Buffer).
- Forgetting-resilient design. Because adaptation is isolated in an external module and the backbone parameters (including BN) stay frozen, source-domain knowledge is preserved during long online adaptation.
- Fully online and truly source-free operation. Unlike EcoTTA and L-TTA, which freeze the backbone but still need a warm-up phase with source data, the Buffer layer requires no initialization and no source data at any stage.
Main Findings
- Large gains under small batch sizes on CIFAR10-C/CIFAR100-C. With batch size 2 on WRN28 (CIFAR10-C), TENT@Buffer cuts error from 82.56% to 37.05% (a 45.51-point reduction) and DeYo@Buffer from 69.95% to 35.65%. EATA@Buffer improves from 45.49% to 35.41%. On CIFAR100-C with ResNeXT at batch size 2, CMF improves from 98.07% to 71.90% and ROID from 93.22% to 72.92%.
- Consistent improvement on the harder CIFAR10-W benchmark. Source error is 77.28%. TENT drops from 89.30% (@BN) to 64.14% (@Buffer) at batch size 2, and DeYo from 84.37% to 46.96%.
- The advantage shrinks as batch size grows, and sometimes reverses. On ImageNet-C with ResNet50, TENT@BN at batch size 16 is 63.61% versus 71.04% for TENT@Buffer — the Buffer-only variant is worse there. The paper attributes this to BN statistics becoming reliable at larger batches.
- Joint updating with normalization helps in that regime. When BN and the Buffer layer are updated together (@BN+Buffer), performance improves in most cases; the authors attribute this to additional degrees of freedom helping methods like CMF and SAR.
- The method also works with GroupNorm. On ImageNet-C with a ResNetV2_50 using GroupNorm (source error 72.80%), trends matched those of the BN-based ResNet50 (source error 82.03%), indicating the Buffer layer is not tied to a specific normalization scheme.
- Strong performance under continuously changing domains. On CIFAR10-C averaged across 15 corruption types, TENT@BN averages 86.90% error versus 29.17% for TENT@Buffer, EATA improves from 53.92% to 28.72%, and CMF from 28.20% to 27.74% (SAR is essentially unchanged, 31.30% to 31.61%). On CIFAR100-C, EATA improves from 87.36% to 53.03% and CMF from 96.67% to 49.55%.
- Catastrophic forgetting is mitigated. In the CIFAR-10-W streaming experiment on WRN28, TENT@Buffer preserves source-domain accuracy far better than TENT@BN over the data stream, and the authors observe that once a model starts forgetting the source domain, its target-domain adaptation also degrades.
- Architecture ablations favor a dual-path module placed early. A configuration combining 1×1 and 3×3 convolutions ("Module ④") placed after the activation layer performed best in all (iii)-type placements. With small batches, inserting only at early stages of the network was best; with larger batches, early plus middle placements was best; insertion at the final stage tended to degrade performance. Module choice was batch-size dependent — a single 1×1 convolution was best at small batch size in (ii)-type placements.
- The scaling coefficient α is init-sensitive. Although α is learnable, smaller initial values performed better at low batch size (e.g., BS=2), while larger initializations were reported to benefit large batch sizes — the paper's discussion of this point is cut off in the available text.
- Not reported in the available content: dataset sizes or image counts, parameter counts or memory/compute costs of the Buffer layer, and wall-clock training times. The paper states experiments used three random seeds and reports means or means with standard deviations.
Methodology in Plain English
The authors start from the observation that almost all TTA research asks "how should we update the model?" while barely questioning "what should we update?" The conventional answer is BN layers, which are unstable with small batches and change the pretrained network itself.
Their alternative is to leave the pretrained network entirely alone and attach a small extra convolutional block, called the Buffer layer, whose output is scaled by a learnable coefficient and added back onto the original activations (a residual connection). The block uses 1×1 and 3×3 convolutions and is placed in the early stages of the network. During inference on the target domain, only this small block is optimized, using the same objective the baseline method would normally use to update BN — nothing about the update rule changes, only the target of the update.
To test the idea cleanly, the authors take established methods (TENT, EATA, SAR, DeYo, CMF, ROID, RoTTA, CoTTA, AdaContrast, plus plain BN adaptation) and create "@Buffer" versions where only the Buffer layer is updated and everything else, including BN, is frozen. They also test "@BN+Buffer", where the Buffer layer and normalization parameters are updated jointly. They run these on standard corruption benchmarks at batch sizes of 2, 4, and 16, on larger batches (CIFAR10-C at BS=512, CIFAR100-C at BS=256, CIFAR10-W and ImageNet-C at BS=128), on a GroupNorm backbone instead of BN, on a continuously changing corruption stream, and on a long stream used to measure forgetting. Finally, they ablate the Buffer layer's internal design, its placement in the network, and its α scaling parameter.
Why This Matters
For research, the paper reframes TTA as a question of where adaptation capacity should live rather than how gradients should be computed. If a small side module can absorb domain shift without touching the backbone, then the common framing that BN adaptation is the default substrate for TTA becomes a design choice rather than an assumption — and the forgetting result suggests that preserving source statistics may matter more than previously treated in the TTA literature.
Real-world applications:
- Medical imaging deployment, where scanners, protocols, or institutions shift the input distribution and only small batches are available at a time (the corresponding author is affiliated with radiology at Yonsei University).
- Edge and embedded inference, where batch sizes are frequently 1–4 and full-network backpropagation is too costly.
- Continual or streaming deployment such as autonomous driving or surveillance, where the environment changes gradually and the model must stay accurate over long periods without re-labeling.
- Privacy-constrained settings, where source data cannot be retained, and warm-up-based methods like EcoTTA and L-TTA are not usable.
For industry, the main appeal is that the Buffer layer is a drop-in addition: it reportedly improves existing TTA pipelines without replacing them, requires no source data, and does not risk degrading the pretrained model that was already validated and shipped.
Future Directions
- A principled rule for module design and placement. The optimal Buffer configuration and location changed with batch size; a way to select or learn them automatically, rather than by ablation, is left open.
- Robust initialization of the scaling coefficient α. The paper reports strong sensitivity to α's initial value, which suggests more work on initialization or adaptive scaling is needed.
- Extension beyond image classification. All reported benchmarks are corruption-shift classification tasks; segmentation, detection, and other modalities are not evaluated in this work.
- Quantifying the efficiency claim. The paper argues the Buffer layer avoids the cost of full-network backpropagation, but parameter counts, memory, and latency numbers are not reported in the available content.
Target Audience
Researchers and graduate students working on test-time adaptation, domain shift, and continual learning; practitioners who deploy models into changing environments under privacy or compute constraints and need source-free, small-batch adaptation; and readers interested in the general question of which parts of a network should be allowed to change after deployment.
Authors’ abstract
In recent advancements in Test Time Adaptation (TTA), most existing methodologies focus on updating normalization layers to adapt to the test domain. However, the reliance on normalization-based adaptation presents key challenges. First, normalization layers such as Batch Normalization (BN) are highly sensitive to small batch sizes, leading to unstable and inaccurate statistics. Moreover, normalization-based adaptation is inherently constrained by the structure of the pre-trained model, as it relies on training-time statistics that may not generalize well to unseen domains. These issues limit the effectiveness of normalization-based TTA approaches, especially under significant domain shift. In this paper, we introduce a novel paradigm based on the concept of a Buffer layer, which addresses the fundamental limitations of normalization layer updates. Unlike existing methods that modify the core parameters of the model, our approach preserves the integrity of the pre-trained backbone, inherently mitigating the risk of catastrophic forgetting during online adaptation. Through comprehensive experimentation, we demonstrate that our approach not only outperforms traditional methods in mitigating domain shift and enhancing model robustness, but also exhibits strong resilience to forgetting. Furthermore, our Buffer layer is modular and can be seamlessly integrated into nearly all existing TTA frameworks, resulting in consistent performance improvements across various architectures. These findings validate the effectiveness and versatility of the proposed solution in real-world domain adaptation scenarios. The code is available at https://github.com/hyeongyu-kim/Buffer_TTA.