Preprint · 2026
Look Ahead, Do Not OverwriteTest-Time Adaptation to the Next Domain in Continual Learning
The University of Tokyo
In short A deployed model often sees images of its next domain before anyone labels them. Test-time adaptation can use this preview, but it damages the domains the model has just learned. DOSE applies the adaptation to each image in proportion to the probability that the image comes from the previewed domain.
01Abstract
Recent years have seen the rise of numerous setups that consider distribution shift in machine learning. Notably, Continual Learning (CL) assumes distribution shift during training while Continual Test-Time Adaptation (CTTA) considers new domains at test time. Setups that require explicit online adaptation to domain shift during both phases remain under-explored. Therefore, we propose continual learning with domain preview, a new combination of CL and TTA where both train and test data suffer from distribution shift. The training phase of continual learning with domain preview is analogous to domain-incremental learning while the testing phase consists of a TTA phase on a future domain (which we call preview), and an evaluation phase on all seen domains. Therefore, the model must not only remember previous knowledge but additionally adapt to newly introduced domains at test time.
In this paper, we evaluate mainstream CL and TTA methods that adapt only at train or test time, as well as their naive combination. Experimentally, we show that on ResNets, TTA heavily damages the domain on which the CL method has just trained and increases forgetting. Notably, this damage mostly comes from the BatchNorm statistics shared by all domains. In that sense, we propose DOSE (Dosing by Online Statistics of Each domain), which allows a seamless combination of any CL and TTA methods by adaptive domain inference at test time, where the adaptation is applied to each image in proportion to the probability that it comes from the previewed domain. Through extensive experiments with ResNet and ViT backbones, various combinations of CL and TTA baseline methods and datasets considering diverse domains, we show that DOSE matches or improves on CL alone in 22 of 24 settings and on the naive combination in 23.
02Continual learning with domain preview
-
Train
The model trains on a labeled domain with any CL method, with or without a replay buffer.
-
Preview
It receives an unlabeled stream from the domain it will train on next, and can adapt to it online with any TTA method. Each image is seen once.
-
Evaluation
One deployed system is evaluated on every domain seen so far, including the previewed one. Test batches mix all domains, and no prediction may use the statistics of the other images in its batch.
03Why CL and TTA do not combine out of the box
CL alone has not trained on the previewed domain yet, so it does poorly there. TTA can use the preview right away and raises the accuracy on the new domain, but applying the adapted model to every image costs the domains the model has just learned. On ResNets, most of this damage comes from the BatchNorm statistics, which all domains share and which TTA re-estimates on the preview.
| No replay buffer | Buffer of 200 images | |||
|---|---|---|---|---|
| Trained | Previewed | Trained | Previewed | |
| CL alone | 50.6 | 30.4 | 65.9 | 43.2 |
| CL + TTA | 39.2 | 56.3 | 42.2 | 55.7 |
| DOSE | 57.4 | 54.8 | 65.6 | 55.0 |
Accuracy (%) on the trained domains and on the previewed domain. ResNet, test batches that mix domains, mean over six benchmarks of the median over TTA methods.
For reference, the previewed domain reaches about 71% once the model has trained on it with labels.
04DOSE: Dosing by Online Statistics of Each domain
The training phase and the preview each contain images of a single domain, so the statistics of every domain can be recorded separately. DOSE leaves the CL and TTA methods untouched and only changes how the deployed system is assembled.
-
(a) Training
While the CL method trains on domain t, a frozen copy of the first block of the initial network summarizes each image. The record of the domain is a diagonal Gaussian of a few kilobytes. Without a buffer, a bank also keeps the BatchNorm statistics of each domain, and an online self-check decides whether to use it.
-
(b) Preview
While TTA adapts online, DOSE records the previewed domain, keeps the statistics that TTA estimates on the stream, and builds class prototypes from TTA's predictions.
-
(c) Prediction
For any test image x, the posterior over the records gives λ(x) = P(preview | x), the weight of the preview's branch in every BatchNorm layer and of the prototypes in the head.
λ ≈ 0: the image comes from a trained domain, and DOSE behaves like CL alone. λ ≈ 1: the image comes from the previewed domain, and DOSE behaves like CL + TTA.
- Any CL method
- Any TTA method
- No stored image
- No extra training stage
- No test-batch statistics
05Results
- 22/24settings where DOSE matches or improves on CL alone
- 23/24settings where it matches or improves on CL + TTA
- 354/380pairs of TTA method and setting where it matches or improves on CL + TTA
| ResNet, no buffer | ResNet, buffer | ViT-B/16, no buffer | ViT-B/16, buffer | |
|---|---|---|---|---|
| CL alone | 43.4 | 58.3 | 70.8 | 73.3 |
| CL + TTA | 41.5 | 43.6 | 71.1 | 73.3 |
| DOSE | 53.4 | 61.1 | 71.6 | 73.9 |
Mean score A over the six benchmarks: accuracy on every domain seen so far after each preview, averaged over tasks. CL + TTA and DOSE are medians over the TTA methods of each setting (20 on ResNets, 18 to 19 on ViTs).
On ResNets, DOSE is above CL alone by 6.5 points and above the naive combination by 14.7 points on average. On ViTs, whose normalization keeps no domain statistics, TTA barely damages the trained domains, and DOSE stays on par with or above both. Its gains there (0.7 and 0.5 points) are limited by how little TTA learns from a short preview. The benchmarks cover corruptions (CIFAR-100-C, ImageNet-C and two sequences of transformed images), a shift of sub-classes (CIFAR-20) and a shift of style (DomainNet).
06BibTeX
@misc{licombeau2026lookahead,
title = {Look Ahead, Do Not Overwrite: Test-Time Adaptation
to the Next Domain in Continual Learning},
author = {{Li Combeau}, Fr{\'e}d{\'e}ric and Michel, Nicolas
and Yamasaki, Toshihiko},
year = {2026}
}