Temporal Test-Time Adaptation with State-Space Models
Authors: Mona Schirmer
Dan Zhang
Eric Nalisnick
Venue: Accepted by TMLR ()

Abstract: Distribution shifts between training and test data are inevitable over the lifecycle of a deployed model, leading to performance decay. Adapting a model on test samples can help mitigate this drop in performance. However, most test-time adaptation methods have focused on synthetic corruption shifts, leaving a variety of distribution shifts underexplored. In this paper, we focus on distribution shifts that evolve gradually over time, which are common in the wild but challenging for existing methods, as we show. To address this, we propose STAD, a Bayesian filtering method that adapts a deployed model to temporal distribution shifts by learning the time-varying dynamics in the last set of hidden features. Without requiring labels, our model infers time-evolving class prototypes that act as a dynamic classification head. Through experiments on real-world temporal distribution shifts, we show that our method excels in handling small batch sizes and label shift.

Published in Transactions on Machine Learning Research (10/2025)
Temporal Test-Time Adaptation with State-Space Models
Mona Schirmer
m.c.schhrmmerruwv..
AoA-Bosch Delta Lab, University of Amsterdam
Dan Zhang
don.thang@@dee.bscc... boschhehheeebbbbb.oooooooccco
Bosch Center for Al
Eric Nalisnick
malismick edu
Johns Hopkins University
Reviewed on OpenReview: https: // openreview. net/ forun? id= HFETOmUtrVV
Abstract
Distribution shifts between training and test. data are inevitable over the lifecycle of a deployed model, leading to performance decay, Adapting model on test samples can help mitigate this drop in performance. However, most test-time adaptation methods have focused synthetic corruption shifts, leaving variety of distribution shifts underexplored. In this paper, we focus on distribution shifts that evolve gradually over time, which are common in the wild but challenging for existing methods, as we show. To address this, we propose STAD, a Bayesian filtering method that adapts a deployed model to temporal distribution shifts by learning the time-varying dynamics the last set of hidden features. Without, requiring labels, our model infers timo-cvolving class prototypes that act as dynamic classification head. Through experiments weal-world temporal distribution shifts, show that our method excels in handling small batch sizes and label shift.
1 Introduction
Predictive models often have an 'expiration date.' Real-world applications tend to exhibit distribution shift, meaning that the data points seen at lest time are drawn from distribution that is different than the training data's. Moreover, the test distribution usually becomes more unlike the training distribution as time goes on. An example of this is with recommendation systems: trends change, new products are released, old products are inse,, elc. Unless a model is updated, its ability to make accurate predictions will expire, requiring the model to be taken offline and re-trained. Every iteration of this model life-cycle can be expensive and time consuming. Allowing models remain 'fresh' for long as possible is thus an open and consequential problem.
Test-time adoptation (TTA) (Liang et al., 2024; Yu et al., 2023) has emerged as a powerful paradigm to preserve model performance under a shifting test distribution. TTA performs online adaptation of a model's parameters using only test-time batches features. By requiring neither access to labels nor source data, TTA algorithms can be employed in resource-constrainee environments, whereas related approaches such as domain generalization, domain adaptation and test-time training cannot. Most TTA methods operate by minimizing an entropy objective (Wang et al., 2021) or updating normalization parameters (Schneider et. al., 2020; Nado et al., 2020; Niu et al., 2023).
Synthetically corrupted images (e.g. CIFAR-10-C) are by far the most commonly used benchmark for assessing progress on TTA, despite concerns about benchmark diversity (Zhao et al., 2023b). These shifts increase the degree of information loss over time, and well-performing TTA methods must learn to preserve a static underlying signal. In this work, we focus on an omnipresont distribution shift of quite a different. nature: Temporal distribution shifts encode structural change, not just information loss. Gradual structural change time is relevant for any deployed model that is operating continuously. While related subfields

---

Published in Transactions on Machine Learning Research (10/2025)
like gradual domain adaptation (GDA) (Kumar et al., 2020) and temporal domain generalization (TDG) (Bai et al., 2023) are dedicated to these shifts, they have received little attention in TTA. As we will demonstrate using datasets like the Functional Map of the World (FMoW), which classifies land use over time (e.g., rural to urban development), the setting of temporal test-time adaptation (TempTTA) presents significant challenges for existing TTA methods.
To address this gap, we propose State-space Test-time Adaptation (STAD), a method that builds on the power of probabilistic state-space models (SSMs) to represent non-stationary data distributions over time. STAD dynamically adapts model's final layer to accommodate an evolving test distribution. Specifically, we employ probabilistic SSM based on Bayesian filtering to model the evolution of the weight vectors in the final layer, where each vector represents a class, as distribution shift occurs. For generating predictions on newly acquired test batches, we use the SSM's posterior cluster means as the new parameters. STAD leverages Bayesian updating and does not rely upon normalization mechanisms. As a consequence, STAD excels in scenarios where many TTA methods collapse (Niu et al., 2023), such as adapting with very few samples and under label shift. Our contributions are the following:
In Sec. 2, we detail the setting of TempTTA, which aims to cope with shifts that gradually cvolve due to variation in the application domain. Despite being ubiquitous in real-world scenarios, these shifts are understudied in the TTA literature and pose significant challenges to established methods, as we demonstrate in Sec. 5.1.
In Soc. 3, we propose STAD, a novel method for TempTTA. It adapts to temporal distribution shifts by modeling its dynamics in representation space. No previous work has explicitly modeled these dynamics, which we demonstrate is crucial via an ablation study (Sec. 5.3).
In Sec. 5, we conduct comprehensive evaluation of STAD and prominent TTA baselines under authentic temporal shifts. Our results show that STAD excels in this setting (Tab. 2), yet is applicable beyond temporal shifts providing performance gains some reproduction datasets (Tab. 3), synthetic corruptions (Tabs, 4 and 12) and domain adaptation benchmarks (Tabs. 8 and 9).
2 Problem Setting
Data & Model We focus on the traditional setting of multi-class classification, where X' C R denotes the input (feature) space and y S {1...., }} denotes the label space. Let x and y be random variables and P(x, y) = Ix(x P(y[x) the unknown source data distribution. We assume æ E X and E 3 are realisations of x and y. The goal of classification to find a mapping fo, with parameters 0, from the input space to the label space fo X y. Fitting the classifier fo is usually accomplished by minimizing an appropriate loss function (e.g. log loss). Yet, our method is agnostic to how fo is trained and therefore easy to use with, for instance, a pre-trained model downloaded from the web.
Temporal Test-Time Adaptation (TempTTA) We are interested in adapting model at test-time to test distribution that evolves with time. More formally, let T {I....,T) be set of T time indices. At test time, let the data at time E T be sampled from a distribution yx = Q Qr(x))). The test. distributions differ from the source distribution, (x,,)) # y(x, Vt > 0, and are non-stationary, meaning yx,, * (x, for L 1'. Like in standard TTA, we of course do not observe labels at test time, and hence we observe only a batch of features X, = batch of features X,, the goal is to adapt fo, forming a new set of parameters O such that fo, has better predictive performance on X, than fo would have. Since we can only observe features, we assume that the distribution shift must at least take the form of covariate shift: (x) * P(x) Vt > 0. In addition, label shift may occur, which poses an additional challenge: Qc(y) * IP()) Vt > 0. Temporal shifts, described above, have been the focus of temporal domain generalization (Bai et al., 2023) and gradual domain adaptation (Abnar et al., 2021). However, both paradigms operate during training, whereas TempTTA is applicable at test time. In Tab. 1, we contrast TemPTTA with adjacent fields highlighting subfields that address temporal shifts. Notably, TempTTA can be seen as a special case of continual TTA (CTTA) (Wang et al., 2022b) with the important distinction that the domain index is inherently temporal. This is opposed to a categorical domain index (e.g. different, corruption types) as is mostly studied in CTTA.
where X ~ (x) (ii.d.). Given the t-th
2

---

Published in Transactions on Machine Learning Research (10/2025)
Table 1: Comparison of TempTTA with related fields
Adaptation
Available samples
Test distribution
stage
non-stationary time-ordered
Domain generalization (DG)
train
P(x, y)
Temporal DG
train
(i y IPTs (x,
Domain adaptation (DA)
train
P P(x. y). Qxx
X
Gradual DA
train
P(x,y), Q1 (x),
(X((x)
Test-time training
train, test
P(x, y), Qx()
X
X
Test-time adaptation (TTA)
test
(xx)
X
X
Continual TTA
test
(x),,, QT(x)
X
TempTTA
test
1 Qx(x)
3 Tracking the Dynamics of Temporal Shifts
We now present our method: the core idea is that adaptation to temporal distribution shifts be done by tracking its gradual change in the model's representations. We employ linear SSMs to capture how test points evolve and drift. The SSM's cluster representations then serve as an adaptive classification head that evolves with the non-stationarity of the distribution shift. Fig. 1 illustrates our method. In Sec. 3.2, we first introduce the general model and then, in Sec. 3.3, we propose an efficient implementation that leverages the von Mises Mises-Fisher distribution model spherical features.
3.1 Adaptation in Representation Space
Following previous work (Twasawa & Matsuo, 2021; Boudiaf et al., 2022), we adapt only the last layer of the source model. This lightweight. approach is rea- sonable for Temp-TTA since the distribution shifts gradually over time, hence constrained adaptation is needed. From practical perspective, this cir- cumvents backpropagation through potentially large networks such foundation models and allows adap- tation when only embeddings are provided e.g. by an APT. More formally, let the classifier fo be neural network with L total layers. We will treat the first L layers, denoted as f2-1, as black box that transforms the original feature vector x into new (lower-dimensional) representation, which denote as h. The original classifier then maps these representations to the classes as: E[y|h| where sof taftma, (-) denotes the dimension of the softmax's output corresponding to the y-th label index and Wo are the last-layer weights. As Wo will only be valid for representations that are similar to the training data, we will discard these parameters when performing TemPTTA, lcarning new parameters W, for the 1-th time step. These new parameters will be used to generate the adapted predictions through the same link function: [h softmax, (WTh) h). In the setting of Temp'TTA, we observe a batch of features X,- Passing them through the model yiclds corresponding representations H,, and this will be the 'data' used for the probabilistic model will describe below. Specifically, will model how the representations change from H, to H4+1 next.
W3,1
W 1.3
W
W2,1
W 2,3
h
W3,2
W 1,2
W2,2 2,2
3.3
X
Figure 1: STAD adapts to distribution shifts by in- ferring dynamic class prototypes Wt,k for each class k (different colors) at each test time point. It operates on the representation space of the penultimate layer.
softmax, (WJh) h),
3.2 A Probabilistic Model of Shift Dynamics
We now describe our general method for a timo-cvolving adaptive classification head. We assume that, while the representations H, are changing gradually over time, they are still maintaining some class structure in the form of clusters. Our model will seek to track this structure it evolves. For the intuition of the
3

---

Published in Transactions on Machine Learning Research (10/2025)
approach, see Fig. 1. The blue red, and green clusters represent classes of classification problem. As the distribution shifts from time step / = 1 to 1 = 3, the class clusters shift in representation space. Using latent variables We,k for the cluster centers, we will assumne each representation is drawn conditioned on K latent vectors: he p (hy//a... We.i..... Wr.k), where K is equal to the number of classes in the prodiction task. After fitting the unsupervised model, the K latent vectors will be stacked creale Wt; the last-layer weights of the adapted predictive model (as introduced in Sec. 3.1). We now move on to a technical description.
Notation and Variables Let H. (h.......... N., E RDxM denote the neural representations for N₂ data points at test time Let W. (Wi..-.... Wr,k) RD*K denote the K weight vectors test time t. As discussed above, the weight vector Wi. can be thought of as latent prototype for class & at time We denote with C = (ct,1,...,, Ct,v,) {0, 1]KXN, the N₁ one-hot encoded latent class assignment vectors Cr, E {0, 1 at time t. The k-th position of Cr, is denoted with Ct,m.k and is 1 if h belongs to class k and 0 otherwisc. Like in standard (static) mixture models, the prior of the latent class assignments p(c,,n) is a categorical distribution, p(Ct,n) Cat( with n. (Tr, kT,K) E [0, and Ei=1 Tr. 1. The mixing coefficient Te,k gives the priori probability of class k at time t and can be interpreted as the class proportions. Next, we formally describe how we model the temporal drift of class prototypes.
Dynamics Model
We model the evolution of the K prototypes W. = -Ww.. Wo,k) with K independent Markov processes. The resulting transition model is
p W.WWa W (trans))
II o ee sitrass).
(1)
where sitraus denote the parameters of the transition density. At each time step, the feature vectors H, are generated by mixture distribution over the K classes,
pHH W c tems)
II Te p(ha, We,ks smms).
where gleus are the emission parameters. We thus assune each time step standard mixture model over the K classes where the class prototype Wi,k defines the latent class center and at the mixture weight. for class k. The joint distribution of representations, prototypes and class assignments can be factorised follows,
T II W. W.-1, (itrnns) II (C.)))((H, C,, ghems).
T
HHIT. WIT,
p(W)
(3)
We use the notation H (H. to denote the representation vectors H. for all time steps T and analogously for WTT and C1.r- A plate diagram of the probabilistic model is depicted in App. B. We next outline how we infer the latent class protolypes WI.--
Posterior Inference & Adapted Predictions The primary goal is to update the class prototypes W, with the information obtained by the Nt representations of test time t. At each test time t, we are thus interested in the posterior distribution of the prototypes p( p(W, 12). Once p(W, (H)H))) known, we can update the classification weights with the new posterior mcan. We can fit the probabilistic model and infer the posterior distribution for the class weights W, and class assignments C, with the Expeelation-Maxxiizztinn (EM) algorithm. In the E-step, we compute the posterior p( O(WIT, 1.T, C1. (H.)), In the M-step, compute the expectation of the complete-data likeliood (Eqn. (3)) with respect to this posterior and then maximize the resulting expression with respect to the model parameters 6z
o² = arg max E Ep(W.C (lggp HT,, WITT, Ci.r)]
(4)
where comprises the parameters of the transition and emission densities as well as the mixing coeffi- cients, Φ (uiitaus yiess Tir), and have abbreviated the posterior distribution by p (W,C. C H) =
4

---

Published in Transactions on Machine Learning Research (10/2025)
pl P(Wr C1.7 H1.)). After one optimization step, we collect the K class prototypes into matrix W Using the same hidden iepresentations used to fit W we generate the predictions via the model's softmax parameterization,
yt,n ~ Cat (Fa,ni sof tmax (W, ha.)),
(5)
where It.. denotes a prediction sampled for the representation vector h Note that adaptation can be performed online by optimizing Eqn. (4) incrementally, considering only data up to point To omit computing the complete-data log likelihood for an increasing sequence time goes on, employ sliding window approach. Algorithm outlines the overall, procedure of our method. The specific EM updates depend on the chosen parametric form of the SSM. We consider two instances: Gaussian model and a hyperspherical model based on the von Mises Fisher distribution. The corresponding EM steps for these two cases are detailed in Algorithm 2 and Algorithm 3, respectively.
Algorithm STAD
1: Input: Source model Sa, test batches XI.T, sliding window size 8
Initialize: mixing coefficients Te, weights We, transition and emission parameters thtrans, gems for E T do
4: Define sliding window: S {T max ST
5: Compute representations: H, = 1/-1111 (X,)
6: Fit probabilistic SSM via EM: W,, C, TT, wttans yenus = EM,, W., C,, T fres., straus beem))
7: Predict: Vr,
Cat(yeni softmax( W, hr,)))
8: end for
Gaussian Model The simplest parametric choice for the transition and emission models is Gaussian. The resulting probabilistic SSM can be interpreted as a mixture of K Kalman filters (KFs) (Kalman, 1960). Owing to the lincar Gaussian structure, the posterior expectation E,,W EpwW,CIHr [+] in Eqn. (4) can be computed in closed form using the standard KF prediction, update, and smoothing equations (Calabrese Paninski, 2011; Bishop Nasrabadi, 2006). The complete model specification is provided in App. B.1, and the corresponding EM updates are summarized in Algorithm 2. However, these closed-form computations come at cost: they require matrix inversions of size D D and the storage of K x D parameters. This makes the Gaussian formulation expensive for high-dimensional features and impractical in low-resource settings. Next, present model for spherical features that circumvents these limitations.
3.3
Von Fisher Model for Hyperspherical Features
H
Hy IC
Choosing Gaussian densities for the transition and emission models, as discussed above, assumes the representation space follows an Euclidean geometry. However, prior work has shown that assuming the hidden representations lie on the unit hyper- sphere results in a botter inductive bias for OOD generalization (Mettes al., 2019; Bai al., 2024). This is due to the norms of the representations being biased by in-domain information such class balance, making angular distances more reliable signal of class membership in the presence of distribution shift (Mettes et al., 2019; Bai et al., 2024). We too employ the hyper- spherical assumption by normalizing the hidden representations such that ||b||2 = and model them with the von Mises-Fisher (vMF) distribution (Mardia & Jupp, 2009),
Mep1
we we42.11
WF42.5
Ha42
Hr42 Ge+2
Figure 2: STAD-vMF: Representations lie on the unit sphere. STAD adapts to the distribution shift induced by changing de- mographics and styles by directing the last. layer weights Wa, towards the representa- tions H,
vMF(h: pk, R) = CD((s exp {n h[
(6)
where He E D with ||wl| = denotes the mcan direction of class k, E I the concentration parameter, and (p(k) the normalization constant. High values of imply larger concentration around μ4g The vMF distribution is proportional to a Gaussian distribution with isotropic variance and unit norm. While previous
5

---

Published in Transactions on Machine Learning Research (10/2025)
work (Mettes et al., 2019; Ming et al. 2023: Bai et al., 2024) has explored training objectives encourage representations to be vMF-distributed, apply Eqn. (6) to model the evolving representations.
Hyperspherical State-Space Model Returning to the SSM given above (Eqn. (3)); we specify both transition (Eqn. (1)) and emission models (Eqn. (2)) as vMF distributions, resulting in a hyperspheri- cal transition model, p(W, Wz-1) = II (We.e/WWee... k and hyperspherical emission model, (W,) = II Σ T (be Week, ). The parameter size of the vMF formulation scales linearly with the feature dimension, (DK)), compared to the Gaussian casc's O(D²K). Notably, the noise parameters, x gtrans sems simplify to scalar values which reduces memory substantially. Fig. 2 illustrates this STAD-vMF variant.
Posterior Inference In contrast to the linear Gaussian case, the vMMF distribution is not closed under marginalization. As a result, the posterior distribution required for computing the expectation in Equ. (4) (E-step of the EM algorithm) cannot be expressed in closed form. To address this, we adopt a variational EM approach, approximating the posterior p(W, C H) with mean-field variational distribution q (W, C)
following Gopal & Yang (2014): q(WL,)) vMF(: Pe, 7,k,, ((Cr,n)) = Cat(:: d,,))
(7)
The variational distribution q( (W, C) factorizes over n, k and the objective from Equ. (4) arg max, W, log H. W 1:,, C1:r)]. The optimal variational parameters given by
becomes
Te, PppCCpmm exp En [Wr,k] h Σj=1 Tee (D,CD(mmm exp { (NemE Barmen//we [we.] hh,n
Ann
Ne, 11Be,oll, Pt, /
(8)
N,
with = == trans
11111 Eyg [we] + K ems Σ
E. (e,, hea + k trans
HECT Byg B.(We+i,,ls
(9)
where T(,) denotes the indicator function, ensuring that terms are omitted at the temporal boundaries and Ey denotes expectations with respect to q( (W, C). The expectations of the variational distributions (Eqn. (7)) are Eg(c,,n] (Nt.m,1...., ,,,,,, and Eg [wrx]]
-ADD,,,))L.. which completes the E-step. We defer the M-step to App. B.2. Algorithm 3 summarizes the FM algorithm for STAD-vMF. As in the Gaussian case, we form the updated last-layer weight matrix by stacking the posterior mcans, W. = (Pt,,..... Pt,k). Notably, posterior inference for the vMF model is much more scalable than the Gaussian case. It operates with linear complexity in D, rather than cubic, reducing runtime significantly.
Recovering the Softmax Predictive Distribution In addition to the inductive bias that is beneficial under distribution shift, using the vMF distribution has an additional desirable property: classification via the cluster assignments is equivalent to the original softmax- parameterized classifier. The equivalence is exact under the assumption of equal class proportions and sharing k across classes:
(he Wr.ks R sems)
p(ct,n,k = 1 1/,,, Wt.1. We.K, ( com)s))
vMF (h.n; Wt.jr gems)
==
(10)
CD(nemm)) exp poms w hem K Cp(cemss) exp { {rems
softmax
(R amss W.hb.))
which is equivalent to softmax with temperature-scaled logits, with the temperature set to 1/x Tem- perature scaling only affects the probabilitics, not the modal class prediction. If using class-specific gems values and assuming imbalanced classes, then these terms show up as class-specific bias terms, p(ce...k = 1/,,, Wt...... W mi kom=)) x exp 16 regms -. Wr. + log CD(ngma) + log Ti,k
4 Related Work
We overview SSMs and TTA next. App. A provides more detailed discussions TTA and adjacent fields.

---

Published in Transactions on Machine Learning Research (10/2025)
State-Space Models (SSMs) in Deep Learning Probabilistic SSMs, such the Kalman filter (Kalman, 1960), provide a principled framework for updating latent states with new information and have been widely applied in deep learning. In sequence modeling, SSMs are used to learn latent trajectories in both discrete (Krishnan et al.; 2015; Karl et al., 2017; Fraccaro et al., 2017; Bocker et al., 2019) and continuous time (Schirmer et al., 2022; Ansari et al., 2023; Zhu et al., 2023). Recent advancements in structured SSMs (Gu et al., 2022; Smith et al., 2023; Gu & Dao, 2023) have pushed the state-of-the-art in sequence modeling. However, these models focus on individual sequence dynamics, whereas we are interested in modeling the dynamics of an entire data stream. Our objective aligns more closely with online learning (Duran-Martin et al., 2025). Notably, Chang et al. (2023) and Titsias et al. (2024) extend Kalman filters to handle non-stationary, supervised settings. Like our method, Titsias et al. (2024) infers the evolution of the classification head with a SSM. However, they require labels whereas our method is fully unsupervised.
Test-Time Adaptation (TTA) TTA aims to make pre-trained models robust to distribution shifts by adapting directly to the test data during inference. is training-agnostic, contributing to its growing popularity (Xiao & Snoek, 2024). Early TTA methods recalculate batch normalization (BN) statisties from test data (Nado et al., 2020; Schneider et al., 2020). Updating model parameters via gradient descent is most commonly done via entropy minimization (Grandvalet & Bengio, 2004; Wang el. al., 2021; Zhang el al., 2022; Yu et al., 2024; Gao et al., 2024). Alternative approaches include contrastive learning (Chen et al., 2022), invariance regularization (Nguyen et al., 2023), Hebbian learning (Tang et al., 2023), and prompt tuning (Niu et al., 2024). Recent work has focused on making TTA reliably deployable by stress-testing various real-world settings (sce App. for detailed discussions). A key challenge is continual adaptation to a non-stationary target domain, studied in CTTA (Wang et al., 2022b). Solutions include episodic resets (Press et al., 2024), student-teacher models (Döbler et. al., 2023; Brahma & Rai, 2023), masking (Liu el. al., 2024) and regularization (Niu et al., 2022; Song et al., 2023). Approaches relying test data statistics further struggle with class imbalance or small test batches, which has led to adaptations in BN strategics (Zhao el al., 2023a; Lim et al., 2023), reservoir sampling (Gong et al., 2022; Yuan et al., 2023), sample filtering (Niu et al., 2023), and label distribution tracking (Zhou et al., 2023). Methods that adapt the classification head, rather than relying on BN, effectively prevent such collapse (Boudiaf et al., 2022; Jang et al., 2023). The most similar approach to ours, T3A (Iwasawa & Matsuo, 2021), recomputes prototypes from representations but relies on heuristics, whereas STAD explicitly models dynamics with a SSM. Lee & Chang (2024b;a); Lee (2025) also use SSM for online TTA, but to filter noisy model updates, while our SSM models the distribution shift itself. Concurrent to our work, Dai & Yang (2025) proposes Gaussian mixture models updated via EM to adapt the prototypes of vision language models (VLMs). Aside from focusing on VLMs, their model is also static and does not consider transition dynamics.
5 Experiments
We evaluate our method, STAD, against various basclines on 7 datasets under challenging settings. Sec. 5.1 studies temporal distribution shifts as defined in Sec. 2, demonstrating the difficulty of the task and STAD's robustness in practical settings. In Sec. 5.2, we go beyond temporal shifts and find that STAD is competitive on reproduction datasets and synthetic corruptions as well (see App. D.1 for results on domain adaptation). Finally, in See. 5.3, we provide insights into STAD's mechanisms, confirming the reliability of its prototypes and highlighting the importance of modeling shift dynamies through an ablation study. We now describe the experimental setup. Details are listed in App. C.
Datasets We investigate temporal distribution shifts using three image classification datasets spanning several years. Ycarbook (Ginosar et al., 2015) involves binary gender prediction on portrait images, capturing changes in demographics and beauty standards over time. EVIS (Zhou et al., 2022a) categorizes vehicles and electronic products. FMoW-Time (Koh et al., 2021) maps satellite images to land use categories. Each dataset comprises samples from multiple years, with the carlier years used for training and the later years for testing (see App. C.1 for details). To evaluate the effectiveness of our method beyond TempTTA, we also test its performance reproduction datasets CeoeetssCCE (0., ImageNet and image corruptions (CIFAR-10-C).
7

---

Published in Transactions on Machine Learning Research (10/2025)
Table 2: Accuracy on temporal distribution shifts and label shifts, averaged over three random seeds. Colors highlight performance that either improves degrades relative the source model. Best model in bold, second-best best underlined.
Yearbook
EVIS
FMoW-Timm
Method
covariate shift
+ label shift
covariate shift.
+ label shift
covariate shift
+ label shift
Source model
$1.30 +: 4.18
56.59
0.92
68.94 + 0.20
adapt feature exbractor
BN
84.54 2.10
70.47 + 0.33
45.72 = 2.79
14.48
1.02
67.60
0.44
10.14 Σ 0.04
TENT
84.53 i 2.11
70.47 + 0.33
45.73 = 2.78
14.49
1.02
67.86 1 0.54
10.21
1 0.01
COTTA
84.35 + 2.13
66.12 + 0.87
46.13 2.86
14.71
+ 1.00
68.50 + 0.25
10.19 1 0.04
SHOT
85.17 + 1.89
70.71 + 0.20
45.93 2.75
14.51
+ 1.00
68.02 + 0.51
10.08 1 0.07
SAR
84.54 2.10
70.47 = 0.33
45.78 = 2.80
14.63
1.00
67.87 = 0.51
10.27 + 0.10
CMF
85.34 + 1.86
71.20 + 0.51
45.75 = 3.01
35.77 + 2.07
67.44 + 0.46
11.21 + 0.10
RoTTA
80.49 + 3.48
80.15 + 3.50
44.28 3.02
45.38 + 2.88
67.43 + 0.67
65.77 + 0.68
adapt classifier
LAME
81.60 = 3.99
82.70 + 4.55
56.67 0.99
69.37 + 5.37
68.32 + 0.32
83.05 + 0,48
T3A
83.49 2.55
83.46 + 2.59
57.63
0.77
37.32
0.77
66.77 + 0.26
66.83 + 0.27
STAD-vMF (ouns)
85.50
1.34
84.46 + 1.19
56.67 0.82
62.08
1.11
68.87 + 0.06
86.25 1.18
D-Aus (ours)
86.22 + 0.84
84.67 + 1.46
Source Architecturos and Basclines We employ a varicty of source architectures to demonstrato the model-agnostic nature of STAD. They vary backbone architecture (ViT, CNN, DenseNet, ResNet, WideResNet) and dimensionality of the representation space (from 32 up to 2048). We list details in App. C.2. We compare against 8 TTA baselines representing fundamental TTA approaches. Six of them adapt the feature extractor: Batch norm adaptation (BN) (Schneider et al., 2020; Nado et al., 2020), TENT (Wang et al., 2021), CoTTA (Wang et al., 2022b), SHOT (Liang et al., 2020) SAR (Niu et al., 2023) and RoTTA (Yuan et al., 2023). Like our method STAD, two baselines adapt the last layer: T3A (Iwasawa & Matsuo, 2021) and LAME (Boudiaf et al., 2022). More details are provided in App. C.3. Batch sizes are the same for all baselines. To ensure optimal performance on newly studied datasets, we conduct an extensive hyperparameter search for cach bascline (sce App. C.4) and report the best setting.
5.1 Temporal Distribution Shifts
We start by evaluating the adaptation abilities to temporal distribution shift on three image classification datasets (Yearbook, EVIS, FMoW-Time), which vary in number of classes (2, 10, 62, respectively), rep- resentation dimension (32, 512, 1024, respectively) and shift dynamics (recurring, progressive and rapid, respectively as visible Fig- 3). For the low-dimensional representations of Yearbook, we also evaluate our computationally costly Gaussian model (STAD-Gauss). We evaluate two settings: (i) covariate shift with uniform label distribution and (ii) covariate shift with additional shift in the label distribution (y). Having uniform label distribution samples are evenly shuffled, making test batches nearly class balanced-hee been the traditional evaluation setting for TTA. However, particularly in temporal distribution shifts, it is highly unlikely that samples arrive in this iid-manner. Instead, temporally correlated test streams often observe consecutive samples from the same class (Gong et al., 2022). We follow Lim et al. (2023), ordering the samples by class and thus inducing an extreme label shift. We draw the class order uniformly at random.
Temporal shifts pose challenges for existing TTA methods. Tab. 2 shows overall accuracy, averaged over all time steps and three random training seeds. Results that do not outperform the source model are highlighted in red and ones that do in blue. Methods that primarily adapt the feature extractor are shown in the upper section of the lable. Ones that, like ours, adapt the classifier are shown in the lower section. To summarize the results: on Yearbook, all methods perform well without label shift, and with label shift, only classifier-based methods improve upon the source bascline. Featuro-basod methods completoly fail on EVIS, and all models, except LAME and STAD-vMF under label shift, fail on FMoW-Tima This leads to three key takeaways: first, these TeMPTTA tasks inherently difficult, leading to smaller adaptation
8

---

Published in Transactions on Machine Learning Research (10/2025)
Yearbook
EVI5
FMoW-Time
100
80
Accuracy (1)
801
TENT
LAME
70
CoTTA
T3A
SHOT
STAD-MP
40
SAR
Source
1970
1980
1990
2000
2010
2012
2014
2016
2018
2020
2013
2014
2015
2016
2017
Year
Year
Year
Figure 3: Accuracy over time for TempTTA: STAD mitigates distribution shifts by improving up to 10 points over the source model (Yearbook, 1980s). Some baselines perform similarly, shown by overlaying accuracy trajectories.
gains overall compared to traditional corruption experiments. Second, methods that adapt only the last layer clearly perform better temporal distribution shifts under both label distribution settings. This indicates that perhaps 'less is more' for TeMp Third, STAD demonstrates the most consistent performance, ranking as the best or second-best model across all datasets and settings. On Yearbook, both the Gaussian and vMF variants outperform the baselines, with the fully parameterized Gaussian model better capturing the distribution shift than the more lightweight vMF model. Fig. displays adaptation performance over different timestamps. We see that on EVIS (middle) the methods markedly separate, which reflects the aforementioned gap between feature-based and classifier-based approaches. The reader may wonder if STAD can be stacked feature-bact based approach. We present results for BN in Tab. 11 (App. D.3) but find no significant. improvement. in STAD's performance.
STAD excels under label shift Tab. 2 demonstrates that STAD performs particularly well under imbalanced label distributions, delivering the best results on both Yearbook and FMoW-Time. This advantage stems from STAD's clustering approach, where a higher number of samples from the same ground truth class provides a stronger learning signal, leading notable FMoW, where STAD improves upon the source model by more than 17 points. Further, the performance gap between classifier and feature extractor adaptation methods bocomes even more pronounced in this setting. This is not surprising as the latter typically depend heavily on current test-batch statistics, making them vulnerable to imbalanced class distributions (Niu et al., 2023). In contrast, having fewer classes to cause confusion allows classifier- based methods to benefit from label shift, with STAD delivering the most persistent adaptation gains.
accurate prototype estimates. This particularly
Yearbook (covariate shift)
EVIS (covariate shitt)
FMoW-Time (covariate shift)
Accuracy (7)
Accuracy
Accuracy
TENT
T3A
CalTA
SLAU-MP
SAR
Source
RaTTA
16
12
04
125
236
512
1106
2145
12
84
125
256
532
1104
2045
16
52
64
125
200 532 2044
Batch Size
Batch Size
Eatch Size
Yearbook (covariate label shift)
EVIS (covariate + label shift)
FMoW: Time (cnvariate label shift)
Acourccy (1)
Accuracy (1)
30
32
256
1004
2045
32
125
256
512
1024
16
128
512
2024
Figure 4: Batch size effects under covariate shift (first row) and additional label shift (second row): STAD-vMF (dark blue) shows robustness to small batches, with a sweet spot around batch size 16 for label shift on EVIS and FMoW- Time.

---

Published in Transactions on Machine Learning Research (10/2025)
STAD is robust to small batch sizes Adapting to small number of samples is crucially valuable, as does not have to wait for large batch to accumulate in order to make adapted predictions. We next evaluate performance across 12 different batch sizes ranging from 1 to 2048 under both covariate shift and additional label shift. Fig. 4, displays results. STAD-vMF (dark blue) is able to maintain stable performance under all batch sizes. Tab. 10 (App. D.2), we report values for batch size showing that. STAD adapts successfully even the most difficult setting. In contrast, methods relying on normalization statistics collapse when not seeing enough samples per adaptation step. For example, on FMoW, feature-based methods collapse to nearly random guessing at the smallest batch sizes. When batch sizes large, note that TENT, CoTTA, SHOT, and SAR hit memory constraints on FMoW-Time, failing to close the gap to the source model performance in the label shift scenario.
5.2 Beyond Temporal Shifts: Reproduction Datasets and Synthetic Corruptions
Although STAD designed for temporal distribution shifts, we are also interested in the applicability of our method to other types of shifts. Next we report performance on reproduction datasets and synthetic image corruptions.
Reproduction Datascts We evaluate our method on reproduction datasets (CIFAR-10.1, ImageNet which have been considered more realistic and challenging distribution shifts (Zhao et al., 2023b). Tab. 3 confirms the difficulty of adapting to more natural dis- tribution shifts. For C1FAR-10.1, only T3A and STAD outperform the source model for both with and without label shift, with STAD adapting best. For ImageNet none of the methods improve upon the source model when the label distribution is uniform. We again ob- serve that classifier- adaptation methods handle label shifts better by a significant margin.
Table 3: Accuracy reproduction datasets.
CIEAR-10.1
Imaag:NetV2
Method
covariate
label
comriste shift +
Soiaree model
88.25
63.18
udept fosture extractor
BN
86.45
0.28
23.83
0.31
02.69
: 0.15
43,20 = 0.28
TENT
0.35
CoTTA
86.15
0.17
22.37
0.25
61.66
0.29
43.73
0.33
SHOT
0.23
SAR
86 10 0.28
23.82
0:53
62.99
0.10
13.19 + 0.25
ROTTAA
0.21
udept elassiffe
LAME T3A
0.09
0.10
88.28 + 0.06
80.00
0.66
02.86
0.04
63.47 + 0.001
STAD&MMP (oun)
88.42 0.10
92.23
0.70
62.39
0.05
81.46 0.24
Synthetic Corruptions Lastly, we test our method on gradually increasing noise corrup- tions of CIFAR-10-C, a standard TTA bench- mark and provide results on ImageNet-C in App. D.4. Tab. 4 shows the accuracy averaged across all corruption types for CIFAR-10-C. We make three key observations. First, perfor- mance gains are much higher than on previous datasets indicating the challenge posed by non- synthetic shifts. Second, as expected, methods adapting the backbone model are more perfor- mative on input-level noise, since such shifts primarily affect earlier layers (Tang et al., 2023; Lee et al., 2023). Lastly, STAD is consistently the best method amongst those adapting only the last layer.
Table 4: Accuracy on synthetic corruptions (CIFAR-10-
Cormuttio severity
Method
5
Mean
Source
86.90
81.34
74.92
67.64
56.48
73.46
adept feature estractor
BN
90.18
88.16
86.24
83.18
79.27
85.41
TENT
90.87
89.70
88.32
85.89
83.09
87.57
CoTTA
90.62
89.
88.55
87.28
85.27
88,
SHOT
90.31
88.66
87.31
85.02
83.
86.69
SAR
90.16
88.09
86.26
83.32
79.48
85.46
RoTTA
90.60
89.41
88.14
85.88
83.37
87.48
adept classifier
LAME
86.94
81.39
74.93
65
56.47
73.48
T3A
87.83
82.75
76.77
69.43
57.90
74.94
STAD-vMF (ours)
88.21
83.68
78.
72.19
62.41
76.99
5.3 Analysis of Tracking Abilities
Lastly, we seek to further understand the reasons behind STAD's strong performance. At core, STAD operates through mechanism of dynamic clustering. We next inspect the importance of STAD's dynamics component and assess the fidelity of its clustering.
10

---

Published in Transactions on Machine Learning Research (10/2025)
Clusters reliable. We evaluate how well STAD's inferred cluster centers align with the ground truth cluster centers (computed using labels). We chose the progressively increasing distribution shift of CIFAR-1O-C as this dataset represents a bigger challenge for STAD, Fig. 5 (left) shows distance (in angular degroes) to the ground truth cluster centers for both the source model and STAD. STAD (blue line) adapts effectively, signilicantly reducing the angular distance to the ground truth cluster centers. For the source model, the progressive distribution shift causes the ground truth cluster centers to drift increasingly further from the source prototypes (red line). Additionally, by computing dispersion (Ming al., 2023) (Fig. 5, middle), which measures the spread of the prototypes (in angular degrees), we find that STAD mirrors the ground truth trend (yellow line) of clusters becoming closer together. This is promising insight, as it suggests that STAD's cluster dispersion could potentially serve as an unsupervised metric to proactively flag when clusters start overlapping and estimate adaptation accuracy. In Fig. 5 (right), we plot accuracy vs dispersion of STAD's prototypes for different corruptions and severity levels, confirming that they positively correlate.
Distance (L)
Dispersion (t)
Source
Accuracy (f)
STAD-MMF
Severity
Ground Truth
60
40
30
50
60
Severity
Severity
Dispersion
Figure 5: Cluster fidelity on CIFAR-10-C
Dynamics are crucial. STAD proposed with the assumption that adapting the class prototypes based those of the previous time step facilitates rapid and reliable adaplation. However, one could also consider static version of STAD that does not have transition model (Eqn. (1)). Rather, the class prototypes are computed as standard mixture model (Eqn. (2)) without considering previously inferred prototypes. Tab. 5 presents the accuracy differences between the static and dynamic versions of STAD. Removing STAD's transition model results in a substantial performance drop of up to 28 percentage points. This supports our assumption that SSMs are well-suited for TempTTA.
Table 5: Accuracy of dynamic and static versions of STAD (i.e. when removing the transition model)
Variant
Yearbook
FMoW
CIFAR-1O-C
STAD-vMF with dynamics
85.50 + 1.30
86.25 + 1.18
76.99
MT w/o dynamics
61.03 + 2.92
68.87 + 0.28
73.57
Delta
-24.47
-17.38
-3.41
STAD-Gauss with dynamics
86.22 0.84
STAD-Gauss w/o dynamics
57.79 + 2.14
Delta
28.43
6 Discussion and Conclusion
We studied temporal distribution shifts and demonstrated the significant challenges they pose for existing TTA methods. We proposed STAD, a novel TTA strategy based on probabilistic stato-space models to address temporal shifts. Our Gaussian and vMF variants of STAD elfectively track the evolution of the last linear layer under distribution shifts, enabling unsupervised adaptation in deployed models. We found STAD be most effective for structural temporal shifts and label shifts (Tabs. 2 and 3). While effective across range of settings, STAD's design inherits limitations regarding the types of distribution shift it mitigate. Notably, its performance depends the shift being visible in the last layer, adapting
11

---

Published in Transactions on Machine Learning Research (10/2025)
only the final classifier is less effective when earlier layers are primarily affected- behavior observe for synthetic corruptions in CIFAR-10-C (Table 4) and ImageNet-CC (Table 12), consistent with prior work (Tee et al., 2023). STAD also assumees that last-layer representations change gradually over time, and that class prototypes remain temporally correlated. This makes abrupt shifts more challenging to address, though in our experiments we did not. encounter a scenario where sudden shifts fully broke the temporal correlation (see App. D.1). Future work on TempTTA could incorporate timestamps to better model time progression or determine when adaptation no longer feasible.
Broader Impact Statement
This work introduces a probabilistic state-space framework for TTA under temporal distribution shifts. By modcling time-cvolving feature dynamics and inferring class prototypes without labels, STAD enables continuous model adaptation in settings where labels are unavailable. STAD contributes to more robust. and flexible deployment of machine learning systems in non-stationary environments. However, because the method operates without ground-truth labels, there is risk of compounding errors if the inferred prototypes drift too far from especil- in cases of abrupt or adversarial shifts. Overreliacce on unsupervised adaptation without safeg safeguards could lead to silent. model degradation. Practitioners should therefore monitor model behavior carefully and understand the assumptions underlying the temporal dynamics. Overall, this work supports the development of adaptive models under distribution shift.
Acknowledgment
We thank Metod Jazbec for valuable discussions and helpful feedback on the draft, and we thank Rajeev Verma for constructive comments on an carly mamuscript. This project was gencrously supported by the Bosch Center for Artificial Intelligence. Eric Nalisnick did not utilize resources from Johns Hopkins University for this project.
References
Samira Abnar, Rianne van den Berg, Golnaz Ghiasi, Mostafa Dehghani, Nal Kalchbrenner, and Hanie Sedghi. Gradual domain adaptation in the wild: When intermediate distributions are absent. ar preprint arXiv:2106.0600 2021. 2, 21
Abdul Fatir Ansari, Alvin Heng, Andre Lim, and Harold Soh. Neural contimuous-discrete state space models for irregularly-sampled time series. In International Conference Machine Learwing, pp. 926 951. PMLR, 2023.
Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization. arXiv preprint trXio:1907.088 02893,, 2019. 20
Guangji Bai, Chen Ling, and Liang Zhao. Temporal domain generalization with drift-aware dynamic neural
networks. International Conference on Learning Representations, 2023. 2, 20
Haoyue Bai, Yifei Ming, Julian Katz-Samuels, and Yixuan Li. Hypo: Hyperspherical out-of-distributtio
generalization. International Conference on Learning Representations, 2024. 5,
Arindam Banerjee, Inderjit S Dhillon, Joydeep Ghosh, Suvrit Sra, and Greg Ridgeway. Clustering on the unit hypersphere using von mises-fisher distributions. Journal of Machine Learning Research, 6(9), 2005. 25
Philipp Becker, Harit Pandya, Gregor Gebhardt, Cheng Zhao, C James Taylor, and Gerhard Neumann. Recurrent kalman networks: Factorized inference in high-dinensional deep feature spaces. In International Conference on Machine Learning, pp. 544-552 PMLR, 2019. 7
Christopher M Bishop and Nasser M Nasrabadi. Pattern recognition and machine learning, volume 4. Springer, 2006. 5, 22
Andreca Bobu, Eric Tzeng, Judy Hoffman, and Trevor Darrell. Adapting to continuously shifting domains. International Conference on Learning Representations Workshop Track, 2018. 21
12

---

Published in Transactions on Machine Learning Research (10/2025)
Malik Boudiaf, Romain Mueleer, Ismail Ben Ayed, and Luca Bertinetto. Parameter- online test-time adaptation. In Proceedings of the TEEE/CT /VV Conference on Compuler Vision and Patlern Recognilion, pp. 8344 8353, 2022. 3, 7, 8, 20, 28, 29
Dhanajit Brahma and Piyush Rai. A probabilistic framework for lifelong test-time adaptation. In Proceedings of the IEEE/CVE Conference on Computer Vision and Pattern Recognition, pp. 3582-3591, 2023.
Zekun Cai, Guangji Bai, Renhe Jiang, Xuan Song, and Liang Zhao. Continuous temporal domain generalization.
Advances in Neural Information Processing Systems, 97:127987-128000 2024. 20
Ana Calabrese and Liam Paninski. Kalman filter mixture model for spike sorting of non-stationary data.
Journal of neuroscience methods, 196(1):159-16,, 2011. 5, 21, 22
Peter G. Chang, Gerardo Durán-Martin, Alex Shestopaloff, Matt Jones, and Kevin Patrick Murphy, Low-rank extended kalman filtering for online learning of neural networks from streaming data. In Proceedings of The 2nd Conference on Lifelong Learning Agents, volume 232, pp. 1025-1071. PMLR, 2023. 7
Dian Chen, Dequan Wang, Trevor Darrell, and Sayna Ebrahimi. Contrastive test-time adaptation. In Proceedings of the IERE/CVP Conference on Computer Vision and Pattern Recognition, pp. 295-305, 2022.
7
Gordon Christic, Neil Fendley, James Wilson, and Ryan Mukherjee. Functional map of the world. In Proceedings of the IEEE/CVF Conference on Compuler Vision and Pallern Recogniliin, pp. 6172-6180, 2018. 27
Francesco Croce, Maksym Andriushchenko, Vikash Sehwag, Edoardo Debenedetti, Nicolas Flammarion, Mung Chiang, Prateck Mittal, and Matthias Hein. Robustbench: a standardized adversarial robustness benchmark. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks 1, 2021.
27
Qiyuan Dai and Sibei Yang. Free the fly: Enhancing ficxibility in test-time adaptation with online em. In Proceedings of the Compuler Vision and Pallern Recognition Conference, pp. 9538 9544,, 2025. 7
Jia Deng, Wei Dong, Richard Socher, Ti-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 248 255, 2009. 27
Mario Döbler, Robert A Marsden, and Bin Yang. Robust mean teacher for continual and gradual test-time adaptation. In Proceedings of the IEEE/CVE Conference on Computer Vision and Pattern Recognition, pp. 7704-7714, 2023. 7, 20
Alexcy Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, al. An image worth 16x16 words: Transformers for image recognition at scale. International Conference on Learning Representations, 2021.
27
Chaoqun Du, Yulin Wang, Jiayi Guo, Yizeng Han, Jie Zhou, and Gao Huang, Unitta: Unified benchmark and versatile framework towards realistic test-time adaptation. Second Workshop on Test Time Adoptation: Putting Updates to the Test! at ICML 2025, 2025. 20
G Duran-Martin, L Sannche--eetnccurtt AY Shestopaloff, and K Murphy. A unifying framework for generalised bayesian online learning in non-stationary environments. Transactions on Machine Learning Research, 2025.
Marco Fraccaro, Simon Due Kamronn, Ulrich Paquet, and Ole Winther. A disentangled recognition and nonlinear dynamics model for unsupervised learning. Advances in Neural Information Processing Systems, 2017.
13

---

Published in Transactions on Machine Learning Research (10/2025)
Zhengqing Gao, YuoYao Zhang, and Cheng-Lin Liu. Unified entropy optimization for open-set test-time adaptation. In Proceedings of the IEEE/CVI /VV Conference on Compuler Vision and Patlern Recognilion, pp. 23975 23984, 2024. 7
Shiry Ginosar, Kate Rakelly, Sarah Sachs, Brian Yin, and Alexei A Efros. A century of portraits: visual historical record of american high school yearbooks. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pp. 1 1-7, 2015. 7, 27
Taesik Gong, Jongheon Jeong, Taewon Kim, Yewon Kim, Jinwoo Shin, and Sung-Ju Lee, Note: Robust continual test-time adaptation against temporal correlation. Advances in Newral Information Processing Systems, 2022. 7, 8, 20
Siddharth Gopal and Yiming Yang. Von mises-fisher clustering models. In International Conference on Machine Learning, pp. 154-162. PMLR, 2014. 6, 29
Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. Advances in Neural Information Processing Systems, 17, 2004.
Albert Gu and Tri Dao. Mamba: Linear-tine sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00758 2023. 7
Albert Gu, Karan Goel, and Christopher Ré. Efficiently modeling long sequences with structured state spaces. International Conference on Learning Represenlations, 2022. 7
Shurui Gui, Xiner Li, and Shuiwang Ji. Active time adaptation: Thcoretical analyses and an algorithm. arXiv preprint ar Xiv:2440 00004, 2024. 31
Ishaan Gulrajani and David Lopez-Paz. In search of lost domain generalization. International Conference Learning Representations, 2021. 31
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on Computer Vision and Pottern Recognition, pp. 770-778, 2016. 27
Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. International Conference on Learning Representations, 2019. 27
Judy Hoffman, Trevor Darrell, and Kate Saenko. Contimuoss manifold based adaptation for evolving visual domains. In Proceedings of the IEEE conference on computer vision and pottern recognition, pp. 867-874,
2014. 21
Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 4700-4708, 2017. 27
Yusuke Iwasawa and Yutaka Matsuo. Test-time classifier adjustment module for model-agnostin domain generalization. Advances in Neural Information Processing Systems, 2021. 3, 7, 8, 28, 29, 31
Minguk Jang, Sac-Young Chung, and Hye Won Chung. Test-time adaptation via self- self-training with nearest. neighbor information. International Conference on Learning Representations, 2023. 7, 31
Yujie Jin, Zhibang Yang, Xu Chu, and Liantao Ma. Temporal domain generalization via learning instance- level evolving patterns. In Proceedings of the Thirty Third International Joint Conference on Artificial Intelligence, pp. 4255-4263, 2024. 20
Rudolph Emil Kalman. A new approach to linear filtering and prediction problems. 1960. 5, 7
Maximilian Karl, Maximilian Soclch, Justin Bayer, and Patrick van der Smagt. Deep variational bayes filters: Unsupervised learning of state space models from raw data. International Conference on Learning Representations, 2017.
14

---

Published in Transactions on Machine Learning Research (10/2025)
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 2015. 28
Pang Wei Koh, Shiori Sagawa, Henrik Markhund, Sang Michael Xie, Marvin Zhang, Akshay Balsubramani,
Weihua Hu, Michihiro Yasunaga, Richard Lanas Phillips, Irena Gao, et al. Wilds: benchmark of in-the-wild distribution shifts. In International Conference on Machine Learning, pp. 5637-5664. PMLR, 2021. 7, 27
Rahul G Krishnan, Uri Shalit, and David Sontag, Deep kalman filters. Advances in Approrimate Bayesion Inference NIPS 2015 Workshop, 2015.
Alex Krizhevsky, Geoffrey Hinton, al. Learning multiple layers of features from tiny imagos. 2009. 27
David Krueger, Ethan Caballero, Meaank Jacobsen, Amy Zhang, Jonathan Binas, Dinghuai Zhang, Remi Le Priol, and Aaron Courville. Ousto--dist generalization via risk extrapolation (rcx). In International Conference on Machine Learning, pp. 5826. PMLR, 2021. 20
Ananya Kumar, Tengyu Ma, and Percy Liang. Understanding self-training for gradual domain adaptation.
In International Conference on Machine Learning, pp. 5468 5479. PMLR, 2020. 2, 21
Jae-Hong Lee. Bayesian weight enhancement with steady-state adaptation for test-time adaptation in dynamic environments. In International Conference on Machine Learning, 2025. 7
Jae- Hong Lee and Joon-Hyuk Chang. Continual momentum filtering on parameter space for online test-time adaptation, 2024a.
Jae-Hong Lee and foon-Hyuk Chang. Stationary latent weight inference for unreliable observations from online test-time adaptation. In International Conference on Machine Learning, 2024b. 7
Yoonho Lee, Annie S Chen, Fahim Tajwar, Ananya Kumar, Huaxiu Yao, Percy Liang, and Chelsea Finn.
Surgical fine-tuning improves adaptation to distribution shifts. International Conference on Learning Representations, 2023. 10,
Jian Liang, Dapeng Hu, and Jiashi Feng. Do really need to access the source data? source hypothesis transfer for unsupervised domain adaptation. In International Conference on Machine Learning, pp. 5028-6039. PMLR, 2020. 8, 28, 29
Jian Liang, Ran He, and Tieniu Tan. A comprehensive survey on test-time adaptation under distribution shifts. International Journal of Computer Vision, pp. 34, 2024.
Hyesu Lim, Byeonggeun Kim, Jacgul Choo, and Sungha Choi. Ttn: A domain-shift aware batch normalization in test-time adaptation. International Conference on Learning Representations, 2023. 7, 8, 20
Jiaming Liu, Ran Xu, Senqiao Yang, Renrui Zhang, Qizhe Zhang, Zehui Chen, Yandong Guo, and Shanghang Zhang. Continual-mae: Adaptive distribution masked autoencoders for continual test-time adaptation. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognátion, pp. 28653-28663
2024. 7
Kanti V Mardia and Peter E Jupp. Directional slatistics. John Wiley & Sons, 2009. 5
Robert A Marsden, Mario Döbler, and Bin Yang. Universal time adaptation through weight ensem- bling, diversity weighting, and prior correction. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 2555-2565, 2024. 20
Pascal Mettes, Elise Van der Pol, and Cees Snoek. Hyperspherical prototype networks. Advonces in Neural
Information Processing Systems, 2019. 5, 6
Yifei Ming, Yiyou Sun, Ousmane Dia, and Yixuan Li. How exploit hyperspherical embeddings for out-of-distribution detection? International Conference Learning Representations, 2023. 6, 11
15

---

Published in Transactions on Machine Learning Research (10/2025)
Zachary Nado, Shreyas Padhy, D Sculley, Alexander D' D'Amour Balaji Lakshminarayanan, and Jasper Snock. Evaluating prediction-time batch normalization for robustness under covariate shift. TCML, 2020 Workshop on Uncertainty Robustness in Deep Learning, 2020. 1, 7, 8, 28
Anshul Nasery, Soumyadeep Thakur, Vihari Piratla, Abir De, and Sunita Sarawagi. Training for the future: A simple gradient interpolation loss to generalize along time. Advances in Neural Information Processing Systems, 2021. 20
A Tuan Nguyen, Thanh Nguyen-Tang, Ser-Nam Lim, and Philip HS Torr. Tipi: Test time adaptation with transformation invariance. In Proceedings of the IEEE/CVE Conference on Computer Vision and Pallern Recognition, pp. 24162-24171, 2023. 7
Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen, Shijian Zheng, Peilin Zhao, and Mingkui Tan. Efficient test-time model adaptation without forgetting. In International Conference on Machine Learning, pp. 16888 16905. PMLR, 2022. 7
Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Zhiquan Wen, Yaofo Chen, Peilin Zhao, and Mingkui Tan. Towards stable test-time adaptation in dynamic wild world. International Conference on Learning Representations, 2023. 1, 2, 7, 8, 9, 20, 28, 29
Shuaicheng Niu, Chunyan Miao, Guohao Chen, Pengcheng Wu, and Peilin Zhao. Test-time model adaptation with only forward passes. In International Conference on Machine Learning. PMLR, 2024. 7
Ori Press, Steffen Schneider, Matthias Kümmerer, and Matthias Bethge. Rdumb: A simple approach that questions our progress in continual test-time adaptation. Advances in Neural Information Processing Systems, 2024. 7
Tiexin Qin, Shiqi Wang, and Haoliang Ti. Generalizing to evolving domains with latent struclure-aware sequential autoencoder. In International Conference Machine Learning, pp. 18062 18082. PMLR, 2022.
20
Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenct classifiers generalize to imagenet? In International Conference on Machine Learning, pp. 5389-5400. PMLR, 2019. 27
Mona Schirmer, Mazin Eltayeb, Stefan Lessmann, and Maja Rudolph. Modeling irregular time series with continuous recurrent units. In International Conference on Machine Learning, pp. 19388 19405. PMLR, 2022.1 7
Steffen Schneider, Evgenia Rusak, Luisa Eck, Oliver Bringmann, Wieland Brendel, and Matthias Bethge. Improving robustness against common corruptions by covariate shift adaptation. Advances in Neural Information Processing Systems, 2020. 1, 7, 8, 28
Jimmy TH Smith, Andrew Warrington, and Scott W Linderman. Simplified state space layers for sequence modeling. International Conference on Learning Representations, 2023. 7
Junha Song, Jungsoo Lee, In So Kweon, and Sungha Choi. Ecotta: Memory-efficient continual test-time adaptation via self-distilled regularization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pollern Recognition, pp. 11929, 2023. 7, 27
Yongyi Su, Xun Xu, and Kui Jia. Towards real-world test-time adaptation: Tri-net self-training with balanced normalization. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 38, pp. 15126-15135, 2024. 20
Yushun Tang, Ce Zhang, Heng Xu, Shuoshuo Chen, Jie Cheng, Luziwei Leng, Qinghai Guo, and Zhihai He. Medua-modulated hebbian learning for fully test-time adaptation. In Proceedings of the LEEE/CV Conference on Compuler Vision and Pallern Recognition, pp. 3728 3738, 2023. 7, 10
Michalis K. Titsias, Alexandre Galashov, Amal Rannen- Triki, Razvan Pascanu, Yee Whye Tch, and Jörg Bornschein. Kalman filter for online classification of non-stationary data. International Conference on Learning Representations, 2024. 7
16

---

Published in Transactions on Machine Learning Research (10/2025)
Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno A. Olshausen, and Trevor Darrell. Tent: Fully test-time adaptation by entropy minimization. International Conference on Learning Represenlations, 2021. 1, 7, 8, 20, 27, 28
Haoxiang Wang, Bo Li, and Han Zhao. Understanding gradual domain adaptation: Improved analysis, optimal path and beyond. In International Conference Machine Learning, pp. 22784 22801. PMLR, 2022a. 21
Qin Wang, Olga Fink, Lue Van Gool, and Dengxin Dai. Continual test-time domain adaptation. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 7201- 2022b. 2, 7, 8, 20, 28
Ross Wightman. Pytorch image models. http:://ggtuuu..ooo//////aaaaaap 27
2019.
Markus Wulfmeier, Alex Bewley, and Ingmar Posner. Incremental adversarial domain adaptation for continually changing environments. In 2018 IEEE International conference on robotics and automation (ICRA), pp. 4489 4495. IEEE, 2018. 21
Zchao Xiao and Cees GM Snock. Beyond model adaptation at test time: survey, arXiv preprint wrXiv:211.036697 2024. 7, 20
Mixue Xie, Shuang Li, Binhui Xie, Chi Harold Liu, Jian Liang, Zixun Sun, Ke Feng, and Chengwei Zhu. Weight diffusion for future: Learn to generalize in non-stationary environments. Advances in Newral Information Processing Systems, 2024a. 20
Mixue Xie, Shuang Li, Longhui Yuan, Chi Liu, and Zehui Dai. Evolving standardization for continual domain generalization over temporal drift. Advances in Neural Information Processing Systems, 36, 2024b. 20
Huaxiu Yao, Caroline Choi, Bochuan Cao, Yoonho Lee, Pang Wei W Koh, and Chelsea Finn. Wild-time: A benchmark of in-the-wild distribution shift over time. Advances in Neural Information Processing Systems, 2022. 27
Yeonguk Yu, Sungho Shin, Seunghyeok Back, Mihwan Ko, Sangiun Noh, and Kyoobin Lee. Domain-specific block selection and paired-view pseudo-labeling for online test-time adaptation. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 22723 22732, 2024.
Yongcan Yu, Lijun Sheng, Ran He, and Jian Liang. Benchmarking test-time adaptation against distribution shifts in image classification. arXiv preprint (arXiv:23077003133) 2023. 1
Longhui Yuan, Binhui Xie, and Shuang Li. Robust test-time adaptation in dynamic scenarios. In Proceedings of the IEEE/CVE Conference on Computer Vision and Pattern Recognition, pp. 15922 15932, 2023. 7, 8, 20, 28, 29
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. In British Machine Vision Conference 2016. British Machine Vision Association, 2016. 27
Maxime Zanella, Clément Fuchs, Christophe De Vleeschouwer, and Ismail Ben Ayed. Realistic test-time adaptation of rision-languag, models. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 25103-25112 2025. 20
Qiuhao Zeng, Changjian Shui, Long- Kaig-Kai Huang, Peng Liu, Xi Chen, Charles Ling, and Boyu Wang. Latent trajectory learning for limited timestamps under distribution shift over time. International Conference on Learning Represenlations, 2024. 20
Hongyi Zhang. mixup: Beyond empirical risk minimization. International Conference on Learning Represen- lalions, 2018. 20
Marvin Zhang, Sergey Levine, and Chelsea Finn. Memo: Test time robustness via adaptation and augmenta- tion. Advances in Newral Information Processing Systems, 35:38629 386442, 2022.
17

---

Published in Transactions on Machine Learning Research (10/2025)
Bowen Zhao, Chen Chen, and Shu-Tao Xia. Delta: degradation-free fully test-time adaptation. International Conference on Learning Representations, 2023a. 7
Hao Zhao, Yuejiang Liu, Alexandre Alahi, and Tao Lin. On pitfalls of test time adaptation. In International Conference Machine Learning, pp. 42058 42080, 2023b. 1, 10, 28, 29
Kaiyang Zhou, Ziwei Liu, Yu Qiao, Tao Xiang, and Chen Change Loy. Domain generalization: A survey. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(4):4396 4415, 2022a. 7, 20
Shiji Zhou, Lianzhe Wang, Shanghang Zhang, Zhi Wang, and Wenwu Zhu. Active gradual domain adaptation: Dataset and approach. IEEE Transactions on Multimedia, pp. 1 1, 2022b. 27
Zhi Zhou, Lan-Zhe Guo, Lin-Han Jia, Dingchu Zhang, and Yu-Feng Li. Ods: Test-time adaptation in the presence of open-world data shift. In International Conference Machine Learning, pp. 42574-42588. PMLR, 2023. 7
Harrison Zhu, Carles Balsells-Rodas, and Yinghen Li. Markovian gaussian process variational autoencoders.
In International Conference on Machine Learning, pp. 42938 42961. PMLR, 2023.
18

---

Published in Transactions on Machine Learning Research (10/2025)
A
Appendix
Appendix
The appendix structured follows:
App. A discusses further related work such as adjacent robustness paradigms and further TTA settings that aim for realistic evaluations.
App. B provides methodological details STAD.
App. B.1 defines the Gaussian SSM (STAD-Gauss), provides the respective EM update equations and an algorithmic overview (Algorithm 2).
App. B.2 details the von Mises-Fisher SSM (STAD-vMF). Here, we notably provide the inference scheme including all update equations for the variational EM step well algorithmic summary (Algorithm 3).
App. contains various implementation details.
App. D provides additional experimental results on
domain adaptation benchmarks (App. D.1)
single sample adaptation (App. D.2)
STAD in combination with BN (App. D.3)
TmageNet-C (App. D.4)
comparison to supervised oracle (App. D.5)
visualizations of representation space (App. D.6)
runtime comparisons (App. D.7)
sensitivity to hyperparameters (App. D.8)
19

---

Published in Transactions on Machine Learning Research (10/2025)
A Expanded Related Work
Table 6: Comparison of realistic TTA scttings and associated methods. We distinguish settings with respect assumptions on the feature distribution and label distribution as well as inherently time-ordered data streams and single sample settings have been considered. Notably, we categorize the assumption on the feature distribution into stationary (a single, static feature distribution), non-stationary (continually evolving distribution) and mixture (mixture distribution, e.g. samples of different corruption types obscrved
simultaneouslly.
TTA sotting
Related method
Feature distribution Q(x)
Label distribution Qvy
Time-orderdd
Single sample
Fully TTA
TENT (Wang et al., 2021)
stationary
balanced
X
Contioual TTA
CoTTA (Wang et al., 2022b)
non-stationary
balanced
X
K
Non-id TTA
LAME (Boudiaf al., 2022)
stationary
imbalanced
X
X
NOTE (Gong et al., 2022)
stationary
imbalanced
X
Practical TTA
RoTTA (Yuan al., 2023)
non-stationary
imbalanced
X
Wild TTA
SAR (Niu et 2023)
mixture
imbalanced
V
N/A
TTN (Lim et al., 2023)
stationary, non-stationary, mixture
imbalanced
X
J
N/A
RMT (Dübler et sl., 20223)
non-stationary
balanced
Universal TTA
ROID [Marsden al., 2024)
non-stationary mixture
inbalatced
V
world TTA
TRIBE (Su et al., 2024)
stationay
inbulanedd
X
UniTTA
UniTTA (Du et ul., 2025)
non-stationary, mixture
imbalanevd
X
ToupTTA
STAD (ours)
notestationary
iubalanced
V
Realistic TTA aims to evaluate models under challenging lest conditions that may occur in real-world deployments. We provide a tabular overview of prominent and recent work in Tab. 6. For a more comprehensive review of TTA settings and methods, see Xiao & Snock (2024). Since TTA methods typically rely on test data statisties, they are often sensitive to the ordering of samples in the test data stream. As result, prior work has explored the robustness of TTA under different sample ordering strategies. Two key factors influence sample order: the domain index, which determines the feature distribution (x), and the class index, which determines the label distribution Q(y).
In the standard fully TTA setting (Wang et al., 2021), the test stream consists of single domain, and test data is sampled ii.d., resulting in a uniform label distribution per batch. Continual TTA (Wang et al., 2022b) extends this setting by considering multiple domains sequentially, leading to non-stationary feature distribution. Non-i.i.d. TTA (Boudiaf et al., 2022; Gong et al., 2022; Zanella et al., 2025) is another extension of fully TTA that challenges the i.i.d. assumption by introducing temporal correlation in the sampling procedure, causing an imbalanced label distribution per lest batch. The Practical T'TA setting (Yuan et. al., 2023) combines continual TTA and non-i.i.d. TTA by incorporating both continually changing domains and temporal corrclation. Wild TTA (Niu al., 2023) another extension of non-i..d. TTA that additionally studies mixed domains (see also Universal TTA (Marsden et al., 2024)) and single sample adaptation (see also Lim et al. (2023); Döbler et al. (2023); Marsden et al. (2024)). Real-world TTA (Su et al., 2024) builds practical TTA by also controlling the global label distribution across the data stream. Lastly, UniTTA (Du et al., 2025) comprises 36 sampling strategies, considering ordering and imbalance of both domains and class labels.
While past work has studied adaptation to non-stationary distributions, they mostly consider a sequence of categorical domains (c.g. different corruption types). In contrast, TempTTA focuses on sequences where the domain index temporal. The data stream thus follows an inherent time-ordering (Bai et al., 2023). To test the applicablity of our method in challenging settings, we also evaluate single sample adaptation and class-inbalanced label distributions in Sec. 5.1.
Domain Genoralization (DG) The goal of DG (Zhou et al., 2022a) is to learn a predictive model that can generalize well to any unseen domains, assuming access to multiple source domains al the training stage. Examples common approaches are Komain-invarianl feature learning (Arjovsky et al., 2019), data augmentation (Zhang, 2018) and regularization (Krueger et al., 2021). The most relevant subfield to this work is temporal DG (TDG) (Nasery et al., 2021; Qin et al., 2022; Bai al., 2023; Xie et al., 2024b; Jin et al., 2024; Zeng et al., 2024; Cai et al., 2024; Xie et al., 2024a), which models dynamics from sequential source
20

---

Published in Transactions on Machine Learning Research (10/2025)
domains to generalize to evolving target domains. While both TDG and TempTTA address temporal shifts, TDG operates during training and requires sequence of labeled source domains, whereas our approach improves the performance of arbitrary pre-trained models at test time using only a stream of unlabeled data.
Unsupervised Domain Adaptation (UDA) UDA improves generalization by exploiting both labeled source data and unlabeled target data. Most related to our sctting is gradual domain adaptation (GDA) (Hoffman et al., 2014; Wulfmeier et al., 2018; Bobu et al., 2018; Kumar et al., 2020; Abnar et al., 2021; Wang et al., 2022a), which aims to adapt to a target domain by exploiting intermediate domains with gradual distribution shift between source and target. GDA methods rely on access to both source and target data for distribution alignment. However, in many practical scenarios, source data may be unavailable due to e.g. privacy concerns, motivating the need for TTA.
Methodological Details
In the following, we provide details on the probabilistic model and inference of STAD. Fig. 6 displays the plate diagram.
We-1k
W1.k
7c-1A
K
Beato
X1
Figure 6: Graphical Model: Representations h are modeled with a dynamic mixture model. Latent class prototypes We.k evolve al each time step, cluster assignments Cr determine class membership.
B.1 Details on STAD-Gaussian
Gaussian State-Space Model We use linear Gaussian transition model to describe the weight evolution over time: For each class k, the weight vector evolves according to a linear drift parameterized by a class- specific transition matrix Aş E DxD This allows each class to have independent dynamics. The transition noise follows a multivariate Gaussian distribution with zero mean and global covariance ttrans DDD, The transition noise covariance matrix is a shared parameter across classes and time points to prevent overfitting and keep the parameter size managcable. Eqn. (11) states the Gaussian transition density.
K Nww. AgW Etraus)
Transition model:
W. W
II Am
(11)
N.
Emission model: p WW))
II
Σ
Whe,n///e.e Doms)
(12)
Equ. (12) gives the emission model of the observed features H, at time L. As in Equ. (2), the features at a given time are generated by a mixture distribution with mixing coefficient Ni The emission density of each of the K components is a multivariate normal with the weight vector of class & at time as mean and Doms E R DDD as plass-nneeeeneen covariance matrix. The resulting model can be seen as a mixture of K Kalman filters. Variants of it have found application in applied statistics (Calabrese & Paninski, 2011).
21

---

Published in Transactions on Machine Learning Research (10/2025)
Posterior inference We use the EM objective of Equ. (4) maximize for the model parameters @ = [(As, ( 1K Dtrans ] Thanks to the linearity and Gaussian assumptions, the poste- rior expectation Bp(W, in Eqn. (4) (E-step) can be computed analytically using the well-known Kalman filter predict, update, and smoothing equations (Calabrese & Paninski, 2011; Bishop & Nasrabadi, 2006) as outlined next.
E-step
The posterior responsibilities of each component are given by the Gaussian mixture posterior:
emms 1/2 exp (h - We,k) (2 (hen - wr,s))
(13)
Σ
Tt. Doms 1/2 exp( (he, Wo,) ( (emms-- -(h,, W
which we summarize as [ computeessiggnnentssth... Wr, Te,ki M) Given the previous posterior
(.-.,,---11. the prior distribution at time follows the standard Kalman filter prediction:
1LA A D
Strans A
(14)
We denote this step (MT,x -Te)) predict Etrans M I Conditioning the predicted state the current observation h yields:
Pink Limn (En,)) M2, + E(ce.n (Eems)-1ng) h
(15)
Σ Link
(ET + Blce,n,e) Demay -
(16)
that is, ( Tt,,,) = update((1 Dj,k he, kl)),, This corresponds to a Kalman filter trajectory for each observation and class. In order to aggregate the observation wise posterior to one single posterior over each class, we chose mixture distribution with weights arnkk En Blocia]]
Elc.nxl which gives:
N. k.nkt
N. E t,k
N.
Σ a u
Σ
a
kmnk Σ a - Mit - MTt)
(17)
or compactly (HT Σtte) = mixture( (utm Ditnkr 0 Smoothing backward in time gives:
Pr.k ,i, + 21 Met1, - Anttt): Ei, Eū, Jr EE+LI Στ,t) J
(18)
Jr,k = AT (
(19)
i.e., (Hr,ke Mx,,) = smooth pitt:: Eith Me+1k; Ec+LK EE, Ag). Finally, from the smoothed posteriors we compute the necessary expectations required in the M-step:
E[Wr,K] = PL,k, IlW. = Er 1,6 + PLE E(WLAW E + Me.HH
(20)
in short, [[] E(w. = computeMarginals(q... E. PL
M-step Given the responsibilities E(ce,,,) and the smoothed posteriors of the prototypes (Me, Et,,,, the parameters re-estimated by maximizing the expected complete-data log- lielliod.
The posterior mixture weights are given by the average responsibilities:
1
TeA
B(ct,,,k,
(21)
N
i.e., Te,s = (BE Maximizing the likelihood of the linear-Gaussian state evolution yields the least-squares estimate of the transition matrices:
T
T
-1
A =
E[ T.....I.....
E E(w (. [
Σ
(22)
22

---

Published in Transactions on Machine Learning Research (10/2025)
equivalently A (Ba obtained by the maximum-likelhhodd estimator of the process noise:
The transition noise covariance is
trans
B[Wr,.w..l E[WLAWLLINAT T. W.w
(T- 1)K
(23)
Ax)22) Finally, maxi- mizing the likelihood of the Gaussian emission model yields the responsibilityyweeiihtee residual covariance:
in short, Etrans = updateSigma'Taane (aaieeeiignnTTaassB///..WWW r,k.:
yems LE=1 LE E N B(e,, (he.n hT h. h E[w.,]] B(Wr,&W...l)
(24)
Σ N. Bleamnk)
or compactly nems updateSignaaEms ((h,, B(c B.a.nkll.B.aa.l... B[ WwW,& w.r (.l.e.)))
Complexity The closed-form computations of the posterior p (W, (i.)) and smoothing p( W, (H.:) densi- ties come at cost they involve, amongst others, matrix inversions of dimensionality in considerable computational costs and lead to numerical instabilities when feature dimension D is large. In addition, the parameter size scales K D², risking overfitting and consuming substantial memory. These are limitations of the Gaussian formulation, making it costly for high-dimensional feature spaces and impractical in low-resource environments requiring instant predictions.
D. This results
A Algorithm EM for STAD-Gauss
1: Input: (W,, Cr, Tr. H Hrsss Dtaans Ag, Dems
2: for T E St do
3: E-step
4:
E[c,,n,k] = computeessignmennsst.. Wr.ks Tr.ke E Cems)
11 D = predict(A Ag, Itaans 14- Σt 11
6:
7ank Σ TT update((1 D h &()
/ Σ r = mixture (Mr T,n,k Σ k, E(cr,n.k) INN,
7:
(==1)
fr,,k, Σ. smooth (1 Σ Mr+1,k1 E,+1, AR)
9:
E[w,,k]: E[ C(w,, ElW,,,. T... &w = computeMaarinall((u.. Er, 11 J,-1,))
10: M-step
11: Ty.k (E
12: end for
13: A+ (p Ww innles r>min S.)
14: Itaans = updaleSiggmaTrrnns (BEr:aannnn(Ww..wW......... H.l. E Elw,,.w,J1.d [[(--1,..W Axtresi r.mins.)
15: ooms updateSigmaEms(( (h,,.. Efcr,,, E. E[w+,e] E[[T,, (r,,k)
16: return W. Cr Ti, Etrans gems
23

---

Published in Transactions on Machine Learning Research (10/2025)
B.2 Details STAD-vMF
Complete-data log likelihood Using the Fisher distribution as the hyperspherical transition and emission model, the log of the complete-data likelihood in Eqn. (3) becomes
logp(Hrrr WIT, CL.)
log pl (W1.))
(25)
Ni
logp(cr,))
+
m p(gp(
Wi,ks K mmma)
(26)
1=1
log Wi.k W,-1,,, trans))
(27)
k=1
log (Ko..) + No. WI.
(28)
N₂
Ct,mk (logTEN + log (x + enus w.. he,.)
(29)
12 k=1
log CD (xtrran)) + tranns Wi-1k Wr,k
(30)
where Ko.x and po, denote the prior parameters for 1. In practice, we set μo, to the source weights and Ko, 100 (see App. C).
Variational EM objective As described in Sec. 3.3, we approxinate the posterior p( WIT, CiT H.r) with variational distribution g( ((W1T. 1.T, C1:r) assuming the factorized form
K II 1=1 1=
N,
W 1:T; C1.r)
II
((we)) II g(c,,)) ==1
(31)
where we parameterize q(W.,,) and ((Cr,n) with
q(We,k) = vMF 7,,)), q(c,.)) = Cat(;; Arn)); Vt,
(32)
We obtain the variational EM objective
arg max E.g logp(Hir,, WIT,, Cir)),
(33)
where W.. is denoted E, to reduce clutter.
E-step Taking the expectation of the complete-data log likelihood (Eqn. (25)) with respect to the variational distribution (Eqn. (31)) gives
E, (HIT, WI.T, Ci.r)) Σ log (D((o,)) K0,sHo [i(wi,
T
N2
K
Eg (c. (log Te,k + log CD(c + x oeme [we,k] he,")
m=
T
K
log Cp CD trataus) + trans [We_1,t] Eg[We.k]
(34)
2
24

---

Published in Transactions on Machine Learning Research (10/2025)
Solving for the variational parameters, we obtain
A,, Tt. (D( exp (NemER, We.k) hea
(35)
Ej=1 Te T (..Cee exp {neme Big Wayl he
Pe.k = //,xt/ No. N = |Bt,lls
(36)
BL K trans
I(e>13 Beg [ + 1 ema
Bg m he. + nuuauss [eET) By(Wee (We,
(37)
The expectations are given by
[g,,,, = A,,
(38)
Egg [WW,k) = AD(TT,)) Pt.k.
(39)
where (n( In/2(K) argument In))-1(N) and (a) denotes the modified Bessel function of the first kind with order v and
M-step Maximizing objective (Equ. (33) with respect to the model parameters fn semss TIT) gives
ptraus
(mtranss3
K Ei= E kml Rig W, 1.8 Eyllen.
trans
with ptrans
(40)
(jtrans y2
(T 1) K
pems
(pemsyy
E1=1 ΣK N.V.
Ey (e, By [WeR] h
A eem
with pems
(41)
(pems) )2
Σt=1 N₂
Em (t,,,k
Wi.k
(42)
N
Here made use of the approximation from Banerjee et al. (2005) to compute an estimate for Ki
FD 8
6
with == AA()..
(3
1 72
25

---

Published in Transactions on Machine Learning Research (10/2025)
Algorithm EM for STAD-vMF
Imput: prototypes, cluster assignments, mixing coefficients, representations {W,, Cr ,, H, Trss transi- tion and emission parameters & gtrans R ems
2: for T E St do
3: E-Step:
Hr, 1r exp ( En ( hrm)
Compute: ,, E Tre (r exp B [ br
5:
Get expectation of cluster assignments: Eylermnee = 2r,n Compute: B gtrans [[>1] [,,kk oms Ex BBg (Cr J,,, + ktrans 4rery [
Compute: Yr.k = ||3
Compute: Pr. = Brr/Trrk
Get expectation of prototypes: By[w+.l = AD(TT,)) M-Step:
10:
E Bylermm.
11:
Compute: Tr,
12: end for
ΣrEs, E
Ey W -
Egg [w,kk 1.
13: Compute: ptrans
(1Se 1) x
ptrans D
(jtrans)3
14: Compute: trans
(Firans)z
Eres, Σ En Eg E Bng h
15: Compute: rems
Eres, N₂
pema
D
(romay3
16: Compute:
R. ems
1 - (jarss)2 )2
17: Assign: W. = (pt,1,..... Pt,K)
18: Assign: C, (Au.l...,, ,,,
19: return W. Ct, Te, ttrans 1e ess
26

---

Published in Transactions on Machine Learning Research (10/2025)
C
Experimental Details
We next list details on the experimental setup and hyperparameter configurations. All experiments are performed on NVIDIA RIX 6000 Ada with 48GB memory.
C.1 Datasets
Yearbook (Ginosar et al., 2015): dataset of portraits of American high school students taken across cight decades. Data shift in the students' visual appearance is introduced by changing beauty standards, group norms, and demographic changes. We use the Wild-Time (Yao et al., 2022) pre-processing and evaluation procedure resulting into 33,431 images from 1930 to 2013. Each 32 x 32 pixel, grey-scaled image is associated with the student's gender as a binary target label. Images from 1930 to 1969 are used for training; the years 1970 2013 for testing.
EVIS: the evolving image search (EVIS) dataset (Zhou et al., 2022b) consists of images of 10 electronic product and vehicle categories retrieved from Google search, indexed by upload date. The dataset captures shift caused by rapid technological advancements, leading to evolving designs across time. It includes 57, 57,600 RGB images of 256x256 pixcls from 2009 to 2020. Models are trained on images from 2009-2011 and evaluated on images from 2012-2020.
FMoW-Times the functional map of the world (FMoW) dataset (Koh et al., 2021) maps 224 x 224 RGB satellite images to one of 62 land-use categorics. Distribution shift is introduced by technical advancement and economic growth changing how humans make use of the land. FMoW-Time (Yao et al., 2022) an adaptation of W-WLDS (Koh et al., 2021; Christie et al., 2018), splitting 141,696 images into a training period (2002-2012) and testing period (2013-2017).
CIFAR-10.1 (Recht et al., 2019): a reproduction of CIFAR-10 (Krizhevsky et al., 2009) assembled from the same data source by following the same clcaning procodure. The dataset contains 2,000 32 x 32 pixel images classes. Models are trained on the original CIFAR-10 train set.
ImageNetV2 (Recht et al., 2019): reproduction of ImageNet (Deng et al., 2009) with 10,000 images of 1,000 classes scaled to 224 x 224 pixels. Models are trained on the original ImageNet.
CIFAR-10-C: a dataset derived from CIFAR-10, to which 15 corruption types are applied with 5 severity levels (Hendrycks & Dietterich, 2019). We mimie a gradual distribution shift by increasing the corruption severity starting from the lowest level (severity 1) to the most sever corruption (severity 5). This results in a test stream of 5 x 10, 000 images per corruption type.
C.2 Source Architectures
We employ the four-block convolutional neural network trained by Yao et al. (2022) to perform the binary gender prediction on the yearbook dataset. Presented results are averages over three different seeds trained with empirical risk minimization. The dimension of the latent representation space is 32.
CNN:
WideResNet: For the CIFAR-10 experiments, follow Song et al. (2023); Wang et al. (2021) and use the pre-trained WideResNet-28 (Zagoruyko & Komodakis, 2016) model from the Robust.Bench benchmark (Croce et al., 2021). The latent representation have a dimension of 512.
DenseNet: For FMoW-Time Time, we follow the backbone choice of Koh et al. (2021); Yao et al. (2022) and use 1enseNet121 (Huang et al., 2017) for the land use classification task. Weights for three random trainings seeds are provided by Yao et al. (2022). We use the checkpoints for plain empirical risk mininization. The latent representation dimension is 1024.
ResNet: For EVIS, we follow Zhou et al. (2022b) and use their ResNet-18 (He ct al., 2016) model with representation dimension of 512 and train on three random seeds. For ImageNet-Ve V2, we follow Song et al. (2023) and employ the standard pre-trained ResNet-50 model from Robust (Croce et al., 2021). Latent representations are of dimension 2048.
ViT-base: For ImageNet-C. C, we employ ViT-base (Dosovitskiy et al., 2021) from the timm library (Wightman, 2019). Latent representations are of dimension 768.
27

---

Published in Transactions on Machine Learning Research (10/2025)
C.3 Baselines
Source Model: the un-adapled original model.
BatchNorm (BN) Adaptation (Schneider et al., 2020; Nado et al., 2020); aims to adapt the source model distributions shift by collecting normalization statisties (mean and variance) of the test data.
Test Entropy Minimization (TENT) (Wang et al., 2021): goes one step further and optimizes the BN transformation parameters (scale and shift) by minimizing entropy on Lest. predictions.
Continual Test-Time Adaptation (CoTTA) (Wang al., 2022b): optimizes all model parameters with entropy objective on augmentation averaged predictions and combines it with stochastic weight restore to prevent catastrophic forgetting.
Source HypOthesis Transfer (SHOT) (Liang el al., 2020) adapts the feature extractor via an information maximization loss in order to align the representations with the source classifier.
ClarpnessAAware Reliable Entropy Minimization (SAR) (Niu et al., 2023) filters out samples with large gradients based on their entropy values and encourages convergence to a flat minimum.
Robust Test-time Adaptation (RoTTA) (Yuan et al., 2023) proposes a robust BN layer and the use of a class-balanced memory bank to address simultaneous covariate and label shift.
Laplacian Adjusted Maximum likelihood Estimation (LAME) (Boudiaf et al., 2022) regularizes the likelihood of the source model with a Laplacian correction term that encourages neighbouring
representations be assigned the same class.
Test-Time Template Adjuster (T3A) (Iwasawa & Matsuo, 2021) computes new class prototypes by a rumning average of low entropy representations.
C.4 Implementation Details and Hyperparameters
By the nature of test-time adaptation, choosing hyperparameters is tricky (Zhao et al., 2023b) since camnot assume access to a validation set of the test distribution in practise. To ensure report the optimal performance on new or barely used datasets (Yearbook, EVIS, FMoW, CIFAR-10.1 and ImageNet we perform a grid search over hyperparameters as suggested in the original papers. We perform separate grid searches for the uniform label distribution and online imbalanced label distribution setting. Reported performance correspond to the best setting. If the basclines were studied in the gradual CIFAR-10-C sotting by Wang et al. (2022b), we use their hyperparameter setup; otherwise, we conduct grid search described earlier. Unless there is a built-in reset (SAR) convergence criteria (LAME) all methods run without reset and one optimization step is performed. We use the same batch sizes for all baselines. For Yearbook we comprise all samples of year in one batch resulting in batch size of 2048. To create online class imbalance, we reduce the batch size to 64. We use a batch size of 100 for EVIS, CIFAR. and CIFAR-10-C and 64 for FMoW-Time and Im2.
BN (Schneider et al., 2020; Nado et al., 2020) Normalization statistics during test-time adaptation are a running estimates of both the training data and the incoming test statistics. No hyperparameter optimization is necessary here.
TENT (Wang et al., 2021) Like in BN, the normalization statistics are based on both training and test set. As in Wang et al. (2021), we use the same optimizer settings for test-time adaptation as used for training, except for the learning rate that find via grid search on (1e-3, 1e -4-4, 1e 55, le 6, 1e- Adam optimizer (Kingma & Ba, 2015) is used. For CIFAR-10-C, we follow the hyperparameter setup of Wang et al. (2022b) and use Adam optimizer with learning rate le 1e-3. 3.
COTTA (Wang et al., 2022b) We use the same optimizer as used during training (Adam optimizer Kingma & Ba (2015)). For hyperparameter optimization we follow the parameter suggestion by Wang el al. (2022b) and conduct a grid search for the learning rate (fle-b le 1e-5, - 1e -7),, EMA factor ((0.99, 0.999, 0.9999)) and restoration factor (f0, 0.001, 0.01, 0.1)). Following Wang et al. (2022b), we determine the augmentation confidence threshold by the 5% percentile of the softmax prediction confidence from the source model on the source images. For the sellestudied CIFAR-10-C dataset, we follow the setting of Wang et al. (2022b) and
28

---

Published in Transactions on Machine Learning Research (10/2025)
use Adam optimizer with learning rate le - 3. The EMA factor is set to 0.999, the restoration factor is 0.01 and the augmentation confidence threshold is 0.92.
SHOT (Liang et al., 2020) We perform a grid search for the learning rate over {1e-9, 1) and for 8, the scaling factor for the loss terms, over (0.1,0.3).
SAR (Niu et al., 2023) We conduct a grid search over the learning rate selecting amoug (le-2, 1e le-1, 0.00025). Like the authors, we compute the Fg threshold as a function of number of classes 0.4 x In K, use SDG, a moving average factor of 0.9, and the reset threshold of 0.2. While (Niu et al., 2023) apply SAR only to models with layer group normalization and update those layers, we also evaluate SAR source architectures with batch normalixation, following prior work (Zhao et al., 2023b). As noted in (Niu et al., 2023), BN layers are less effective for small batch sizes, which accounts for the reduced performance of SAR in this setting (Fig. 4 and Tab. 10).
RoTTA (Yuan et al., 2023) We conduct a search over the learning rate among {le-3, le ,e $}. As in the experiments of the original paper, we use the default values for X = 1.0, An = 1.0, a = 0.05 and y 0.001.
LAME (Boudiaf et al., 2022) The only hyperparameter is the choice of affinity matrix. Like Boudiaf et al. (2022) k-NN affinity matrix and select the number of nearest neighbours among {1,3,5) 5}.
T3A (Iwasawa & Matsuo, 2021) We test different values for the hyperparameter M. The M-th largest entropy values are included in the support set used for computing new prototypes. We test the values (1,5,20, 50, 100, None]. None corresponds to no threshold, i.c. all samples are part of the support set.
STAD-vMF
The hyperparameters are the initialization values of the transition concent parameter trans emission concentration parameter gems and the sliding window size s. We chose the concentration parameters from {100, 10003. Tab. 7 lists employed settings. We use default window size of 3. For Yearbook, employ class specific noise parameters kg wranns and Ki wens discussed in Sec. 3.3. For the other datasets, we found more restricted noise model beneficial. Particularly, we use global concentration parameters, 5 itrans and emss and follow suggestions by Gopal & Yang (2014) to keep noise concentration parameters fixed instead of learning them via maximum likelihood (line 13 16 in Algorithm 3). Keeping them fix acts as a regularization term as it controls the size of the cluster (via xc" ===))) and the movement of the prototypes (via n.trnn)) Low concentration values generally correspond to more adaptation ficxibility while larger values results in more conservative and rigid model.
STAD-Gauss We initialize the mixing coefficients with Tet K Vt, k the transition covariance matrix with Dtraus 0.01 x I and the emission covariance matrix with Dems = 0.5 x I. We found normalization of the representations to be also beneficial for STAD-Gauss. Note that despite normalization, the two models are not equivalent. STAD-Gauss models the correlation between different dimensions of the representations and is therefore more expressive, while MTAD-vME assumes an isotropic variance.
29

---

Published in Transactions on Machine Learning Research (10/2025)
Table Hyperparameters employed for STAD-vMF
Dataset
Afrans
Yearbook (covariate shift)
100
100
Yearbook (+ label shift)
1000
100
EVIS (covariate shift)
1000
1000
EVIS (+ label shift)
1000
100
"MoW-Time (covariate shift)
100
100
FMoW-Time (+ label shift)
1000
100
CIFAR-1001 (covariate shift)
1000
1000
CIFAR-10.1 (+ label shift)
1000
100
ImageNet V2 (covariate shift)
100
1000
ImageNet (+ label shift)
1000
100
CIFAR-10-C (covariale shift)
1000
100
30

---

Published in Transactions on Machine Learning Research (10/2025)
D Additional Results
D.1 Domain Adaptation Benchmarks
To study the limitations and applicability of our method STAD, we also test adaptation performance on non-gradual shifts. For that, we use the domain adaptation benchmark PACS, which comprises images of 10 classes across four categorical domains (photo, art- art-painting, cartoon and sketch). We use DomainBed (Gulrajani & Lopez-Paz, 2021) ) to train a ResNet-50 model with BN. We test two settings. In the first setting, we follow Iwasawa & Matsuo (2021); Jang et al. (2023) and train the model on three domains and adapt it on the held-out domain. In the second setting, we follow Gui et al. (2024) and train the model the remaining domains
Table 8: Accuracy on domain adaptation benchmarks under covariate shift and uni- form label distribution. The source model trained on three domains and tested on the remaining one, rotating the Lest domain for averaging.
Method
PACS
Source model
82.99 + 8.87
adapt feature extractor BN
on the photo domain and adapt sequentially. The second setting is more difficult the model is exposed to only single domain during training and needs to leverage several abrupt changes in the distribution over longer Lest stream.
82.85 1 9.57
TENT
85.30 7.33
COTTA
83.59 + 8.46
SHOT
83.30 + 9.01
SAR
85.03 7.71
RoTTA
85.11 + 7.73
Tab. shows adaptation performance for the first setting. Adap- tation gains are generally smaller than on corruption datasots, with TENT, RoTTA, and SAR improving most upon the source model by 2-3 percentage points. While STAD achieves more modest improvement of percentage point, it remains the best- performing method among classifier adaptation approaches.
adopt classifier
LAME
83.31 + 8.90
T3A STAD-vMF (ours)
83.68 + 9.14
83.91 + 8.58
Results for the second setting are shown Tab. 9. Consistent with Gui et al. (2024), we observe a decreasing performance across all TTA methods over the course of adaptation, highlighting the challenge posed by multiple non-gradual domain shifts. Nevertheless, all TTA methods, except LAME, improve upon the source model by over 10 percentage points average. Despite the highly non-gradual nature of this test setting, STAD-vMF performs comparably to the baselines, achieving the third-best performance overall. These findings strengthens the results in Sec. 5.2, which suggest that STAD is applicable beyond gradual, temporal distribution shifts similar as other TTA methods.
Table Accuracy on domain adaptation benchmarks under covariate shift and uniform label distribution. The source model is trained the photo domain and TTA methods adapt to the remaining domains sequentially. Results show average over three random training seeds. N/A indicates that adaptation is not applied to the source domain.
Domain
Method
P
A
+
C
+ S
Mean
Source
99.34 + 0.57
63.10 + 1.55
38.37
4.99
41.51 +: 2.99
47.66 + 1.29
adapt feature extractor
BN
N/A
68.03 + 1.98
61.15 + 0.34
49.64 + 0.28
59.61 = 0.52
TENT
N/A
68.05 + 2.11
61.53 + 0.52
51.33 + 1.35
60.30 + 0.28
CoTTA
N/A
63.82 + 3.23
59.36 + 1.35
56.74 + 2.70
59.97 = 2.17
SHOT
N/A
67.91 + 2.04
63.17 0.86
57.90 + 1.22
62.99 0.58
SAR
N N/A
68.34 + 1.81
61.49 0.36
52.06 1.10
60.63 + 0.67
RoTTA
N/A
68.73 1.13
58.52 1.32
52.43 + 1.19
59.89 - 0.19
adapt classifier
LAME
N/A
62.73 + 1.72
37.80 + 5.09
41.01 2.90
47.18 + 1.26
T3A
N/A
68. + 1.55
62.05
0.67
54.80 0.97
61.71 + 0.40
STAD-vMF (ours)
N/A
68.59 + 2.51
61.65 0.39
52.16 + 0.49
60.80 + 0.72
31

---

Published in Transactions on Machine Learning Research (10/2025)
D.2 Single Sample Adaptation
Table 10: Adaptation accuracy on temporal distribution shift with single sample adaplation (batch size 1) for both covariate shift and additional online label shift; Tabll shows values as plotted in Fig. Most methods collapse when only provided with one sample per adaptation step. STAD can improve upon the source model in out of scenarios.
Yearbook
EVIS
FMoW
Model
covariste shift
label shift
covariate shift
label shift
covariate shift
label shift
Source
81.30 4.18
0.92 56.59
0.20 68.91
adapt feature extractor
BN
73.32 6.90
73.32
6.90
11.12
0.97
11.12 0.97
3.46
0.03
TENT
61.33 + 9.42
61.45 + 9.46
10.80 + 0.84
10.78 = 0.81
4.00
0.87
3.99 = 0.87
COTTA
55.91 + 5.26
56.71
+ 6.12
10.04
0.08
9.88 U.34
3.42
0.14
3.42 + 0.03
SHOT
53.71 1 3.77
51.48
20.23
1.40
16.36
1.67 11.12 0.97
3.84
0.21
4.01 =
SAR
73.32 + 6.89
73.38 + 7.01
11.12 + 0.97
3.46 + 0.03
3.46 + 0.03
adapt classifier
T3A
83.51 + 2.54
83.44 + 2.60
57.63 + 0.77
57.40
0.76
66.78 = 0.24
66.87 + 0.27
LAME
81.29
4.18
81.30
4.18
56.59
0.91
56.59
68.94
0.20
68.94
0.20
STAD-vME
84.32 + 2.03
81.49 + 4.23
56.15 + 0.98
58.02 = 0.77
68.88 = 0.29
71.22 + 0.40
D.3 STAD in Combination with BN
Table 11: We explored whether STAD, which adapts the classifier, can be effectively combined with TTA methods like BN adaptation, which targets the feature extractor. The results are mixed. On the covariate shift of Yearbook, combining the two methods improves performance beyond what each achieves individually. However, on other datasets, the combination generally results in decreased performance.
Yearbook
EVIS
FMoo
Model
covariate shift
+ label shift
covariate shift + label shift
covariate shift + label shift
Source
81.30 = 4.18
56.59 + 0.92
68.94 + 0.20
BN
84.51 2.10
70.17 + 0.33
45.72
2.79
14.48 + 1.02
67.60 + 0.44
10.14
0.04
STAD-vMF
85.50
1.34
84.46 + 1.19
56.67
0.82
62.08 + 1.11
68.87 + 0.06
86.25
1.18
STAD-vMF + BN
86.20 + 1.23
69.96 + 0.39
14.23
2.88
15.18 + 1.68
66.97 + 0.46
9.26 + 1.97
STAD-Gauss
86.22
0.84
84.67
+ 1.46
STAD-Gauss + BN
1.08 86.56
70.12 10.33
32

---

Published in Transactions on Machine Learning Research (10/2025)
D.4 ImageNet-C
Table 12: Accuracy gradually increasing corruptions of ImageNet-C using ViT-Base the source model. BN and RoTTA specific to batch normalization layers and are thus ineffective ViT; they omitted from this experiment. As discussed in Sec. 5.2, methods that adapt the feature extractor achieve greater adaptation gains on synthetic corruptions- except for CoTTA, which collapses. On this dataset, STAD provides only marginal improvement over the source model.
Corruption severity
Method
4
5
Mean
Source
66.66
59.71
53.88
43.97
32.43
51.33
adapt feature extractor
TENT
68.41
66.01
63.85
59.18
52.89
62.07
COTTA
48.02
34.87
28.12
19.78
12.71
28.70
SHOT
67.51
64.41
62.33
57.52
51.19
60.59
SAR
67.69
64.70
62.33
57.55
51.01
60.66
adapt classifier
LAME
66.48
59.52
53.64
43.76
32.21
51.12
T3A
66.71
61.31
56.59
46.75
34.22
53.12
STAD-vMF (ours)
66.60
59.81
54.05
44.25
32.80
51.50
D.5 Comparison to Supervised Oracle
We investigate how far STAD, which operates unsupervised and does not require labels, can close the gap to a supervised approach that makes use labels. Obviously, a supervised approach is superior, as it can directly learn the function mapping input samples to target labels. In contrast, TTA methods rely solely signals from the input and therefore have strictly less information available. To evaluate how far this gap can be bridged, labeled samples. For this, the adaptation test stream. At each timestep, we fine-tune the model for one epoch on this split and then evaluate the performance on the regular test set.
continuously fine-tune the source model at each timestep using small portion of another held-out set from the Wild-Tine pipeline, which is 10% the size of
We find that the supervised model achieves an average accuracy 90.67% over the entire test stream. Comparing this to the source model 81.30%, STAD-Gauss 86.22%, and STAD-vMF 85.50% (see Tab. 2), observe that STAD partially close the gap between the unadapted source model and the fine-tuned model. Fig. 7 further reveals that STAD-vMF is on par with the fine-tuned classifier at certain time steps (1986, 1995, 1997). Additionally, we observe that the severity of the temporal distribution shift, hampers also the supervised model's ability to regain in-distribution accuracy. For instance, in the 1970s and 1980s, the performance of the supervised model 20 points lower than its in-distribution accuracy (nearly 100%).
Yearbook
Accuracy (1)
90
80
Source Supervised (Oracle)
70
STADXMM
1970
1975
1960
1965
1990
1995
2000
2003
2010
Year
Figure 7: Accuracy over time for the temporal distribution shift Yearbook averaged over three random training seeds.
33

---

Published in Transactions on Machine Learning Research (10/2025)
D.6 Cluster Visualization
BN
STAD
Dimension 2
Dimension
Dimension 1
Dimension 1
Figure 8: t-SNE visualization of the representation space of FMoW-Time (year 2013) under joint covariate and label shift: We visualize the cluster structure in representation space. Colors indicate ground truth class labels for the 10 most common classes. Adapting with BN destroys the cluster structure, resulting in inseparable clusters. In contrast, STAD operates lincarly separable representations.
D.7 Computational Complexity and Runtime
The complexity of STAD-vMF scales linearly with the sliding window size 5, batch size N,, representation dimension D and number of classes K, ie. O(s x No x D x K). Note that the sliding window size is fixed at = 3 and operations over the batch size, number of classes and representation dimension can be fully parallelized.
Tab. 13 reports relative runtime compared to the source model for STAD and baselines. As results on ImageNet-V2 show, even for high dimensions (D 2048) and large number of classes (K= 1000) STAD's runtime is comparable to baseline TTA methods.
Table 13: Relative runtime per batch compared to the source model
Methods
Yearbook
FMoW- Time
ImageNet FMoW-Time
Source Model
1.0
1.0
1.0
BN
1.0
1.1
1.1
TENT
1.4
6.4
7.2
COTTA
17.1
200.0
327.3
SHOT
1.3
6.3
6.7
SAR
1.5
7.1
10.0
RoTTA
90.0
30.0
41.8
LAME
1.2
2.9
5.5
T3A
1.1
1.8
10.9
STAD->MF
2.5
8.8
23.6
STAD-Gauss
3.3
D.8 Sensitivity to Hyperparameters
In this section, we conduct a scnsitivity analysis of the hyperparameters involved in STAD. We analyze sensitivily on two datasels: the temporal shift dataset Yearbook and the commonly used corruption benchmark CIFAR-10-C. All experiments are conducted under a uniform label distribution. When testing the sensitivity specífic hyperparameter, all other hyperparameters are fixed their default values (see App. C). Results show the average over three random training seeds for Yearbook and the average over 15 corruption types for CIFAR-10-C.
34

---

Published in Transactions on Machine Learning Research (10/2025)
Sensitivity to sliding window size The window size determines the number of past time steps considered by the dynamic model. A small 8 limits the influence of past prototypes, whereas a larger extends the considered history, giving more weight to past prototypes. However, large values of s come at the cost of increased computational burden, as runtime scales linearly with window size. Tab. 14 suggests that increasing the window size could improve adaptation performance.
Table 14: Accuracy of STAD for different values of
Yearbook
85.4975 + 1.34
85,5022
1.30
85.5029 + 1.31
CIFAR-I0-6 76.9683 11.25 76.9735 + 11.25
76.9823 + 11.24
Sensitivity to strans The transition concentration parameter x frans regulates the transition noise and determines how far cluster prototypes move between different time steps. A high concentration value krrons implies little movement of class prototypes, whereas low gtrons allows prototypes to move more. This parameter thus acts as a regularization factor between a more static and a more dynamic model. Tab. 15 displays the results. Performance changes only marginally for different values of the concentration parameter.
Table 15: Accuracy of STAD-vMF for different values of k trans
A trome
50
100
500
1000
5000
Yearbook
85.5034 + 1.3031
85.5034 + 1.3031
85.5034 + 1.3031
85.5034
1.3031
85.4980 + 1.3099
CIFAR-10-C 76.9684 11.2540
76.9683 11.2543
76.9685 # 11.2538
76.9685
11.2538
76.9688 11.2552
Sensitivity to =ms The emission concentration parameter =m regulates the emission noise and determines the spread of clusters. A high concentration value gems implies small, compact clusters, while low x eeme allows for widespread clusters. Results are shown in Tab. 16.
Table 16: Accuracy of STAD-vMF for different values of ems
100
500
1000
5000
Yearbook
85.5022 1.3036
85.5034 + 1.3031
85.5043
1.3019
85.5058
1.3001
85.5058 = 1.3001
CIPAR-10-C
76.9679 1 11.2543
76.9683
11.2543
76,9680 1 11.2529
76.9700 1 11.2514
76.9700 1 11.2513
35


Reviews:
[{"review_id": "rXX6uO02aC", "reviewer": "Reviewer_BpXb", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n\n1. This paper discusses an interesting but often overlooked problem of test-time adaptation, where both sample and label distributions vary over time.  The setup echoes with real-world use case, such change in the visual appearance of landscapes in different seasons.  \n2. The idea of adapting class assignments and class feature prototypes with EM optimization is technically sound.  Such a formulation is fully unsupervised, without the need for access to class labels during inference / adaptation.\n3. This paper presents visualization results well, helping readers understand its high-level idea and appreciating its efficacy.  For example, Figure 1 shows the temporal distributional drift and Figure 8 demonstrate the effective update of class-wise clustering.\n4. The experiments demonstrate consistent improvement over different datasets and setups, including datasets for temporal TTA and typical TTA.\n\n---\n\nWeaknesses:\n\n1. The paper writing is confusing:\n    - This paper lacks high-level idea, or more precisely, what elements are updated in the E-step and M-step during optimization.  Although the equations provide some hints, it's be more readable if the authors write down them more explicitly\n    - Some notations are incorrect: $p(W_{1:T} C_{1:T} |H_{1:T} )$ around eqn 4 and 7 should be $p(W_{1:T}, C_{1:T} |H_{1:T} )$ instead.\n2. Although the proposed method is technically sound, its temporal performance is highly-correlated with the source model (see Figure 3).  In other words, all existing methods including STAD can only bring minor performance gain to the source model.  If the source model fails to deal with the current distribution, no TTA method is able to rescue.  These results may hurt the applicability of all these TTA methods in real-world use case.\n3. I'd encourage the authors to include necessary background of Kalman Filter in the Appendix.  The connection to Kalman filter described in this paper is still confusing.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This paper tackles test-time adaptation (TTA) under non-stationary data distributions, which is a realistic setup yet overlooked by the previous TTA literature.  Inspired probabilistic state-space models, this paper proposes State-space Test-time Adaptation (STAD) that models dynamics of temporal distribution shifts in a latent feature space.  With an EM formulation, the class clustering and data distribution are updated in a fully unsupervised manner.  The experiments evaluate the proposed method over three image classification dataset with temporal distributional drift, where the model demonstrates more consistent performance gain over other baselines.  The proposed method also works beyond temporal TTA, showing strong results on two reproduction datasets and a synthetic dataset.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "1. I'd request for clarification on Weakness 1 and 3\n2. I'd request for argument against Weakness 2", "broader_impact_concerns": "N/A", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "ea1KNNJMkn", "reviewer": "Reviewer_q6BP", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths:\n\n1. **Novel Focus on Temporal Distribution Shifts**: The submission addresses a critical gap in test-time adaptation (TTA) research by focusing on temporal distribution shifts—gradual, time-evolving shifts common in real-world scenarios but underexplored in existing literature. It formalizes the Temporal Test-Time Adaptation (TempTTA) setting, highlighting its unique challenges for established TTA methods.  \n\n2. **Innovative Method Design**: STAD (State-space Test-time Adaptation) introduces a probabilistic state-space model (SSM) to track time-varying class prototypes in the representation space, enabling dynamic adaptation of the model’s final layer. This explicit modeling of temporal dynamics, validated via ablation studies, distinguishes it from prior TTA methods that lack such mechanisms.  \n\n3. **Strong Empirical Performance**: STAD demonstrates consistent superiority over baselines on real-world temporal shift datasets (Yearbook, EVIS, FMoW-Time), particularly in challenging scenarios like small batch sizes and label shifts. It outperforms both feature extractor-adapting methods (e.g., BN, TENT) and classifier-adapting methods (e.g., LAME, T3A) in these settings.  \n\n\nWeaknesses:\n\n1. The E-Step involves three nested for-loops (iterating over time steps in the sliding window, classes, and samples), and the M-Step also contains for-loops. However, according to the experimental analysis of algorithm runtime, the time consumption does not increase significantly compared to the source model. Why is this the case? Please explain further. Were there any optimizations made in this regard that were not mentioned in the article?\n\n2. I notice that Steps 17-18 in the Algorithm table are marked as \"optional\". What does \"optional\" mean, and why can these steps be optional? Please explain further.\n\n3. SAR is specifically designed for the scenario where the batch size is 1. However, judging from the results of EVIS and FMoW in Table 10, this algorithm does not work effectively. Is there a case of under-reporting? Please further explain the reasons.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The submission makes three key contributions to the field of test-time adaptation (TTA):\n\n1. **Formalization of Temporal Test-Time Adaptation (TempTTA)**: It explicitly defines and details the setting of TempTTA, which focuses on handling gradually evolving distribution shifts over time—common in real-world scenarios but underexplored in TTA literature. The work demonstrates that such shifts pose significant challenges to existing TTA methods.\n\n2. **Proposal of STAD**: A novel TempTTA method, State-space Test-time Adaptation (STAD), is introduced. STAD leverages probabilistic state-space models (SSMs) to model the dynamics of temporal distribution shifts in the representation space, adapting the model's final layer by tracking time-varying class prototypes. Unlike prior work, it explicitly models these dynamics, which is shown to be critical via ablation studies.\n\n3. **Comprehensive Evaluation**: STAD is rigorously evaluated against prominent TTA baselines on real-world temporal shifts (e.g., Yearbook, EVIS, FMoW-Time), where it outperforms alternatives, particularly in handling small batch sizes and label shifts. Additionally, it shows versatility by delivering performance gains beyond temporal shifts, including on reproduction datasets, synthetic corruptions, and domain adaptation benchmarks.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "1. Elaborate on the reasons behind the limited runtime increase despite nested loops in E-Step and M-Step. For example, explicitly discuss implementation optimizations (e.g., parallelization strategies, GPU acceleration) and their impact.  \n\n2. Clarify the definition of \"optional\" for Steps 17-18 in the algorithm. For example, explain the conditions under which these steps should be included or omitted.  \n\n3. Expand on why SAR fails in batch size = 1 scenarios for EVIS and FMoW, beyond the current analysis. Discuss whether hyperparameter tuning or modified mechanisms could improve its performance, and confirm that results are not under-reported (e.g., by verifying experimental setup consistency). This would enhance the robustness of the comparative analysis.", "broader_impact_concerns": "None.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "ERT0w9FdcK", "reviewer": "Reviewer_F8Aa", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths: \n1. This paper is well-written, with detailed approach description and experimental evaluation.\n2. This problem this paper studies is important, as real-world distribution shifts are not static but could vary over time.\n\n\nWeaknesses\n1. I am a little unsure about the use of state-space models as framing the approach in order to avoid confusion with other popular deep learning architectures, e.g., Mamba. When I was reading the abstract and introduction, i was getting the sense that this paper is adapting Mamba models. I think a more accurate statement is that you are using probabilistic models to model the test-time distribution shift.\n2. The paper lacks discussion on the distribution shifts you are tackling and the limitations, for instance what type of distribution shift the proposed approach would work less effectively.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This paper propose a new approach for temporal test-time adaptation, where distribution shifts change over time during inference. The proposed approach use a probabilistic state-space model to adapt the classifier by learning the classification features in the last layer. The authors evaluated their proposed approach on real-world temporal distribution shifts and demonstrate the effectiveness of proposed approach.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "1. Could the authors discuss in detail the distribution shifts that the proposed approach can effectively handle?\n2. Could the authors add more description on the motivation for Section 3.3? it is hard to understand this part.\n3. Could you add a part that formally describe the proposed algorithm?", "broader_impact_concerns": "None.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Decision: Accept (poster)