Original: Revisiting Realistic Test-Time Training: Sequential Inference and Adaptation by Anchored Clustering
Revised: Revisiting Realistic Test-Time Training: Sequential Inference and Adaptation by Anchored Clustering

Original: Anonymous Author(s)

Original: AffiliationAddress email

Original: Abstract
Revised: Abstract

Original: Deploying models on target domain data subject to distribution shift requiresadaptation.
Revised: Deploying models on target domain data subject to distribution shift requires adaptation.

Original: Test-time training (TTT) emerges as a solution to this adaptationunder a realistic scenario where access to full source domain data is not availableand instant inference on target domain is required.
Revised: Test-time training (TTT) emerges as a solution to this adaptation under a realistic scenario where access to full source domain data is not available and instant inference on target domain is required.

Original: Despite many efforts into
Revised: Despite many efforts into

Original: TTT, there is a confusion over the experimental settings, thus leading to unfaircomparisons.
Revised: TTT, there is a confusion over the experimental settings, thus leading to unfair comparisons.

Original: In this work, we first revisit TTT assumptions and categorize TTTprotocols by two key factors.
Revised: In this work, we first revisit TTT assumptions and categorize TTT protocols by two key factors.

Original: Among the multiple protocols, we adopt a realisticsequential test-time training (sTTT) protocol, under which we further develop atest-time anchored clustering (TTAC) approach to enable stronger test-time featurelearning.
Revised: Among the multiple protocols, we adopt a realistic sequential test-time training (sTTT) protocol, under which we further develop a test-time anchored clustering (TTAC) approach to enable stronger test-time feature learning.

Original: TTAC discovers clusters in both source and target domain and matchthe target clusters to the source ones to improve generalization.
Revised: TTAC discovers clusters in both source and target domain and match the target clusters to the source ones to improve generalization.

Original: Pseudo labelfiltering and iterative updating are developed to improve the effectiveness andefficiency of anchored clustering.
Revised: Pseudo label filtering and iterative updating are developed to improve the effectiveness and efficiency of anchored clustering.

Original: We demonstrate that under all TTT protocols
Revised: We demonstrate that under all TTT protocols

Original: TTAC consistently outperforms the state-of-the-art methods on five TTT datasets.
Revised: TTAC consistently outperforms the state-of-the-art methods on six TTT datasets.

Original: We hope this work will provide a fair benchmarking of TTT methods and futureresearch should be compared within respective protocols.
Revised: We hope this work will provide a fair benchmarking of TTT methods and future research should be compared within respective protocols.

Original:  Introduction
Revised:  Introduction

Original: The recent success in deep learning is attributed to the availability of large labeled data [14, 39] andthe assumption of i.i.d.
Revised: The recent success in deep learning is attributed to the availability of large labeled data [16, 43] and the assumption of i.i.d.

Original: between training and test datasets.
Revised: between training and test datasets.

Original: Such assumptions could be violated when test data features a drastic difference from the training data, e g. training on synthetic images andtest on real ones, and this is often referred to as domain shift [21, 2].
Revised: Such assumptions could be violated when test data features a drastic difference from the training data, e g. training on synthetic images and test on real ones, and this is often referred to as domain shift [24, 2].

Original: To tackle this issue, domainadaptation (DA) [31] emerges and the labeled training data and unlabeled testing data are oftenreferred to as source and target data/domains respectively.
Revised: To tackle this issue, domain adaptation (DA) [34] emerges and the labeled training data and unlabeled testing data are often referred to as source and target data/domains respectively.

Original: The existing DA works either require the access to both source and target domain data duringtraining [4] or training on multiple domains simultaneously [38].
Revised: The existing DA works either require the access to both source and target domain data during training [6] or training on multiple domains simultaneously [42].

Original: The former approach rendersthe methods restrictive to limited scenarios where source domain data is always available duringadaptation while the latter ones are computationally more expensive.
Revised: The former approach renders the methods restrictive to limited scenarios where source domain data is always available during adaptation while the latter ones are computationally more expensive.

Original: To alleviate the reliance on source domain data, which may be inaccessible due to privacy issues or storage overhead,source-free domain adaptation (SFDA) emerges which handles DA on target data without access tosource data [18, 15, 36, 34, 19].
Revised: To alleviate the reliance on source domain data, which may be inaccessible due to privacy issues or storage overhead, source-free domain adaptation (SFDA) emerges which handles DA on target data without access to source data [21, 17, 39, 37, 22].

Original: SFDA is often achieved through self-training [18], self-supervisedlearning [19] or introducing prior knowledge [18] and it requires multiple training epochs on thefull target data to allow convergence.
Revised: SFDA is often achieved through self-training [21], self-supervised learning [22] or introducing prior knowledge [21] and it requires multiple training epochs on the full target data to allow convergence.

Original: Despite easing the dependence on source data, SFDA hasmajor drawbacks in a more realistic domain adaptation scenario where test data arrives in a streamand inference or prediction must be taken instantly, and this setting is often referred to as test-timetraining (TTT) or adaptation (TTA) [26, 30, 12, 19].
Revised: Despite easing the dependence on source data, SFDA has major drawbacks in a more realistic domain adaptation scenario where test data arrives in a stream and inference or prediction must be taken instantly, and this setting is often referred to as test-time training (TTT) or adaptation (TTA) [29, 33, 14, 22].

Original: Despite the attractive feature of adaption at time test, we notice a confusion of what defines a test-time training and as a result comparing apples and oranges happens frequently in the community.
Revised: Despite the attractive feature of adaption at time test, we notice a confusion of what defines a test-time training and as a result comparing apples and oranges happens frequently in the community.

Original: In this work, we first categorize TTT by twokey factors after summarizing various definitions made in existing works.
Revised: In this work, we first categorize TTT by two key factors after summarizing various definitions made in existing works.

Original: First, under a realistic
Revised: First, under a realistic

Original: TTT setting, test samples are sequentially streamed and prediction must be made instantly uponthe arrival of a new test sample.
Revised: TTT setting, test samples are sequentially streamed and prediction must be made instantly upon the arrival of a new test sample.

Original: More specifically, the prediction of test sample X T , arriving attime stamp T , should not be affected by any subsequent samples, { X t } t =
Revised: More specifically, the prediction of test sample X T , arriving at time stamp T , should not be affected by any subsequent samples, { X t } t =

Original: T +1 ···∞ .
Revised: T +1 ···∞ .

Original: Throughout thiswork, We refer to the sequential streaming as one-pass adaptation protocol and any other protocolsviolating this assumption are called multi-pass adaptation (model may be updated on all test datafor multiple epochs before inference).
Revised: Throughout this work, we refer to the sequential streaming as one-pass adaptation protocol and any other protocols violating this assumption are called multi-pass adaptation (model may be updated on all test data for multiple epochs before inference).

Original: Second, we notice some recent works must modify sourcedomain training loss , e.g. by introducing additional self-supervised branch, to allow more effective
Revised: Second, we notice some recent works must modify source domain training loss , e.g. by introducing additional self-supervised branch, to allow more effective

Original: TTT [26, 19].
Revised: TTT [29, 22].

Original: This will introduce additional overhead in the deployment of TTT because re-trainingon some source dataset, e.g. ImageNet, is computationally expensive.
Revised: This will introduce additional overhead in the deployment of TTT because re-training on some source dataset, e.g. ImageNet, is computationally expensive.

Original: In this work, we aim totackle on the most realistic and challenging TTT protocol, i.e. one-pass test time training with nomodifications to training objective.
Revised: In this work, we aim to tackle on the most realistic and challenging TTT protocol, i.e. one-pass test time training with no modifications to training objective.

Original: This setting is similar to TTA proposed in [30] except for notrestricting access to a light-weight information from the source domain.
Revised: This setting is similar to TTA proposed in [33] except for not restricting access to a light-weight information from the source domain.

Original: Given the objective of TTTbeing efficient adaptation at time-time, this assumption is computationally efficient and improves TTT performance substantially.
Revised: Given the objective of TTT being efficient adaptation at test-time, this assumption is computationally efficient and improves TTT performance substantially.

Original: We name this new TTT protocol as sequential test time training(sTTT) .
Revised: We name this new TTT protocol as sequential test time training (sTTT) .

Original: We propose two techniques to enable efficient and accurate sTTT.
Revised: We propose two techniques to enable efficient and accurate sTTT.

Original: i)
Revised: i)

Original: We are inspired by the recentprogresses in unsupervised domain adaptation [27] that encourages testing samples to form clusters inthe feature space.
Revised: We are inspired by the recent progresses in unsupervised domain adaptation [30] that encourages testing samples to form clusters in the feature space.

Original: However, separately learning to cluster in the target domain without regularizationfrom source domain does not guarantee improved adaptation [27].
Revised: However, separately learning to cluster in the target domain without regularization from source domain does not guarantee improved adaptation [30].

Original: To overcome this challenge, weidentify clusters in both the source and target domains through a mixture of Gaussians with eachcomponent Gaussian corresponding to one category.
Revised: To overcome this challenge, we identify clusters in both the source and target domains through a mixture of Gaussians with each component Gaussian corresponding to one category.

Original: Provided with the category-wise statistics fromsource domain as anchors, we match the target domain clusters to the anchors by minimizing the
Revised: Provided with the category-wise statistics from source domain as anchors, we match the target domain clusters to the anchors by minimizing the

Original: KL-Divergence as the training objective for sTTT.
Revised: KL-Divergence as the training objective for sTTT.

Original: Therefore, we name the proposed method test-timeanchored clustering (TTAC) .
Revised: Therefore, we name the proposed method test-time anchored clustering (TTAC) .

Original: Since test samples are sequentially streamed, we develop an exponentialmoving averaging strategy to update the target domain cluster statistics to allow gradient-basedoptimization.
Revised: Since test samples are sequentially streamed, we develop an exponential moving averaging strategy to update the target domain cluster statistics to allow gradient-based optimization.

Original: ii)
Revised: ii)

Original: Each component Gaussian in the target domain is updated by the test sample featuresthat are assigned to the corresponding category.
Revised: Each component Gaussian in the target domain is updated by the test sample features that are assigned to the corresponding category.

Original: Thus, incorrect assignments (pseudo labels) willharm the estimation of component Gaussian.
Revised: Thus, incorrect assignments (pseudo labels) will harm the estimation of component Gaussian.

Original: To tackle this issue, we are inspired by the correlationbetween network’s stability and confidence and pseudo label accuracy [16, 23], and propose to filterout potential incorrect pseudo labels.
Revised: To tackle this issue, we are inspired by the correlation between network’s stability and confidence and pseudo label accuracy [19, 26], and propose to filter out potentially incorrect pseudo labels.

Original: Component Gaussians are then updated by the samples that havepassed the filtering.
Revised: Component Gaussians are then updated by the samples that have passed the filtering.

Original: To exploit the filtered out samples, we incorporate a global feature alignment [19]objective.
Revised: To exploit the filtered out samples, we incorporate a global feature alignment [22] objective.

Original: We also demonstrate TTAC is compatible with existing TTT techniques, e.g. contrastivelearning branch [19], if source training loss is allowed to be modified.
Revised: We also demonstrate TTAC is compatible with existing TTT techniques, e.g. contrastive learning branch [22], if source training loss is allowed to be modified.

Original: The contributions of this workare summarized as below.
Revised: The contributions of this work are summarized as below.

Original: • In light of the confusions within TTT works, we provide a categorization of TTT protocols by two key factors.
Revised: • In light of the confusions within TTT works, we provide a categorization of TTT protocols by two key factors.

Original: Comparison of TTT methods is now fair within each category.
Revised: Comparison of TTT methods is now fair within each category.

Original: • We adopt a realistic TTT setting, namely sTTT.
Revised: • We adopt a realistic TTT setting, namely sTTT.

Original: To improve test-time feature learning, we propose TTAC by matching the statistics of the target clusters to the source ones.
Revised: To improve test-time feature learning, we propose TTAC by matching the statistics of the target clusters to the source ones.

Original: The target statistics are updated through moving averaging with filtered pseudo labels.
Revised: The target statistics are updated through moving averaging with filtered pseudo labels.

Original: • The proposed method is complementary to existing TTT method and is demonstrated on five TTT datasets, achieving the state-of-the-art performance under all categories of TTTprotocols.
Revised: • The proposed method is complementary to existing TTT method and is demonstrated on six TTT datasets, achieving the state-of-the-art performance under all categories of TTT protocols.

Original:  Related Work
Revised:  Related Work

Original: Unsupervised Domain Adaptation .
Revised: Unsupervised Domain Adaptation .

Original: Domain adaptation aims to improve model generalizationwhen source and target data are not drawn i.i.d.
Revised: Domain adaptation aims to improve model generalization when source and target data are not drawn i.i.d.

Original: When target data are unlabeled, UDA [4, 28] learnsdomain invariant feature representations on both source and target domains to improve generalization.
Revised: When target data are unlabeled, unsupervised domain adaptation (UDA) [6, 31] learns domain invariant feature representations on both source and target domains to improve generalization.

Original: Follow-up works improve DA by minimizing a divergence [5, 24, 37], adversarial training [10] ordiscovering cluster structures in the target data [27].
Revised: Follow-up works improve UDA by minimizing a divergence [7, 27, 40], adversarial training [12] or discovering cluster structures in the target data [30].

Original: Apart from formulating DA within a task-specificmodel, re-weighting has been adopted for domain adaptation by selectively up-weighting conducivesamples in the source domain [13, 35].
Revised: Apart from formulating UDA as a task-specific model, re-weighting has been adopted for domain adaptation by selectively up-weighting conducive samples in the source domain [15, 38].

Original: Despite the efforts in UDA, it is inevitable to access  the sourcedomain data which may be not accessible due to privacy issues, storage overhead, etc.
Revised: During model training, the existing approaches often require access to the source domain data which, however, may be not accessible due to privacy issues, storage overhead, etc.

Original: Deploying DAin more realistic scenarios has inspired research into source-free domain adaptation and test-timetraining/adaptation.
Revised: Therefore, deploying UDA in more realistic scenarios has inspired research into source-free domain adaptation and test-time training/adaptation.

Original: Source-Free Domain Adaptation .
Revised: Source-Free Domain Adaptation .

Original: Without the access to source data, source-free domain adaptation(SFDA) develops domain adaptation through self-training [18, 15, 12], self-supervised training [19]or clustering in the target domain [36].
Revised: Without the access to source data, source-free domain adaptation (SFDA) develops domain adaptation through self-training [21, 17, 14], self-supervised training [22], clustering in the target domain [39] and feature restoration [5].

Original: It has been demonstrated that SFDA performs well on seminaldomain adaptation datasets even compared against UDA methods [27].
Revised: It has been demonstrated that SFDA performs well on seminal domain adaptation datasets even compared against UDA methods [30].

Original: Nevertheless, SFDA stillrequires access to all testing data  and  training must be carried out iteratively on the testing data.
Revised: Nevertheless, SFDA requires access to all testing data beforehand and model training must be carried out iteratively on the testing data.

Original: Ina more realistic DA scenario where inference and adaptation must be implemented simultaneously, SFDA will no longer be effective.
Revised: In a more realistic DA scenario where inference and adaptation must be implemented simultaneously, SFDA will no longer be effective.

Original: Moreover, some statistical information on the source domain doesnot pose privacy issues and can be exploited to further improve adaptation on target data.
Revised: Moreover, some statistical information on the source domain does not pose privacy issues and can be exploited to further improve adaptation on target data.

Original: Test-Time Training .
Revised: Test-Time Training .

Original: Collecting enough samples from target domain and adapt models in an offlinemanner restricts the application to adapting to  static target domain.
Revised: Collecting enough samples from target domain and adapt models in an offline manner restricts the application to adapting to a static target domain.

Original: To allow fast and online adaptation,test-time training (TTT) [26, 32] or adaptation (TTA) [30] emerges.
Revised: To allow fast and online adaptation, test-time training (TTT) [29, 35] or adaptation (TTA) [33] emerges.

Original: Despite many recent worksclaiming to be test-time training, we notice a severe confusion over the definition of TTT.
Revised: Despite many recent works claiming to be test-time training, we notice a severe confusion over the definition of TTT.

Original: In particular,whether training objective must be modified [26, 19] and whether sequential inference on targetdomain data is possible [30, 12].
Revised: In particular, whether training objective must be modified [29, 22] and whether sequential inference on target domain data is possible [33, 14].

Original: Therefore, to reflect the key challenges in TTT, we define a settingcalled sequential test-time training (sTTT) which neither modifies the training objective nor violatessequential inference.
Revised: Therefore, to reflect the key challenges in TTT, we define a setting called sequential test-time training (sTTT) which neither modifies the training objective nor violates sequential inference.

Original: Under the more clear definition, some existing works, e.g. TTT [26] and TTT++ [19] is more likely to be categorized into SFDA.
Revised: Under the more clear definition, some existing works, e.g. TTT [29] and TTT++ [22] is more likely to be categorized into SFDA.

Original: Several existing works [30, 12] can beadapted to the sTTT protocol.
Revised: Several existing works [33, 14] can be adapted to the sTTT protocol.

Original: Tent [30] proposed to adjust affine parameters in the batchnorm layers toadapt to target domain data.
Revised: Tent [33] proposed to adjust affine parameters in the batchnorm layers to adapt to target domain data.

Original: The high TTA efficiency inevitably leads to limited performance gain onthe target domain.
Revised: Nevertheless, updating only a fraction of model weights inevitably leads to limited performance gain on the target domain.

Original: T3A [12] further proposed to update classifier prototype through pseudo labeling.
Revised: T3A [14] further proposed to update classifier prototype through pseudo labeling.

Original: Despite being efficient, updating classifier prototype alone does not affect feature representationfor the target domain.
Revised: Despite being efficient, updating classifier prototype alone does not affect feature representation for the target domain.

Original: Target feature may not form clusters at all when the distribution mismatchbetween source and target is large enough.
Revised: Target feature may not form clusters at all when the distribution mismatch between source and target is large enough.

Original: In this work we propose to simultaneously cluster on thetarget domain and match target clusters to source domain classes, namely anchored clustering.
Revised: In this work we propose to simultaneously cluster on the target domain and match target clusters to source domain classes, namely anchored clustering.

Original: Tofurther constrain feature update, we introduce additional global feature alignment and pseudo labelfiltering.
Revised: To further constrain feature update, we introduce additional global feature alignment and pseudo label filtering.

Original: Through the introduced anchored clustering, we achieve test-time training of more networkparameters and achieve the state-of-the-art performance.
Revised: Through the introduced anchored clustering, we achieve test-time training of more network parameters and achieve the state-of-the-art performance.

Original:  Methodology
Revised:  Methodology

Original: In this section we first introduce the anchored clustering objective for test-time training throughpseudo labeling and then describe an efficient iterative updating strategy.
Revised: In this section we first introduce the anchored clustering objective for test-time training through pseudo labeling and then describe an efficient iterative updating strategy.

Original: An overview of the proposedpipeline is illustrated in Fig.
Revised: An overview of the proposed pipeline is illustrated in Fig.

Revised: 3.1 Anchored Clustering for Test-Time Training

Revised: Discovering cluster structures in the target domain has been demonstrated effective for unsupervised domain adaptation [30] and we develop an anchored clustering on the test data alone.

Original: 1.𝑁(𝜇 ! ,Σ ! )
Revised: We first use a mixture of Gaussians to model the clusters in the target domain, here each component Gaussian represents one discovered cluster. We further use the distributions of each category in the source domain as anchors for the target distribution to match against. In this way, test data features can simultaneously form clusters and the clusters are associated with source domain categories, resulting in improved generalization to target domain. Formally, we first write the mixture of Gaussians in the source and target domains p s ( x

Original: [Figure]
Revised: [Equation]

Original: (⋅)
Revised: , p t

Original: [Figure]
Revised: [Equation]

Original: (µ "
Revised: x ) =

Original: [Figure]
Revised: [Equation]

Original: Σ " ) 𝑁 ( µ " # , Σ " # ) 𝑁 ( µ " $
Revised: k β k N ( µ tk , Σ tk ) , where {

Original: [Figure]
Revised: [Equation]

Original: Σ " $ ) 𝑁 ( µ " % , Σ " % )
Revised: represent one cluster in the source/target domain and d is the dimension of feature embedding.

Original: [Figure]
Revised: Anchored clustering can be achieved by matching the above two distributions and one may directly minimize the KL-Divergence between the two distribution. Nevertheless, this is non-trivial because the KL-Divergence between two mixture of Gaussians has no closed-form solution which prohibits efficient gradient-based optimization. Despite some approximations exist [11], without knowing the semantic labels for each Gaussian component, even a good match between two mixture of Gaussians

Original: 𝑁(𝜇 ! ,Σ ! )
Revised: 𝑁(𝜇 ! ,Σ ! )

Original: Iterativelyupdate 𝑁 𝜇 $! ,Σ $!
Revised: Source Domain (offline) 𝑓(⋅) Iteratively update

Original: 𝑁 𝜇 %! ,Σ %!
Revised: Streaming Testing Data Pseudo Label Filter (P.L.F) temporal changing direction (t) (t - 1) (t + 1) Fixed-Length Queue

Original: 𝑁 𝜇 #! ,Σ #!
Revised: Push 𝑓 ! (⋅) ℎ(⋅)

Original:  𝑁(µ " ,Σ " ) 𝑁 ( µ " # , Σ " # ) 𝑁 ( µ " $ , Σ " $ ) 𝑁 ( µ " % , Σ " % )  𝑁(𝜇 ! ,Σ ! ) 
Revised: P.L.F pseudo label filter out 𝑁(µ " ,Σ " ) 𝑁 ( µ " # , Σ " # ) 𝑁 ( µ " $ , Σ " $ ) 𝑁 ( µ " % , Σ " % ) Iteratively update 𝑁(𝜇 ! ,Σ ! ) Iterativelyupdate 𝑁 𝜇 $! ,Σ $!

Original: 𝑁  ( µ # ! , Σ # & ) 𝑁 ( µ % ! , Σ % ! )
Revised: 𝑁 𝜇 %! ,Σ %! 𝑁 𝜇 #! ,Σ #! 𝑁(µ " ,Σ " ) 𝑁 ( µ " # , Σ " # ) 𝑁 ( µ " $ , Σ " $ ) 𝑁 ( µ " % , Σ " % ) 𝑁(𝜇 ! ,Σ ! ) 𝑁 ( µ # ! , Σ # & ) 𝑁 ( µ % ! , Σ % ! )

Original: 𝑁 ( µ $ ! , Σ $ ! )
Revised: 𝑁 ( µ $ ! , Σ $ ! )

Original: (t + 2)
Revised: (t + 2)

Original: [Figure]

Original:  ℒ "# ℒ $" 𝑁 ( µ # ! , Σ # & ) 𝑁 ( µ % ! , Σ % ! )
Revised: Frozen ℒ "# ℒ $" 𝑁 ( µ # ! , Σ # & ) 𝑁 ( µ % ! , Σ % ! )

Original: 𝑁 ( µ $ ! , Σ $ ! )
Revised: 𝑁 ( µ $ ! , Σ $ ! )

Original: 𝑁(µ " ,Σ " ) 𝑁 ( µ " # , Σ " # ) 𝑁 ( µ " $ , Σ " $ ) [Figure] ( µ [Figure]
Revised: 𝑁(µ " ,Σ " ) 𝑁 ( µ " # , Σ " # ) 𝑁 ( µ " $ , Σ " $ ) 𝑁 ( µ " % , Σ " % )

Original: [Figure]

Original: Σ

Original: [Figure] [Figure] In the source domain, we calculate category-wise and global statistics as anchors. ii)
Revised: Anchor.

Original: In the testing stage, samples are sequentially streamed and pushed into a fixed-length queue. Clusters in target domain are identified through anchored clustering with pseudo label filtering. Target clusters are then matched to the anchors in source domain to achieve test-time training. 3.1 Anchored Clustering for Test-Time Training
Revised: Cluster. & Global Feat.

Original: Discovering cluster structures in the target domain has been demonstrated effective for unsuperviseddomain adaptation [27] and we develop an anchored clustering on the test data aloneWe first usea mixture of Gaussians to model the clusters in the target domain, here each component Gaussianrepresents one discovered cluster. We further use the distributions of each category in the sourcedomain as anchors for the target distribution to match against. In this way, test data features cansimultaneously form clusters and the clusters are associated with source domain categories, resultingin improved generalization to target domain. Formally, we first write the mixture of Gaussians inthe source and target domains p s ( x ) =
Revised: Align.

Original: (cid:80) k

Original: α k N ( µ sk , Σ sk ) , p t ( x ) =

Original: (cid:80) k β k N ( µ tk , Σ tk ) , where{ µ k ∈ R d , Σ k ∈ R d × d } represent one cluster in the source/target domain and d is the dimension offeature embedding. Anchored clustering can be achieved by matching the above two distributions and one may directlyminimize the KL-Divergence between the two distribution. Nevertheless, this is non-trivial becausethe KL-Divergence between two mixture of Gaussians has no closed-form solution which prohibitsefficient gradient-based optimization. Despite some approximations exist [9], without knowing thesemantic labels for each Gaussian component, even a good match between two mixture of Gaussiansdoes not guarantee target clusters are aligned to the correct source ones and this will severely harm theperformance of test-time training.
Revised: Anchored Clustering does not guarantee target clusters are aligned to the correct source ones and this will severely harm the performance of test-time training.

Original: In light of these challenges, we propose a category-wise alignment.
Revised: In light of these challenges, we propose a category-wise alignment.

Original: Specifically, we allocate the same number of clusters in both source and target domains and eachtarget cluster is assigned to one source cluster.
Revised: Specifically, we allocate the same number of clusters in both source and target domains and each target cluster is assigned to one source cluster.

Original: We can then minimize the KL-Divergence betweeneach pair of clusters as in Eq. 1.
Revised: We can then minimize the KL-Divergence between each pair of clusters as in Eq. 1.

Original: [Equation]
Revised: [Equation]

Original: The KL-Divergence can be further decomposed into the entropy H ( N ( µ sk , Σ sk )) and cross-entropy
Revised: The KL-Divergence can be further decomposed into the entropy H ( N ( µ sk , Σ sk )) and cross-entropy

Original: H ( N ( µ sk , Σ sk ) , N ( µ tk , Σ tk )) .
Revised: H ( N ( µ sk , Σ sk ) , N ( µ tk , Σ tk )) .

Original: It is commonly true that the source reference distribution P s ( x ) isfixed thus the entropy term is a constant C and only the cross-entropy term is to be optimized.
Revised: It is commonly true that the source reference distribution P s ( x ) is fixed thus the entropy term is a constant C and only the cross-entropy term is to be optimized.

Original: Giventhe closed-form solution to the KL-Divergence between two Gaussian distributions, we now write theanchored clustering objective as,
Revised: Given the closed-form solution to the KL-Divergence between two Gaussian distributions, we now write the anchored clustering objective as,

Original: [Equation]
Revised: [Equation]

Original: The source cluster parameters can be estimated in an offline manner.
Revised: The source cluster parameters can be estimated in an offline manner.

Original: These information will notcause any privacy leakage and only introduces a small computation and storage overheads.
Revised: These information will not cause any privacy leakage and only introduces a small computation and storage overheads.

Original: In thenext section, we elaborate clustering in the target domain.
Revised: In the next section, we elaborate clustering in the target domain.

Original: 3.2 Clustering through Pseudo Labeling
Revised: 3.2 Clustering through Pseudo Labeling

Original: In order to test-time train network with anchored clustering loss, one must obtain target clusterparameters { µ tk , Σ tk } .
Revised: In order to test-time train network with anchored clustering loss, one must obtain target cluster parameters { µ tk , Σ tk } .

Original: For a minibatch of target test samples B t = { x i } i =1 ...N B at timestamp t , wefirst denote the predicted posterior as P t = softmax ( h ( f ( x i )))
Revised: For a minibatch of target test samples B t = { x i } i =1 ...N B at timestamp t , we first denote the predicted posterior as P t = softmax ( h ( f ( x i )))

Original: ∈ [0 , 1] B × K where softmax ( · ) ,h ( · ) and f ( · ) respectively denote a standard softmax function, the classifier head and backbonenetwork.
Revised: ∈ [0 , 1] B × K where softmax ( · ) , h ( · ) and f ( · ) respectively denote a standard softmax function, the classifier head and backbone network.

Original: The pseudo labels are obtained via ˆ y i = arg max k P tik .
Revised: The pseudo labels are obtained via ˆ y i = arg max k P tik .

Original: Given the predicted pseudo labelswe could estimate the mean and covariance for each component Gaussian with the pseudo labeledtesting samples.
Revised: Given the predicted pseudo labels we could estimate the mean and covariance for each component Gaussian with the pseudo labeled testing samples.

Original: However, pseudo labels are always subject to model’s discrimination ability.
Revised: However, pseudo labels are always subject to model’s discrimination ability.

Original: Theerror rate for pseudo labels is often high when the domain shift between source and target is large,directly updating the component Gaussian is subject to erroneous pseudo labels,a.k.a.
Revised: The error rate for pseudo labels is often high when the domain shift between source and target is large, directly updating the component Gaussian is subject to erroneous pseudo labels,

Original: confirmationbias [1].
Revised: a.k.a. confirmation bias [1].

Original: To reduce the impact of incorrect pseudo labels, we first adopt a light-weight temporalconsistency (TC) pseudo label filtering approach.
Revised: To reduce the impact of incorrect pseudo labels, we first adopt a light-weight temporal consistency (TC) pseudo label filtering approach.

Original: Compared to co-teaching [6] or meta-learning [17]based methods, this light-weight method does not introduce additional computation overhead andis therefore more suitable for test-time training.
Revised: Compared to co-teaching [8] or meta-learning [20] based methods, this light-weight method does not introduce additional computation overhead and is therefore more suitable for test-time training.

Original: Specifically, to alleviate the impact from the noisypredictions, we calculate the temporal exponential moving averaging posteriors (cid:101) P t ∈ [0 , 1] N × K asbelow,
Revised: Specifically, to alleviate the impact from the noisy predictions, we calculate the temporal exponential moving averaging posteriors (cid:101) P t ∈ [0 , 1] N × K as below,

Original: [Equation]
Revised: [Equation]

Original: The temporal consistency filtering is realized as in Eq.
Revised: The temporal consistency filtering is realized as in Eq.

Original: 4 where τ TC is a threshold determining themaximally allowed difference in the most probable prediction over time.
Revised: 4 where τ TC is a threshold determining the maximally allowed difference in the most probable prediction over time.

Original: If the posterior deviate fromhistorical value too much, it will be excluded from target domain clustering.
Revised: If the posterior deviate from historical value too much, it will be excluded from target domain clustering.

Original: [Equation]
Revised: [Equation]

Original: Due to the sequential inference, test samples without enough historical predictions may still pass the
Revised: Due to the sequential inference, test samples without enough historical predictions may still pass the

Original: TC filtering.
Revised: TC filtering.

Original: So, we further introduce an additional pseudo label filter directly based on the posteriorprobability as,
Revised: So, we further introduce an additional pseudo label filter directly based on the posterior probability as,

Original: [Equation]
Revised: [Equation]

Original: By filtering out potential incorrect pseudo labels, we update the component Gaussian only with theleftover target samples as below.
Revised: By filtering out potential incorrect pseudo labels, we update the component Gaussian only with the leftover target samples as below.

Original: [Equation]
Revised: [Equation]

Original: 3.3 Global Feature Alignment
Revised: 3.3 Global Feature Alignment

Original: As discussed above, test samples that do not pass the filtering will not contribute to the estimation oftarget clusters.
Revised: As discussed above, test samples that do not pass the filtering will not contribute to the estimation of target clusters.

Original: Hence, anchored clustering may not reach its full potential without the filtered testsamples.
Revised: Hence, anchored clustering may not reach its full potential without the filtered test samples.

Original: To exploit all available test samples, we propose to align global target data distribution to thesource one.
Revised: To exploit all available test samples, we propose to align global target data distribution to the source one.

Original: We define the global feature distribution of the source data as ˆ p s ( x ) =
Revised: We define the global feature distribution of the source data as ˆ p s ( x ) =

Original: N ( µ s , Σ s ) and thetarget data as ˆ p t ( x ) = N ( µ t , Σ t ) .
Revised: N ( µ s , Σ s ) and the target data as ˆ p t ( x ) = N ( µ t , Σ t ) .

Original: To align two distributions, we again minimize the KL-Divergenceas,
Revised: To align two distributions, we again minimize the KL-Divergence as,

Original: [Equation]
Revised: [Equation]

Original: Similar idea has appeared in [19] which directly matches the moments between source and targetdomains [37] by minimizing the F-norm for the mean and covariance, i.e. || µ t − µ s || 22 + || Σ t − Σ s || 2 F .
Revised: Similar idea has appeared in [22] which directly matches the moments between source and target domains [40] by minimizing the F-norm for the mean and covariance, i.e. || µ t − µ s || 22 + || Σ t − Σ s || 2 F .

Original: However, designed for matching complex distributions represented as drawn samples, central momentdiscrepancy [37] requires summing infinite central moment discrepancies and the ratios betweendifferent order moments are hard to estimate.
Revised: However, designed for matching complex distributions represented as drawn samples, central moment discrepancy [40] requires summing infinite central moment discrepancies and the ratios between different order moments are hard to estimate.

Original: For matching two parameterized Gaussian distributions
Revised: For matching two parameterized Gaussian distributions

Original: KL-Divergence is more convenient with good explanation from a probabilistic point of view.
Revised: KL-Divergence is more convenient with good explanation from a probabilistic point of view.

Original: Finally,we add a small constant to the diagonal of Σ for both source and target domains to increase thecondition number for better numerical stability.
Revised: Finally, we add a small constant to the diagonal of Σ for both source and target domains to increase the condition number for better numerical stability.

Original: 3.4 Efficient Iterative Updating
Revised: 3.4 Efficient Iterative Updating

Original: Despite the distribution for source data can be trivially estimated from all available training datain a totally offline manner, estimating the distribution for target domain data is not equally trivial,in particular under the sTTT protocol.
Revised: Despite the distribution for source data can be trivially estimated from all available training data in a totally offline manner, estimating the distribution for target domain data is not equally trivial, in particular under the sTTT protocol.

Original: In a related research [19], a dynamic queue of test datafeatures are preserved to dynamically estimate the statistics, which will introduce additional memoryfootprint [19].
Revised: In a related research [22], a dynamic queue of test data features are preserved to dynamically estimate the statistics, which will introduce additional memory footprint [22].

Original: To alleviate the memory cost we propose to iteratively update the running statisticsfor Gaussian distribution.
Revised: To alleviate the memory cost we propose to iteratively update the running statistics for Gaussian distribution.

Original: Formally, we define t -th test minibatch as B t = { x i } i =1 ··· N B .
Revised: Formally, we define t -th test minibatch as B t = { x i } i =1 ··· N B .

Original: Denotingthe running mean and covariance at step t as µ t and Σ t , we present the rules to update the mean andcovariance in Eq.
Revised: Denoting the running mean and covariance at step t as µ t and Σ t , we present the rules to update the mean and covariance in Eq.

Original: More detailed derivations and update rules for per cluster statistics are deferredto the Appendix. 
Revised: More detailed derivations and update rules for per cluster statistics are deferred to the Appendix. [Equation] [Table]

Original: [Equation]
Revised: [Equation]

Original: Additionally, N t grows larger overtime.
Revised: Additionally, N t grows larger overtime.

Original: New test samples will have smaller contribution to theupdate of target domain statistics when N t is large enough.
Revised: New test samples will have smaller contribution to the update of target domain statistics when N t is large enough.

Original: As a result, the gradient calculated fromcurrent minibatch will vanish.
Revised: As a result, the gradient calculated from current minibatch will vanish.

Original: To alleviate this issue, we impose a clip on the value of α t as below.
Revised: To alleviate this issue, we impose a clip on the value of α t as below.

Original: As such, the gradient can maintain a minimal scale even if N t is very large.
Revised: As such, the gradient can maintain a minimal scale even if N t is very large.

Original: [Equation]
Revised: [Equation]

Original: N clip others (9)

Original: 3.5 TTAC Training Algorithm
Revised: 3.5 TTAC Training Algorithm

Original: We summarize the training algorithm for the TTAC in Algo.
Revised: We summarize the training algorithm for the TTAC in Algo.

Original: For effective clustering in targetdomain, we allocate a fixed length memory space, denoted as C ∈ R N C
Revised: For effective clustering in target domain, we allocate a fixed length memory space, denoted as C ∈ R N C

Original: ×
Revised: ×

Original: H × W × 3 , to store the recenttesting samples.
Revised: H × W × 3 , to store the recent testing samples.

Original: In the sTTT protocol, we first make instant prediction on each testing sample,and only update the model when N B testing samples are accumulated.
Revised: In the sTTT protocol, we first make instant prediction on each testing sample, and only update the model when N B testing samples are accumulated.

Original: TTAC can be efficientlyimplemented, e.g. with two devices, one is for continuous inference and another is for model updating.
Revised: TTAC can be efficiently implemented, e.g. with two devices, one is for continuous inference and another is for model updating.

Original: Algorithm  input : A new testing sample batch B t = { x i } i =1 ...N B .
Revised: Algorithm 1: Test-Time Anchored Clustering Training Algorithm input : A new testing sample batch B t = { x i } i =1 ...N B .

Original: # Update the testing sample queue C .
Revised: # Update the testing sample queue C .

Original: C t =
Revised: C t =

Original: C t \ B t − N C /N B , C t =
Revised: C t \ B t − N C /N B , C t =

Original: C t (cid:83) B t for 1 to N itr do for minibatch { x tk } Nk =1 in C t do # Obtain the predicted posterior and pseudo labels
Revised: C t (cid:83) B t for 1 to N itr do for minibatch { x tk } Nk =1 in C t do # Obtain the predicted posterior and pseudo labels

Original: P [Equation] [Equation]
Revised: P ti = softmax ( h ( f ( x ti ))) , ˆ y ti = arg max k ( P tik )

Original: # Calculate the global and per-cluster running mean and covariance by Eq.µ t , Σ t , { µ tk } , { Σ tk } # Optimize the combined loss by Eq. 2 and Eq.
Revised: # Calculate the global and per-cluster running mean and covariance by Eq.µ t , Σ t , { µ tk } , { Σ tk } # Optimize the combined loss by Eq. 2 and Eq.

Original: L = L ac + λ L ga update network f to minimize L
Revised: L = L ac + λ L ga update network f to minimize L

Original:  Experiment
Revised:  Experiment

Original: In this section, we first compare various existing methods based on the two key factors.
Revised: In this section, we first compare various existing methods based on the two key factors.

Original: Evaluation isthen carried out on five test-time training datasets.
Revised: Evaluation is then carried out on six test-time training datasets.

Original: We then ablate the components of TTAC.
Revised: We then ablate the components of TTAC.

Original: Furtheranalysis on the cumulative performance, qualitative insights, etc. are provided at the end.
Revised: Further analysis on the cumulative performance, qualitative insights, etc. are provided at the end.

Original: 4.1 Datasets
Revised: 4.1 Datasets

Original: We evaluate on 5 test-time training datasets and report the classification error rate ( % ) throughout theexperiment section.
Revised: We evaluate on 5 test-time training datasets and report the classification error rate ( % ) throughout the experiment section.

Original: To evaluate the test-time training efficacy on corrupted target images, we use CIFAR10-C/CIFAR100-C [8], each consisting of 10/100 classes with 50,000 training samples ofclean data and 10,000 corrupted test samples.
Revised: To evaluate the test-time training efficacy on corrupted target images, we use CIFAR10-C/CIFAR100-C [10], each consisting of 10/100 classes with 50,000 training samples of clean data and 10,000 corrupted test samples.

Original: We further evaluate test-time training on hard targetdomain samples with CIFAR10.1 [22], which contains around 2,000 difficult testing images sampledover years of research on the original CIFAR-10 dataset.
Revised: We further evaluate test-time training on hard target domain samples with CIFAR10.1 [25], which contains around 2,000 difficult testing images sampled over years of research on the original CIFAR-10 dataset.

Original: To demonstrate the ability to do test-timetraining for synthetic data to real data transfer we further use VisDA-C [20], which is a challenginglarge-scale synthetic-to-real object classification dataset, consisting of 12 classes, 152,397 synthetictraining images and 55,388 real testing images. 
Revised: To demonstrate the ability to do test-time training for synthetic data to real data transfer we further use VisDA-C [23], which is a challenging large-scale synthetic-to-real object classification dataset, consisting of 12 classes, 152,397 synthetic training images and 55,388 real testing images. To evaluate large-scale test-time training, we use ImageNet-C [10] which consists of 1,000 classes and 15 types of corruptions on the 50,000 testing samples.

Original: Finally, to evaluate test-time training on 3D pointcloud data, we choose ModelNet40-C [25], which consists of 15 common and realistic corruptionsof point cloud data, with 9,843 training samples and 2,468 test samples.
Revised: Finally, to evaluate test-time training on 3D point cloud data, we choose ModelNet40-C [28], which consists of 15 common and realistic corruptions of point cloud data, with 9,843 training samples and 2,468 test samples.

Original: 4.2 Experiment Settings
Revised: 4.2 Experiment Settings

Original: Hyperparameters .
Revised: Hyperparameters .

Original: We use the ResNet-50 [7] for image datasets and the DGCNN [33] on
Revised: We use the ResNet-50 [9] for image datasets and the DGCNN [36] on

Original: ModelNet40-C. We optimize the backbone network f ( · ) by SGD with momentum on all datasets.
Revised: ModelNet40-C. We optimize the backbone network f ( · ) by SGD with momentum on all datasets.

Original: On
Revised: On

Original: CIFAR10-C/CIFAR100-C and CIFAR10.1, we set BS = 256 and  LR = 0.01, 0.0001, 0.01 respectively.
Revised: CIFAR10-C/CIFAR100-C and CIFAR10.1, we use (batchsize) BS = 256 and (learning rate) LR = 0.01, 0.0001, 0.01 respectively.

Original: On VisDA-C we set BS = 128 and LR = 0.0001, and on ModelNet40-C we set BS = 64 and LR =0.001.
Revised: On VisDA-C we use BS = 128 and LR = 0.0001, and on ModelNet40-C we use BS = 64 and LR = 0.001.

Original: More details of hyperparameters can be found in the Appendix.
Revised: More details of hyperparameters can be found in the Appendix.

Original: Test-Time Training Protocols .
Revised: Test-Time Training Protocols .

Original: We categorize test-time training based on two key factors.
Revised: We categorize test-time training based on two key factors.

Original: First,whether the training objective must be changed during training on the source domain, we use Y and N to indicate if training objective is allowed to be changed or not respectively.
Revised: First, whether the training objective must be changed during training on the source domain, we use Y and N to indicate if training objective is allowed to be changed or not respectively.

Original: Second, whether testingdata is sequentially streamed and predicted, we use O to indicate a sequential O ne-pass inferenceand M to indicate non-sequential inference, a.k.a.
Revised: Second, whether testing data is sequentially streamed and predicted, we use O to indicate a sequential O ne-pass inference and M to indicate non-sequential inference, a.k.a.

Original: M ulti-pass inference.
Revised: M ulti-pass inference.

Original: With the above criteria,we summarize 4 test-time training protocols, namely N-O, Y-O, N-M and Y-M, and the strength ofthe assumption increases from the first to the last protocols.
Revised: With the above criteria, we summarize 4 test-time training protocols, namely N-O, Y-O, N-M and Y-M, and the strength of the assumption increases from the first to the last protocols.

Original: Ours sTTT setting makes the weakestassumption, i.e. N-O. Existing methods are categorized by the four TTT protocols, we notice thatsome methods can operate under multiple protocols
Revised: Our sTTT setting makes the weakest assumption, i.e. N-O. Existing methods are categorized by the four TTT protocols, we notice that some methods can operate under multiple protocols

Original: Competing Methods .
Revised: Competing Methods .

Original: We compare the following test-time training methods.
Revised: We compare the following test-time training methods.

Original: Direct testing ( TEST )without adaptation simply do inference on target domain with source domain model.
Revised: Direct testing ( TEST ) without adaptation simply do inference on target domain with source domain model.

Original: Test-timetraining ( TTT-R ) [26] jointly trains the rotation-based self-supervised task and the classification taskin the source domain, and then only train the rotation-based self-supervised task in the streaming testsamples and make the predictions instantly.
Revised: Test-time training ( TTT-R ) [29] jointly trains the rotation-based self-supervised task and the classification task in the source domain, and then only train the rotation-based self-supervised task in the streaming test samples and make the predictions instantly.

Original: The default method is classified into the Y-M protocol.
Revised: The default method is classified into the Y-M protocol.

Original: Test-time normalization ( BN ) [11] moving average updates the batch normalization statistics bystreamed data.
Revised: Test-time normalization ( BN ) [13] moving average updates the batch normalization statistics by streamed data.

Original: The default method follows N-M protocol and can be adapted to N-O protocol.
Revised: The default method follows N-M protocol and can be adapted to N-O protocol.

Original: Test-time entropy minimization ( TENT ) [30] updates the parameters of all batch normalization byminimizing the entropy of the model predictions in the streaming data.
Revised: Test-time entropy minimization ( TENT ) [33] updates the parameters of all batch normalization by minimizing the entropy of the model predictions in the streaming data.

Original: By default, TENT followsthe N-O protocol and can be adapted to N-M protocol.
Revised: By default, TENT follows the N-O protocol and can be adapted to N-M protocol.

Original: Test-time classifier adjustment ( T3A ) [12]computes target prototype representation for each category using streamed data and make predictionswith updated prototypes.
Revised: Test-time classifier adjustment ( T3A ) [14] computes target prototype representation for each category using streamed data and make predictions with updated prototypes.

Original: T3A follows the N-O protocol by default.
Revised: T3A follows the N-O protocol by default.

Original: Source Hypothesis Transfer( SHOT ) [18] freezes the linear classification head and trains the target-specific feature extractionmodule by exploiting balanced category assumption and self-supervised pseudo-labeling in the targetdomain.
Revised: Source Hypothesis Transfer ( SHOT ) [21] freezes the linear classification head and trains the target-specific feature extraction module by exploiting balanced category assumption and self-supervised pseudo-labeling in the target domain.

Original: SHOT by default follows the N-M protocol and we adapt it to N-O protocol.
Revised: SHOT by default follows the N-M protocol and we adapt it to N-O protocol.

Original: TTT++ [19]aligns source domain feature distribution, whose statistics are calculated offline, and target domainfeature distribution by minimizing the F-norm between the mean covariance.
Revised: TTT++ [22] aligns source domain feature distribution, whose statistics are calculated offline, and target domain feature distribution by minimizing the F-norm between the mean covariance.

Original: TTT++ follows the Y-Mprotocol and we adapt it to N-O (removing contrastive learning branch) and Y-O protocols.
Revised: TTT++ follows the Y-M protocol and we adapt it to N-O (removing contrastive learning branch) and Y-O protocols.

Original: Finally,we present our own approach, TTAC , which only requires a single pass on the target domain anddoes not have to modify the source training objective.
Revised: Finally, we present our own approach, TTAC , which only requires a single pass on the target domain and does not have to modify the source training objective.

Original: We further modify TTAC for Y-O, N-M and
Revised: We further modify TTAC for Y-O, N-M and

Original: Y-M protocols, for Y-O and Y-M we incorporate an additional contrastive learning branch [19].
Revised: Y-M protocols, for Y-O and Y-M we incorporate an additional contrastive learning branch [22].

Original: Wecould further combine TTAC with additional diversity loss and entropy minimization loss introducedin SHOT [18], denoted as TTAC+SHOT.
Revised: We could further combine TTAC with additional diversity loss and entropy minimization loss introduced in SHOT [21], denoted as TTAC+SHOT.

Original: 4.3 Test-Time Training on Corrupted Target Domain
Revised: 4.3 Test-Time Training on Corrupted Target Domain

Original: We present the test-time training results on CIFAR10C/100C and ModelNet40C datasets in Tab. 1.
Revised: We present the test-time training results on CIFAR10/100-C and ModelNet40-C datasets in Tab. 1, and the results on ImageNet-C dataset in Tab. 2.

Original: We make the following observations from the results.sTTT (N-O) Protocol .
Revised: We make the following observations from the results. sTTT (N-O) Protocol .

Original: We first analyze the results under the proposed sTTT (N-O) protocol.
Revised: We first analyze the results under the proposed sTTT (N-O) protocol.

Original: Ourmethod outperforms all competing ones by a large margin, e.g. 3% improvement is observed on both CIFAR10-C and CIFAR100-C from the previous best (TTT++).
Revised: Our method outperforms all competing ones by a large margin. For example, 3% improvement is observed on both CIFAR10-C and CIFAR100-C from the previous best (TTT++) and 5-13% improvement is observed on ImageNet-C compared with BN and TENT, and TTAC is superior in average accuracy and outperforms on 9 out of 15 types of corruptions compared with SHOT on ImageNet-C.

Original: We further combine TTAC withthe class balance assumption made in SHOT (TTAC+SHOT).
Revised: We further combine TTAC with the class balance assumption made in SHOT (TTAC+SHOT).

Original: With the stronger assumptions outmethod can further improve upon TTAC alone, in particular on ModelNet40-C dataset.
Revised: With the stronger assumptions out method can further improve upon TTAC alone, in particular on ModelNet40-C dataset.

Original: This resultdemonstrates TTAC’s compatibility with existing methods.
Revised: This result demonstrates TTAC’s compatibility with existing methods.

Original: Alternative Protocols .
Revised: Alternative Protocols .

Original: We further compare different methods under N-M, Y-O and Y-M protocols.
Revised: We further compare different methods under N-M, Y-O and Y-M protocols.

Original: Under the Y-O protocol, TTT++ [19] modifies the source domain training objective by incorporatinga contrastive learning branch [3].
Revised: Under the Y-O protocol, TTT++ [22] modifies the source domain training objective by incorporating a contrastive learning branch [3].

Original: To compare with TTT++, we also include the contrastive branch andobserve a clear improvement on both CIFAR10-C and CIFAR100-C datasets.
Revised: To compare with TTT++, we also include the contrastive branch and observe a clear improvement on both CIFAR10-C and CIFAR100-C datasets.

Original: More TTT methods canbe adapted to the N-M protocol which allows training on the whole target domain data multiple epochs.
Revised: More TTT methods can be adapted to the N-M protocol which allows training on the whole target domain data multiple epochs.

Original: Specifically, we compared with BN, TENT and SHOT.
Revised: Specifically, we compared with BN, TENT and SHOT.

Original: With TTAC alone we observe substantialimprovement on all three datasets and TTAC can be further combined with SHOT demonstratingadditional improvement.
Revised: With TTAC alone we observe substantial improvement on all three datasets and TTAC can be further combined with SHOT demonstrating additional improvement.

Original: Finally, under the Y-M protocol, we demonstrate very strong performancecompared to TTT-R and TTT++.
Revised: Finally, under the Y-M protocol, we demonstrate very strong performance compared to TTT-R and TTT++.

Original: It is also worth noting that TTAC under the N-O protocol canalready yield results close to TTT++ under the Y-M protocol, suggesting the strong test-time trainingability of TTAC even under the most challenging TTT protocol.
Revised: It is also worth noting that TTAC under the N-O protocol can already yield results close to TTT++ under the Y-M protocol, suggesting the strong test-time training ability of TTAC even under the most challenging TTT protocol.

Original: 4.4 Additional Datasets
Revised: 4.4 Additional Datasets

Original: TTT on Hard Samples .
Revised: TTT on Hard Samples .

Original: CIFAR10.1 contains roughly 2,000 new test images that were re-sampledafter the research on original CIFAR-10 dataset, which consists of some hard samples and reflects thenormal domain shift in our life.
Revised: CIFAR10.1 contains roughly 2,000 new test images that were re-sampled after the research on original CIFAR-10 dataset, which consists of some hard samples and reflects the [Table] [Table] normal domain shift in our life.

Original: The results in Table.
Revised: The results in Table.

Original: 2 demonstrate our method is better able to adaptto the normal domain shift.
Revised: 3 demonstrate our method is better able to adapt to the normal domain shift

Original: [Table]

Original: [Table]
Revised: [Table]

Original: TTT on Synthetic to Real Adaptation .
Revised: TTT on Synthetic to Real Adaptation .

Original: VisDA-C is a large-scale benchmark of synthetic-to-realobject classification dataset.
Revised: VisDA-C is a large-scale benchmark of synthetic-to-real object classification dataset.

Original: The setting of training on a synthetic dataset and testing on real datafits well with the real application scenario.
Revised: The setting of training on a synthetic dataset and testing on real data fits well with the real application scenario.

Original: On this dataset, we conduct experiments with ourmethod under the N-O, Y-O and Y-M protocols and other methods under respective protocols, resultsare presented in Table.
Revised: On this dataset, we conduct experiments with our method under the N-O, Y-O and Y-M protocols and other methods under respective protocols, results are presented in Table.

Original: We make the following observations.
Revised: We make the following observations.

Original: First, our method (TTAC Y-O)outperforms all methods except TTT++ under the Y-M protocol.
Revised: First, our method (TTAC Y-O) outperforms all methods except TTT++ under the Y-M protocol.

Original: This suggests TTAC is able to bedeployed in the realistic test-time training protocol.
Revised: This suggests TTAC is able to be deployed in the realistic test-time training protocol.

Original: Moreover, if training on the whole target data isallowed, TTAC (Y-M) further beats TTT++ by a large margin, suggesting the effectiveness of TTACunder a wide range of TTT protocols.
Revised: Moreover, if training on the whole target data is allowed, TTAC (Y-M) further beats TTT++ by a large margin, suggesting the effectiveness of TTAC under a wide range of TTT protocols.

Original: [Table]
Revised: [Table]

Original: [Table]

Original: [Table]
Revised: [Table]

Original: 4.5 Ablation Study
Revised: 4.5 Ablation Study

Original: [Table] We conduct ablation study on CIFAR10-C dataset for individual components, including anchored clustering, pseudo label filtering, global feature alignment and finally the compatibility with contrastivebranch [19].
Revised: We conduct ablation study on CIFAR10-C dataset for individual components, including anchored clustering, pseudo label filtering, global feature alignment and finally the compatibility with contrastive branch [22].

Original: For anchored clustering alone, we use all testing samples to update cluster statistics.
Revised: For anchored clustering alone, we use all testing samples to update cluster statistics.

Original: Forpseudo label filtering alone, we implement as predicting pseudo labels followed by filtering, thenpseudo labels are used for self-training.
Revised: For pseudo label filtering alone, we implement as predicting pseudo labels followed by filtering, then pseudo labels are used for self-training.

Original: We make the following observations from Tab. 5.
Revised: We make the following observations from Tab. 6.

Original: Under both
Revised: Under both

Original: N-O and N-M protocols, introducing anchored clustering or pseudo label filtering alone improvesover the baseline, e.g. under N-O 29 .
Revised: N-O and N-M protocols, introducing anchored clustering or pseudo label filtering alone improves over the baseline, e.g. under N-O 29 .

Original: 15% → 14 .
Revised: 15% → 14 .

Original: 32% for anchored clustering and 29 .
Revised: 32% for anchored clustering and 29 .

Original: 15% → 15 . {+
+}
Revised: 15% → 15 . {+
+}

Original: 00%for pseudo label filtering.
Revised: % for pseudo label filtering.

Original: When anchored clustering is combined with pseudo label filtering, weobserve a significant boost in performance.
Revised: When anchored clustering is combined with pseudo label filtering, we observe a significant boost in performance.

Original: This is due to more accurate estimation of category-wise 
Revised: This is due to more accurate estimation of category-wise cluster in the target domain and this reflects matching directly in the feature space may be better than minimizing cross-entropy with pseudo labels. We further evaluate aligning global features alone with KL-Divergence. This achieves relatively good performance and obviously outperforms the L

Original: TEST
Revised: [Table]

Original:  BN (N-O)
Revised: [Figure] BN (

Original:  TENT (N-O)
Revised: [Figure] TENT (N

Revised: [Figure]

Original: SHOT (N-O)
Revised: SHOT (N [Figure]

Original: TTT++ (Y-O) T3A (N-O)
Revised: TTT [Figure] [Figure]

Original: OURS( [Figure] 
Revised: [Figure] OURS(N

Original: [Figure]
Revised: [Figure]

Original: CIFAR
Revised: OURS

Original: [Figure] 
Revised: [Figure] [Figure]

Original: C
Revised: C

Original: CIFAR

Original: [Figure]
Revised: [Figure]

Original: C
Revised: C

Original: [Figure]
Revised: [Figure]

Original: cluster in the target domain and this reflects matching directly in the feature space may be better thanminimizing cross-entropy with pseudo labels. We further evaluate aligning global features alonewith KL-Divergence. This achieves relatively good performance and obviously outperforms the L2distance alignment adopted in [19].
Revised: distance alignment adopted in [22].

Original: Finally, we combine all three components and the full modelyields the best performance.
Revised: Finally, we combine all three components and the full model yields the best performance.

Original: When contrast learning branch is included, TTAC achieves even betterresults.
Revised: When contrast learning branch is included, TTAC achieves even better results.

Original: [Table]
Revised: [Table]

Original: 4.6 Additional Analysis
Revised: 4.6 Additional Analysis

Original: Cumulative performance under sTTT .
Revised: Cumulative performance under sTTT .

Original: We illustrate the cumulative error under the sTTT protocolin Fig.
Revised: We illustrate the cumulative error under the sTTT protocol in Fig.

Original: 2 (a).
Revised: 2 (a).

Original: For both datasets TTAC outperforms competing methods from the early stage oftest-time training.
Revised: For both datasets TTAC outperforms competing methods from the early stage of test-time training.

Original: The advantage is consistent throughout the TTT procedure.
Revised: The advantage is consistent throughout the TTT procedure.

Original: TSNE Visualization of TTAC features .
Revised: TSNE Visualization of TTAC features .

Original: We provide qualitative results for test-time training byvisualizing the adapted features through T-SNE [29].
Revised: We provide qualitative results for test-time training by visualizing the adapted features through T-SNE [32].

Original: In Fig.
Revised: In Fig.

Original: 2 (b) and Fig.
Revised: 2 (b) and Fig.

Original: 2 (c), we compared thefeatures learned by TTT++ [19] and TTAC (Ours).
Revised: 2 (c), we compared the features learned by TTT++ [22] and TTAC (Ours).

Original: We observe a better separation between classesby TTAC, implying an improved classification accuracy.
Revised: We observe a better separation between classes by TTAC, implying an improved classification accuracy.

Original: Source-Free Test-Time Training .
Revised: Source-Free Test-Time Training .

Original: TTT aims to adapt model to target domain data by doing simultaneous training and sequential inference.
Revised: TTT aims to adapt model to target domain data by doing simultaneous training and sequential inference.

Original: It has been demonstrated some light-weight information,e.g. statistics, from source domain will greatly improve the efficacy of TTT.
Revised: It has been demonstrated some light-weight information, e.g. statistics, from source domain will greatly improve the efficacy of TTT.

Original: Nevertheless, undera more strict scenario where source domain information is strictly blind, TTAC can still exploitclassifier prototypes to facilitate anchored clustering.
Revised: Nevertheless, under a more strict scenario where source domain information is strictly blind, TTAC can still exploit classifier prototypes to facilitate anchored clustering.

Original: Specifically, we normalize the category-wiseweight vector with the norm of corresponding target domain cluster center as prototypes.
Revised: Specifically, we normalize the category-wise weight vector with the norm of corresponding target domain cluster center as prototypes.

Original: Then, webuild source domain mixture of Gaussians by taking prototypes as mean with a fixed covariancematrix.
Revised: Then, we build source domain mixture of Gaussians by taking prototypes as mean with a fixed covariance matrix.

Original: The results on CIFAR10-C are presented in Tab. 3.
Revised: The results on CIFAR10-C are presented in Tab. 4.

Original: It is clear that even without any statisticalinformation from source domain, TTAC still outperforms all competing methods. 
Revised: It is clear that even without any statistical information from source domain, TTAC still outperforms all competing methods. Test Sample Queue and Update Epochs.

Revised: Under the sTTT protocol, we allow all competing methods to maintain the same test sample queue and multiple update epochs on the queue.

Revised: To analyse the significance of the sample queue and update epochs, we evaluate BN, TENT, SHOT and TTAC on CIFAR10-C and ImageNet-C level 5 snow corruption evaluation set under different number of update epochs on test sample queue and under a without queue protocol, i.e. only update model w.r.t.

Revised: the current test sample batch.

Original: Conclusion
Revised: As the results presented in Tab. 7, we make the following observations. i) Maintaining a sample queue can substantially improve the performance of methods that estimate target distribution, e.g. TTAC ( 11 . 91 → 10 . 88 on CIFAR10-C) and SHOT ( 15 . 18 → 13 . 96 on

Revised: CIFAR10-C).

Revised: This is due to more test samples giving a better estimation of true distribution.

Revised: ii)

Revised: Consistent improvement can be observed with increasing update epochs for SHOT and TTAC.

Revised: We ascribe this to iterative pseudo labeling benefiting from more update epochs.

Revised: [Table]

Revised: Computation Cost Measured in Wall-Clock Time.

Revised: Test sample queue and multiple update epochs introduce additional computation overhead.

Revised: To investigate the impact on efficiency, we measure the overall wall time as the time elapsed from the beginning to the end of test-time training, including all I/O overheads.

Revised: The per-sample wall time is then calculated as the overall wall time divided by the number of test samples.

Revised: We report the per-sample wall time (in seconds) for BN, TENT, SHOT and TTAC in Tab. 8 under different update epoch settings and without queue setting.

Revised: The Inference row indicates the per-sample wall time in a single forward pass including the data

Revised: I/O overhead.

Revised: We observe that, under the same experiment setting, BN and TENT are more computational efficient, but TTAC is only twice more expensive than BN and TENT if no test sample queue is preserved (0.0083 v.s. 0.0030/0.0041) while the performance of TTAC w/o queue is still better than TENT (11.91 v.s. 13.48).

Revised: In summary, TTAC is able to strike a balance between computation efficiency and performance depending on how much computation resource is available.

Revised: This suggests allocating a separate device is only necessary when securing best performance is the priority.

Original:  Test-time training (TTT) tackles the realistic challenges of deploying domain adaptation on-the-fly.
Revised: [Table]  Conclusion Test-time training (TTT) tackles the realistic challenges of deploying domain adaptation on-the-fly.

Original: In this work, we are first motivated by the confused evaluation protocols for TTT and proposetwo key criteria, namely modifying source training objective and sequential inference, to furthercategorize existing methods into four TTT protocols.
Revised: In this work, we are first motivated by the confused evaluation protocols for TTT and propose two key criteria, namely modifying source training objective and sequential inference, to further categorize existing methods into four TTT protocols.

Original: Under the most realistic protocol, i.e. sequentialtest-time training (sTTT), we develop a test-time anchored clustering (TTAC) approach to align targetdomain features to the source ones.
Revised: Under the most realistic protocol, i.e. sequential test-time training (sTTT), we develop a test-time anchored clustering (TTAC) approach to align target domain features to the source ones.

Original: Unlike batchnorm and classifier prototype updates, anchoredclustering allows all network parameters to be trainable, thus demonstrating stronger test-timetraining ability.
Revised: Unlike batchnorm and classifier prototype updates, anchored clustering allows all network parameters to be trainable, thus demonstrating stronger test-time training ability.

Original: We further propose pseudo label filtering and an iterative update method to improveanchored clustering and save memory footprint 
Revised: We further propose pseudo label filtering and an iterative update method to improve anchored clustering and save memory footprint respectively.

Revised: Experiments on six datasets verified the effectiveness of TTAC under sTTT as well as other TTT protocols.

Revised: Acknowledgement This work was supported in part by the National Natural Science Foundation of China (NSFC) under Grant 62106078, Guangdong RD key project of China (No.: 2019B010155001), and the Program for Guangdong Introducing Innovative and Enterpreneurial

Revised: Teams (No.: 2017ZT07X183).

Original: Checklist
Revised: Checklist

Original: The checklist follows the references.
Revised: The checklist follows the references.

Original: Please read the checklist guidelines carefully for information onhow to answer these questions.
Revised: Please read the checklist guidelines carefully for information on how to answer these questions.

Original: For each question, change the default [TODO] to [Yes] , [No] , or[N/A] .
Revised: For each question, change the default [TODO] to [Yes] , [No] , or [N/A] .

Original: You are strongly encouraged to include a justification to your answer , either by referencingthe appropriate section of your paper or providing a brief inline description.
Revised: You are strongly encouraged to include a justification to your answer , either by referencing the appropriate section of your paper or providing a brief inline description.

Original: For example:
Revised: For example:

Original: • Did you include the license to the code and datasets?
Revised: • Did you include the license to the code and datasets?

Original: [Yes] See Section ?? .•
Revised: [Yes] See Section ?? .

Original:  Did you include the license to the code and datasets?
Revised: • Did you include the license to the code and datasets?

Original: [No] The code and the data areproprietary.•
Revised: [No] The code and the data are proprietary.

Original:  Did you include the license to the code and datasets?
Revised: • Did you include the license to the code and datasets?

Original: [N/A]
Revised: [N/A]

Original: Please do not modify the questions and only use the provided macros for your answers.
Revised: Please do not modify the questions and only use the provided macros for your answers.

Original: Note that the
Revised: Note that the

Original: Checklist section does not count towards the page limit.
Revised: Checklist section does not count towards the page limit.

Original: In your paper, please delete this instructionsblock and only keep the Checklist section heading above along with the questions/answers below.
Revised: In your paper, please delete this instructions block and only keep the Checklist section heading above along with the questions/answers below.

Original: For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
Revised: For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?

Original: [Yes] (b) Did you describe the limitations of your work?
Revised: [Yes] (b) Did you describe the limitations of your work?

Original: [Yes] We have discussed the assumptions and evaluation protocols explicitly.(c)
Revised: [Yes] We have discussed the assumptions and evaluation protocols explicitly.

Original:  Did you discuss any potential negative societal impacts of your work?
Revised: (c) Did you discuss any potential negative societal impacts of your work?

Original: [N/A] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
Revised: [N/A] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?

Original: [Yes] 
Revised: [Yes] 2.

Original: If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
Revised: If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?

Original: [N/A] (b) Did you include complete proofs of all theoretical results?
Revised: [N/A] (b) Did you include complete proofs of all theoretical results?

Original: [N/A] 
Revised: [N/A] 3.

Original: If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experi- mental results (either in the supplemental material or as a URL)?
Revised: If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?

Original: [Yes] We will provide a sample demo code in the supplementary.
Revised: [Yes] We will provide a sample demo code in the supplementary.

Original: (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
Revised: (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?

Original: [Yes] Please see the experiment section and Appendix.
Revised: [Yes] Please see the experiment section and Appendix.

Original: (c) Did you report error bars (e.g., with respect to the random seed after running experi- ments multiple times)?
Revised: (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?

Original: [N/A]
Revised: [N/A]

Original: The randomness is negligible.
Revised: The randomness is negligible.

Original: (d) Did you include the total amount of compute and the type of resources used (e.g., typeof GPUs, internal cluster, or cloud provider)?
Revised: (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?

Original: [Yes] Please see the Appendix. 
Revised: [Yes] Please see the Appendix. 4.

Original: If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
Revised: If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?

Original: [Yes] We have properly cited all datasets used and works we compared against.
Revised: [Yes] We have properly cited all datasets used and works we compared against.

Original: (b) Did you mention the license of the assets?
Revised: (b) Did you mention the license of the assets?

Original: [N/A] (c) Did you include any new assets either in the supplemental material or as a URL?
Revised: [N/A] (c) Did you include any new assets either in the supplemental material or as a URL?

Original: [No] No additional data is involved.
Revised: [No] No additional data is involved.

Original: (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
Revised: (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?

Original: [N/A] (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
Revised: [N/A] (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?

Original: [N/A]
Revised: [N/A]

Original: No personally identifiable information is used.5.
Revised: No personally identifiable information is used.

Original: If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, ifapplicable?
Revised: If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?

Original: [N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? 
Revised: [N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?

Original: [N/A]
Revised: [N/A]

Original: (c) Did you include the estimated hourly wage paid to participants and  the total amount
Revised: Sequential Inference and Adaptation by Anchored Clustering In this appendix, we first provide more details for the derivation of iterative updating target domain cluster parameters.

Original: spent on participant compensation?
Revised: We further provide more details of the hyperparameters used in TTAC. Finally, we present evaluation of TTAC with transformer backbone, ViT [4], additional evaluation of TTAC update epochs, the stability of TTAC under different data streaming orders and compared alternative target clustering updating strategies. A Derivations of Efficient Iterative Updating The mean and covariance for each target domain cluster can be naively estimated through Maximum

Revised: Likelihood Estimation (MLE) as below.

Revised: The existing solution in TTT++ [22] stores the recent one thousand testing samples and their features for MLE.

Revised: [Equation]

Revised: When N is very large, it is inevitable that a very large memory space must be allocated to store all features F ∈ R N × D , e.g. the VisDA dataset has 55k testing samples and a naive MLE prohibits efficient test-time training.

Revised: In the manuscript, we propose to online update target domain feature distribution parameters without caching sample features as Eq. 8.

Revised: The detailed derivations are now presented as follows.

Revised: Formally, we denote the running mean and covariance at step t − 1 as µ t − 1 and Σ t − 1 , and the test minibatch at step t as B t = { x i } i =1 ··· N B .

Revised: The following is the derivation of µ t .

Revised: [Equation]

Revised: To simplify the expression, we denote δ t = 1 N t (cid:80) x i ∈B t ( f ( x i ) − µ t − 1 ) , so µ t = µ t − 1 + δ t .

Revised: The following is the derivation of Σ t .

Revised: For the ease of calculation, we use the asymptotic unbiased estimator of Σ t as shown as below.

Revised: [Equation]

Revised: Furthermore

Revised: [Equation]

Revised: we give the formulations of the running mean µ tk and covariance Σ tk for the k th target domain cluster as below.

Revised: [Equation]

Revised: Similarly to N clip for the threshold used to clip the N t protecting the gradient of new test samples, we use N clip _ k as the threshold to clip the N tk for each target domain cluster.

Revised: B Hyperparameter Values

Revised: We provide the details of hyperparameters in this section.

Revised: Hyperparameters are shared across multiple

Revised: TTT protocols except for N C and N itr which are only applicable under one-pass adaptation protocols.

Revised: The details are shown as Tab. 9.

Revised: α k and β k respectively represent the prevalence of each category, here we set them to 1 over the number of categories.

Revised: N C indicates the length of the testing sample queue C under the sTTT protocol, and N itr controls the update epochs on this queue.

Revised: τ TC and τ PP are the thresholds used for pseudo label filtering.

Revised: N clip and N clip _ k are the upper bounds of sample counts in the iterative updating of global statistics and target cluster statistics respectively.

Revised: Finally λ is the coefficient of L ga , which takes the default value of 1.

Revised: All models are implemented by the

Revised: PyTorch 1.10.2 framework, CUDA 11.3 with an NVIDIA RTX 3090 GPU.

Revised: [Table]

Revised: [Table]

Revised: C Additional Evaluation C.1 Evaluation of TTAC with Transformer Backbone

Revised: In this section, we provide additional evaluation of TTAC with a transformer backbone, ViT [4].

Revised: In specific, we pre-train ViT on CIFAR10 clean dataset and then follow the sTTT protocol to do testtime training on CIFAR10-C.

Revised: The results are presented in Tab.

Revised: We report the average (Avg) and standard deviation (Std) of accuracy over all 15 categories of corruptions.

Revised: Again, TTAC consistently outperform all competing methods with transformer backbone.

Revised: C.2 Impact of TTAC Update Epochs on Cached Testing Sample

Revised: Under the sTTT protocol, we perform multiple iterations of adaptation on cached testing sample queue.

Revised: Preserving a history of testing samples is a commonly practice in test-time training.

Revised: For example, T3A [14] preserves a support set, which contains testing samples and the pseudo labels, to update classifier prototypes.

Revised: TTT++ [22] preserves a testing sample queue to estimate global feature distribution.

Revised: For these methods, both raw testing samples and features must be cached simultaneously, in comparison, we only cache the raw data samples and target domain clusters are estimated in an online fashion.

Revised: Here, we analyze the impact of TTAC update epochs on cached testing samples.

Revised: The results are presented in Tab. 11, where we make the following observations.

Revised: First, the error rate is decreasing as the number of epochs increases, while at the cost of more computation time.

Revised: But this can be solved by allocating a separate device for model adaptation.

Revised: Second, the error rate saturates at N itr =suggesting only a few epochs is necessary to achieve good test-time training on target domain.

Revised: [Table]

Revised: C.3 Impact of Data Streaming Order

Revised: The proposed sTTT protocols assumes test samples arrive in a stream and inference is made instantly on each test sample.

Revised: The result for each test sample will not be affected by any following ones.

Revised: In this section, we investigate how the data streaming order will affect the results.

Revised: Specifically, we randomly shuffle all testing samples in CIFAR10-C for 10 times with different seeds and calculate the mean

Revised: [Table]

Revised: [Table]

Revised: and standard deviation of test accuracy under sTTT protocol.

Revised: The results in Tab.

Revised: 12 suggest TTAC maintains consistent performance regardless of data streaming order.

Revised: C.4 Alternative Strategies for Updating Target Domain Clusters

Revised: In the manuscript

Original: [N/A]
Revised: [Table]

Revised: we presented target domain clustering through pseudo labeling.

Revised: A temporal consistency approach is adopted to filter out confident samples to update target clusters.

Revised: In this section

Revised: [Table]

Revised: we discuss two alternative strategies for updating target domain clusters.

Revised: Firstly, each target cluster can be updated with all samples assigned with respective pseudo label (Without Filtering).

Revised: This strategy will introduce many noisy samples into cluster updating and potentially harm test-time feature learning.

Revised: Secondly, we use a soft assignment of testing samples to each target cluster to update target clusters (Soft Assignment).

Revised: This strategy is equivalent to fitting a mixture of Gaussian through EM algorithm.

Revised: Finally, we compare these two alternative strategies with our temporal consistency based filtering approach.

Revised: The results are presented in Tab. 13.

Revised: We find the results with temporal consistency based filtering outperforms the other two strategies on 13 out of 15 categories of corruptions, suggesting pseudo label filtering is necessary for estimating more accurate target clusters.

Revised: C.5 Sensitivity to Hyperparameters

Revised: We evaluate the sensitivity to two thresholds during pseudo label filtering, namely the temporal smoothness threshold τ TC and posterior threshold τ PP .

Revised: τ TC controls how much the maximal probability deviate from the historical exponential moving average.

Revised: If the current value is lower than the ema below a threshold, we believe the prediction is not confident and the sample should be excluded from estimating target domain cluster.

Revised: τ PP controls the the minimal maximal probability and below this threshold is considered as not confident enough.

Revised: We evaluate τ TC in the interval between 0 and -1.0 and τ PP in the interval from 0.5 to 0.95 with results on CIFAR10-C levelglass blur corruption presented in Tab. 14.

Revised: We draw the following conclusions on the evaluations.

Revised: i)

Revised: There is a wide range of hyperparameters that give stable performance, e.g. τ TC ∈ [0 . 5 , 0 . 0 . 9] and τ PP ∈ [ − 0 .

Revised: 0001 , − 0 .

Revised: ii) When temporal consistency filtering is turn off, i.e. τ TC = − 1 . 0 , because the probability is normalized to between 0 and 1, the performance drops substantially, suggesting the necessity to apply temporal consistency filtering.

Revised: [Table]

Revised: [Table]

Revised: C.6 Improvement by KL-Divergence

Revised: Minimizing KL-Divergence between two Gaussian distributions is equivalent to matching the first two moments of the true distributions [18].

Revised: TFA or TTT++ aligns the first two moments through minimizing the L2/F norm, referred to as L2 alignment hereafter.

Revised: Although L2 alignment is derived from Central Moment Discrepancy [41], the original CMD advocates a higher order moment matching and the weight applied to each moment is hard to estimate on real-world datasets.

Revised: An empirical weight could be applied to balance the mean and covariance terms in TTT++, at the cost of introducing additional hyperparameters.

Revised: We also provide a comparison between KL-Divergence and L2 alignment on CIFAR10-C level 5 snow corruption in Tab.

Revised: 15 using the original code released by TTT++.

Revised: The performance gap empirically demonstrates the superiority of KL-Divergence.

Revised: Nevertheless, we believe a theoretical analysis into why KL-Divergence is superior under test-time training would be inspirational and we leave it for future work.

Revised: [Table]

Revised: D Limitations and Failure Cases

Revised: We discuss the limitations of our method from two perspectives.

Revised: First, we point out that TTAC implements backpropagation to update models at test stage, therefore additional computation overhead is required.

Revised: Specifically, as Tab. 8, we carried out additional evaluations on the per-sample wall clock time.

Revised: Basically, we discovered that TTAC is 2-5 times computationally more expensive than BN and

Revised: TENT.

Revised: However, contrary to usual recognition, BN and TENT are also very expensive compared with no adaptation at all.

Revised: Eventually, most test-time training methods might require an additional device for test-time adaptation.

Revised: We further discuss the limitations on test-time training under more severe corruptions.

Revised: Specifically, we evaluate TENT, SHOT and TTAC under 1-5 levels of corruptions on CIFAR10-C with results reported in Tab. 16.

Revised: We observe generally a drop of performance from 1-5 level of corruption.

Revised: Despite consistently outperforming TENT and SHOT at all levels of corruptions, TTAC’s performance at higher corruption levels are relatively worse, suggesting more attention must be paid to more severely corrupted scenarios.

Revised: [Table]

Revised: E Detailed results

Revised: We further provide details of test-time training on CIFAR10-C, CIFAR100-C and ModelNet40-C datasets in Tab. 17, 18 and 19 respectively.

Revised: The results in Tab. 17 and 18 suggest TTAC has a powerful ability to adapt to the corrupted images, and obtains the state-of-the-art performances on almost corruption categories.

Revised: [Table]

Revised: [Table]

Revised: [Table]

Revised: [Table]

Revised: [Table]

Revised: [Table]