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

Three timelines. Continual learning trains on labeled domains one after another and is evaluated on all seen domains. Continual test-time adaptation adapts a trained model to a stream of unlabeled domains. Our setup alternates training on a labeled domain with a preview of the next, unlabeled domain, followed by an evaluation on all domains seen so far.
Three setups. CL trains on labeled domains in sequence. CTTA adapts a trained model to a stream of unlabeled domains. Our setup combines both, with three phases per task.
  1. Train

    The model trains on a labeled domain with any CL method, with or without a replay buffer.

  2. 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.

  3. 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 bufferBuffer of 200 images
TrainedPreviewedTrainedPreviewed
CL alone50.630.465.943.2
CL + TTA39.256.342.255.7
DOSE57.454.865.655.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.

Diagram of DOSE in three panels: (a) during training, a frozen first block records each domain; (b) during the preview, TTA adapts while DOSE records the preview and builds prototypes; (c) for any test image, the posterior over the records mixes the preview's and the trained domains' BatchNorm branches.
λ · BN(h; preview statistics, TTA's affine) + (1 − λ) · BN(h; trained statistics mixed by the posterior, trained affine)

λ ≈ 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.

05Results

Mean score over six benchmarks (%)
ResNet, no bufferResNet, bufferViT-B/16, no bufferViT-B/16, buffer
CL alone43.458.370.873.3
CL + TTA41.543.671.173.3
DOSE53.461.171.673.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}
}