Bayesian Weight Enhancement with Steady-State Adaptation for Test-time Adaptation in Dynamic Environments
Authors: Jae-Hong Lee
Venue: ICML 2025 poster (2025)
Keywords: Bayesian inference
test-time adaptation
online learning
Kalman filtering
Primary area: general_machine_learning->online_learning_active_learning_and_bandits
TL;DR: Test-time adaptation faces weight degradation from unsupervised online learning, which the Bayesian weight enhancement framework and steady-state adaptation algorithm mitigate through principled covariance-aware optimization in dynamic environments.

Abstract: Test-time adaptation (TTA) addresses the machine learning challenge of adapting models to unlabeled test data from shifting distributions in dynamic environments. 
A key issue in this online setting arises from using unsupervised learning techniques, which introduce explicit gradient noise that degrades model weights. To invest in weight degradation, we propose a Bayesian weight enhancement framework, which generalizes existing weight-based TTA methods that effectively mitigate the issue. Our framework enables robust adaptation to distribution shifts by accounting for diverse weights by modeling weight distributions.
Building on our framework, we identify a key limitation in existing methods: their neglect of time-varying covariance reflects the influence of the gradient noise. To address this gap, we propose a novel steady-state adaptation (SSA) algorithm that balances covariance dynamics during adaptation. SSA is derived through the solution of a stochastic differential equation for the TTA process and online inference. The resulting algorithm incorporates a covariance-aware learning rate adjustment mechanism. Through extensive experiments, we demonstrate that SSA consistently improves state-of-the-art methods in various TTA scenarios, datasets, and model architectures, establishing its effectiveness in instability and adaptability.

Bayesian Weight Enhancement with Steady-State Adaptation for Test-time Adaptation in Dynamic Environments
Jae-Hong Lee
Abstract
& Zisserman, 2014; He et al., 2016; Hinton et al., 2012). This success rests on the critical assumption that the test data adhere to the same distribution as the train data used to pre-train the source model (Goodfellow et al., 2016; Mur- phy, 2023). However, in real-world applications, models often encounter dynamic environments in which the data distribution changes over time, making this assumption dif- ficult to hold (Hendrycks & Dietterich, 2019b; Koh et al., 2021). For example, autonomous driving systems face ex- ternal factors such as weather variability and internal is- sues such as sensor degradation, resulting in substantial performance degradation. Even models with robust training pipelines often exhibit high sensitivity distribution shifts, with minor deviations causing significant drop accuracy (Quinonero- CaannoneroCCandela al., 2008; Sun et al., 2017). Conse- quently, robust online adaptation mechanisms are essential, ensuring reliable performance in dynamic settings.
Test-time adaptation (TTA) addresses the ma- chine learning challenge of adapting models to unlabeled test data from shifting distributions in dynamic environments.
key issue in this on- line setting arises from using unsupervised learn- ing techniques, which introduce explicit gradi- ent noise that degrades model weights. To invest in weight degradation, we propose Bayesian weight enhancement framework, which gener- alizes existing weight-based TTA methods that effectively mitigate the issue. Our framework enables robust adaptation distribution shifts by accounting for diverse weights by modeling weight distributions. Building on our framework, we identify a key limitation in existing methods: their neglect of time-varying covariance reflects the influence of the gradient noise. To address this gap, we propose a novel steady-state adaptation (SSA) algorithm that balances covariance dynam- ies during adaptation. SSA is derived through the solution of stochastic differential equation for the TTA process and online inference. The re- sulting algorithm incorporates a covariance-aware learning rate adjustment mechanism. Through extensive experiments, we demonstrate that SSA consistently improves state-of-the-an methods in various TTA scenarios, datasets, and model archi- tectures, establishing its effectiveness in instabil- ity and adaptability.
Test-time adaptation (TTA) is an online adaptation tech- nique that updates a model using unlabeled test samples drawn from a new data distribution through unsupervised learning. TTA methods often rely on the model's own pre- dictions to drive adaptation, employing entropy minimiza- tion loss (Wang et al., 2020). However, in dynamic envi- ronments with complex, time-varying distribution shifts, these unsupervised approaches face significant challenges. One critical issuc is weight degradation, where reliance on explicit gradient noise-caused by inaccurate model pre- Dictions-cooruptt the weights over time (Boudiaf al., 2022; Chen al., 2022: Gong et al., 2022; Niu et al., 2023). Recent research has introduced weight-based TTA methods that mitigate this issue by enhancing model weights during adaptation (Wang et al., 2022; Niu et al., 2022; 2023; Mars- den et al., 2023; Lee & Chang. 2024), typically by averaging current model weights with the pre-tree pre-trained source weights.
1. Introduction
Machine learning algorithms have achieved remarkable suc- cess due the ability of deep neural networks (DNNs) to model large-scale data (Krizhevsky et al., 2012; Simonyan
In this study, propose Bayesian weight enhancement framework that unifies and generalizes existing weight- based TTA methods by explicitly modeling the enhanced weight distribution. Our framework, rooted in Bayesian deep learning (Murphy, 2023), offers a principled approach to improving robustness to distribution shifts. Under this framework, existing weight-based methods can be viewed as special cases that assume time-invariant covariance in
'Division of Language AI, Hankuk University of Foreign Studies, Scoul, Republic of Korea. Correspondence Jac-Hong Lee <Ijh931jh@@ @h ac.
Proceedings of the 4dnd International Conference Machine Learning. Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).

---

Bayesian Weight Enhancement with Aleady-State Adaptation
the dynamics of weight distributions in stochastic gradi- ent descent (SGD). Using this foundation, propose the steady-state adaptation (SSA) algorithm, which dynami- cally regulates covariance during TTA to ensure stability and adaptability. SSA derived in three steps: (1) model- ing the transition weight distribution via the SDE approx- imation SGD, (2) performing online inference posterior weight distribution using this transition model, and (3) adjusting weight updates maintain steady-state covariance. Our algorithm introduces a covariance-aware learning rate adjustment mechanism that increases learn- ing rates under low noise for enhanced adaptability and decreases them under high noise for improved stability. We validate SSA in various TTA scenarios, demonstrating its consistent improvements over state-of-the-ar methods. In addition, SSA addresses common challenges such per- formance degradation in increasing learning rates (Zhao et al., 2023), providing robust and principled solution in dynamic environments.
10 00-3
TTA Process
g
gt-11
ge.2
At
f--1
33
KAp-11
Boyesian Weight Enbancement
+2
to
f2 1
2
fa1a
Steaddy Stadde
Adaptation
2. Bacckrrondd
In this section, summarize previous studies as the basis for our proposed framework and algorithm. Related works are provided in Appendix 6.
MM--3
f (ha7)
Weight- Based Test-time Adaptation TTA is an online learning paradigm designed to adapt a pre-trained source model to unlabeled test samples drawn from a shifted dis- tribution. However, traditional TTA methods are prone to weight degradation in dynamic environments with evolving diverse distribution shifts (Boudiaf al., 2022; Gong et al., 2022; Niu et al., 2022; Lee et al., 2024). This degradation occurs because explicit gradient noise from unsupervised learning accumulates damage to the model weights over time. Weight- based TTA methods provide complementary approach by directly addressing weight degradation. Instead of relying solely on noisy gradient updates, these methods continually integrate the pre- pre-trained source weights into the current model during adaptation. At each time step k, the current weights it are adjusted by averaging them with the pre-trained source weights wh as follows:
2g
1po1 8642 8e48
Figure 1. (Top) Test-time adaptation process. The blue circles indicate that the weight, Weg evolves over time. black ar- rows denote gradients, gt. emitted at arbitrary discrete time steps tu E (fu, fi,..., fx). (Bottom) Bayesian weight enhancement with steady-state adaptation. Bayesian weight enhancement aligns weights to the source model üon for enhanced weight úg. Steady- state adaptation balances the variance of and adjusts the step size Afş by calculating og from the variance.
the weight distribution. However, the TTA methods in dy- namic environments introduce the explicit noise arising from changes in the data distribution, and covariance reflects the evolution of the noise over time. This covariance repre- sents the stability and adaptability of the learning process: excessive covariance destabilizes learning by overshoot- ing optimal solutions, while insufficient covariance reduces adaptability, trapping the model in suboptimal states (Jas- trzebski et al., 2017; Zhu et al., 2018; Wu et al., 2020). These challenges make balancing covariance critical aspect of improving TTA performance.
i
att + (1 a)wo:
(1)
where S a S 1 a weighting factor that determines the balance between the current and source weights. Several state-of-the-as weight-based TTA methods adopt this prin- ciple: SAR (Niu al., 2023) resets the model weights the source weights (i.e., = 0) when the exponential moving average of the total loss falls below a predefined threshold.
ROID (Marsden et al., 2023) employs moving average approach with small a, anchoring the weights close to the source weights. CMF (Lee & Chang. 2024) introduces a "hidden source weight" by averaging the source and model
To address these challenges, we draw on stochastic dif- ferential equation (SDE) approximations (Li et al., 2019; 2021), which provide theoretical foundation for modeling
2

---

Bayesian Weight Enhancement with Steady-State Adaptation
weights over time with an additional parameter similar to a. This hidden weight is then further averaged with the current model weights to produce w. These methods improve TTA performance in dynamic environments by mitigating weight degradation during adaptation.
Algorithm 1 Bayesian Weight Enhancement Framework
with Steady-State Adaptation
Require: Learning rate 1/. Source model f(:: ibo), A
aI, o3
Initialization mo- W Po- = 0, 9o for k 1 to K do
Approximating SGD with SDEs SGD is a cornerstone of deep learning optimization, and its behavior can be effec- tively analyzed by approximating its discrete updates using SDEs (Li et al., 2019; 2021; Malladi et al., 2022). SDE approximations offer theoretical framework for how the gradient noise of covariance influences optimization dynam- ics, convergence, and generalization. The introduction of SDE approximations provided key insights into the average behavior of SGD, linking covariance to convergence prop- erties (Li et al., 2019). Subsequent work validated these approximations for discrete SGD updates, showing how learning rate adjustments influence covariance and, in turn, the optimization trajectory (Malladi et al., 2022). Specifi- cally, increasing learning rates amplify the noise, promoting exploration of flatter minima, while lower learning rates suppress the noise, stabilizing optimization but risking con- vergence sharp minima. These studies are particularly relevant for TTA, where shifting data distributions cause excessive changes in covariance, significantly affecting the performance of the model. SDE approximations thus serve as a powerful tool for understanding and addressing these covariance dynamics, providing a foundation for robust op- timization in the presence of distribution shifts.
9k <- V me G(m²)
Steady-state adaptation: 9k - 7 [gk + 9k-1)
of - J (gx - 5x - TT
ak Vo
Eq. (19)
m k+1|k f ma 01:19
Eq. (20)
P k+1lK + Ps + a
Eq. (21)
9k +- (argk 9k-1)
Bayesian weight enhancement:
mk+1 <- m. k+1|k + A(io m
> Eq. (17)
PR+1 + (I A) k+1/K
Eq. (18)
end for
where {(.) is typically entropy-based loss function:
((((=+1;;)))
Σ NEY
ply xx+1, wx) log p(yl wx).
(3)
The predictive distribution p(y wa) represents the model output for input 2x. where the weights are iteratively optimized via SGD:
3. Methodology
In this section, we start by introducing the notation and problem formulation, followed by the Bayesian weight en- hancement framework and the proposed SSA algorithm. The framework with our algorithm presented Algo- rithm
# arg min G(üxz).
(4)
4%
This sequential weight update process produces a time series of weights (w0 ..,...., w However, due to the absence of ground-truth labels in the TTA settings, the reliance on unsupervised learning introduces explicit noise into the gra- dient estimates. This explicit gradient noise accumulates over time, leading to weight degradation, which ultimately compromises model performance, especially in dynamic environments characterized by significant and evolving dis- tribution shifts.
3.1. Problem Formulation
We consider a DNN model f x X + V, parameterized by an arbitrary weight w E Rdd which maps input data e X to a predicted label probability p(y|æ,, w) where y E y and d is the dimensionality of the weight space. Given a well-trained source model f(:; (oo) pre-trained on labeled source data [( ~ Do n = 1: No). the objective of TTA is to adapt the model to unlabeled test data Ik ~ DR. where D₃ represents a dynamically evolving new distribution. This adaptation is required at each discrete time step & E {1, 2,....... K}. under Dy # Do-
The primary goal of this paper to mitigate the effects of the explicit noise caused by the unsupervised nature of the TTA process. To achieve this, we aim to derive an enhanced weight sequence {ū,, i2,,.., ūs) ...,
In the TTA process, the unsupervised objective is the pected risk G(-) at each time step k; defined as:
where ú represents a refined weight estimate at the time step k. This enhanced weight sequence is designed to restore and improve model performance under dynamic distribution shifts, offering a robust solution to the challenges of weight degradation.
G((rk) = Empes [((
3

---

Bayesian Weight Enhancement with Steady-State Adaptation
3.2. Bayesian Weight Enhancement with Time-Invariant Covariance
noise over time. This evolving noise profile directly affects the covariance of the weight distribution (Jastrzebski et al., 2017; Zhu et al., 2018; Wu et al., 2020), capturing the trade- off between adaptability and stability during training.
Bayesian deep learning provides a principled approach to represent model weights probability distributions rather than deterministic values (Polson & Sokolov, 2017; Wilson, 2020; Wilson & Izmailov, 2020; Khan, 2019). This rep- resentation enables the consideration of multiple plausible weight configurations simultaneously, which enhances the robustness of distribution shifts and the explicit gradient noise (Wortsman et al., 2022; Rame et al., 2022). These properties make Bayesian approach particularly well suited for the TTA methods, where models adapt to evolving data distributions in dynamic environments while maintaining stability against noise.
3.3. Steady-State Adaptation
In this section, we introduce the SSA algorithm, which integrates the dynamics of SGD using an SDE approxima- tion, applies Bayesian filtering to compute the posterior weight distribution, and ensures stcady-state covariance. The detailed derivations are provided in Appendix A.
Transition Weight Distribution with Time-varying Covariance In many TTA methods, the SGD optimizer serves as the backbone to update model weights. We adopt the SDE approximation to capture the temporal dynamics of the weight and their covariance during the TTA process (Li et al., 2019). This approximation provides a continuous-time stochastic representation of SGD. For a small learning rate 7), the weight dynamics during TTA can be expressed as:
Using Bayesian model averaging, the posterior predictive distribution is expressed as:
pl wa. wh+1)= I plylars u)p(u we, we+ wx+i)dd,
(5)
where p(u|wx, w x p(wx+1 p (l))w/))))) To com- pute the posterior weight distribution ( wx+1), ), we approximate both likelihood and prior terms using linear Gaussian models:
du, -g.d + VTTLL /dW,
where dW, is standard Brownian motion, Ir represents the gradient of the loss function VG((;), and Σ = of de- scribes the covariance matrix derived from the gradient (Malladi et al., 2022). The time-varying variance of is com- puted as of 2 ( Et (gr 9-) T-)T), where
p( u2) = N(w wo. R), p(u)ww)) = N(u) (0 Q),
(6)
where R = 0²
o3 Q = o and I E Iødxd is the identity matrix. The formulation results in the posterior distribution that is also Gaussian:
ge = 1/t 1/= 9r is the mean gradient, tr(.) is the trace operator. Covariance reflects the variability of the gradient and serves an indicator of optimization stability.
p(ulw,, w = (u (m.P)
The posterior mean and covariance are given by:
The temporal evolution of the weight distribution p(u,) is governed by the Maatee--lPaacc-oomoggaae (FPK) equa- tion:
m = (I - A)wx + Aw,, P AR,
and A Q(Q + R1 Recent weight- TTA meth- ods, such as ROID and CMF, have achieved performance improvements by setting A close to 0. This setting corre- sponds to the case where og < oZ. Furthermore, for well-trained source model with o² 0, the covariance P becomes O. In the limit where P + O, the posterior distri- bution plu Wo, wx) reduces to a Dirac delta 5(u; m). Under these conditions, the posterior predictive distribution in Eq. (5) is simplified to p(y xx, m). where m represents the updated weight that combines information from both the current and the source weights.
Öp(u.) Ōt
d Op(u)) Ow
d
d
8 p(us))
[gr] + 2
Ow; m
sy'
1=1
(10)
where H-s and Hiss represent the i-th element of a vec- tor [.]. and (i.j)-th element of a matrix [-], respectively. Since de and E,, are generally intractable, we solve the FPK equation by assuming a Gaussian approximation p(u,) v
N Nu, m,,, P.) and applying Taylor expansion to linearize the dynamics. As the results, the mean and covariance evolve as follows:
dm dt
-t. dP PG. + +G, G.P n,E,
From the perspective of our framework, existing weight- based TTA methods can be interpreted as specific cases of the posterior weight distribution under the assumption of time-invariant covariance. However, dynamic environments frequently induce variability in model performance due to data distribution shifts, which result in changes in gradient
(11)
and G. is the Jacobian matrix of w.r.t. Uy. In this situation, the transition distribution p(u, u..) is derived by solving this cquation for the interval 0 < s < t and the initial conditions m. = dr and P. = 0 (Särkkä & Solin, 2019). For a small

---

Bayesian Weight Enhancement with Steady-State Adaptation
interval 8 kn and (k: + 1),, we can approximate the constant within each step k;
P Pk+1 (I A&) P
(18)
gradients and covariance leading to Gr = 0. In this situation, the transition weight distribution is derived as:
where A, is the Kalman gain (Särkkä & Svensson, 2023)
defined as A = P (P adjusts the influence of the source weight wy based on the relative magnitude of the covariance P 1+11/ and R. This adjustment ensures that the posterior mean incorporates both the current weight and the source weight, similar to the exist weight- based TTA.
(P*+
R+1JA: + -R) The term As
p(us+1lu4) (ux+1 m 1|k PR+1|R),
(12)
where m 1|k dos - St, PR+ At with gk
(G())) of 1 (ok - (gr - -9x) Tw) and the step
size is At 17.
In the TTA process, the gradients 9k are estimated from unlabeled test samples, leading to explicitly noisy covariance estimates Σg. This explicit noise introduces fluctuations in the one-step-ahead covariance P *+1jk and, consequently. Ag. Such fluctuations destabilize the weight update process (Kloeden et al., 1992), impairing the ability to adapt effectively to new data samples, particularly under significant distribution shifts. These challenges underscore the need for robust mechanism to regulate covariance dynamics.
This transition distribution aligns the evolution of the mean with the discrete TTA process, while the covariance reflects the influence of gradient noise. The covariance serves as a measure of noise shape in the weight updates, highlighting the interplay between noise and optimization dynamics during TTA.
Online Posterior Weight Distribution Inference
To perform an online inference of the posterior weight dis- tribution in our Bayesian weight enhancement framework, we adopt a Bayesian filtering approach (Särkkä & Svensson, 2023). The approach provides recursive mechanism for computing the posterior distribution each discrete time step by incorporating the prior distribution and the likelihood of new observations. This mechanism enables efficient computation of the posterior distributions in online learning.
Balancing Covariance TTA methods are sensitive to learning rate adjustments. High learning rates exacerbate covariance, leading to abrupt performance drops due to instability (Zhao al., 2023). In contrast, excessively low learning rates trap the model in local optima, resulting in significant performance degradation (Niu et al., 2023; Lee et al., 2024). To address these competing challenges, we propose a dynamic algorithm that calculates a step size Aty to balance covariance based on the posterior weight distribution.
Given the posterior weight distribution at the previous time step. p(ux|woxx), the one-step-ahead posterior dis- tribution p(ux+1 (wox)) is computed using the Chapman- Kolmogorov equation (Murphy, 2023):
To achieve this balance, introduce scalar ay > 0 to parameterize the step size as a277 The dynamic step size is computed to satisfy the condition P4+1 ~ Pk. ensuring that the covariance remains near its steady-state. Given that all covariance matrices in Eqs. (15) and (18) are scalar multiples of the identity matrix, i.e., Pa = P.l. Σ, = of and R. = I the steady-state condition is simplified to:
p(us+1/100 [wo.)) = - p(us++ 1 (pl))(((u (p( wo:
(13)
= -N(u--llmt 1411 Pit P(tt)k):
where p(ug+a u the transition distribution given in Eq. (12). Starting from the initial condition mg wng and Po = 0, the mean and covariance are updated as:
m m++1lk = mm At,
(14)
0 V
(19)
pt k+1/K P& + ERAt?
(15)
where σ% = / Poo)) and P& represents P& in the steady-state regime. Substituting ayh into At in Eqs. (14) and (15), the enhanced mean and covariance of the one-step-ahead posterior distribution are derived as follows:
Using our Bayesian framework, the likelihood p(w*+1 (1)+1) is modeled as p(ws+1lu) in Eq. (6), the posterior weight distribution is derived as:
1 Z
M(Ux+1/wakH)
pw 1o wook)
m m2 ag
(20)
= -N |M4+1, PR+1),
(16)
P P Pk + 2
(21)
where Zμ = p(wpww 1 )p( uk+1 wo dux++ The
These updates are then applied to Eqs. (17) and (18) to calcu- late the posterior weight distribution. Under the steady-
mean and covariance of this distribution are updated as:
m 11+ m ++ 1| 1|k= + As mtttn))
(17)
condition, As in Eq. (17) stabilizes and becomes A = al
5

---

Bayesian Weight Enhancement with Steady-State Adaptation
Table 1. Average error rates (%) and standard deviations in covariate shift (7 oo) on ImageNet-C.. Red fonts indicate performance degradation with respect to Source.
Adaptation Order (-)
Method
NOISE
BLUR
WEATHER
DIGITAL
Avg.
gaussian
shot
impulse
defocus
glass
motion
20om
snow
frost
log
bright
contrast
elastic
pixelate
jpeg
Source
43.9
43.3
43.4
69.7
78.3
59.6
69.1
40.1
44.3
36.3
26.5
50.6
67.6
60.6
43.4
51.8
TENT
43.8
42.9
43.1
70.1
77.9
59.4
69.3
42.2
48.7
45.9
28.9
50.4
68.0
63.3
45.3
53.3+0022
LAME
45.4
43.7
44.5
72.1
90.7
60.6
89.3
91.5
96.5
99.7
26.7
95.9
96.1
63.3
44.7
70.740.14 14
RoTTA
43.9
43.3
43.3
69.7
77.8
42.5
35,9
26.2
49.8
66.6
43.4
51.4+0.02
SAR
44.2
43.8
43.7
69.7
77.5
57.1
66.8
41.4
42.0
26.4
51.6
64.3
57.2
42.1
51.310.35
EATA
44.3
43.8
43.5
69.0
74.3
56.8
64.2
39.8
44.2
46.3
25.4
45.3
61.2
54.1
40.7
50.210.06
DeYO
43.6
41.9
40.8
66.3
70.7
54.7
63.4
38.3
38.3
36,8
24.5
43.2
55.5
49.3
39.5
47.1
ROID
42.8
40.4
39.8
63.0
63.2
49.7
56.7
36.8
36.2
31.5
24.8
39.7
57.1
47.3
36.6
44.4+0.13
+SSA
43.0
40.8
39.8
62.8
64.2
49.5
55.5
36.8
35.7
31.1
24,4
39.8
54.8
45.6
35.3
43.9+0.11
CMF
42.9
40.3
39.8
64.0
63.4
49.5
55.1
36.7
34,9
32.4
23,4
38.4
52.0
44.9
35.6
43.5+0.04
+SSA
39.9
39.4
63.1
60.5
37.1
33.9
31.1
22.8
37.9
49.8
33.1
42.2#0.16
where 0 is constant scalar. Consequently, the pro- posed algorithm seamlessly integrates with existing weight- based methods by inheriting the time-invariant covariance behavior described in Eq. (8).
scenarios, sequentially arranged domains modeled time- correlated changes, where input samples were streamed domain by domain (Boudiaf et al., 2022; Wang et al., 2022; Yuan et al., 2023). The label shift scenarios were conducted by presenting sequential input samples drawn from specific label classes over time. Using a Dirichlet distribution parameter 7, we controlled the concentration of local label distributions; lower values ? formed label-specific clusters, while 7 oc reproduced covariate shifts (Gong et al., 2022; Niu et al., 2023; Zhou et al., 2023). To evaluate the long-term stability of adaptation, we introduced periodic scenarios in which the domains followed a repeating sequence of covariate shifts. Each sequence was repeated up to 15 times to assess long-term adaptation behavior. In addition, we designed various order scenarios in which groups were presented in various orders to examine the order dependency of the TTA methods. For these, we created four group sequences (Order-1 to Order-4) to evaluate robustness under unpredictable distribution changes.
By adopting a tiny initial step size 77, the covariance P8+1 in Eq. (18) remains sufficiently small, ensuring that the posterior weight distribution is well-suited for the Bayesian weight enhancement framework. Within this framework, the posterior predictive distribution is simplified to p(yl [xy] 1)), enabling efficient inference without requiring sampling.
4. Experiments
4.1. Experimental Setup
Datasets and Metries We evaluated our method using two widely recognized datasets, ImageNet-C (Hendrycks & Dietterich, 2019a) and D109 (Marsden et al., 2023), for distribution shifts in dynamic environments (Niu et al., 2023; Marsden et al., 2023). ImageNet (Deng et al., 2009) consists of 1,281,167 training samples and 50,000 testing samples. ImageNet-C extends ImageNet by applying 15 types of corruption at five severity levels. These corruptions are categorized into four groups: NOISE, BLUR, WEATHER, and DIGITAL. Consistent with prior studies (Niu et al., 2022; 2023; Marsden et al., 2023), we focused on the highest corruption level (level 5) to evaluate robustness against severe image degradation. The D109 dataset features five domains representing natural distribution shifts derived from DomainNet (Peng et al., 2019). It includes 109 classes that overlap with ImageNet, enabling cross-domain evaluations. The evaluation metrics were the mean and standard deviation of error rates computed across five random seeds to ensure robust performance measurement.
Implementation Details For all experiments, we used the base version of TranforTransoommrr (ViT) (Dosovit- skiy et al., 2020) with the sulf-super data2vec (D2V) model (Baevski et al., 2022) as the backbone, consistent with previous works (Niu et al., 2023; Marsden et al., 2023; Lee & Chang, 2024). Source models were pre-trained on the ImageNet training dataset using publicly available weights to ensure reproducibility. Following previous studies (Li et al., 2018; Niu al.. 2022; 2023; Marsden et al., 2023; Lee & Chang, 2024), we limited the trainable weights to normalization layers, employing either batch normalization (loffe & Szegedy, 2015) or layer normalization (Ba et al., 2016), depending on the model architecture. Comparative methods were implemented using their official codebases and hyperparameters as described in their respective papers, ensuring alignment with the standard TTA benchmark (Marsden & Döbler, 2022). The models were trained with batch size of 64 and learning rate of 0.00001 using the
Scenarios For evolving distribution shifts over time, we leveraged several dynamic scenarios. In the covariate shift
6

---

Bayesian Weight Enhancement with Steady-State Adaptation
Table Average error (%) and standard deviations in label shifts (? (1.1) on ImageNet-C. Red fonts indicate performance degradation with respect to Source.
Adaptation Order (-)
Method
NOISE
BLUR
WEATHER
DIGITAL
Avg.
gaussian
shot
impulse
defocus
glass
motion
200m
Snow
frost
fog
bright
contrast
elastic
pixelate
Jpeg
Source
43.9
43.3
43.4
69.7
78.3
59.6
69.1
40.1
44.3
36.3
26.5
50.6
67.6
60.6
43.4
51.8
TENT
44.0
43.5
43.8
70.8
78.3
59.9
68.8
42.4
52.0
56.5
30.2
64.7
68.7
63.2
44.7
55.42 .58
LAME
45.7
43.7
45.2
72.4
88.0
60.2
87.5
89.1
95.0
99.7
27.1
95.7
95.0
63.2
44.2
70.110.04
RoTTA
43.5
41.2
40.8
68.4
71.1
56,3
64.4
39.1
38.3
38.6
28.3
65.4
67.5
67.4
49.4
52.0#0.06
SAR
43.9
55.0
63.4
39.3
38.8
44.8
58.0
49.9
39.3
48.0+0.10 10
EATA
43.5
40.5
39.6
61.7
62.0
48.1
56.0
36.7
36.0
32.9
23.0
37.1
53.2
44.5
34.7
43.3+0..3
DeYO
41.3
38.8
38.8
60.8
61.0
52.3
70.6
42.5
40.3
40.8
26.1
64.3
66.4
48.1
42.9
49.0+2.83
ROID
40.6
39.4
39.3
54.8
55.4
46.4
53.1
35.5
34.7
30.0
23.7
36,1
48.0
41.4
34.9
40,940.10 10
+SA
40.5
38.8
38.7
$4.3
53.8
45.0
51.9
34.7
34.1
29.5
23.0
35.7
45.1
39.5
33.2
39 39.940.04
CMF
40.3
38.5
38.4
52.7
49.9
42.5
46.4
34.0
32.8
28.6
22.2
34.4
42.1
38.6
31.6
38.240.05
ASA
39.8
37.6
37.6
50.4
46.1
39,9
42.0
32.1
31.1
27.5
21.1
33,9
36.4
33.7
29.4
35.940.04
Table Average error rates (%) and standard deviations in label shifts (y 0.0) on ImageNet-C. Red fonts indicate performance
degradation with respect to Source.
Adaptation Order
Method
NOISE
BLUR
WEATHER
DiGITAL
Avg.
gaussian
shot
impulse
defocus
glass
motion
zoom
Snow
frost
fog
bright
contrast
clastic
pixelate
ipeg
Source
43.9
43.3
43.4
69.7
78.3
59.6
69.1
40.1
44.3
36.3
26.5
50.6
67.6
60.6
43.4
51.8
TENT
44.1
43.7
44.0
71.1
79.2
61.6
69.8
43.2
53.1
55.9
30.8
48.7
69.4
69.1
58.9
56. 36.2400.98
LAME
30.5
29.8
30.2
49.4
62.4
39.9
50.3
31.3
34.3
31.4
22.7
39.9
55.9
41.4
34.5
38.910.07
RoTTA
43.8
42.0
42.0
69.9
74.5
59.3
67.4
40.3
39.5
40.2
29.0
74.5
72.4
72.8
51.5
54.610.04
SAR
44.2
41.8
41.0
67.6
71.7
54.8
63.5
39.2
39.0
38.2
25.6
67.5
66.0
57.9
39.0
50.5+1.38
EATA
41.4
40.8
52.2
60.5
39.7
40.6
39.4
46.0
55.4
49.7
38.3
47.0+0.11
DeYO
41.5
38.9
38,9
61.7
61.3
51.8
72.0
42.2
41.6
39.7
26.5
56.4
57.1
47.3
41,4
47,9+0.57
ROID
12.2
11.8
11.6
32.5
33.5
18.4
30.1
12.4
11.6
9.8
7.3
12.6
25.1
15.3
13.0
17.140.32
SSSA
12.2
11.8
11.5
32.6
29.6
18.3
28.9
11.9
11.3
9.6
7.1
12.1
23.2
14.1
11.5
16.4#0.14 14
CMF
12.4
12.0
11.9
28.8
23.9
15.6
22.4
11.2
10.2
8.9
6.3
11.3
17.9
13.0
9.7
14.410.24
+SSA
12.3
11.4
11.3
29.2
20.5
14.5
19.4
10.5
9.7
8.3
10.0
14.6
10.8
8.7
13.120.29
Table Average error rates (%) comparison with various methods in the periodic scenario.
approaches. This result supports our hypothesis that leverag- ing weight distributions and incorporating multiple weights with consistent mixing ratios enhances robustness in dy- namic environments. By incorporating the proposed SSA algorithm, these methods achieved state-of-the-at perfor- mance in all domains, except the snow domain. Tables 2 and 3 present the performance of the TTA methods in the label shift scenario, with the intensities set to ? = 0.1 and y 0.0, respectively. In both cases, SSA consistently improved the average performance of ROID and CMF, high- lighting its effectiveness in addressing significant label im- balances. Similar trends were observed on the D109 dataset (detailed in Appendix B), where SSA consistently enhanced the robustness of weight- methods. These results un- derscore the generalizability of SSA to different datasets and adaptation scenarios.
Method
Round
Source
EATA
DeYO
ROID
CMF
SSA
50.2
47.1
44.4
43.3
42.2
2
46.6
45.6
44.3
42.0
40.8
3
45.1
45.6
44.3
41.7
40.6
44,2
45.7
44.3
41.6
40.4
43.7
40.2
43.3
47.4
44,3
41.5
40.2
43.1
48.6
44.3
41.5
40.4
51.8
42.9
49.3
44.3
41.5
40.2
9
42.7
50.9
44.3
41.4
40.3
42.7
11
42.6
57.2
44,3
41.4
40.3
12
42.5
54.3
44.3
41.4
40.4
42.4
44.4
41.4
40.2
14
42.3
$7.0
44.3
41.4
40.4
42.3
44.3
41.4
40.3
Avg.
51.8
43.842.14
51.044.88
44,
44.360.03
41
41.640.50
40.5:0.51
SGD optimizer. By default, SSA was integrated with CMF, setting the hyperparameter a = 0.01, following the ROID and CMF configurations. The steady-state scale factor o²
4.3. Stability
was set to 12
Table presents the performance of various TTA methods in the periodic scenario as the number rounds increases. Initially, EATA lags in performance but improves rapidly over successive rounds, eventually surpassing ROID. How- ever, CMF consistently outperforms both EATA and ROID in all rounds, achieving higher average performance. By integrating SSA, CMF further improves, maintaining supe-
4.2. Effectiveness
The performance of TTA methods in the covariate shift scenario on ImageNet-C is summarized in Table 1. Weight- based TTA methods, particularly ROID and CMF, demon- strated significantly better performance compared to other
7

---

Bayesian Weight Enhancement with Steady-State Adaptation
BEATA DDYO SROID &CMF SSSA
Table S. Average error rates (%) and elapsed time comparison of
70,0
methods with and without SSA in covariate shift.
Wengge Eroo Kate
60.0
Method
Time
Relative Time (%)
Avg.
55.0
TENT
1565.2
0.0
53.3=0.22
50.0
TENT+SSA
1580.7
1.0
49,3+0.30
65.0
ROID
1732.3
0.0
44.420.13
40.0
ROID+SSA
1790.4
3.4
43.920.11
35.0
CMF
17514
0.0
43.5+0.04
CMI+SSA
18274
4.3
42.2+0016
N005
WEATEE
DIGITAL
MESATHER
NOSS
WEATTER
DISTTAL
MOSE
DOGIA
WETTATTEE
TENT
TENT-SSA -.. CMP - -MP
-ESRY B11 8GR oow.
Orlen
Ordan-)
Ordan-1
Dadand
Posterior Vaniancee
Figure 2. Average error rates (%) comparison with various meth-
in various order scenario.
100000
SSROODD
ZEACPP
200 SSA
2 per. Mov. Avg. (ROID)
1000
2 per. Mov. Avg. (CMF)
.* 2 per. Mov. Avg. (SSA)
80.0
Adaptation Time
2 75.0
Figure 4. Comparison of variance evolution with and without SSA.
88 70.0
2
learning rates (Zhao et al., 2023). As shown Figure when the learning rate exceeded 0.00004, both ROID and CMF experienced significant performance degradation. In contrast, SSA effectively mitigated this instability, maintain- ing stable performance even at learning rates up to 15 times the default value. Beyond this threshold, SSA's performance also declined due to violations of the small learning rate assumption inherent to the SDE approximation. Despite this limitation, SSA significantly improved the stabil- ity of existing methods across wide range of learning rates.
88 50.0
55.0
INEER0-000 28 80.0
45.0
30.0
8.semuu
dsgges
Leming Rate
Figure 3. Average error rates (%) of different methods as learning rate increase.
rior performance throughout the adaptation process. These results highlight the ability of SSA to balance high adapt- ability with long-term stability, making it a reliable solution for scenarios that require sustained performance.
Efficiency Efficiency is a essential consideration for TTA methods, as they operate in an online learning setting where computational overhead must be minimized. Table reports the elapsed time and relative time for various TTA methods under the covariate shift scenario. SSA-enhanced methods exhibited minimal relative time increases of 1.0%. 3.4%, and 4.3% compared to their re- spective baselines, while delivering significant performance improvements. Notably, SSA boosted TENT's performance by 4.0%, effectively mitigating weight degradation with minimal additional computational cost. These results highlight SSA's efficiency, as it enhances adaptation by refining the existing trajectory of weight updates without requiring additional optimization steps.
4.4. Adaptability
Figure 2 illustrates the performance of TTA methods in four different group orders. While CMF generally outperforms ROID, it exhibits vulnerabilities in certain cases. Specifi- cally, CMF underperforms in the NOISE domain for Order-2 and Order-3 and shows degraded performance in the DIG- ITAL domain for Order-4, as indicated by the red dotted boxes. By integrating SSA, these limitations are effectively mitigated, with SSA achieving the highest performance across all groups and orders compared to existing methods. These results demonstrate the adaptability of SSA to unpre- dictable distribution shifts, reinforcing its robustness and versatility in handling diverse and dynamic environments.
Covariance Profile The core mechanism of SSA lies in balancing covariance. Figure illustrates the evolution of the scalar variance P& the posterior covariance Py over the adaptation process in the covariate shift scenario on ImageNet-C. Throughout the process, the variance remained consistently within the range of 10-7 to 10-1, demonstrating its consistently small magnitude. This result supports the thcoretical assertion of our framework that a small variance must be maintained. For TENT, SSA effectively reduced both the variance and its fluctuations, leading to a stabilized adaptation process.
5. Analysis
We conducted an in-depth analysis of sensitivity learning rates, computational efficiency, and the role of covariance in driving its performance. These analyses provide insights into the core mechanisms and effectiveness of SSA.
Learning Rate Sensitivity A common challenge
for TTA methods is the instability caused by increasing
8

---

Bayesian Weight Enhancement with Steady-State Adaptation
In the case of CMF, SSA slightly increased the variance, but simultaneously controlled its variability, thereby enhancing the stability. These results empirically validate the hypothesis that covariance is a critical factor influencing TTA performance and demonstrate the effectiveness of SSA in dynamically balancing covariance.
empirically demonstrated robustness out-of-distribution data, particularly in fine-tuning large foundation models (Wortsman et al., 2022; Rame et al., 2022). However, the study of time-dependent weight distributions under unsu- pervised learning, where explicit gradient noise can arise, remains an underexplored area. Our research addresses this gap by theoretically deriving the weight distribution using SDE approximations and Bayesian filtering and further demonstrating its empirical effectiveness in improving model performance.
6. Related Works
Sample-based based Test-time Adaptation TTA is online learning paradigm that adapts pre-trained source model to unlabeled test samples drawn from a different distribution. Many TTA methods rely on entropy minimization, using model outputs as target probability to facilitate unsupervised adaptation (Wang et al., 2020). However, in dynamic environments characterized by diverse changing distribution shifts, these methods are prone to model collapse (Boudiaf et al., 2022; Gong et al., 2022; Niu et al., 2023; Press et al., 2024). Model collapse typically arises from explicit gradient noise, which is introduced by unreliable model predictions, leading to weight degradation over time. To mitigate these issues, sample-based TTA methods reduce the influence of test samples associated with poor predictions (Niu et al., 2022: Lee al., 2024; Marsden et al., 2023). These methods attempt to filter out unreliable samples by selecting high-confidence samples during adaptation. However, their dependence on unreliable model output, which becomes increasingly corrupt under extreme distribution shifts, limits their overall effectiveness. As a result, these methods remain vulnerable to performance degradation in highly dynamic contrast, beight-based TTA methods (Niu et al., 2022; 2023; Marsden et al., 2023; Lee & Chang, 2024) alleviate this problem by continuously averaging the source weight with the current weight. This approach addresses weight degradation and integrates naturally into our proposed Bayesian weight enhancement framework.
Bayesian Filtering Bayesian filtering is a recursive Bayesian inference method for predicting and updating time-evolving observations. Kalman filtering, in particular, performs exact Bayesian inference under the assumption of linear Gaussian models (Cheng et al., 2019; Abuduweili & Liu, 2020). For nonlinear observations, extensions such as Extended Kalman Filtering (EKF) and Iterated EKF have been developed (Kloeden et al., 1992; Bell & Cathey, 1993). These techniques have been applied to DNN outputs, where Kalman filtering is performed with linearized approximations (Puskorius & Feldkamp, 2001). Our approach shares this idea by using linearization from Eq. (24) and substituting local gradient and covariance terms with observed constants. The validity of this substitution is confirmed through experiments in various scenarios, datasets, and models. Another Bayesian inference approach, particle filtering, can also capture complex weight distri- butions (Huang et al., 2022). However, particle filtering requires sampling weights, which introduces significant computational overhead. In contrast, SSA directly leverages the mean of the posterior weight distribution, leveraging the small-variance characteristic of TTA processes. This SSA behavior ensures computational efficiency, making SSA a practical and scalable solution for TTA.
extreme shifts. In
7. Conclusion
Bayesian Deep Learning Highly flexible models such as DNNs can represent wide range of functions, each with different generalization properties. Considering these multiple models improves accuracy in new data distributions. This concept is often implemented through Bayesian model averaging. where model weights are treated as samples drawn from weight distribution (Polson & Sokolov, 2017; Wilson, 2020; Wilson & Izmailov, 2020; Khan, 2019). The weight distribution is commonly approximated as a Gaussian distribution centered around local modes (Chaudhari& & Soatto, 2018). Since weights obtained via SGD tend to cluster around regions with good generalization properties, averaging multiple SGD samples collected regular intervals improves robustness to distribution shifts (Izmailov et al., 2018; Garipov et al., 2018; Madry et al., 2017). These approaches have
In this paper, addressed the weight degradation prob- lem in the TTA process caused by explicit gradient noise and introduced the Bayesian weight enhancement frame- work, which generalizes existing weight-based TTA meth- ods effective in mitigating the problem. Building on this probabilistic framework, we identified a key limitation in weight-based approaches: their neglect of time-varying co- variance, which captures changes in gradient noise. To address this, we theoretically derived the covariance using the SDE approximation and Bayesian inference, leading to the development of the SSA algorithm. The algorithm con- sistently improved the performance of the statc-of-ther -frth-arr TTA method by dynamically balancing covariance across diverse datasets, scenarios, and model architectures. These results highlight the covariance dynamics that drive TTA performance in dynamic environments.

---

Bayesian Weight Enhancement with Steady-State Adaptation
Acknowledgements
Garipov, T., Izmailov, P., Podoprikhin, D., Vetrov, D. P., and Wilson, A. G. Loss surfaces, mode connectivity, and fast ensembling of dnns. Advances in Neural Information Processing Systems, 31, 2018.
This work was supported by Hankuk University of Foreign Studies Research Fund (Of 2025)
Impact Statement
Gong, T., Jeong, J., Kim, T., Kim, Y., et al. Note: Robust continual test-time adaptation against temporal correla- tion. Neural Information Processing Systems, 2022.
This paper presents work whose goal is to advance the field of Machine Learning. There are many potential societal consequences of our work, none which we feel must be specifically highlighted here.
Goodfellow, I., Bengio, Y., Courville, A., and Bengio, Y. Deep learning, volume 1. MIT Press, 2016.
He, K., Zhang, X., Ren, S., and Sun. J. Deep residual learning for image recognition. In JEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 770- 778, 2016.
References
Abuduweili, A. and Liu, C. Robust online model adapta- tion by extended kalman filter with exponential moving average and dynamic multi-epoch strategy. Learning for Dynamics and Control, pp. 65-74, 2020.
Hendrycks, D. and Dietterich, T. Benchmarking neural network robustness to common corruptions and perturba- tions. International Conference on Learning Representa- tions, 2019a.
Ba, J. L., Kiros, J. R., and Hinton, G. E. Layer normalization. arXiv preprint arXiv: 2016.
Baevski, A., Hsu, W.-N., Xu, Q., Babu, A., Gu, J., and Auli, M. data2vec: A general framework for self-supervised learning in speech, vision and language. International Conference on Machine Learning, pp. 1298-1312, 2022.
Hendrycks, D. and Dietterich, T. Benchmarking neural network robustness to common corruptions and perturba- tions. arXiv preprint arXiv: 12261, 2019b.
Hernandez, F., Nguyen, V., Ghannay, S., Tomashenko, N., and Esteve, Y. Ted-lium 3: Twice as much data and corpus repartition for experiments on speaker adaptation. In Speech and Computer: 20th International Conference, SPECOM 2018, Leipzig, Germany, September 18-22, 2018, Proceedings 20, pp. 198-208. Springer, 2018.
Bell, B. M. and Cathey, W. The iterated kalman filter update gauss-newton method. IEEE Transactions Automatic Control, 38(2):294 297, 1993.
Boudiaf, M., Mueller, R., Ben Ayed, I., and Bertinetto, L. Parameter- free online test-time adaptation. IEEE/CVF Conference on Computer Vision and Puttern Recognition, 2022.
Hinton, G. E. et al. Deep neural networks for acoustic modeling in speech recognition: The shared views of four research groups. IEEE Signal Processing Magazine, 29: 2,,99,2122
pp.
Chaudhari, P. and Soatto, Stochastic gradient descent performs variational inference, converges to limit cycles for deep networks. In 2018 Information Theory and Applications Workshop (ITA). pp. 1-10. IEEE, 2018.
Huang. H., Gu, X., Wang, H., Xiao, C., Liu, H., and Wang, Y. Extrapolative continuous-time bayesian neural net- work for fast training-free test-time adaptation. Advances in Neural Information Processing Systems, 35:36000- 36013, 2022.
Chen, D., Wang, D., Darrell, T., and Ebrahimi, S. Con- trastive test-time adaptation. IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 295-305, 2022.
Ioffe, S. and Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. International Conference on Machine Learning, pp. 448- 456, 2015.
Cheng, Y., Zhao, W., Liu, C., and Tomizuka, M. Human motion prediction using semi-adaptable neural networks. American Control Conference, pp. 4884 4884-4890. 2019.
Deng, J., Dong, W., Socher, R., Li, L.JJ,, Li, K., and Fei-Fei, I.. Imagenet: A large-scale hierarchical image database. IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2488-255,220 2009.
Izmailov, P., Podoprikhin, D., Garipov, T., Vetrov, D., and Wilson, A. G. Averaging weights leads to wider optima and better generalization. arXiv preprint arXiv:/803 054000 2018
Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenbom, D., et al. An image worth 16x16 words: Trans- formers for image recognition at scale. arXiv preprint arXiv:2010.1 1999, 2020.
Jastrzebski, S., Kenton, Z., Arpit, D., Ballas, N., Fischer, A., Bengio, Y., and Storkey, A. Three factors influencing minima in sgd. arXiv preprint arXiv: 1,04623, 2017.
10

---

Bayesian Weight Enhancement with Steady-State Adaptation
Khan, M. E. Deep learning with bayesian principles. Tu- torial Advances in Neural Information Processing Systems, 2019.
Marsden, R. A., Döbler, M., and Yang, B. Universal test-time adaptation through weight ensembling, diver- sity weighting, and prior correction. arXiv preprint arXiv:2306.0m 00650, 2023.
Kloeden, P. E., Platen, E., Kloeden, P. E., and Platen, E. Stochastic differential equatiion.. Springer, 1992.
Murphy, K. P. Probabilistic machine learning: Advanced topics. MIT press, 2023.
Koh, P. W., Sagawa, S., Marklund, H., Xie, S. M., et al. Wilds: A benchmark of wildhe-wild distribution shifts. International Conference on Machine Learning, pp. 5637- 5664, 2021.
Niu, S., Wu, J., Zhang, Y., Chen, Y., et al. Efficient test-time model adaptation without forgetting. International Con- ference on Machine Learning, pp. 16888-16905, 2022.
Krizhevsky, A., Sutskever, I., and Hinton, G. E. Imagenet classification with deep convolutional neural networks. Advances in Neural Information Processing Systems, 25, 2012.
Niu, S., Wu, J., Zhang, Y., Wen, Z., et al. Towards sta- ble test-time adaptation in dynamic wild world. ArXiv, abs/2302.12400 2023.
Panayotov, V., Chen, G., Povey, D., and Khudanpur, Librispeech: an asr corpus based on public domain au- dio books. IEEE international conference on acous- tics, speech and signal processing, pp. 5206-5210. IEEE, 2015.
Lee, J., Jung, D., Lee, S., Park, J., Shin, J., Hwang, U., and Yoon, S. Entropy is not enough for test-time adapta- tion: From the perspective of disentangled factors. arXiv preprint arXiv:2403.07366 2024.
Lee, J. and Chang, J. Continual momentum filtering on parameter space for online test-time adaptation. In The Twelfth International Conference Learning Repre- sentations, 2024.
Peng. X., Bai, Q., Xia, X., Huang. Z., al. Moment match- ing for multi-source domain adaptation. IEEE/CVF Con- ference Computer Vision and Pattern Recognition, pp. 1406-1415, 2019.
Polson, N. G. and Sokolov, V. Deep learning: A bayesian perspective. Bayesian Anal, 12(4):1275-1344 2017.
Li, Q. Tai, C., and Weinan, E. Stochastic modified equa- tions and dynamics of stochastic gradient algorithms Mathematical foundations. Journal of Machine Learning Research, 20(40):1-44 2019.
Press, O., Schneider, S., Kümmerer, M., and Bethge, M. Rdumb: A simple approach that questions our progress in continual test-time adaptation. Advances in Neural Information Processing Systems, 36, 2024.
Li, Y. Wang, N., Shi, J., Hou, X., and Liu, J. Adaptive batch normalization for practical domain adaptation. Pattern Recognition, 80:109-117 2018
Puskorius, G. and Feldkamp, A. Parameter-based kalman filter training: Theory and implementation. Kalman filtering and neural networks, pp. 23-67, 2001.
Li, Z., Malladi, S., and Arora, S. On the validity of mod- eling sgd with stochastic differential equations (sdes). Advances in Neural Information Processing Systems, 34: 12712-12725, 2021.
Quinonero-Candela, J., Sugiyama, M., Schwaighofer, A., and Lawrence, N. D. Dataset shift in machine learning. MIT Press, 2008.
Liu, Z., Lin, Y., Cao, Y., Hu, H., et al. Swin transformer: Hierarchical vision transformer using shifted windows. JEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10012-10022, 2021.
Rame, A., Kirchmeyer, M., Rahier, T., Rakotomamonjy, A., et al. Diverse weight averaging for duttof-distribution generalization. Advances in Neural Information Process- ing Systems, 35: 15:10021-10838 2022.
Madry, A., Makelov, A., Schmidt, L., Tsipras, D., and Vladu, A. Towards deep learning models resistant to adversarial attacks. slat, 1050()) 2017.
Särkkä, S. and Solin, A. Applied stochastic differential equations, volume 10. Cambridge University Press, 2019.
Malladi, S., Lyu, K., Panigrahi, A., and Arora, S. On the sdes and scaling rules for adaptive gradient algorithms. Advances in Neural Information Processing Systems, 35: 7697-7711, 2022.
Särkkä, S. and Svensson, L. smoothing. In Bayesian Filtering and Smoothing, 2023. URL https: pattps://aph /apii. semanticscholl. ezg/CorpusID:2615577
Bayesian filtering and
Marsden, R. A. and Döbler, M. cest-tmme-adaptatie https//gthhbb.cmmmmriioooblc wttp:///wwobbeeeeeetie--a--aaaae adaeatttnnnionn 2022.
Simonyan, K. and Zisserman, A. Very deep convolu- tional networks for large-scale image recognition. arXiv preprint arXiv: 1556, 2014.

---

Bayesian Weight Enhancement with Steady-State Adaptation
Steiner, A., Kolesnikov, A., Zhai, X., Wightman, R., et al. How to train your vit? data, augmentation, and regularization in vision transformers. arXiv preprint orXiv22106.10270 2021.
Sun, S., Zhang, B., Xie, L., and Zhang, Y. An unsuper- vised deep domain adaptation approach for robust speech recognition. Neurocomputing, 757:79-87, 2017.
Wang, D., Shelhamer, F.,, Liu, S., Olshausen, B., and Darrell, T. Tent: Fully test-time adaptation by entropy minimiza- tion. arXiv preprini arXiv:2006. 10726, 2020.
Wang, Q., Fink, O., Van Gool, L., and Dai, D. Contin- test-time domain adaptation. IEEE/CVE Conference on Computer Vision and Pattern Recognition, pp. 7201- 7211, 2022.
Wilson, A. G. The case for bayesian deep learning. arXiv preprint arXiv:2001.10995, 2020.
Wilson, A. G. and Izmailov, P. Bayesian deep learning and probabilistic perspective of generalization. Advances in neural information processing systems, 33:4697-4708, 2020.
Wortsman, M., Ilbarco, G., Gadre, S. Y., Roelofs, R., et al. Model soups: averaging weights of multiple fine-tuned models improves accuracy without increasing inference time. In International Conference on Machine Learning, pp. 23965 23998. PMLR, 2022.
Wu, J., Hu, W., Xiong. H., Huan, J., Braverman, V., and Zhu, Z. On the noisy gradient descent that generalizes as sgd. International Conference on Machine Learning, pp. 10367-10376. PMLR, 2020.
Yuan, L., Xie, B., and Li, S. Robust test-time adaptation in dynamic scenarios. IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 19932, 2023.
Zhao, H., Liu, Y., Alahi, A., and Lin, T. On pitfalls of test-time adaptation. arXiv preprint 233.033300 2023.
Zhou, 7.,, Guo, I.-7.,, Jia, L.-H., Zhang. D., and Li, Y.- F. Ods: test-time adaptation in the presence of open- world data shift. International Conference on Machine Learning, pp. 42574-42588, 2023.
Zhu, Z., Wu, J., Yu, B., Wu, L.,, and Ma, J. The anisotropic noise in stochastic gradient descent: Its behavior of escap- ing from sharp minima and regularization effects. arXiv preprint arXiv: arXiv:1803.00/9) 803,00195, 2018
12

---

Bayesian Weight Enhancement with Steady-State Adaptation
A. Technical Details and Derivation
this section, we discuss integration of SSA and SSA into unified algorithm. In addition, we examine the validity of the SDE approximation and provide detailed derivation of the SSA.
A.1. Continual Momentum Filtering with SSA
Algorithm 2 Continual Momentum Filtering with Steady-State Adaptation
Require:
Learning rate 7j, Source model f(; ((:
Require for SSA: x A al
Require for CMF: B, S sl
Initialization My iDo Po 0, go = 0. ho wo. Qu 0
for k to K do 9k - m. ((m)))
Steady-state adaptation:
9k [gg 1)1
of jur (gk (gk gx)
as t v 2
m k+ - mi 0x.9Kk
pt IJ+ Pk + a Ex
GN t (axgk + 91-
Continual momentum filtering:
h * Shg + (1 B)wo
Q @++1/K t Q2 +
B. = 1 ( 11-11-111111 + 1)-1
h&+1 + k+ 1|k + B. ktipe 11p1
Qc+1 - (I (I-K,)Q KT
Bayesian weight enhancement framework: mi+1 /+1 + A(h m((1)k)
P + (I A k+1jK
end for
Algorithm/ 2 details the integration of SSA with CMF forming a unified TTA algorithm. SSA achieves state-of-the-art performance when combined with CMF in various scenarios by effectively regulating weight dynamics. CMF utilizes Kalman filtering to update the source model with the current weight, resulting in the hidden source weight distribution p(wr+1 1 1) contrast, SSA estimates p( u( [ using the transition weight distribution derived from SDE and the Heapman-Kollogoone
equation in Eq. (13). These two distributions are naturally integrated into Eq. (16), where SSA replaces the fixed source weight w with the hidden source weight h,+1 obtained through CMF This integration seamlessly combines two different methods, allowing SSA to take advantage of the flexible source weight derived from CMF for improved adaptability.
A.2. Validity of SDE Approximation in TTA Process
The validity of the SDE approximation for SGD arises from the requirement that the learning rate 1j be sufficiently small (Zhu et al., 2018: Li et al., 2021). In the TTA process, the connection between discrete time steps and continuous time is defined as f = kπy. where k denotes the iteration step. This mapping ensures that discrete updates in TTA can reasonably be modeled as continuous stochastic process when 17 is small. TTA methods typically update less than 1 1% weights (Yuan et al., 2023; Niu et al., 2022; Marsden et al., 2023). This TTA setting indicates that the learning rates for 99% weight are zero. Furthermore, TTA methods adopt learning rates in the range of 10 10-5 10- which are approximately 100
model's total
13

---

Bayesian Weight Enhancement with Steady-State Adaptation
times smaller than the learning rates commonly used for training source models (i.e., 10-3 to 10-4) (Steiner al., 2021; Wang et al., 2020; 2022). This nature of low learning rates across TTA methods ensures that the gradient noise introduced by SGD remains manageable and aligns with the assumptions of the SDE approximation. Consequently, the small learning rates widely adopted in TTA provide strong empirical and theoretical support for the validity of the SDE approximation in this context.
A.3. Transition Distribution from SDE Approximation
In this section, we derive the transition weight distribution from the SDE approximation of the TTA process. The approximation for SGD in the TTA process is expressed as:
du, = -g(u, t)dt + tE
(22)
where (ww, t) and E(w, t) are di and E, o,I in Eq. (9). For this SDE, the evolution of the weight distribution p(u:) is governed by following the FPK equation:
Öp(u)) Öt
Öp(ue) Ow!
p(uu), u [E(u, 03 lg(u, ()s + 2 Oufuu?
(23)
where [tly and Hy represent the i-th element of a vector [t]. and (i. element of a matrix [-] respectively. Since g(u, 1) and E(u,t) () are generally intractable, we approximate p(u,) as a Gaussian distribution M(u, (m, P) following the Gaussian assumed density approximation from (Särkkä & Solin, 2019). However, this approximation requires the efficient computation of an n-dimensional Gaussian integral. Following Theorem 9.2 and Algorithm 9.4 from (Särkkä & Solin, 2019), we linearize (via Taylor series) the gradient y(m, 1) and approximate the (T) 1)2/² around the mean m as:
g(u. 1) R g(m, 1) + G (u, ()(u - m). (u, 1)2 v VT 1)
(24)
where G(u,t) () represents the Jacobian matrix of g(u, t) with respect to u. Thus, the mean and covariance are derived as follows:
dt - dP dt In this context, the transition weight distribution can be constructed using a linear Gaussian model (Särkkä & Solin, 2019). For arbitrary intervals < t with initial conditions m, uú P. 0, the transition distribution is given by p(u)lus) es (uu++ |ma]e; Pala). For the discrete interval
dm
PG. + G.P + (),,
(25)
kn and (k + )y, the discrete transition distribution p(u++1 (u)) simplifies to N (uu++1 mm 1|k: P Pk+1))). Over this small interval, g(u, t) and "',, t) can be constant, denoted
as go ((r) and of = Htr (gx gx) (sk TT) where G. is approximated as 0. Consequently, Eq. (25) reduced to linear ordinary differential equations, yielding the mean and covariance at discrete time k:
mk+1|k iik [[ gudt = urk At, P4+1IK = L. n
(26)
where At = 17. This transition distribution is combined with Bayesian filtering to derive the posterior weight distribution in Eq. (16).
A.4. Balancing Covariance
To maintain the covariance of the weight posterior distribution near the steady-state, it is necessary to satisfy P R Pk. Since all covariance matrices 1k+1 and Pk in Eqs. (15) and (18) are scalar multiples of the identity matrix, we can consider only the scalar term (i.c., variance) in Pk= = L Σ = If and R = I²1. At steady-state, the variance no longer changes between steps:
P Pk+1 Pro
(27)
Substituting this into the scalar forms of Eqs. (15) and (18), we have:
(1
Poo + ofAt
Px = (Pxc + of
Poo + 0 At2 + +
(28)
= =p + +fA
Pro + o At 0z
14

---

Bayesian Weight Enhancement with Steady-State Adaptation
Rearranging this equation yields:
(Px + ofAAf + off) (P +f Pº P + Px of Pf - oRo =0
(29)
Px - of - Poo ) =0
From this, the step size At is derived as:
Poo (o?
At
(30)
Poo)
where Pox < <o To define the dynamic step size Ats- = a477 where is the base learning rate, we rewrite or as:
o
0kk
(31)
where .Λ = // -Poo This result is substituted into At in Eqs. (14) and (15), ensuring that the posterior weight distribution in Eq. (16) maintains the steady-state condition, thus balancing covariance. Importantly, under the steady-state condition, Ag converges A al with fixed scalar a >> 0, representing time- invariant covariance. Consequently, the proposed algorithm integrates naturally with weight-based TTA methods described in Eq. (7), maintaining compatibility while improving stability and adaptability.
B. Experiments Details
B.1. Experimental Setup
Our experiments were conducted using single NVIDIA GeForce RTX 3090 GPU. This section outlines the specific experimental settings used in our study. To ensure robustness and reproducibility, the evaluation metrics include the mean and standard deviation of eиror rates across five random seeds (1, 2, 3, 4, and 5).
The datasets used in our experiments were selected to evaluate the effect of diverse classes, corruption types, and natural distribution shifts commonly encountered in real-world scenarios. ImageNet-C was employed as a standard benchmark for evaluating robustness against corruption. ImageNet consists of 1,281,167 training samples and 50,000 testing samples, while ImageNet-C extends ImageNet by applying 15 types of corruption (e.g., Gaussian noise, shot noise, defocus blur, frost, and JPEG compression) at five severity levels. Consistent with previous studies (Boudiaf al., 2022: Niu et al., 2022; 2023; Marsden et al., 2023; Lee & Chang, 2024), used severity level 5, treating each type of corruption as a distinct domain. To further assess model performance under natural distribution shifts, we utilized D109, derived from Nem D109 includes five domains (clipart, infograph, painting, real, and sketch) and comprises 109 classes that overlap with ImageNet. For an additional exploration of natural distribution shifts, we incorporated the Rendition and Sketch datasets in the covariate shift scenario. Rendition contains 30,000 images of 200 ImageNet classes rendered in artistic styles, collected from Flickr and curated via Amazon Mechanical Turk. The Sketch dataset consists of 50,000 black-and-white images, with 50 sketches for each of the 1,000 ImageNet classes, constructed using Google image queries.
Datasets
Compared Methods We compared SSA with several state-of-the-art TTA methods, each employing different strategies to improve adaptation to distribution shifts. TENT (Wang et al., 2020) updates trainable weights using entropy minimization loss, allowing the model to adjust its predictions to reduce uncertainty in test samples. LAME (Boudiaf et al., 2022) adapts to label distribution shifts by modifying model outputs rather than updating the model weights, ensuring stable adaptation without direct changes of parameters. RoTTA (Yuan et al., 2023) employs a student-teacher approach with cross-entropy objectives and data augmentation to improve robustness against shifting distributions. EATA (Niu et al., 2022) follows an entropy-based objective while excluding high-entropy samples based on predefined threshold, preventing noisy gradient updates from degrading model performance. SAR (Niu al., 2023) integrates sample exclusion with sharpness-aware minimization to avoid sharp local optima. Additionally, SAR monitors the model loss and resets the model to its source state if the loss exceeds predefined threshold. DeYO (Lee et al., 2024) employs a sample selection strategy based on pseudo-label probability differences and entropy. identifies high- high-confidence samples by applying object-destruetive transformations and measuring prediction changes. ROID (Marsden et al., 2023) incorporates an entropy objective that accounts for label distribution diversity, while
15

---

Bayesian Weight Enhancement with Steady-State Adaptation
excluding low-confidence samples during training. Additionally, ROID continuously averages the source weight with the current weight to enhance stability during adaptation. CMF (Lee & Chang, 2024) uses Kalman filtering to dynamically update the source weight by mixing it with the current weight. The updated source weight is then further integrated with the target weight, ensuring smooth adaptation while preserving knowledge from the pre-trained model.
Implementation Details Our experiments were implemented using the base version of ViT (Dosovitskiy et al., 2020) with the self-supervised D2V model (Baevski et al., 2022) as the backbone, following previous work (Niu et al., 2023; Marsden et al., 2023; Lee & Chang, 2024). In addition, we used SwinTransformer (Liu et al., 2021) as an alternative architecture. All source models were pre-trained on the ImageNet training dataset using publicly available weights to ensure reproducibility. For all experiments, we adhered to the hyperparameters specified in the TTA benchmark (Marsden & Döbler, 2022) and followed the official implementations and values reported in the original papers of each method. If hyperparameters were unavailable for specific dataset or model, we adjusted them accordingly. All experiments used the SGD optimizer with a momentum of 0.9. The learning rates were set as follows: 0.00001 for D2V, 0.00025 for ViT, and 0.000005 for EATA. Swin used the same learning rate as ViT, while SAR employed the SAM optimizer with a learning rate of 0.001 for both ViT and Swin. For CMF, we used s8,s) (0.99, 0.005). Following ROID and CMF, we set the SSA hyperparameter a 0.01. The steady-state scale factor o was set to 10-12, and SSA was applied once 1 reached half of this factor.
B.2. Additional Experiments
Table Average error rates
(%) and standard deviations in covariate
Table 7. Average error rates (%) and standard deviations in label shifts ( = 0.1) on D109. Red fonts indicate performance degrada- tion with respect to Source.
shift (y = 00) on D109, Red fonts indicate performance degrada- tion with respect Source.
Adaptation Order (-)
Adaptation Order (+)
Method
Avg.
Method
Avg.
clipart
infograph
painting
real
sketch
clipurt
infogruph
painting
real
sketch
Source
48.7
72.9
41.2
20.5
56.7
48.0
Source
48.7
72.9
41.2
20.5
56.7
48.0
TENT
49.1
77.5
51.4
31.2
79.4
57.7+0.08
TENT
49.1
77.4
51.3
31.7
79.7
57.8+0.06
LAME
98.7
99.6
96.4
51.3
99.1
89.020.14
LAME
69.8
94.5
57.6
32.7
68.3
64 64.6222.5
RoTTA
48.6
72.6
40.7
19.9
53.9
47.2+0.01
RoTTA
48.7
72.7
40.9
20.2
55.4
47. 17.620.03
SAR
48.3
74.4
42.9
20.3
56.5
10.5
SAR
48.4
74.6
43.5
20.3
56.4
48 6+0.02
EATA
47.9
71.6
40.0
19.7
54.1
46.6#0.05
EATA
47.8
71.5
39.9
19.8
53.7
46.5+0.06
DeYo
47.2
74.5
41.3
19.8
51.3
46, 8+0.56
DeYo
47.3
74.4
40.6
19.7
51.0
46 6+..00
ROID
43.5
68.5
37.7
19.3
50.4
43.9=0.04
ROID
35.0
63.1
28.1
12.9
41.0
36.0+0.08
+SSA
43.7
67.0
36.9
18.8
47.9
42.9a0.06
+SSA
35.3
61.3
27.4
12.6
38.1
34.9+0.07
CMF
43.0
66.5
36.3
18.5
47.3
42.3+0.11
CMF
34.4
60.3
26.6
12.1
36.8
14.1
+SSA
42.1
65.3
35,8
18.2
46.0
41.5=0.06
+SSA
33.7
59.2
26.4
12.0
35.5
33.420.06
Table Average error rates (%) and standard deviations label shifts (7 = 0.0) on D109. Red fonts indicate performance degrada-
Table 9. Average error rates (%) and standard deviations on Rendi- tion and Sketch. Red fonts indicate performance degradation with respect to Source.
tion with respect to Source.
Method
Adaptation Order (-+)
Avg.
Method
Rendition
Sketch
clipart
inlograph
painting
real
sketch
Source
46.6
60.4
Source
48.7
72.9
41.2
20.5
56.7
48.0
TENT
46.020.03
60.320.06
TENT
49.2
77.1
51.5
32.6
80.9
58. 240.04
LAME
86.7=0.39
86.9+0.37
LAME
26.0
68.8
19.2
8.0
26.7
29.7 15
RoTTA
46.5#0.01
10.100
RoTTA
48.7
72.9
41.1
20.5
56.7
48.0=0.01
SAR
45.920.05
60.2+0.07
SAR
48.7
75.4
46.8
20.1
56.6
49.5+0.05
EATA
45.8=0.09
58.620.08
EATA
47.9
71.5
39.6
19.7
54.0
16.14
Do
42.9=0.07
60.44))62
DeYo
48.9
75.8
45,1
20.7
52.2
39.39
ROID
41.4=0.08
55.7+1).02
ROID
25.3
55.5
21.6
10.5
33.1
29, 200.4
+SSA
25.4
52.9
21.7
10.5
30.7
28. 340.5
+SSA
40.3+0.13
$4.5+0.07
CMF
24.9
52.8
20.4
10.2
30.9
17.8+0.12
CMF
39.7+0.11
53.320.06
+SSA
24.4
51.3
20.4
10.0
30.6
27.4
+SSA
38.8+0.12
52.5+0.07
Tables 6, 7, and 8 present results omitted from Section 4.2. SSA consistently improved ROID and CMF performance in all scenarios in the D109 dataset, demonstrating its robustness in handling natural distribution shifts. We further evaluated TTA methods under a prolonged long onc-domain natural shift scenario. Table 9 reports the performance of various methods on the Rendition and Sketch datasets. In this scenario, SSA significantly improved ROID and CMF performance, achieving state-of-the the-the-rtt art results. These results provide empirical evidence that SSA is not only effective in addressing data corruption but also robust in handling natural distribution shifts, reinforcing its reliability in diverse adaptation environments.
16

---

Bayesian Weight Enhancement with Steady-State Adaptation
B.3. Additional Experiments: Real-world Scenario
Table 10. Average word rates (%) and standard deviation in the real-world speech recognition scenario TED,
Method
Source
Pseudo Label
TENT
CMF
SSA
Avg. WER 12.4+0.00
12. 12.033
11.940.02
11.8+0.05
11.5+00.1
Table 11 compares the performance of various TTA methods in real-time speech recognition scenario TEDLIUM3 (Hermandez et al., 2018), which consists of streamed talk recordings. The TEDLIUM3 test dataset includes speeches by 11 experts, each delivering talks on different topics. We used the speech version D2V that was pre-trained LibriSpeech (Panayotov et al., 2015). Following the CMF setup, we measured the average word error rate (WER) of the model in an environment where multiple speakers sequentially deliver speech. These results show that SSA achieved the best performance compared to competing TTA methods, demonstrating its effectiveness adapting to speaker variations in real-time speech recognition.
B.4. Additional Analysis: Various Model Architectures
Table 11. Average rates (%) and standard deviation for various model architectures in covariate shift ImageNet-C.
Model
Source
ROID
CMF
SSA
VIT 60.2
45.0+0.08
44.9=0.08
44.6+0.05
Swin
64.0
47.2+0.15
46.6+0.12
46.0+0.07
D2V
51.8
44.8+0.04
43.5+0.04
42.2+0.16
Table II compares the performance of TTA methods across different model architectures in the covariate shift scenario. The results show that SSA achieved ttaeeoffthe--ee art performance across all tested architectures, demonstrating its adaptability and effectiveness. Notably, SSA remained highly effective even for models with lower source model performance, such as Swin, where it achieved substantial improvements. This suggests that SSA particularly beneficial where the base model struggles with adaptation.
B.5. Additional Analysis: Validity of Stcady-State Scale Factor
52
Source
Average Error Rate (%)
50
48
46
44
ROID
CMF
50
100
1000
10000
100000
Variance Scale
Figure 5. Average error rates (%) for various the steady-state scale factor.
The steady-state scale factor of determines the baseline for covariance regulation in SSA. To analyze its impact, varied this factor by multiplying of by log( Variance Scale), adjusting the scale accordingly. Figure 5 presents the average eиrоr rates in the covariate shift scenario for different variance scales. The results show that SSA maintained consistent performance for Variance Scale values ranging from to 10,000, demonstrating its robustness a wide range of covariance conditions. These results highlight the reliability and adaptability of SSA, confirming that its performance remains stable even under significant variations in the steady-state scale factor.
17

---

Bayesian Weight Enhancement with Steady-State Adaptation
C. Limitation and Future Works
One limitation of our current approach was the reliance on a linear Gaussian model to represent the weight distribution. Although this choice provides computational efficiency and analytical tractability, can limit the flexibility the model in capturing more complex weight behaviors. However, our empirical results demonstrated that SSA significantly improves performance in various scenarios, model architectures, and TTA methods with fixed hyperparameters. For future work, aim to explore weight distributions that can model a broader range of weight dynamics. By extending beyond the linear Gaussian assumption, we seek to enhance the adaptability and robustness of our approach in more complex and rapidly evolving environments.
18


Reviews:
[{"review_id": "16QZgcU04e", "reviewer": "Reviewer_HHYp", "summary": "Test-time adaptation assumes that only the inputs of the test dataset are given for adaptation, where the model parameters are updated using an unsupervised loss without labels. Consequently, the model parameters are inevitably updated by a noisy gradient, which differs from the gradient obtained using true labels. Thus, this work considers the weight parameters as random variables and applies the Kalman filtering approach to update the mean and covariance of the random weight parameters. Unlike previous Bayesian approaches, this work presents how to adapt the learning rate/step size of the mean using the covariance so that the weight parameters are updated in a way that ensures the covariance of the noisy gradient remains stable, meaning it does not change significantly compared to its previous update. Empirically, the effectiveness of the proposed method is demonstrated on ImageNet using various scenarios of covariate shift and label shift, as well as in terms of learning rate robustness.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We deeply appreciate your valuable review and insightful comments. In line with your suggestions, we are extending our research to address a general problems of DNNs. Once again, thank you very much for your thoughtful feedback.", "claims_and_evidence": "The claim is well supported by empirical results.", "methods_and_evaluation_criteria": "The proposed method seems to make sene.", "theoretical_claims": "Although this work does not have the theoretical claim, the claim of the proposed scala parameter in Eq. (19) seems valid.", "experimental_designs_or_analyses": "The experimental design and analysis are well conducted.", "relation_to_broader_scientific_literature": "This work presents a clever approach to updating model parameters in test-time adaptation while considering a realistic adaptation setting. In this context, the proposed method has the potential to enable DNN models to adapt effectively and continually to new environments.", "essential_references_not_discussed": "N/A", "other_strengths_and_weaknesses": "### Strengths\n\n*  This work recognizes an important problem in previous test-time adaptation algorithms, where parameter updates using noisy gradients could result in performance degradation of the adapted model due to an improperly tuned learning rate.\n\n* This work presents a clever way to address the learning rate issue by considering that the filtered covariance of the noisy gradient remains stable, and then determining the adaptive step size depending on the filtered covariance.\n\n### Weaknesses\n\n* In my view, this work does not seem to have any clear weaknesses.", "other_comments_or_suggestions": "N/A", "questions_for_authors": "I do not have any further question on this.", "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": "", "extra_scores": {"ethical_review_flag": "Flag this paper for an ethics review."}}, {"review_id": "lCP6R0R4DF", "reviewer": "Reviewer_a4NL", "summary": "This paper proposes using a stochastic differential equation (SDE) to handle temporal distribution shifts in test-time adaptation scenarios. The SDE is applied to handle the temporal dynamics of stochastic gradient descent, balancing the current updates of the model weight with that of the pre-trained model. The experiment results give the performance gains of the proposed method over two datasets.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely appreciate your valuable review and insightful comments. We have carefully examined your feedback, fully understood the concerns and questions raised, and have earnestly endeavored to address them.\n\n**Claims And Evidence:**\n\n> However, the approach appears to primarily apply an SDE to SGD dynamics, which was a major contribution of prior work (Li et al., 2019).\n\n**Experimental Designs Or Analyses:**\n\n> The ablation study is insufficient. For example, is Bayesian filtering truly necessary (empirically and theoretically), or would directly applying the SDE from Li et al. (2019) suffice?\n> \n\n→ Below, we address your comments across Claims And Evidence, Experimental Designs Or Analyses. We understood your comments to revolve around questioning whether modeling the TTA process solely via SDE approximating SGD is sufficient. Relying exclusively on the SDE approximation is inadequate for capturing weight evolution based on discrete observations, and it prevents the use of empirically validated weight-based TTA methods. The detailed reasoning is as follows:\n\n- **The SDE approximation** describes how weights evolve without data during the TTA process.\n    - Additionally, while the SDE approximation provides dynamics in continuous time, actual observations occur only at discrete time steps $k$, necessitating the discretized transition distribution we derived in Eq. (12).\n- **Bayesian filtering** explains how the TTA process evolves given observations (i.e., weights).\n    - The TTA process deals explicitly with noisy observations (Section 3.1). To model these noisy observations effectively, it is essential to interpret weight-based TTA methods probabilistically through Bayesian weight enhancement, as discussed in Section 3.2. This necessity results in the likelihood $p(w_{k+1}|u_{k+1})$ in Eq. (16), implicitly incorporating noise.\n    - Combined with the transition distribution, this likelihood integrates into Bayesian filtering in Eq. (13) and Eq. (16), thus yielding the posterior weight distribution incorporating past observations.\n\n→ These points underscore the significance of integrating SDE approximation with Bayesian filtering and highlight our contributions.\n\n**Experimental Designs Or Analyses**\n\n> However, a more in-depth analysis is lacking, particularly regarding the computational cost introduced by the new method or analysis that indicates noise covariance has been effectively handled.\n> \n\n→ As shown in Algorithm 1, the SSA method requires only simple arithmetic operations among weights, resulting in minimal additional computational overhead. In Table 5, we addressed your concern regarding computational cost by analyzing GPU wall time and relative execution time before and after applying SSA. Our analysis reveals that SSA incurs only an additional relative computational cost ranging from 1% to 5%, depending on the specific approach.\n\n→ The SSA method incorporates a mechanism to drive the noise covariance towards a steady-state over time. As demonstrated in Figure 4, we measured the posterior covariance over time for TENT and CMF methods without SSA applied. Our results show that existing methods exhibit significant temporal fluctuations in covariance. In contrast, such fluctuations decrease significantly when SSA is used, and the covariance converges towards a particular steady-state value. \n\n**Essential References Not Discussed**\n\n> The key contribution lies in the application of SDE or a dynamic system to address online distribution shifts in TTA. However, this general idea has been explored before, albeit with different definitions of SDE or dynamic systems. For example:\n\n→ In Appendix C (Bayesian Filtering), we have cited the reference you recommended [Huang et al. (2022)]. This reference employs a particle filtering approach, which requires offline training using source and target data and a sampling process to learn the distribution parameters of weights and their importance. In contrast, SSA uses only online learning and requires only one sampling, resulting in significantly higher computational efficiency (Section 3.3).\n\n→ Another reference you suggested [Schirmer et al. (2024)] utilizes a state-space model to capture the distribution of representation and weight changes. Consequently, their method leads to a complex design for the posterior of the weight distribution, resulting in additional computational overhead. On the other hand, SSA directly infers the posterior of the weight distribution using a transition model derived by introducing an SDE approximation. This approach allows SSA to perform inference through simple arithmetic operations, achieving high computational efficiency (Table 5). We will include this discussion in Appendix C (Bayesian Deep Learning) to clarify the contributions of SSA further.", "claims_and_evidence": "One of the key claims is a \"Bayesian weight enhancement framework that unifies and generalizes existing weight-based TTA methods.\" However, the approach appears to primarily apply an SDE to SGD dynamics, which was a major contribution of prior work (Li et al., 2019). This work extends it by introducing Bayesian filtering to estimate the posterior of weight distributions.", "methods_and_evaluation_criteria": "The proposed methods make sense, and the datasets for evaluation seem reasonable.", "theoretical_claims": "N.A.", "experimental_designs_or_analyses": "- The method achieves state-of-the-art (SoTA) results on two datasets, ImageNet-C and D109. However, a more in-depth analysis is lacking, particularly regarding the computational cost introduced by the new method or analysis that indicates noise covariance has been effectively handled.\n\n- The ablation study is insufficient. For example, is Bayesian filtering truly necessary (empirically and theoretically), or would directly applying the SDE from Li et al. (2019) suffice?", "relation_to_broader_scientific_literature": "In the broader scientific context, this work builds upon SDE+SGD (Li et al., 2019) by incorporating Bayesian filtering to handle distribution shifts in TTA. Since both components are well-established with existing solutions, the theoretical contribution remains unclear. While combining these two techniques is reasonable, the overall contribution does not appear particularly significant.", "essential_references_not_discussed": "The key contribution lies in the application of SDE or a dynamic system to address online distribution shifts in TTA. However, this general idea has been explored before, albeit with different definitions of SDE or dynamic systems. For example:\n\n- Huang et al. (2022): Extrapolative continuous-time Bayesian neural network for fast training-free test-time adaptation (NeurIPS 2022).\n- Schirmer et al. (2024): Test-time adaptation with state-space models (ICML 2024 Workshop on Structured Probabilistic Inference & Generative Modeling).\nWhile this work builds on these foundations, the novelty may be limited given prior investigations in similar directions. But I do appreciate the practical contribution of this work.", "other_strengths_and_weaknesses": "See above.", "other_comments_or_suggestions": "N.A.", "questions_for_authors": "See above.", "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": "", "extra_scores": {}}, {"review_id": "B3qusfSQ5u", "reviewer": "Reviewer_JHQ8", "summary": "This manuscript proposes a novel Bayesian-based framework to enhance existing weight-based TTA methods. They investigate the distribution shifts issue and reflect the reason behind gradient noise. A tailored steady-state adaptation algorithm shows SOTA performance on several benchmarks.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We deeply appreciate your valuable review and insightful comments. We have carefully considered your feedback, fully understood the concerns and questions raised, and endeavored to address them thoroughly and sincerely.\n\n**Relation To Broader Scientific Literature:**\n\n> However, the paper's exclusive focus on weight-based methods limits the scope of its contributions and may overlook other potential approaches.\n> \n\n→ As you rightly pointed out, our study primarily focuses on the mechanisms underlying weight-based methods. Nonetheless, our contribution goes beyond merely analyzing weight-based techniques; we uncover and advance the underlying probabilistic framework. By doing so, we effectively mitigate instability issues commonly encountered in TTA methods, especially those caused by increasing learning rates (Section 5). Furthermore, as demonstrated in Table 5, the SSA method has shown notable generality by significantly improving performance when combined with fundamental TTA methods such as TENT.\n\n**Questions For Authors**\n\n> An additional issue is that, based on the experimental data, the performance improvement of SSA on ROID appears to be less significant than that of CMF. Have the authors analyzed the reasons for this difference?\n> \n\n→ The issue raised by the reviewer can be explained through the discussion presented in Appendix A.1. As mentioned in that section, CMF provides a distribution for the hidden source weights that evolves in real-time based on observed weights. This approach contrasts with the typical scenario in Eq. (16), where the mean of the likelihood $p(w_{k+1}|u_{k+1})$ is fixed as the source weights (i.e., combining ROID with SSA). In other words, CMF's modeling of the hidden source weights facilitates a more sophisticated likelihood estimation. \n\n→ This advantage explains why the combination of CMF and SSA achieves superior performance. We will incorporate this explanation into Section 4.2 of the manuscript to clarify further the superior performance of the CMF and SSA combination, thereby enhancing the robustness of our paper.", "claims_and_evidence": "The claims made in the submission are well-supported by a robust analytical framework and experimental results, which collectively validate the effectiveness of the work.", "methods_and_evaluation_criteria": "1. The proposed framework employs the SDE approximation to ensure steady-state covariance, which can align with the discrete TTA process.\n2. The authors design a dynamic algorithm for the step size calculation, which can balance covariance based on the posterior weight distribution.", "theoretical_claims": "Yes.", "experimental_designs_or_analyses": "The authors have conducted several experiments that demonstrate the ability of the proposed SSA algorithm to enhance the generalization capabilities of recent ROID and CMF methods. The experimental design appears to be comprehensive, with thorough consideration of various submodules and hyperparameters.", "relation_to_broader_scientific_literature": "The study of online TTA presented in this paper is of significant relevance to both computer vision and protein prediction fields. However, the paper's exclusive focus on weight-based methods limits the scope of its contributions and may overlook other potential approaches.", "essential_references_not_discussed": "None", "other_strengths_and_weaknesses": "+ The manuscript is well-organized with clear illustrations.", "other_comments_or_suggestions": "None.", "questions_for_authors": "An additional issue is that, based on the experimental data, the performance improvement of SSA on ROID appears to be less significant than that of CMF. Have the authors analyzed the reasons for this difference?", "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": "", "extra_scores": {}}, {"review_id": "HQgN33bA5M", "reviewer": "Reviewer_Tysa", "summary": "This paper proposes steady-state adaptation (SSA), a novel test-time adaptation (TTA) method that can be combined with existing ones.\nSSA aims to reduce noise accumulation in gradients caused by the unsupervised nature of a TTA loss (e.g., entropy).\nSSA models the distribution of the model weights and estimates it using the Bayesian weight enhancement. \nExperimental results show that SSA improved classification accuracy under image corruption, label shifts, and domain shifts.\n\n## update after rebuttal\nI appreciate the author's further experiment. My concerns have been addressed. I have updated my score to 3.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely appreciate your valuable review and insightful comments. We have carefully examined your feedback, fully understood the concerns and questions you raised, and have made every effort to reflect them thoroughly and faithfully in our manuscript.\n\n**Methods And Evaluation Criteria:**\n\n> According to Eq. (6), $p({w}_{k+1}|{u})$ does not affected by ${u}$. \n\n→ In Eq. (6), the mean, represented by the source weight $w_0$, corresponds to the enhanced weight $u_0$ at time step 0, and thus is indirectly influenced by $u$.\n\n> Is it sufficient to represent the covariance with a single scalar as $\\Sigma_k=\\sigma_k^2 \\mathbf{I}$? Intuitively, each model weight has a different variance.\n\n→ In Appendix D, we explicitly mention exploring more complex and potentially better-suited weight distributions for the TTA process as future work, which includes considering the diagonal covariance structure suggested by the reviewer. However, the rationale behind retaining a scalar covariance in our current work is motivated by the considerable noise inherent to unsupervised learning within the TTA process. Under such noisy conditions, scalar covariance helps mitigate potential overfitting from covariance flexibility. The following results substantiate this claim:\n\n| Method | covariate shifts | label shifts ($\\gamma=0.1$) | label shifts ($\\gamma=0.0$) |\n| --- | --- | --- | --- |\n| SSA (scalar) | **42.2±0.16** | **13.1±0.29** | **35.9±0.04** |\n| SSA (diagonal) | 42.6±0.11 | 13.2±0.30 | 36.3±0.03 |\n\n**Theoretical Claims:**\n\n> Explaining how the proposed method addresses label shifts would be interesting.\n> \n\n→ Under label shift scenarios, models often converge to trivial solutions, excessively increasing the probability assigned to specific classes. In such situations, gradients become excessively large, causing model weights to enter narrow optimal points (Section 3.3). SSA prevents the model from falling into narrow optimal points by decreasing the learning rate in response to gradients that significantly enlarge the variance.\n\n**Experimental Designs Or Analyses:**\n\n> Specifically, combining SSA with simple TTA methods like TENT would enhance SSA's generality and efficacy, which would also support the hypothesis.\n> \n\n→ In Table 5 of Section 4, we have demonstrated the effectiveness and compatibility of combining SSA with TENT in the covariate-shift scenario. As shown in that table, even when combined with TENT, SSA yields a substantial performance improvement.\n\n→ Additionally, beyond the covariate-shift scenario presented in Table 5, we measured the average error rates (%) for TENT combined with SSA in the label-shift scenarios (corresponding to Tables 2 and 3) as follows:\n\n| Method | covariate shifts | label shifts ($\\gamma=0.1$) | label shifts ($\\gamma=0.0$) |\n| --- | --- | --- | --- |\n| TENT | 53.3±0.22 | 55.4±1.58 | 56.2±0.98 |\n| TENT+SSA | **49.3±0.30** | **49.9±0.03** | **50.3±0.02** |\n\n**Essential References Not Discussed:** \n\n→ In Appendix C (Bayesian Deep Learning), we have discussed SWAG [b], as you have suggested. SWAG has demonstrated robustness to out-of-distribution data, particularly when considering multiple models. Based on SWAG, BACS [a] obtains a posterior distribution over the data by marginalizing parameters through a prediction ensemble. However, such an approach is computationally inefficient because it requires making $N$ predictions for each inference, using $N$ models stored beforehand.\n\n→ In contrast, SSA directly infers a time-varying posterior weight distribution in environments subject to gradient noise. It achieves this by performing Bayesian filtering through dynamics derived via an SDE approximation. Subsequently, SSA selects a single weight from the posterior distribution, thus requiring only one prediction per inference. Therefore, our proposed algorithm enables significantly more efficient inference than existing methods. Furthermore, SSA theoretically derives and accounts for the temporal evolution of the weight distribution (Section 3.3). We will include this discussion explicitly in Appendix C to further clarify and strengthen the contribution of our manuscript.\n\n**Other Comments Or Suggestions:**\n\nWe sincerely appreciate your careful proofreading for typographical errors. Following your valuable suggestions, we have corrected the identified errors to enhance the readability of our manuscript. However, for the following cases, we either maintained our original notation or revised it differently from your suggestion for the reasons explained below:\n\n→ In Eq. (16), we first computed the joint distribution $p(w_{k+1},u_{k+1}|w_{0:k})$ and then converted it into $p(u_{k+1}|w_{0:k},w_{k+1})=p(u_{k+1}|w_{0:k+1})$ with $Z_k=p(w_{k+1}|w_{0:k})$, which aligns with Bayes' rule. Hence, we decided to maintain our original notation.\n\n→ Regarding $1.0^{-12}$, this notation was intended to represent $1^{-12}$. We have revised this to indicate $10^{-13}$ to prevent potential confusion.", "claims_and_evidence": "Existing TTA methods accumulate noise in gradients due to the unsupervised nature of TTA losses, which results in the model weights being no longer reliable (weight degradation).\nSSA robustly estimates the posterior weights by modeling their distribution by Gaussian, which improves the stability and efficiency of TTA.\nExperimental results show that existing TTA methods degrade accuracy when adaptation is continually performed, while SSA retains high accuracy.", "methods_and_evaluation_criteria": "Strength: Modeling and updating the posterior weights with the Bayesian weight enhancement is compelling and intriguing.\n\nWeakness: The modeling is too simple. Does it sufficiently represent the weight distribution? \n  - According to Eq. (6), $p({w}_{k+1}|{u})$ does not affected by ${u}$.\n  - Is it sufficient to represent the covariance with a single scalar as $\\Sigma_k=\\sigma_k^2 \\mathbf{I}$? Intuitively, each model weight has a different variance. For example, Modeling the covariance as diagonal, i.e., $\\Sigma_k = \\text{diag} (\\sigma_{k,1}^2,\\ldots, \\sigma_{k,d}^2)$ would be interesting.", "theoretical_claims": "I have checked the derivation of SSA using the SDE approximation of SGD.\n\nExplaining how the proposed method addresses label shifts would be interesting.", "experimental_designs_or_analyses": "- In Tables 1 to 3, combining SSA with not only ROID and CMF but also the other methods would be interesting. Specifically, combining SSA with simple TTA methods like TENT would enhance SSA's generality and efficacy, which would also support the hypothesis.\n- A comparison of each method's performance with and without SSA would provide valuable insights.\n- The accuracy gains achieved by SSA (e.g., ROID vs. ROID+SSA, CMF vs. CMF+SSA) appear to be marginal.\n- Experiments on other tasks, e.g., semantic segmentation, would strengthen the SSA's generality.", "relation_to_broader_scientific_literature": "The Bayesian weight enhancement can be integrated with various TTA methods.\nIt can raise the baseline of existing TTA literature.", "essential_references_not_discussed": "BACS[a] also models the posterior weight distribution of the model using SWAG[b].\n\n[a] Zhou and Levine, Bayesian Adaptation for Covariate Shift, NeurIPS 2021.   \n[b] Izmailov et al., Averaging Weights Leads to Wider Optima and Better Generalization, UAI 2018.", "other_strengths_and_weaknesses": "N/A", "other_comments_or_suggestions": "There are many typos, which are confusing:\n\n- Eq. (1): $\\hat{{w}\\_o} \\rightarrow \\hat{{w}}\\_0$\n- Eq. (5): ${w}\\_{+1} \\rightarrow {w}\\_{k+1}$\n- Eq. (16): Is the $\\int$ missing?\n- The right column of L315, L658, etc.: $1.0^{-12} \\rightarrow 10^{-12}$?\n- Title: Stead -> Steady", "questions_for_authors": "N/A", "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": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: The work addresses the weight degradation problem in unsupervised Test-time Adaptation by proposing a Bayesian approach with steady-state adaptation which ensures the covariance of the noisy gradient remains stable. Reviewers agree that the idea is interesting and the effectiveness of the method is well supported by real data experiments under various scenarios of distribution shift. Authors are encouraged to conduct ablation study to clarify the contribution of each component of their proposed method.
Decision: Accept (poster)