NOTE: Robust Continual Test-time Adaptation Against Temporal Correlation
Authors: Taesik Gong
Jongheon Jeong
Taewon Kim
Yewon Kim
Jinwoo Shin
Sung-Ju Lee
Venue: NeurIPS 2022 Accept (2022)
Keywords: test-time adaptation
domain adaptation
deep learning
machine learning

Abstract: Test-time adaptation (TTA) is an emerging paradigm that addresses distributional shifts between training and testing phases without additional data acquisition or labeling cost; only unlabeled test data streams are used for continual model adaptation. Previous TTA schemes assume that the test samples are independent and identically distributed (i.i.d.), even though they are often temporally correlated (non-i.i.d.) in application scenarios, e.g., autonomous driving. We discover that most existing TTA methods fail dramatically under such scenarios. Motivated by this, we present a new test-time adaptation scheme that is robust against non-i.i.d. test data streams. Our novelty is mainly two-fold: (a) Instance-Aware Batch Normalization (IABN) that corrects normalization for out-of-distribution samples, and (b) Prediction-balanced Reservoir Sampling (PBRS) that simulates i.i.d. data stream from non-i.i.d. stream in a class-balanced manner. Our evaluation with various datasets, including real-world non-i.i.d. streams, demonstrates that the proposed robust TTA not only outperforms state-of-the-art TTA algorithms in the non-i.i.d. setting, but also achieves comparable performance to those algorithms under the i.i.d. assumption. Code is available at https://github.com/TaesikGong/NOTE.

NOTE: Robust Continual Test-time Adaptation Against Temporal Correlation
Taesik Gong, Jongheon Jeong, Taewon Kim, Yewon Kim, Jinwoo Shin, and Sung-Ju Lee KAIST Daejeon, South Korea
{taesik, paaesik.gong,i gon. jongheonj 1 maxkim139 yewon. kim, hatm:jjjnoos..rosss]... proffs))@kaiste ac.sst...... kc.
Abstract
Test-time adaptation (TTA) is emerging paradigm that addresses distributional shifts between training and testing phases without additional data acquisition or labeling cost; only unlabeled test data streams used for continual model adap- tation. Previous TTA schemes assume that the test samples are independent and identically distributed (i.i.d.), even though they often temporally correlated (non-i.i.d.) in application scenarios, e.g., autonomous driving. We discover that most existing TTA methods fail dramatically under such scenarios. Motivated by this, we present a new test-time adaptation scheme that is robust against non-i.i.d. test data streams. Our novelty mainly two-fold: (a) Instance-Aware Batch Normal- ization (IABN) that corrects normalization for out-of-distribution samples, and (b) Prediction-balancee Reservoir Sampling (PBRS) that simulates i.i.d. data stream from non-i.i.d. stream in class mass-balanced manner. Our evaluation with various datasets, including real-world non-i.i.d streams, demonstrates that the proposed ro- bust TTA not only outperforms state-of- saate-of-the-ate t-tthe-rtt TTA algorithms in the non-i.i.d. set- ting, but also achieves comparable performance to those algorithms under the i.i.d. assumption. Code is available at https: // g thub. com/ com/Taes wwweeaeeeeeeeeeeeeaeeeeee kGong/NOTE,
Introduction
While deep neural networks (DNNs) have been successful in several applications, their performance degrades under distributional shifts between the training data and data [32]. This distributional shift hinders DNNs from being widely deployed in many risk-sensitive applications, such as au- tonomous driving, medical imaging. and mobile health care, where new types of test data unseen during training could result in undesirable disasters. For instance, Tesla Autopilot has caused 12 "deaths" until recently [2]. address this problem, test-time adaptation (TTA) aims to adapt DNNs to the target/unseen domain with only unlabeled test data streams, without any additional data acqui- sition or labeling cost. Recent studies reported that TTA is a promising, practical direction to mitigate distributional shifts [29, 33, 41, 4, 44].
Prior TTA studies typically assume (implicitly or explicitly) that a target test sample x, time and the corresponding ground-trui -tuth label y/ (unknown to the learner) are independent and identically distributed (i.i.d.) following target domain, i.e., (x,, V/ is drawn independently from time-ime invariant distribution Pf (x, y). However, the distribution of online test samples often changes across the time axis, i.e.. (xe, ) ~ Px(x, y (b) many applications; for instance, Al-powered self-driving car's object encounter will be dominated by cars while driving on the highway, but less dominated by them on downtown where other classes such as pedestrians and bikes are visible. In human activity recognition, some activitics last for short term (c.g.. fall down), whereas certain activities last longer (e.g., a sleep). Figure I illustrates that some data distributions in the real world, such as autonomous driving and human activity recognition, are often temporally correlated. Considering that most
36th Conference on Neural Information Processing Systems (NcurIPS 2022).

---

Cor
Cyclil
Padesitaa
Mis
Passon
jillinn
Performance Overview
Classification error(%)
60
Source
BN Stats
(a) KITTI dataset.
ONDA
40
PL
Hurnin
Walking
Banniing
TENT
CoTTA
20-
NOTE
MMs
A Ammmy
(b) HARTH dataset.
l.d.
non-i.id.
Figure I: Illustration of test sample distributions along the time axis from real-world datasets: (a) autonomous driving (KITTI [9]) and (b) human activity recognition (HARTH [25]). They are temporally correlated.
Figure 2: Average classification error (%) of ex-
isting TTA methods and method (NOTE) CIFARIO-C [13]. The enror rates significantly increase under the non-i.i.d. setting compared with the i.i.d. setting. Lower is better.
existing TTA algorithms simply use an incoming batch of test samples for adaptation [29, 33, 41, 44], the model might be biased towards these imbalanced samples under the temporally correlated test streams. Figure 2 compares the performance of the state-of-the-as TTA algorithms under the i.i.d. and non-i.i.d.' conditions. While the TTA methods perform well under the i.i.d. assumption, their errors increase under the non-i.id. case. Adapting to temporally correlated test data results in overfitting to temporal distributions, which in turn harms the generalization of the model.
Motivated by this, we present a NOn-i.i.d TEst-time adaptation scheme, NOTE, that consists of two components: (a) Instance-Aware Batch Normalization (IABN) and (b) Prediction-Balancee Reservoir Sampling (PBRS). First, we propose a novel normalization layer, IABN, that eliminates the dependence on temporally correlated data for adaptation while being robust to distribution shifts. IABN detects out-of-distribution instances sample by sample and corrects via instance-aware normalization. The key idea of IABN is synthesizing Batch Normalization (BN) [16] with Instance Normalization (IN) [37] in unique way; calculates how different the learned knowledge (BN) is from the current observation (IN) and corrects the normalization by the deviation between IN and BN. Second, we present PBRS that resolves the problem of overfitting to non-i.i.d. samples by mimicking i..dd samples from non-i.i.d. streams. By utilizing predicted labels of the model, PBRS aims for both time-uniform sampling and class-uniform sampling from the non-i.i.d. streams and stores the 'simulated' i.i.d. samples in memory. With the i.i.d.-like batch in the memory, PBRS enables the model to adapt to the target domain without being biased to temporal distributions.
We evaluate NOTE with state-of-the-art TTA baselines [29, 33, 22, 27, 4, 44] multiple datasets, including common TTA benchmarks (CIFAR1O-C, CIFAR 100-C, and ImageNet-C [13]) and real- world non-i.i.d. datasets (KITTI [9]. HARTH [25], and ExtraSensory [38]). Our results suggest that NOTE not only significantly outperforms the baselines under non-i.i.d. test data, e.g., it achieves a 21.1% error rate CIFAR which is average 15.1% 1% lower than the sfate-of-the-a art method [4], but also shows comparable performance even under the i.i.d. assumption, e.g., 17.6% error on CIFAR10-C where the best baseline [44] achieves 17.8% error. Our ablative study demonstrates the individual effectiveness of IABN and PBRS and further highlights their synergy when jointly used.
Finally, summarize the key characteristics of NOTE. First, NOTE is batch-free inference algorithm (requiring a single instance for inference), different from the state-of-the-ad TTA algo- rithms [29, 33, 41, 4, 44] where batch of test data is necessary for inference to estimate normalization statistics (mean and variance). Second, while some recent TTA methods leverage augmentations to improve performance at the cost of additional forwarding passes [35, 44], NOTE requires only a single forwarding pass. NOTE updates only the normalization statistics and affine parameters in IABN, which is, e.g., approximately 0.02% of the total trainable parameters in ResNet18 [12]. Third, NOTE's additional memory overhead is negligible. merely stores predicted labels of test data to run PBRS. These characteristics make NOTE easy apply to any existing AI system and particularly, are beneficial in latency -ennciveensitive tasks such as autonomous driving and human health monitoring.
We use the terms temporally correlated and non-i.i.d. interchangeably in the context of test-time adaptation.

---

2 Background
2.1 Problem setting: test-time adaptation with non-i.id. streams
Test-time adaptation. Let Ds { } be the data from the source domain and Dy (x }} be the data from the target domain to adapt to. Each data instance and the corresponding ground-trum truth label pair (x,,)) 9:) X x ) in the source domain follows a probability distribution (s(x, v). Similarly, each target test sample and the corresponding label at test time 6, (X4, M1. E X V follows probability distribution (x. y) where y is unknown for the learner. The standard covariate shift assumption in domain adaptation is defined as Ps(x) * Pr(x) and (s(y\x) = Pr (z/xx [32]. Unlike traditional domain adaptation that uses Ds and X collected beforehand for adaptation, test-time adaptation (TTA) continually adapts a pre-trained model (o) from Ds. by utilizing only X2 obtained test time I.
TTA on non-i.i.d. streams. Note that previous TTA mechanisms typically assume that each target sample (Xe, 3r) E X² >Vis independent and identically distributed d.) following time-invariant distribution (x y). However, the data obtained at test time is non-i.i.d. in many scenarios. By non-i.idd., we refer to distribution changes over time, i.e., (x,, (x, y (t), which is a practical setting in many real world applications [46].
2.2 Batch normalization in TTA
Batch Normalization (BN) [16] is widely-used training technique in deep neural networks it reduces the internal covariant shift problem. Let f E RBxxxL denote batch of feature maps in general, where B, C, and L denote the batch size, the number of channels, and the size of each feature map, respectively. Given the statistics of the feature maps for normalization, say mean fa and variance a², BN is channel-wise, i.e. μ. o² E RC and computes:
BN e. Pa: o.) : f. Me V + +B,
where and 3 are the affine parameters followed by the normalization, and > 0 is small constant for numerical stability.
Although a conventional way of computing BN in test-time is to set μ and o² as those estimated from training (or source) data, say j and σ², the state-of-the-art TTA methods based adapting BN layers [29, 33, 41, 44] instead use the statistics computed directly from the recent test batch to de-bias distributional shifts test-time, i.e.:
1 Σ f. and 0² BL 6.
Σ (fo,c,t ic.)
P2 BL
This practice is simple yet effective under distributional shifts and is thus adopted in many recent TTA studies [29, 33, 41, 44], Based on the test batch statistics, they often further adapt the affine parameters via entropy minimization of the model outputs [41] update the entire parameters with self-training [44].
3 Method
In the same vein as previous work [29, 33, 41], we focus on adapting BN layers in the given model to perform TTA, and this includes essentially two approaches: (a) re-calibrating (or adapting) channel- wise statistics for normalization (instead of using those learned from training), and (b) adapting the affine parameters (namely, 7 and (3) after the normalization with respect to certain objective based on test samples, e.g., the entropy minimization of model outputs [41].
Under scenarios where test data are temporally correlated, however, naïvely adapting to the incoming batch of test samples [29, 33, 41, 44) could be problematic for both approaches: the batch is now more likely to (a) remove instance-wise variations that are actually useful to predict y, i.e., the "contents" rather than "styles" through normalization, and (b) include a bias p(y) rather than uniform, which can negatively affect the test-time adaptation objective such entropy minimization.

---

NorsLid.
temporally comreated)
(1) Noralize Predict via LABN
Cornect INN stats
(2) Manage Memory & Adapt LABN vaa PORS
disribuion igared
VXEE
Timm-uufom
BN LABN
Adapi
pred -nfor---ffmmmmm
NN Instoce start
Nomalzzed oupput LABN
Class A
Ne.
R.4. Racefiu
Ri,0,
Ruu
Class
distribution
Ule- (k..0)
BNN
BN LABN
Pe-so de-se
Re.P, RacePax
RL. P. Pao PAL
(NL-
6002
Figure 3: An overview of the proposed methodology: Instance-Awar Batch Normalization (IABN) and Prediction Ballance Reservoir Sampling (PBRS). IABN aims to detect non-i.i.d. streams and in turn corrects the normalization for inference. PBRS manages data in time- and prediction-unifone manner from non-i.i.d. data streams and gradually adapts IABNs with the balanced data afterward.
We propose two approaches to tackle each of the failure modes of adapting BN under temporal correlation. Our method consists of two components: (a) Instance-Award Batch Normalization (IABN) (Section $3.1) overcome the limitation of BN under distribution shift and (b) Prediction- Balanced Reservoir Sampling (PBRS) (Section $3.2) to combat with the temporal correlation of test batches. Figure 3 illustrates the overall workflow of NOTE with IABN and PBRS.
3.1 Instance-Aware Batch Normalization
As described in Section $2.2, recent TTA algorithms rely solely on the test batch to re-calculate BN statistics. We argue that this common practice does not successfully capture the feature statistics to normalize the feature map E RBxCxI. under temporal correlation in the test batch B. principle, standardizing a given feature map f.: by the statistics p.: o computed across and L is posited on premise that averaging information across B can marginalize out uninformative instance- variations for predicting y. Under temporal correlation in B, however, this assumption is no longer valid, and averaging across B may not fully de-correlate useful information in f. f. from p.c and o²
In an attempt to bypass such "over-wile whitening" effect of using i. and o² in test-time under temporal correlation, we propose correcting normalization statistics on a per-sample basis: specifically, instead of completely switching from the original statistics of (j, o²) into (f.,, o²), our proposed Instance- Aware Batch Normalization (IABN) considers the instance-wise statistics ju, o² E IRB.C of f similarly to Instance Normalization (IN) [37], namely:
Po.c = + D eo and 0².- == E in,a)²
(3)
We assume that Pb and of. follow the sampling distribution of a sample size L in ( σ²) as the population. Then the corresponding variances for the sample mean ub.c and the sample variance o can be calculated as:
and 82.c L 7-1 0² L
20
IABN corrects (a. σ²) only in cases when As.c. (and o significantly differ from P. (and o?). Specifically, we propose to use the following statistics for TTA:
1 = P. + (pr. Pai asp,e): and
(a
IADN 0² (6 o2. asga,c) h,o
X
i
where (b;;; A) =
I ++ X,
if <
is the soft-shrinkage function. (5)
0,
otherwise
2 0 is the hyperparameter of IABN that determines the confidence level of the BN statistics. A high value of relies more on the learned statisties (BN), while low value of a is in favor of the current statisties measured from the instance. Finally, the output of IABN can be described as:

---

data in Algorithm Prediction-Balanced Reservoir Sampling
Input: target stream
(x((((), memory bank M of capacity N 1: Mi < @ for i = 1,... N: and m|c] <- for e E y
2: for E {1,.... T) do
3:
n[ye] f- </gr]
// increase the number of samples encountered for the class
4:
m.c] < ((x, y) E Mly = c}} for E y // count instances per class in memory
5:
ir [M] < then // if memory is not full
6:
Add (x,, 0t) to M
7:
else
8:
C argmax m[c] I/ get majority class(es)
9:
if Ut & C' then // if the new sample is not majority
b Prediction- -allnneed
10:
Randomly pick M[]] == (x;, vis) where ÿ E C
11:
Mid (xt, (t)) // replace it with a new sample
12:
else
Reservoir Sampling
13:
Sample Uniform (0, 1) p < m m then
15:
Randomly pick M == (x; vi) where di = Ut
Mi + (x,, Ut) replace it with a new sample
fo.c.
Mbc
(f, Per 8² Pr,eo obr))= =
+
(6)
V / b,c. )2 +
Observe that IABN becomes IN and BN when a 0 and oC, respectively. If one chooses too small 2 0, IABN may remove useful features, e.g., styles, of input (as with IN), which can degrade the overall classification (or regression) performance [30]. Hence, it is important to choose an appropriate Nevertheless, we found that good choice of is not too sensitive across tested scenarios, where we chose a = 4 for all experiments. This way, IABN can be robust distributional shifts without the risk of eliminating crucial information to predict y.
3.2 Adaptation via Prediction-Balancee Reservoir Sampling
Temporally correlated distributions lead to undesirable bias in p(v). and thus adaptation with a batch of consecutive test samples negatively impacts the adaptation objective, such as entropy minimization [41]. To combat this imbalance, we propose Prediction-Balanced Reservoir Sampling (PBRS) that mimics i.idd samples from temporally correlated streams with the assistance of a small (e.g., mini-batch size) memory. PBRS combines time-uniform sampling and prediction-uniform sampling to simulate i.i.d. samples from the non-i.i.d. streams. For time-uniform sampling, we adopt reservoir sampling (RS) [40], proven random sampling algorithm collect single pass on a stream without prior knowledge of the total length of data. For prediction-unifome sampling, first use the predicted labels to compute the majority class(es) in the memory. We then replace a random instance of the majority class(es) with a new sample. We detail the algorithm of PBRS pseudo-code in Algorithm 1. We found that these two heuristics can effectively balance samples among both time and class axes, which mitigates the bias in temporally correlated data.
With the stored samples in the memory, update the normalization statistics and affine parameters in the IABN layers. Note that IABN assumes Ph.c. and of follow the sampling distribution of ( σ²) and corrects the normalization if it.c and o are of distribution. While IABN is resilient to distributional shifts to a certain extent, the assumption might not hold under severe distributional shifts. Therefore, we aim to find better estimates of μ., 2 in IABN under distributional shifts via PBRS. Specifically, we update the normalization statistics, namely the means μ and N variances 2², via exponential moving average: (a) ,4, (1 m) + m - i,, and (b) of (1-m)o?_ + o where m is momentum and N is the size of the memory. We further optimize the affine parameters, scaling factor 7 and bias term 3, via a single backward pass with entropy minimization, similar previous study [41]. These parameters account for only around 0.02% of the total trainable parameters in ResNet18 [12]. The LABN layers adapted with the
5

---

N samples in the memory every N test samples. We set the memory size N as 64 following the common batch size of existing TTA methods [33, 4, 41] ensure fair memory constraint.
3.3 Inference
NOTE infers each sample via single forward pass with IABN layers. Note that NOTE requires only a single instance for inference, different from the state-of-the-ar TTA methods [29, 33, 41. 4, 44] that require batches for every inference. Moreover, NOTE requires only one forwarding pass for inference, while multiple forward passes are required in other TTA methods that utilize augmentations [35, 44]. The batch-free single-forward inference of NOTE is beneficial in latency-sensitive tasks such as autonomous driving and human health monitoring. After inference, NOTE determines whether to store the sample and predicted label in the memory via PBRS.
Experiments
We implemented NOTE and the baselines via the PyTorch framework [31].2 We ran all experiments with three random seeds and report the means and standard deviations. Additional experimental details, e.g., hyperparameters of the baselines and datasets, are specified in Appendix A.
Baselines. We consider the following baselines including the faate-of-the-an test-time adaptation algorithms: Source evaluates the model trained from the source data directly on the target data without adaptation. Test-time normalization (BN stats) [29, 33] updates the BN statistics from batch of test data. Online Domain Adaptation (ONDA) [27] adapts batch normalization statistics to target domains via batch of target data with exponential moving average. Pseudo-Label (PL. [22] optimizes the trainable parameters in BN layers via hard pseudo labels. We update the BN layers only in PI., as done in previous studies [41, 44J. Test entropy minimization (TENT) [41] updates the BN parameters via entropy minimization. Laplacian Adjusted more conservative approach: it modifies the classifier's output probability and not the internal parameters of the model itself. By doing so, it prevents the model parameters from over-adapting to the test batch. Continual test-time adaptation (CoTTA) [44] reduces the error accumulation by inteentttion-vveraeee predictions. It avoids catastrophic forgetting by
Estimation (LAME) [4] takes
using weight-averaged and stochastically restoring a part of the neurons to the source pre-trained weights.
Adaptation and hyperparameters. We assume the model pre-trained with source data is available for TTA. In NOTE, we replaced BN with IABN during training. We set the test batch size as 64 and the adaptation epoch as one for adaptation, which is the most common setting among the baselines [33, 4, 41J. Similarly, we set the memory size N as 64 and adapt the model every 64 samples in NOTE to ensure fair memory constraint. We conduct online adaptation and evaluation, where the model is continually updated. For the baselines, we adopt the best values for the hyperparameters reported in their papers or the official codes. We followed the guideline to tune the hyperparameters when such a guideline was available [44]. We use fixed values for the hyperparameters of NOTE, soft- soft-shrinkage width a 4 and exponential moving average momentum m 0.01, and update the affine parameters via the Adam optimizer [18] with learning rate of / = 0.0001 unless specified. We detailed hyperparameter information of the baselines in Appendix A.
Datasets. We use CIFARIO-C, CIFAR100-C, and ImageNet-C [13] datasets that are common
TTA benchmarks for evaluating the robustness to corruptions [29, 33, 41, 44, 4]. Both CI- FAR10/CIFAR 100 [19] have 50,000/10,000 training/test data. ImageNet [7] has
training/test data. CIFAR LO/CIFRR 100/ImageNet have 10/100/1, 1,00 classes, respectively. CIFAR 10- CICIFARIO0- C/00C//mmaeNNee-CCCCCCCCC apply 15 types of corruption to CIFARIO/CIFAL 100/mmaeeNet test data. Similar to previous studies [29, 33, 44J, we use the most severe corruption level of 5. We use ResNet18 [12] as the backbone network and pre-trained it the clean training data. Following prior studies [23, 15, 43, 42], we adopt Dirichlet distribution to generate synthetic non-i.i.d. test streams from the originally i..dd CIFARIO/100 data. The details are provided in Appendix A.2. We vary the Dirichlet concentration parameter ó to simulate diverse streams and visualize the resulting data in Figure 4. We use 0.1 as the default value unless specified. For ImageNet, we sort the test stream
hnttps:/ggihhbb how.aaaa..c.ctaaaaanoooooo/////

---

Table Average classification error (%) and their corresponding standard deviations on CIFARIO- C/100-C and ImageNet- under temporally correlated (non-ii.d.) and uniformly distributed (i.i.d.) test data stream, Bold fonts indicate the lowest classification errors, while Red fonts show performance degradation after adaptation. Values encompassed by parentheses refer to NOTE used directly with test batches (without using PBRS). Averaged over three runs.
Temporally correlated stream
Uniformly distributed test stream
Method
CIFARIO-C
CIFAR100-C
ImageNet-C
Avg
CIFARIO-C
CIFAR100-C
ImageNet-C
Avg
Source
42.3 1.1
66.6
86.1 0.0
65.0
42.3
6.1
86.1 0.0
65.0
Stats [29]
73.4 1.3
6.3
96.9 0.0
78.5
0.4
46.6
7..0
48.1
ONDA [27]
63.6 1,0
0.3
8.0
67.4
21.7
4.1
7.09
48.0
PL [22]
1.84
6..4
9.0
80.2
2.2
4.3
7.,4
46.4
TENT [41]
7.74
0.6
9..9
80.1
18.
402
7..0
45.0
LAME
36.2
6.3
60.7
4.5
68.8
86.3
66.4
CoTTA [44]
0.7
0.2
0.0
78.9
0..
4..
71.5
44,6
2.55
0.0
7.0
45.6
NOTE
21.1 + 0.6
47.0 0.1
80.6 + 0.1
49.6
(17.6
(.,)
(71.7
(43.4)
100
Source
TENT LAVE NOTE
100
0.001
9has
Clossifcaaion error (5)
CNDA
Clessfficaioon eroo((5)
Dirichie paremeter
1.0
40x
unioom
20
Cleas distribtion
10.0
66
Drichlel parameter
Batchh size
Figure 4: Illustration of syn- thetic non-i.idd streams sampled from Dirichlet distribution vary- ing 8 on CIFAR1O-C. uniform denotes an i.i.d. condition. The lower the 8, the more temporally correlated the distribution.
Effect Dirichlet concen-
Effect of batch size.
tration parameter
Figure 5: Average classification error (%) under the non-i.i.d setting with CIFARIOS 10-C dataset. We vary (a) the Dirichlet con- centration parameter 5 investigate the impact of the degree temporal correlation and (b) batch size to understand the be- haviors of the TTA methods. Averaged over three runs. Lower is better.
as the number of test samples per class is not enough for generating temporally correlated streams via Dirichlet distribution. We additionally provide experiment with MNIST-C data [28] in the appendix, which shows similar takeaways to our experiments with CIFARIO-CICIFAR 10A--10000O-C/eeeeeeeeee
Overall result. Tables shows the result under the temporally correlated (non-i.i.d.) data and the uniform (i.i.d)) data, respectively. We observe significant performance degradation in the baselines under the temporally correlated setting. For BN Stats, PL, TENT, and CoTTA, this degradation is particularly due to the dependence on the test batch for the re-calculation of the BN statistics. Updating the batch statisties from test data via exponential moving average (ONDA) also suffers from the temporally correlated data. This indicates relying on the test batch for re-calculating the BN statistics indeed cancels out meaningful instance-wise variations under temporal correlation. Interestingly, LAME works better in the non-i.i.d. setting than in the i..dd setting, which is consistent with previous reports [4]. The primary reason is, as stated by the authors, it "discourages deviations from the predictions of the pre-trained model," and thus it "does not noticeably help in i.i.d and class-balanced scenarios."
NOTE achieves on average 11.1% improvement over the best baseline (LAME) under the non-i.i.d. setting. With the i.i.d. assumption, NOTE still achieves comparable performance to the baselines. When we know the target samples are i.i.d., we can simply use the test batch without using PBRS. For this variant version of NOTE, we update IABN with incoming test batches directly using ten times higher learning rate of 0.001 following previous work [41, 44]. We report the result of the variant

---

Table Average classification error (%) and their corresponding standard deviations on three real test data streams: KITTI, HARTH, and ExtraSensory. Bold fonts indicate the lowest classification errors, while Red fonts show performance degradation after adaptation. Averaged over three runs.
Real test stream
Method
KITTI
HARTH
ExtraSensory
Avg
Source
2.3
62.6 8.5
50.2 2.2
41.7
BN Stats [29]
0.5
68.6 1.1
56,0
53,4
ONDA [27]
0.5
69.3 1.1
4.5
47.9
PL [22]
0.3
6,6
56,0
53.3
TENT [41]
3.2
6.71
56.0
53.2
LAME [4]
21.3
61.0 10.0
50.7
41.0
COTTA [44]
0.6
68.7 1.1
5..0
53.4
NOTE
10.9 3.6
51.0 + 5.6
4
35.8
version of NOTE in the parentheses, which achieves on average 2.2% improvement further when the i..dd assumption known.
Effect of the degree of temporal correlation. We also investigate the effect of the degree of temporal correlation for TTA algorithms. Figure 5a shows the result. The lower is, the severer the temporal correlation becomes. The rates of most of the baselines deteriorate 5 decreases, which shows that the existing TTA baselines are susceptible to temporally correlated data. NOTE shows consistent performance among all ó values, indicating robustness under temporal correlation.
Effect of batch size. While we experiment with a widely-used value of 64 the batch size (or memory size in NOTE), one might be curious about the impact of batch size under temporally correlated streams. Figure 5b shows the result with six different batch sizes. As shown, NOTE is much affected by the batch size, while most of the baselines recover performance degradation as the batch size increases. This because higher batch size has better chance of adaptation with balanced samples under temporally correlated streams. Increasing the batch size, however, mitigates temporal correlation the expense of inference latency and adaptation speed.
4.1 Real-distribations with domain shift
Datasets.
We evaluate NOTE under three real-world distribution datasets: object detection in autonomous driving (KITTI [9]), human activity recognition (HARTH [25]), and user behavioral
context recognitio (ExtraSensory [38]). Additional dataset-specific details are in Appendix A.2.
KITTI is well-known autonomous driving dataset that provides consecutive frames that contains natural temporal correlation in driving contexts. We adapted from KITTI to KITTI-Rain [11] a dataset that converted KITTI images rainy images. This contains 7,481/7,800 train/test samples with nine classes. We use ResNet50 [12] pre-trained on ImageNet [8] as the backbone network.
HARTH was collected from 22 users in free-living environments for seven days. Each user was equipped with two three-axial Axivity AX3 accelerometers for recording human activities. use 15 users collectively as the source domain and the remaining seven users as each target domain, which entails natural domain shifts from source users to target users as different physical conditions make domain shifts across users. HARTH contains 82.544/39,377 train/test samples with 12 classes. We report the average error over all target domains. We use four one-dimensional convolutional layers followed by one fully-connected layer the backbone network for HARTH.
The Extrasensory dataset collected users' own smartphone sensory data (motion sensors, audio, etc.) in the wild for seven days, aiming to capture people's 's authentic behaviors in their regular activities. We use 16 users as the source domain and seven users as target domains. ExtraSensory includes 17,777/4.866 train/test data with five classes. For ExtraSensory, we use two one-dimensional convolutional layers followed by one fully-connected layer as the backbone network. For both HARTH and ExtraSensory models, single BN layer follows each convolutional layer.

---

Table Average classification error (%) and corresponding standard deviations of varying ablation settings on CIFARIO-C/100-C under temporally correlated (non-i..d.) and uniformly distributed (i.i.d.) test data stream, Bold fonts indicate the lowest classification errors. Averaged over three runs.
Temporally correlated test stream
Uniformly distributed test stream
Method
CIFARIO-C
CIFAR100-C
Avg
CIFARIO-C
CIFAR
Avg
Source
42.3 1.1
66,6 0.1
54.4
42.3 1.1
66.6 0.1
54.4
IABN
0.6
5.1
39.5
0.6
5..5
39.5
PBRS
27.5 1.0
5.2
39.6
25.8
0.1
38.5
IABN+RS
1.5
482
34.3
20.7 = 0.6
4.3
34.5
IABN+PBRS
21.1 + 0.6
47.0
34.0
20.1 + 0.5
46.4
33.2
Result. Table 2 shows the result for the real-world datasets. The overall trend is similar the tem- poral correlation experiments with CIFAR 10-C/CIFAR I (0-CC/mageNet-CC datasets, which indicates that the real-world datasets are indeed temporally correlated. NOTE consistently reduces errors after adaptation under real-world distributions. We believe this demonstrates NOTE is a promising method be utilized in various real-world ML applications with distributional shifts. We illustrate real-time classification error changes for real-world datasets in the appendix.
4.2 A Allaioon study
We conduct ablative study to further investigate the individual components' effectivvness. Table 3 shows the result under both i...d and non-i.i.d. settings. Using IABN alone significantly reduces error rates over Source, demonstrating the effectiveness of correcting normalization for out-of-distribution samples. Using PBRS with BN shows comparable improvement with the IABN-only result. Note that there only marginal gap (around 1%) between the non-i.i.d. and i.i.d. results in PBRS. This indicates that PBRS could effectively simulate i.i.d. samples from non-i.i.d. streams, The joint use of IABN and PBRS outperforms using either of them, meaning that PBRS provides IABN with better estimates for the normalizing operation. In addition, PBRS is better than Reservoir Sampling (RS) that has been a strong baseline continual learning [17, 5]. This shows storing prediction-be balanncedddd sampling in addition to time-umiie uniform sampling leads to better adaptation in TTA. We also investigated the joint use of IN and PBRS with the combination of IABN and PBRS on CIFAR100-C, and the
result shows that IABN+PBRS (47.0%) achieves a lower error rate than IN+PBRS (52.5%) on CIFAR100-C under temporal correlation.
Related work
Test-time adaptation. Test-time adaptation (TTA) attempts to overcome distributional shifts with test data without the cost of data acquisition or labeling. TTA adapts to the target domain with only test data on the fly. Most existing TTA algorithms rely on a batch of test samples to adapt [29, 33, 41, 44] to re-calibrate BN layers on the test data. Simply using the statistics of a test batch in BN layers improves the robustness under distributional shifts [29, 33). ONDA [27] updates the BN statistics with test data via exponential moving average. TENT [41] further updates the scaling and bias parameters in BN layers via entropy minimization.
Latest TTA studies consider distribution changes of test data [4, 44). LAME [4] corrects the output probabilities of a classifier rather than tweaking the model's inner parameters. By restraining the model from over-adapting to the test batch, LAME allows the model to be more robust under non- ii.d. scenarios. However, LAME does not have noticeable performance gains in class-balanced, standard i.i.d. scenarios. The primary reason is, as stated by the authors, it "discourages deviations from the predictions of the pre-trained model," and thus it "does not noticeably help in i.i.d and scenarios." CoTTA [44] aims to adapt to continually changing target environments via weight-averaged teacher model, weight-averagen augmentations, and stochastic restoring. However, CoTTA assumes i.i.d. test data within each domain and updates the entire model which increases computational costs.
There also exist works [35, 24] utilizing comain-speciffe self-supervision to resolve the distribution shift with test data, but are complementary to ours, i.c., we can also optimize the self-supervised loss

---

instead of the entropy loss, and not applicable to our setups of real test data streams as designing good self-supervision for these domains is highly non-trivial.
Replay memory. Replay memory is one of the major approaches in continual learning; it manages a buffer to replay previous data for future learning to prevent catastrophic forgetting. Reservoir sampling [40] is random sampling algorithm that collects time-uniform samples from unknown sample streams with a single pass, and it has been proven to be a strong baseline in continual learning [17, 5]. GSS [1] stores samples
memory in way that maximizes the gradient direction among those samples. A recent study modifies reservoir sampling to balance classes under imbalanced data when the labels are given [6]. Our memory management scheme (PBRS) is inspired by these studies to prevent catastrophic forgetting in test-time adaptations.
6 Discussion and conclusion
This paper highlights that real-world distributions often change across the time axis, and existing test- time adaptation algorithms mostly suffer from the non-i.i.d. test data streams. To address this problem, we present NOn-i..d. TEst-time adaptation algorithm, NOTE. Our experiments evaluated robustness under corruptions and domain adaptation on real-worla distributions. The results demonstrate that NOTE not only outperforms the baselines under the non-i.i.d./real distribution settings, but it also shows comparable performance under the i.i.d. assumption. We believe that the insights and findings from this study are meaningful step toward the practical impact of the test-time adaptation paradigm.
Limitations. NOTE and most state-of-the-art TTA algorithms [29, 22, 27, 33, 41, 44) assume that the backbone networks are equipped with BN (or IABN) layers. While BN is widely-used component in deep learning, several architectures, such as LSTMs [14] and Transformers [39]. do not embed BN layers. recent study uncovered that BN is advantageous in Vision Transformers [45], showing potential room to apply our idea to architectures without BN layers. However, more in-depth studies are necessary to identify the actual applicability of BN (or IABN) to those architectures. While LAME [4] is applicable to models without BN, its limitation is the performance drop in i.i.d. scenarios, as shown in both its paper and our evaluation. While NOTE shows its effectiveness in both non-i.i.d and i.i.d. scenarios, remaining challenge is to design an algorithm that generalizes to any architecture. We believe the findings and contributions of our work could give valuable insights to future endeavors on this end.
Potential negative societal impacts. As TTA relies on unlabeled test samples and changes the model accordingly, the model is exposed to potential data-driven biases after adaptation, such as fairness issues [3] and adversarial attacks [36]. In some sense, the utility of TTA comes at the expense of exposure to threats. This vulnerability is another crucial problem that both ML researchers and practitioners need to take into consideration. In addition, TTA entails additional computations for adaptation with test data, which may have negative impacts on environments, e.g., increasing electricity consumption and carbon emissions [34]. Nevertheless, we believe NOTE would not exacerbate this issue as it is computationally efficient as mentioned in Section $1.
Acknowledgments and Disclosure of F Funding
We thank the anonymous reviewers for their constructive feedback and suggestions to improve this paper. This work was supported in part by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIP) (No.NRF-2020R) A2C1 (24100)))2 and Center for Applied Research in Artificial Intelligence (CARAI) grant funded by Defense Acquisition Program Administration (DAPA) and Agency for Defense Development (ADD) (UD190031RD)
References
[1] Rahaf Aljundi, Min Lin, Baptiste Goujaud, and Yoshua Bengio. Gradient based sample selection for online continual learning. Advances neural information processing systems, 32, 2019.
[2] Elon Bachman and I Capulet. Digital record of tesla crashes resulting in death, May 2022.
10

---

[3] Solon Barocas, Moritz Hardt, and Arvind Narayanan. Fairness in machine learning. Nips nutorial, 1:2, 2017.
[4] Malik Boudiaf, Romain Mueller, Ismail Ben Ayed, and Luca Bertinetto. Parameter- free online test-time adaptation. In Proceedings of Conference on Computer Vision and Pattern Recognition, 2022.
[5] Arslan Chaudhry, Marcus Rohrbach, Mohamed Elhoseiny, Thalaiyasingam Ajanthan, Puneet Dokania, Philip HS Torr, and Marc' Aurelio Ranzato. Continual learning with tiny episodic memories. JCMI. Workshop: Multi-Tass and Lifelong Reinforcement Learning, 2019.
[6] Aristotelis Chrysakis and PranceFran Moens. Online continual learning from imbalanced data. In Hal Daumé III and Aarti Singh, editors, Proceedings of the 37th International Confer- ence Machine Learning. volume 119 of Proceedings of Machine Learning Research, pages 1952-1961. PMLR, 13-18 Jul 2020.
[7] Jia Deng, Wei Dong. Richard Socher, Li-Jia Li. Kai Li, and Li Fei-Fei. Imagenet: A large- scale hierarchical image database. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, pages 248-255, 2009.
[8] Jia Deng. Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large- scale hierarchical image database. In 2009 IEEE conference computer vision and pattern recognition, pages 248-255. leee, 2009.
[9] A Geiger, P Lenz, C Stiller, and R Urtasun. Vision meets robotics: The kitti dataset. The International Journal of Robotics Research, 32(11): 1):121111113 2013.
[10] Clément Godard, Oisin Mac Aodha, and Gabriel J. Brostow. Unsupervised monocular depth estimation with left-right consistency, 2016.
[11] Shirsendu Sukanta Halder, lean-François Lalonde, and Raoul de Charette. Physics-based rendering for improving robustness to rain, 2019.
[12] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 770-778, Los Alamitos, CA, USA, jun 2016. IEEE Computer Society.
[13] Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common corruptions and perturbations. Proceedings of the International Conference on Learning Representations, 2019.
[14] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735-178)) 1997.
[15] Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown. Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06333 2019.
[16] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Francis Bach and David Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pages 4484456, Lille, France, 07-09 Jul 2015. PMLR.
[17] David Isele and Akansel Cosgun. Selective experience replay for lifelong learning. In Proceed- ings of the Thirty-Second AAAI Conference on Artificial Intelligence and Thirtieth Innovative Applications of Artificial Intelligence Conference and Fighth AAAI Symposium on Educational Advances in Artificial Intelligence, AAAI 11/1AA/AT///AAAAA" 18. AAAI Press, 2018.
[18] Diederick P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Interna- tional Conference on Learning Representations (ICLR), 2015.
[19] A. Krizhevsky and G. Hinton. Learning multiple layers features from tiny images. Master's thesis, Department of Computer Science, University of Toronto, 2009.
11

---

[20] Nicholas D. Lane, Emiliano Miluzzo, Hong Lu, Daniel Peebles. Tanzeem Choudhury, and Andrew T. Campbell. A survey of mobile phone sensing. IEEE Communications Magazine, 4809);140-150, 2010.
[21] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, (6(11)2277-23222 1998.
[22] Dong-Hyun Lee et al. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on challenges in representation learning, ICML, page 896, 2013.
[23] Qinbin Li, Yiqun Diao, Quan Chen, and Bingsheng He. Federated learning on non-iid data silos: An experimental study. arXiv preprint Stti:2002.000799 2021.
[24] Yuejiang Liu, Parth Kothari, Bastien van Delft, Baptiste Bellot-Gurlet, Taylor Mordan, and Alexandre Alahi. Tit++: When does self-supervised test-time training fail or thrive? Advances in Neural Information Processing Systems, 34, 2021.
[25] Aleksej Logacjov, Kerstin Bach, Atle Kongsvold, Hilde Bremseth Bärdstu, and Paul Jarle Mork. Harth: A human activity recognition dataset for machine learning. Sensors, 21(23), 2021.
[26] Iya Loshchilov and Frank Hutter. Sgdr: Stochastic gradient descent with warm restarts. 2017.
[27] Massimiliano Mancini, Hakan Karaoguz, Elisa Ricci, Patric Jensfelt, and Barbara Caputo. Kit- ting in the wild through online domain adaptation. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1103-1109. IEEE, 2018
[28] Norman Mu and Justin Gilmer. Mnist-c: A robustness benchmark for computer vision. arXiv preprint arXiv: 1906. 02337, 2019.
[29] Zachary Nado, Shreyas Padhy, D Sculley, Alexander D' Amour, Balaji Lakshminarayanan, and Jasper Snoek. Evaluating prediction-time batch normalization for robustness under covariate shift. arXiv preprint arXiv:2006. 10963, 2020.
[30] Hyeonseob Nam and Hyo-Eun Kim. Batch-instance normalization for adaptively style-invariant neural networks. Advances in Neural Information Processing Systems, 31, 2018.
[31] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang. Zachary Vito,o, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high- performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d' d'Alché- Buc, E. Fox, and Garnett, editors, Advances in Neural Information Processing Systems 32, Curran Associates, Inc., 2019.
pages
[32] Joaquin Malhonero-Candell Masashi Sugiyama, Anton Schwaighofer, and Neil D Lawrence. Dataset shift in machine learning. Mit Press, 2008
[33] Steffen Schneider, Evgenia Rusak, Luisa Eck, Oliver Bringmann, Wieland Brendel, and Matthias Bethge. Improving robustness against common corruptions by covariate shift adaptation. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 11539-11551. Curran Associates, Inc., 2020.
[34] Roy Schwartz, Jesse Dodge, Noah A. Smith, and Oren Etzioni. Green ai. Commun. ACM, 63(12):54-63, nov 2020.
[35] Yu Sun, Xiaolong Wang, Zhuang Liu, John Miller, Alexei Efros, and Moritz Hardt. Test-time training with self-supervision for generalization under distribution shifts. In International Conference on Machine Learning, pages 9229-9248. PMLR, 2020.
[36] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfel- low, and Rob Fergus. Intriguing properties of neural networks, arXiv preprint arXiv: 131.66199 2013.
12

---

[37] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky, Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022 2016.
[38]
Yonatan Vaizman, Katherine Ellis, and Gert Lanckriet. Recognizing detailed human context in the wild from smartphones and smartwatches. IEEE Pervasive Computing, 16(4):62-74, 2017.
[39] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention all you need. Advances in newral information processing systems, 30, 2017.
[40] Jeffrey Vitter. Random sampling with a reservoir. ACM Trans. Math. Softw. 11(1):37-57, mar 1985.
[41] Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, and Trevor Darrel. Tent: Fully test-time adaptation by entropy minimization. In International Conference on Learning Representations, 2021.
[42] Hongyi Wang, Mikhail Yurochkin, Yuekai Sun, Dimitris Papailiopoulos, and Yasaman Khazaeni. Federated learning with matched averaging. arXiv preprint arXiv:2002.06444) 2020.
[43] Jianyu Wang, Qinghua Liu, Hao Liang, Gauri Joshi, and Vincent Poor. Tackling the objective inconsistency problem in heterogeneous federated optimization. Advances in neural information processing systems, 33:7611-7622 2020.
[44] Qin Wang, Olga Fink, Luc Van Gool, and Dengxin Dai. Continual test-time domain adaptation. In Proceedings of Conference on Computer Vision and Pattern Recognition, 2022.
[45] Zhuliang Yao, Yue Cao, Yutong Lin, Ze Liu, Zheng Zhang, and Han Hu. Leveraging batch nor- malization for vision transformers. In 202/ IEEE/CVF International Conference on Computer Vision Workshops (ICCVW), pages 413-422, 2021.
[46] Hangyu Zhu, Jinjin Xu, Shiqing Liu, and Yaochu Jin. Federated learning on non-iid data: A survey, Neurocomputing, 465:371-390, 2021.
13

---

Checklist
1. For all authors...
(a) Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope? [Yes]
(b) Did you describe the limitations of your work? [Yes] See Section $6.
(c) Did you discuss any potential negative societal impacts of your work? [Yes] See Section $6.
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
2. If you are including theoretical results...
(a) Did you state the full set of assumptions of all theoretical results? [N/A]
(b) Did you include complete proofs of all theoretical results? [N/A]
3. If you ran experiments...
(a) Did you include the code, data, and instructions needed to reproduce the main ex- perimental results (either in the supplemental material or URL)? [Yes] Code is available at https: /tt::/gittt /ggttub... com/TaesikGong//ee
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section $4 and Appendix
(c) Did you report error bars (e.g., with respect the random seed after running experi- ments multiple times)? [Yes] We ran the entire experiments with three different random seems (0,1 and reported
standard deviations.
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, cloud provider)? [Yes] See Appendix A.
4. If you using existing assets (e.g., code, data, models) or curating/releasing
assets...
(a) If your work uses existing assets, did you cite the creators? [Yes]
(b) Did you mention the license of the assets? [Yes]
(c) Did you include any assets either in the supplemental material URL? [Yes]
(d) Did you discuss whether and how consent obtained from people whose data you're rou're using/curating? [Yes]
(c) Did you discuss whether the data you using/curating contains personally identifiable information or offensive content? [Yes]
5. If you used crowdsourcing or conducted research with human subjects...
(a) Did you include the full text of instructions given participants and screenshots, if applicable? [N/A]
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, applicable? [N/A]
(c) Did you include the estimated hourly wage paid to participants and the total amount spent participant compensation? [N/A]
14


Reviews:
[{"review_id": "xl8by_jGVvt", "reviewer": "Reviewer_bg8w", "summary": "Temporal correlated data violates the i.i.d. assumption and the existing test-time adaptation methods are prone to overfitting under high correlated test data. This work proposed two components, IABN and PBRS, to tackle the temporal correlation. IABN only updates BN parameters when test data distribution is sufficiently different and PBRS resamples data samples for calculating test data batch statistics. Experiments are carried out on simulated temporal correlated data and real datasets.", "questions": "Evaluation and discussion on how to generalize to transformer based backbones would further improve the quality of this work.\n\nFor streaming test, it would be interesting to report the real-time accuracy which illustrates the real adaptation power in test-on-stream manner.", "limitations": "Yes.", "rating": 5, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strength:\n\n1. Temporal correlation is a practical concern in test-time training. Addressing the challenges in TTA for temporal correlated data is important.\n \n2. Experiments are extensive, covering both visual and audio modalities.\n\nWeakness:\n\n3. The improvement on KITTI is very marginal (as shown in Tab. 2). KITTI is the real temporally correlated dataset that motivates this work but the improvement is not significant to support the claims.\n\n4. For temporally correlated test-time adaptation task, CIFAR10-C/100-C can hardly simulate the temporal correlation. How does the temporally correlated streams look like? It is important to give illustrations or analysis of why this synthesized data stream presents temporal correlation.\n\n5. Adjusting Batchnorm has limitation to certain backbone networks. For example, ViT (transformer) does not have batchnorm layers, how does this approach apply to transformer backbones where BN is missing?\n", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "pLhU1eCRXO", "reviewer": "Reviewer_GmfJ", "summary": "The authors present a method named NOTE to address the online adaptation for non-iid data streams without additional annotation. It has two key components: instance-aware batch norm (IABN) and prediction-balanced reservoir sampling (PBRS). The former computes the difference between learned knowledge and the current observation (i.e., the new instances from the online data stream). The latter aims to avoid overfitting towards the non-iid streams by mimicking the iid samples with a simulated memory. They evaluate the method with sota TTA baselines on a few datasets (mainly for computer vision) and show that NOTE is effective. ", "questions": "N/A", "limitations": "Yes", "rating": 7, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "***Strengths***\n\n\n- The paper is comprehensive and has a nice presentation. It introduces the background knowledge very well and the proposed components have clear motivation. \n\n- The IABN and PBRS are both novel and show effectiveness over other baseline methods. \n\n- This paper studies a very important problem of test-time adaptation without supervision. It can be used for many real-world applications. \n\n***Weakness***\n- In the experiments, the authors should use more tasks such as some NLP data and more popular base models like Transformer-based ones for both CV and NLP. Otherwise, it's hard to measure how the proposed methods really work in modern AI systems. ", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "cvGIFr7ETV-", "reviewer": "Reviewer_AWKz", "summary": "Test-time training is an emerging and promising approach for building robust machine learning models to distribute shifts. This paper claims that most existing TTA methods assume that the test samples come from i.i.d distribution, but it does not hold for many practical applications of TTA, such as self-driving, human activity recognition, etc. This paper then proposes two new techniques to adapt the model under non-i.i.d setup, namely Instance-Aware Batch Normalization and Prediction-Balanced Reservoir Sampling (PBRS). Experimental results on synthesized non-i.i.d setup and realistic non-i.i.d setup show that the proposed method significantly outperformed the existing methods. \n", "questions": "(1) Why do we need equation (4) and equation (5)? What happens if we always u_{b, c} to compute outputs? \n\n(2) What is the final output of IABN layer?\n\n(3) Regarding the exponential moving average presented in 3.2, do you stop gradient for the past mean and sigma? \n\n(4) Why do we need lines 9-17 for PBRS? In other words, why don’t you randomly discard one instance in memory even if y_t \\in L? \n\n(5) In table 1, why does the value for Source differ between i.i.d setup and non-i.i.d setup? \n\n(6) If I correctly understood the paper, PBRS can be incorporated with any prior studies, e.g., TENT, PL. Why did you choose to combine it with IABN? In other words, is IABN itself perform better than existing methods? \n", "limitations": "This paper adequately addressed the limitation and potential negative social impact. ", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 2, "contribution": 3, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "---\n**Strengths**\n\n(1) Test-time adaptation is a timely and important topic. This paper pointed out important issues of existing TTA methods. \n\n(2) This paper validates the effectiveness of the proposed method on both synthetic and realistic benchmark tasks of non-i.i.d adaptation setup. \n\n---\n**Weaknesses**\n\nOverall, I think this paper provides a good contribution for the test-time adaptation research, with extensive experiments. However, I found several important details lacking in current manuscripts, including the detail of the proposed method (especially IABN part), explanation about why the proposed method should work better than prior works, and empirical validations.  See questions for the detailed comments. \n\nMinor comments/questions:\n- Equation (4), the left hand side should be u_c/L?\n- Lines 282-284, can you explain why LAME does not works well on i.i.d setup, or even worse than non-i.i.d setup?\n", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}, {"review_id": "-dw4WhZ8FFi", "reviewer": "Reviewer_5mFV", "summary": "Test-time adaptation updates the model on the test data to improve generalization to shifted data.\nWhile this sort of adaptation can help, most existing methods assume the test data arrives i.i.d., and in particular without temporal dependence.\nIn temporal settings, such as robotics or autonomous driving, this work first demonstrates the weakness of existing methods, and then proposes a fix (NOn-i.i.d TEst-time adaptation, or NOTE) that adjusts normalization statistics and maintains a reservoir/queue of test data to stabilize test-time optimization.\n\nThis fix is an extension of TENT, a test-time adaptation method that updates batch normalization layers in two steps: first, it re-estimates the normalization statistics from test batches, and second, it updates affine scale and shift parameters to minimize the entropy of model predictions.\nThe normalization part of the fix generalizes instance norm and batch norm (IABN), reducing to each as a special case of the hyperparameters, and in essence correct outliers w.r.t. the batch statistics by using the instance statistics instead (Sec. 3.1).\nThe reservoir part of the fix adopts reservoir sampling to maintain a queue that is expected to be class-balanced and time-balanced in order to simulate access to i.i.d. data in the non-i.i.d. setting.\nThe balancing is accomplished by making use of the model predictions as pseudo-labels, in place of the true labels used for continual learning, for prediction based reservoir sampling (PBRS).\nWith the reservoir samples, current test inputs can be batched with past test inputs, which stabilizes both the normalization statistics and entropy gradients for updating the affine parameters.\n\nExperiments on standard benchmarks for dataset shift (CIFAR-10/100-C), real temporal data with synthetic shift (KITTI), and lesser-known temporal datasets (HARTH, ExtraSensory) demonstrate that existing methods degrade in the temporal setting.\nMatched comparison on standard and temporal/class-ordered CIFAR-10/100-C confirm that NOTE achieves comparable accuracy in both settings, rivaling existing methods in the i.i.d. case and signifcantly improving (~50% relative error) in the temporal case.\nOn the real temporal data (KITTI, HARTH, ExtraSensory) NOTE still does as well as better, although the KITTI result is within the error bars, while HARTH and ExtraSensory are not well-established as benchmarks for shift.\nThe main components of the method, IABN and PBRS, are ablated and the sensitivity of methods to temporal dependence w.r.t. the degree of non-uniformity and batch size are analyzed.\n\nNOTE is the first work to identify the failure of test-time adaptation on temporal data and achieves state-of-the-art accuracies compared to existing methods in this setting.", "questions": "Questions\n\n- How does NOTE perform on ImageNet-C in the i.i.d. and non-i.i.d. settings with ResNet-18 (and ideally ResNet-50)? For the non-i.i.d. setting, consider the same proposed dirichlet ordering, or simply ordering the data by classes.\n- What is the full impact of PBRS on the amount of computation for prediction and adaptation? In particular, how much more time is needed per test input? Given that it is used for batching inputs, it seems that forward and backward would require linearly more time in the size of the reservoir. To put it another way, does using a reservoir of size 64 for a test input mean that inference is 64x times slower or at least requires that many more forward passes?\n- Is it possible to adopt IABN during testing without altering training? That is, can NOTE operate in a fully test-time manner without having to (re-)train the model with IABN?\n- For the real-world datasets, what is the source accuracy on the source data? This is important to report for measuring adaptation so that the severity of the shift and how much it is mitigated can be gauged. As presented, it is hard to know if HARTH and ExtraSensory are hard problems, and if the source model is not already doing quite well.\n- (Minor) How are predictions made on the first samples before the reservoir is filled? Is adaptation deferred until the reservoir is full?\n\nOther Feedback\n\n- Are the KITTI, HARTH, and ExtraSensory datasets \"real distributions with domain shift\" (as in Sec. 4.2)? KITTI-Rain is real data, with a synthetic shift. HARTH and ExtraSensory are both real data, but the shift is not evident.\n- Please clarify the hyperparameters for IABN in Equation 5 and the definition of $\\psi$ that follows it. $k$ is often used for integer values, but in this case it seems to be a real-valued weight. Consider other notation, such as $alpha$, and introducing this weighting in its own sentence following Equation 5.\n- Figure 3 tries to cover a lot, and is less accessible as a result. Part (3) on PBRS does not communicate a lot, as it just shows updated statistics, so consider dropping it in favor of focusing more on the IABN update. Consider more labeling of part (1) to express how IABN corrects BN or not.\n- In Figure 3 (2), is the time arrow reversed? I would expect the latest sample $x_t$ to be new while the discarded sample $x_i$ should be old.\n- To report failures in the temporal setting, consider highlighting results that are worse than the source model with special formatting. For example, these could be underlined, or typset in red.", "limitations": "The limitations covered are thoughtful, in particular when it comes to the potential to amplify bias in testing data. The reliance on batch normalization layers, at least as empirically examined, is honestly discussed. While this discussion is adequate, it would be further improved by underlining the need to alter training, in substituting BN with IABN, as other methods are agnostic to training (like TENT and BN).", "rating": 6, "confidence": 5, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strengths\n\n- Well-motivated: Temporal data is ubiquitous, and many cases that may need adaptation are indeed temporal, such as autonomous driving in anomalous weather or robotics applications in poorly-controlled conditions.\n  The difficulty current methods have with temporal data is neatly summarized by Fig. 2, which shows the stark contrast between the i.i.d. and non-i.i.d. settings on a simple dataset (CIFAR-10-C).\n- Clear illustrations: Fig. 1 shows two varieties of temporal data, with inputs and labels, where both clearly show the type of temporal correlation higlighted by this work.\n- Sound experimental design on standard datasets: The use of CIFAR-10/100-C is standard and serves as a sanity check of the method in the established setting. The application of the Dirichlet distribution for sampling more dependent and less dependent orderings of the data according to its concentration hyperparameter is appropriate and effective for sweeping across degrees of dependence.\n- Strong enough results: NOTE rivals existing methods in the existing setting, and does far better in the temporal setting it focuses on.\n- Baselines: The experimental comparisons include the basic method, TENT, which is extended by NOTE, alongside the recent and strongest methods such as LAME and CoTTA which were only recently published at CVPR'22.\n- Consistency: The same hyperparameters, such as the threshold for IABN, are used across experiments\n\nWeaknesses\n\n- NOTE has to alter training by replacing BN with IABN, and therefore cannot be applied to off-the-shelf models without re-training.\n  The test-time adaptation setting is in part motivated by not having access to the source/training data, so this makes NOTE less of a good fit for this particular assumption.\n- There is no large-scale evaluation in terms of dataset or model. For data, one would expect results on ImageNet-C, which serves as a gold standard benchmark of robustness to natural shifts like corruptions. For models, ResNet-50 is a common choice among test-time adaptation methods, including those compared to in this work.\n- How NOTE updates is not fully specified. While Sec. 3.2 explains that inputs are sampled from the reservoir and batched with test inputs, it does not detail the proportion of test inputs to reservoir inputs and the number of gradient steps among other such considerations.\n- The choice of datasets is not entirely justified. HARTH and ExtraSensory are indeed temporal, but at the same time they are unfamiliar for the purpose of evaluating adaptation. Are these datasets subject to shift across the given sources and targets? It would be reassuring to measure source accuracy on source and target to evidence drops and thus the presence of shift.\n  The architectures for these datasets are likewise not standard, which would be fine, except the text does not explain how to they incorporate IANB (though this presumably follows the convolution layers).", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"ethics_review_area": ""}, "extra_text": {}}]

Author rebuttal:

Decision: Accept