PROGRAM: PROtotype GRAph Model based Pseudo-Label Learning for Test-Time Adaptation
Authors: Haopeng Sun
Lumin Xu
Sheng Jin
Ping Luo
Chen Qian
Wentao Liu
Venue: ICLR 2024 poster (2024)
Keywords: test-time adaptation
domain adaptation
domain shift
Primary area: transfer learning, meta learning, and lifelong learning
TL;DR: This work proposes a novel test-time adaptation method, namely PROGRAM, for robust target domain adaptation by exploiting noisy pseudo-labels.

Abstract: Test-time adaptation (TTA) aims to adapt a pre-trained model from a source domain to a target domain only using online unlabeled target data during testing, without accessing to the source data or modifying the original training process. Among the various TTA methods, pseudo-labeling has gained popularity. However, the presence of incorrect pseudo-labels can hinder the effectiveness of target domain adaptation. To overcome this challenge, we propose a novel TTA method, called PROtotype GRAph Model based pseudo-label learning (PROGRAM). PROGRAM consists of two key components: (1) Prototype Graph Model (PGM) for reliable pseudo-label generation; (2) Robust Self-Training (RST) for test-time adaptation with noisy pseudo-labels. PGM constructs the graph using prototypes and test samples, facilitating effective message passing among them to generate more reliable pseudo-labels. RST combines the advantages of consistency regularization and pseudo-labeling to achieve robust target domain adaptation in the presence of noisy pseudo-labels. Our proposed PROGRAM can be easily integrated into existing baselines, resulting in consistent improvement. Extensive experiments show that our PROGRAM outperforms the existing TTA methods on multiple domain generalization and image corruption benchmarks.

Published as a conference paper at ICLR 2024
PROGRAM: PROTOTYPE GRAPH MODEL BASED PSEUDO-LABEL LEARNING FOR TEST TIME ADAPTA-
TION
Haopeng Sun
Lumin Xu² Sheng Jin 42
Ping Luo
Chen Qian 12
Wentao Liu²
Department of Computer Science and Technology. Tsinghua University, Beijing, China
Sense Research and Tetras.AI The Chinese University of Hong Kong
4 TTe University of Hong Kong
SShanghai Al Laboratory
sunhaopeng, jinsheng jinsheng]etetras...... @tetras
wat.aaaullsssinnnaaaaaa. edu. cn
ABSTRACT
Test-time adaptation (TTA) aims to adapt a pre-trained model from source do- main to a target domain only using online unlabeled target data during testing. without accessing to the source data or modifying the original training process. Among the various TTA methods, pseudo-labeling has gained popularity. How- ever, the presence of incorrect pseudo-labels can hinder the effectiveness of target domain adaptation. To overcome this challenge, we propose novel TTA method, called PROtotype GRAph Model based pscudo-label learning (PROGRAMD. PROGRAM consists of two key components: (1) Prototype Graph Model (PGM) for reliable pseudo-label generation; (2) Robust Self-Training (RST) for test-time adaptation with noisy pseudo-labele PGM constructs the graph using prototypes and test samples, facilitating effective message passing among them generate more reliable pseudo-labels. RST combines the advantages of consistency regu- larization and pseudo-labeling to achieve robust target domain adaptation the presence of noisy pseudo-labels. Our proposed PROGRAM can be easily inte- grated into existing baselines, resulting consistent improvement. Extensive ex- periments show that our PROGRAM outperforms the existing TTA methods on multiple domain generalization and image corruption benchmarks.
INTRODUCTION
Deep neural network (DNN) based methods perform exceedingly well when training and testing data are sampled from the same distribution. However, under test-time domain shift (Pan & Yangl 2009, Gopalan al., 2011), DNNs encounter significant performance degradation. Test-time adaptation (TTA) (Liang et af. 2023) is prominent paradigm to alleviate this problem. TTA methods adapt the models trained from the source domain to the target domain test-time, without accessing to labeled data from the target domain.
A majority of TTA approaches adopt pseudo-labeling (PL. based methods, which first generate pseudo-labels and then adapt the model to the target domain via self-training. Traditional PL based methods (Wang et al. 222 Lee al. 2013) directly use the output of the classifier as pseudo- labels, and reinforce the model to learn overly confident predictions for the test data. Due to in- evitable noises contained in the pseudo-labels, such approaches might suffer from dramatic perfor- mance degradation (Mukhoti et al. (020) or total model collapse (Wang et al. 20226). In order to generate more reliable pseudo-labels, we propose novel TTA method, termed PROtotype GRAph Model based pseudo-label learning (PROGRAM)
In order to generate credible pseudo-labels, prototype-basee based PI. (Iwasawa & Matsuo 2021 Wang al. 2023 Liang et al. 2020), and nearest-neighbor based PL (Yang et al. [222 Jang et al. 2023) have been proposed for performance improvement. However, these two types of approaches have
Work done during internship at SenseTime Research and Ael Corresponding author.

---

Published as a conference paper at ICLR 2024
Prototypes
Correclly C classified Samples Mis-classffed Samples
(x) Prototype
[b] Nearest-naighoor PL
[c] PROGRAM (Ours)
Figure 1: Different strategies of pseudo-labeling (PL): (a) Prototype-based PL. (b) Nearest-neighhor based PL. (c) PROtotype GRAph Model based pseudo-label learning (PROGRAM), The red lines represent the decision boundary.
their own drawbacks. As shown in Fig. Ta), prototype-based PL generates pseudo-labels based on global class prototype information but fails to incorporate local features of test samples, leading to incorrect predictions under domain shift. As shown in Fig. [b). nearest-neighbor based PL relies on local neighboring features of test samples for pseudo-label generation, overlooking the global representative features of each class, As the feature distribution of different categories may have overlaps under domain shift, test samples near the decision boundary are easily influenced by neighbors from other categories. To mitigate these problems, we propose Prototype Graph Model (PGM) to take both global and local information into consideration for pseudo-label generation. As shown in Fig. (c), our proposed method combines the advantages of both prototype-base -asedd PI. and neighbr based PL., by incorporating both the global representative features of prototypes and the local information from neighboring test data in flexible graph representation.
In terms of the self-training stage, some approaches (Lee et al. 2013 Iwasawa Matsuo 202 1 Jang et al. (023) use hard pseudo-labels (i.e. one-hot encoding), while others (Wang et al. 20023 use sofi pseudo-labels (i.e. probability encoding) for model fine-tuning. Hard labels help accelerate model training but vulnerable to label noises, so it is generally necessary to set handpicked thresh- old (Lee et al. 2013) to filter out unreliable pseudo-labels (Rizve et al. 2021). However, choosing a universally appropriate threshold is challenging for different datasets (Wang et al. 2022a Too high threshold will discard some useful correct pseudo-labels, while too low threshold will involve noisy pseudo-labels. On the contrary, soft labels help improve the model generalization ability, but suffer from slower model convergence. In this paper, we propose Robust Self- Self-Training (RST) technique avoid the above pitfalls. When the pseudo-labels are reliable enough (the model predictions are consistent with pseudo-labelsy we adopt hard pseudo-labels to accelerate model convergence with- out setting handpicked thresholds. Otherwise, we adopt soft pseudo-label, and use noise-resistant consistency regularization losses for model training. Our proposed RST effectively combines con- sistency regularization and pseudo-labeling, without tediously setting handcrafted threshold.
We benchmark PROGRAM on four domain generalization datasets (i.e., VLCS Tooralla & Efros) 2011), PACS (Li et al. 2017). OfficeHome (Venkateswara et al. 2017) and TerraIncognita (Beery et al. 2018) and three image corruption benchmarks (Hendrycks & Dietterich) 2019) including CIFAR IOC. CIFAR- 10OC, and ImageNet-C. Experiments show that PROGRAM outperforms other
TTA methods and can be applied to various baselines to deliver consistent improvements.
Our main contributions can be summarized as follows:
We propose novel TTA method called PROtotype GRAph Model based pseudo-label learning (PROGRAM) to address the issue of noisy pseudo-labels. Extensive experiments on popular domain generalization and image corruption benchmarks demonstrate the supe- riority of PROGRAM over the previous state-of of-te-of-the-ar the-art TTA methods.
In the pseudo-label generation stage, we propose Prototype Graph Model (PGM) that com- bines the advantages of both prototype-based PL and nearest-neighhor based PL to produce reliable pseudo-labels. It incorporates both global representative features of prototypes and local information from neighboring test data in a flexible graph representation.
In the self-training stage, we propose Robust Self-Training (RST) that combines pseudo- labeling and consistency regularization. It benefits from both hard and soft pseudo- labelss make the self-training process more stable and robust.
2

---

Published as a conference paper at ICLR 2024
2
RELATED WORK
2.1 TEST-TIME ADAPTATION
Test-time adaptation (TTA) (Liang al., 2023) involves adapting a pre-trained model using online unlabeled test data only. It is closely re related to two research topics, i.e. test-time training (TTT) and source-free domain adaptation (SFDA). TTT methods (Gidaris et al. 2018 Liu
2021
Sun et al. 2020b) also optimize during testing. however, they require to alter training procedure by
introducing the proxy loss on source data. SFDA methods (You et 2021b Wang al. 202 lb Yan et al.
2021 | Liang et al. 2020 Morerio et al. 2020; Kurmi et al. [022]] Zhou et al. 2022 Tang
et al. 2021 also adapt without source data, however, they optimize offline with full access to the
whole target test data. In contrast, TTA does not need any specific modifications during the training phase and only requires the pre-trained source model and unlabeled target data during the testing phase, which is a more practical and feasible setting. To adapt a pre-trained model to unlabeled target domain, a majority of TTA methods take inspiration from the semi-supervised learning field
and employ various prevalent techniques tailored for unlabeled test data adaptation. Existing works
TTA mainly include batch norm calibration (Mirza et al. 2022 Schneider et al.) 2020 Zhao et al,,
2023 Gong et al. 2022 You al.. 2021a), consistency regularization (Boudiaf et al. 2022 Choi
et al. 2022 2022 Kojima et al. 2022 Döbler et al.
2023). and pseudo-labeling (Iwasawa & Matsuo 2021
Jang et al.] 2023 Li et al. 2023 Wang et al.
2023 Our work belongs to the pseudo-labeling based
approach, which fine-tunes a pre-trained model using pseudo-labels based on classifier predictions.
T3A (Iwasawa & Matsuo 202T) designs the prototype-based classifier and predicts the labels of test data by comparing distances between the test data and the aseudo-prototyon
TAST (Jang et al.)
2023) improves upon T3A by fine-tuning the pre-trained model through self-training with nearest neighbor information. In comparisons, we propose a graph based approach to incorporate both global representative features of prototypes and local nearest neighboring information.
2.2 SEMI-SUPERVISEI LEARNING
Recent semi-supervised learning methods can be mainly categorized into consistency regulariza-
tion based methods (Bachman et al., 2014, Sajjadi et al. 2016 Laine & Aila 2016 French et al,
2017) and pseudo-labeling based methods (Lee et al. [203]] Rizve et 202120221 Arazo et al.) 2020 Wang et al. 2022a). Consistency regularization (CR) based methods assume that the output of the model should be invariant random perturbations including data augmentation (French al., 2017) and stochastic regularization (Laine & Aila, 2016 Sajjadi et al. (2166). Pseudo-labeling (PL) based methods use the model itself to produce artificial labels for unlabeled data. More recently, FixMatch (Sohn et al. 2020) produces artificial labels using both CR and PL to boost the perfor- mance of semi- semi-supervised learning. However, it requires complicated augmentation designs of CR and handpicked thresholds of PL. In comparison, our proposed RST is simple and effective, which combines CR and PL in the context of TTA to handle noisy label learning.
Our proposed PGM is inspired by graph based semi semi-supervised learning which applies graph Lapla- cian regularization (Zhu et al.] 2003 Yang et al., 2016) or contrastive regularization (Wan et al.] 2021 (Sun et al. 2019:2020a) 2020a) for representation learning with consistency regularization. However, these works primarily focus on modeling the relationship among labeled data and unlabeled data. In contrast, we build connections among prototypes and test data obtain more reliable pseudo-labels. To the best of our knowledge, we are the first to apply graph based approach to TTA to facilitate effective message passing.
3 METHODOLOGY
3.1 PROBLEM DEFINITION
Test-time adaptation involves fine-tuning a source domain pre-trained model using the online un- labeled test data from the target domain. Given the model trained using standard empirical risk minimization (Chowdhary) 2020) on source data D., a batch of unlabeled target data K; E D,, where i f1.....N .N' and N denotes batch size, is sampled from the target domain D, for domain adaptation. The model consists of a feature extractor fo and a classifier Jø- During testing, the model h fo go is initialized with pre-trained parameters. K is the number of classes
3

---

Published as a conference paper at ICLR 2024
RST
Unikboloe Text Duta
Tost Duta Pasurn
Predctions /
fo
PGM
Test Data Fretures
Inikitzaiion
Coneectie
CoostinciPruutppe Grophh
Considency
Label Propegation
P
Figure 2: Overview of PROtotype GRAph Model based pseudo-label learning (PROGRAM). Green lines represent the forward and backward propagation, and blue lines represent only forward propa- gation. Different shapes of prototypes mean different classes. PGM: Prototype Graph Model. RST: Robust Self- Teaf-nrain
3.2 OVERVIEW
In this section, we introduce our proposed method for test-time adaptation, termed PROtotype GRAph Model based pseudo-label learning (PROGRAM), PROGRAM consists of two main compo- nent including Prototype Graph Model (PGM) and Robust Self Training (RST) as shown in Fig. For each batch of test samples, PGM first initializes the prototypes according to the weights of classifier fa. and constructs prototype graph among both prototypes and test samples via condi- tional probability distributions with respect to the prototypes. Lahel propagation is conducted in the constructed prototype graph and reliable pscudo-labels for the test samples are obtained. In RST, pseudo-labels consistency regularization is utilized for model fine-tuning. When the hard labels of model predictions and pscudo-labels obtained by PGM are inconsistent, consistency loss is ap- plied to exploit the noisy pseudo-labels. The final results are estimated using the model fine-tuned by RST. PROGRAM eliminates the interference of noisy pseudo-labe and adapts the source model to the target domain for robust predictions.
3.3 PROTOTYPE GRAPH MODEL (PGM)
Prototype Graph Construction. Similar to T3A (Iwasawa Matsuo 2021). I), we initialize proto- types using the model weights of classification layer C2 Tw. I where we is the k-th element of the weight matrix in the classifier Iœ. representing the template of k--th class. For each test sam- ple Hi we compute soft label [811, 812, ... 8ik] T IR with regard to prototypes using the softmax function:
exp(ck . x())
8ik
(1)
1= exp(ci xx()
where æ. denotes the feature representation of obtained from the feature extractor Sa. By cal- culating the soft labels of the entire batch of N test samples, we obtain a sample label matrix S 11, $2..... sN] E N for the batch. In order represent the labels for prototypes, we define a prototype label matrix T E K where one-hot encoding scheme is utilized that is T- = 1 if the i-th prototype corresponds to the class and Tıj O otherwise. In general, T is di- agonal matrix with ones on the diagonal when the order of prototypes is sequential. We concatenate T and along the row axis to form the label matrix E (
Prototypes can be regarded good representation of the class centers. Instead of only considering the connections among test samples, we propose prototype graph to capture the relationships among test samples and prototypes. We construct graph both the prototypes U; (1 < K)) and the batch of unlabeled test samples U; (K + 1 S S K N), and the edges modeling their relationship are represented by an adjacency matrix W ([K+N)x(K*) NN), We compute the similarity wa between the vertex v, V and vertex U, V to determine their comnectivity with respect to the prototypes 24 (1 S k S K). In the prototype-based graph, we leverage small number of prototypes turn sample-to-sample affinity computations into
(V,E), where the vertices V represent
4

---

Published as a conference paper at ICLR 2024
much simpler sample-to-roototppe interactions. Similar ideas have also been exploited in (Zhu & Koniusz, (2023) for transductive few-shot learning. Specifically, the Markov random walks Lovász 1993 Szummer & Jaakkola 2001) and Bayes' theorem employed as follows:
Wij- similarity(u,, vj) x p(viluz)) = E p(osslo))(unnls))
2yh KNN
2
y/==
2yh
We define (())/mx)) zi where Sis K KKK N and S k S K. W symmetric matrix and
Waj Wiit Given the diagonal matrix D E RX*k and D = > aml Zik, the adjacency matrix
K
W be formulated as:
W = 2D Z
Considering that prototypes are typically good representation of classes while neighboring samples may contain some noises, proposed prototype graph is constructed by way of the prototypes, which is stable and effective.
Prototype Graph based Label Propagation. After prototype graph construction, we propose to propagate labels (Zhou et al. 2003) by optimizing the following problem:
K+N Σ
K+N
Y arg min
me llue v,1l2
Σ
l
-2113
(4)
Y = [y,, V2..... yK..... UK+N J E (R(+N)) is the optimization objective where (1 S S K)) represents the optimized labels of the prototypes and y; (K + S S K + N) represents those of test samples as pscudo-labels. Y denotes the optimal solution. 2, E R is the i-th row in the inital label matrix Z.
The first term in Eq. measures the smoothness constraint, which promotes smoothness by penal- izing large differences between neighboring vertices in the graph. The second term the fitting constraint, which measures the discrepancy between the optimized labels and the label assignment with regard to prototypes. The hyperparameter >> controls the trade-off between the two terms.
The optimal solution be obtained by the following equation (refer to Sec. A.I for more details):
Y' (1- - = (1 - A) (T XZD- Z, where is the identical matrix and A I+p ance the two constraints. Finally, we extract the pseudo-labels of the test samples Y by se- lecting the corresponding rows from the optimal solution Y and applying the softmax function: Y (xx 1 22 ØK-N]
(5)
(0 < X < 1) is the hyperparameter to bal-
Re-initializing Prototypes. In our online test setting, for each batch of input test data, we re- initialize the prototype set leveraging the linear layer weights of the source model. This design ensures that prototypes always keep up to date and maintain their representation of global class characteristics, while minimizing the memory burden associated with prototype updates.
3.4 ROBUST SELF-NRAININ (RST)
To better utilize the pseudo-labels generated by PGM, we propose method named Robust Self- Training (RST). Unlike the conventional approaches that directly use hard pseudo-labels as super- vision, our method draws inspiration from FixMatch (Sohn al. 2020) and combines both pseudo- labels and consistency regularization. Specifically, if the linear classifier and PGM produce the same predictions (i.e. identical results after applying argmax to the logits), we employ hard pseudo- labels. On the other hand, if they yield different predictions, we enforce consistency regularization by utilizing the Symmetric Cross Entropy (SCF) loss function (Wang al. 2019):
K
K
LSCE =
Σ
Dok log Pir.
Σ
Pax log Pis.
(6)
5

---

Published as a conference paper at ICLR 2024
Algorithm PROtotype GRAph Model based pseudo-label learning (PROGRAM)
Input:
Pre-trained source model h j a Id. number of class K, batch size N, a test batch æ, cost balance coefficient X, loss balance term ,3.
Output: Model prediction Yppred-
(1) PGM generates reliable pseudo-labels: Initialize protolypes: C₁ T l
Prototype graph construction following Eq.
3
/ = (x:), 8ik
T 12. Z = (T, DEs = Ex
K+N
E G
W = --D--Z"
Prototype graph label propagation following Eq.
Y (1 A) A) (T
XZD- 2. Y
Softmax (Yx K-I-K-NV
(2) RST fine-tunes the pre-trained model with Eq. 7 to obtain fine-tuned model hift.
Ek=1 arg max y: log Pi if arg max p; arg max yi
LRST Ei=1
B(LSCE)
else
(3) Get final predictions:
Upred (x)).
Return: Vpree
where P, [P:1. Pe.........P _K represents the inferred output distribution of the i-th test sample, and yi = jūa, Ui....., Dik] E R denotes the pseudo-label generated by PGM. This loss function serves consistency loss function that exhibits robustness noisy labels.
Consequently, we formulate the final training objective function as follows:
LAST = Σ Ek arg max y: logPa Pae
N
if arg max p: = arg max y:
B(LSCE)
else
where /3 is the loss balance term and we empirically set 3 = 0.4. This loss function enables all pseudo-labels to fine-tune the source model and sufficiently mitigates the negative impact of noisy pseudo-labels. Theoretical analysis is presented in Sec. A.3 Furthermore, the alternating use of the two loss functions helps prevent model collapse caused by consistency loss (Jing et al. 2021
3.5 ALGORITHM SUMMARY
We summarize the pipeline of PROGRAM in Algorithm!] During the testing phase, the adaptation performed in online manner. For each batch of test data, PGM first initializes prototypes, and constructs the prototype graph for label propagation. After that, RST is applied to fine-tune the pre-trained model. Finally, the fine-tuned model is used to produce prediction results.
4
EXPERIMENTS
4.1
EXPERIMENTAL SETUP
Due to space limit, more details about the experimental setup including datasets (Sec. F.1 models (Sec. baselines (Sec. F.3) and implementation (Sec. F.4 are provided in Appendix.
four domain generalization benchmarks (i.e., VLCS Tooralba & Efros] 2011). PACS (Li et al., 2017), OfficeHome (Venkateswara et al., 2017). and Terralncog- nita (Beery et al. (018)) and three image corruption benchmarks (i.e., CIFAR-10/100C (Hendrycks) & Dietterich 2019) and Imagenet-C (Hendrycks & Dietterich) 2019 For domain generaliza- tion datasets, we choose one domain as the target domain and the others as the source domains. For image corruption datasets,
Datasets. We conduct experiments
select the original CIFAR- 10/100 (Krizhevsky) 2009) and Ima- geNet (Krizhevsky et al. 2012) as the source domains. And the corrupted test data as the target domain. We follow the dataset splits TAST (Jang et al.) 2023) for fair comparison.
Models. the main experiments, we compare different methods on CosNet-18/50 (He et al. 2016) backbones, which are widely used in domain adaptation and generalization community. Also,

---

Published as a conference paper at ICLR 2024
Table 1: Comparisons with the state-of-the-art methods with average accuracy (%) on four domain generalization benchmarks. Avg. is the average performance of all the datasets. + indicates the ERM baseline combined with the respective TTA method. means higher better, and * denotes the results from (Jang et al. 2023).
Method
Backbone
VLCS
PACS
OfficeHome
TerraIncogniaa
Avg.
ERM Chowdhury
2020
ResNet-18
74.88::0.66
79.29=0.77
62.10=0.31
4..62:1.11
64.22
*Tent*
Wang cral
272Ta
ResNet-18
72.88+0.82
83.89#0.54
60.86-0.39
33.70= 1.09
62.83
TeatAuuptee" (Wang et
2021a
ResNet-18
67.02++1.16
10.75=1.01
62.64=0.38
09.91
62.58
+TenCIIf* WWang
ResNet-18 72.96=1144
78.57=1.78
59.33=0.62
38.30=3.44
+SHOT* [iang
2020
ResNet-18
65.24:12.29
82.3620..3
62.58=0.39
33.57=1.04
60.94
+SHOTIM [Lang et
X120
ResNet-18 64.86:122.2
82.33-0.61
62.57-0.39
33.35
60.78
+PL.* (Lee
2015
ResNet-18 62,97:+2.72
70.98=1178
58.20=3.21
77.44=7.20
+PLCIT (Lee
5
ResNet-18 74.89=10.11
78.11=2.30
619920011
41.8=1.94
64.18
+T3A* TIwasawa & Matsuo
2021
ResNet-18 17.26:t1.49
80.83=0.67
63.21=0.550
40.20=0060
65.38
+TAST Jang
2025
ResNet-18 77.27::067
81.9420.4
63.70=0.52
42.64
66.39
*TAST-BNN
Jang
023
ResNet-18 75.21=+2.36
07.07=0.53
62.79=0.41
39.43-2.24
66.13
+TSD (Wang 2 al. K045
ResNet-18
73.37=+1.08
87.06=0.68
64,51=1222
42.65=1447
66.95
+PROGAAM
ReaNet-18
77.75=1.37
88.0320.74
6..59=0.85
43.16=1.122
68.38
ERM Chowdhary 2020
ResNet-50
76.71=0..00
83.21
67.13-0.99
45.93-1134
*Tent* Wang
0024
ResNet-50
72.96+11.27
85.16+0.62
0.72
37.08+2.044
65.37
TemAAdapeer" Wang 2021a
ResNet-50
69.65-t1.17
83.6921.16
67.91-0.89
13.89=1.25
66.29
+TenClIf*
Wany c1 2021
ResNet-50
75.80++0.68
82.66+1.59
66.79-0.98
43.64+2.59
67.22
+SHOT* [iang
ResNet-50
67.07-1090
8..07
67.65=0.72
35.20=:.82
63.50
+SHOTIM Liang
2020
ResNet-50
66.93-10.84
84,14=1.225
67.65=0.77
34.37=1007
63.27
+PI.* (Lee
2013
ResNet-50
69.41-+3.12
81.72+4.61
62.85-3.05
38.09+2.35
63.02
+PLCI
el 2013
ResNet-50
75.65+10.88
13.33-1..59
67.01=1.00
46.6612.12
+T3А* [Iyasawa Malsuo
2021
ResNet-50
77.29:+0.39
83,92##1113
68.26-0.84
45.61=1.10
68.77
+TAST Jang ct 2025
ResNet-50 77.66:10.48
84.11=11222
68.63-0.70
47.43-2.09
69.46
+TAST-BN* Jang el dl
2023
ResNet-50
73.52:1.377
89.16-20447
68.88=0.50
4147
+TSD (Wang
ResNet-50 74.46+00.3
89.27+0.599
68.43-0.74
47.41 160
69.89
+PROGRAM
ResNet-50 78.17:0..2
90.78
69.05
47.84 1.23
71.46
Table Comparisons with the state-of-the-art methods with averuge error rate (%) on image cor-
ruption benchmarks. Testing is conducted the highest level of image corruttion. All methods use ResNet-50 backbone. & means lower is better. denotes the results from (Jang et al. 2023
Method
CIFAR-10C
CIFAR-1006
ImageNet-C
Avg.
No Adaptation" (Chowdhary
2020
29.14
60.35
81.99
57.16
+SHOT* (Liang ct al. 2020
15.32
41.54
58.27
38.38
Tentt
(Wang et 20210
13.95
39.04
37.02
+PL* cLe 2013
22.34
40.06
62.95
41.78
+T3A (eA**Iwwsse (Iwasawa & Matsuo
2021
26.68
58.28
75.81
53.59
TAST Jang et al. 2023
26.61
60.74
TAST-BNN (Jang et 2023
13.08
37.82
67.05
39.32
+TIPI (Neuven
13.52
38.33
55.94
35,93
+TSD Wang cr 2025
13.05
37.67
53.18
34.63
+PROGAAM
11.91
36.42
51.43
33.25
test our method on different backbones, including ViT-B/16 (Dosovitskiy et al.) 2020), ResNeXt- 50 (Xie al. 2017), EfficientNet-BA (Niu et 2022). and Mixer-L/16 (Tolstikhin et al. 2021
Baselines. We compare PROGRAM with the following baselines: Empirical Risk Minimization (ERM) (Chowdhary 2020), PI. and PI.CI (Leee al. 2013). Tent, TentAdapter and TentCIf (Wang
et al. 2021a), SHOTIM IM and SHOT (Liang et al. 2020). T3A (Iwasawa & Matsuo (021). TAST and TAST-BN (Jang et 2023 TSD (Wang et al.) 2023). and TIPI (Nguyen et al. (202)). For fair comparisons, all methods are based on online letel test data adaptation setting.
Implementation. During the test phase, we use the Adam optimizer (Loshchilov & Hutter 2017) to fine-tune the whole network parameters. We set the cost balance coefficient À = 0.5 and loss balance term / = 0.4. We report the mean value and variance of results with four different random seeds (0, 1, 2, and data splits on domain generalization benchmarks.
4.2 EXPERIMENTAL RESULTS
Domain Generalization Benchmarks. Table [ shows the results with ResNet-18/50 backbones on four popular domain generalization datasets. Average accuracy (top-1) reported. We follow

---

Published as a conference paper at ICLR 2024
Table 3: Effect of Prototype Graph Model (PGM) and Robust Self-Training (RST) on the domain generaliza- tion datasets. Average accuracy (%) reported.
88
PROGRAM
86
13D
Accuracy
84
02
80
Medhod
VLCS
PACS
Officelleme
Teraancognin
1
78
RoxNa-18
7488-0046
70.29-0.77
62:10-0:3 31
40.2#1..19 19
64.22
76
4PGM
77. 17.12-0.87
87.51=1.00 1.00
6366220.75 78
41.94=0.95
67.56
36
32
128
+PMM + RST
77,75:1.37
68003:0.74
66:5910:85
43
68.38
Batch Size
RoxNa1-0
76.1--0.50
83.21=1.14
67.13+0:99
4593#1.38 54
68.25
Figure 3: Effect of batch sizes PACS
PPMM
77.72=0.83
90.45:0..57
68.2320.78
46.92=1.04
70.83
dataset with ResNet-18 88 backbone.
PPMM RST
78:17:0.90
90:78:0::0
6900500:66
47.8431:23
71:46
Table 4: Applying Prototype Graph Model (PGM) to pseudo-labeling based approaches. Average accuracy (%) is reported domain generalization benchmarks, and average error rate (%) is re- ported on image corruption benchmarks. means higher is better, while & means lower is better.
Mothoo
VLCS
PACS 1
Domain Generalization Benchmark
OfficeHome
Terrahnoggicaa
Avg. 1
Image Comuptiin Benchmark CIFAR 10C i CIFAR CIFAR-100C
T3A (twasawa Mansso 2021
77.29+0.39
K3.92+1133
68 26-+0.844
45.61+1.10
68.77
26.66 68
58.28
T3A TPGM
78.5100577
28
68.9241.25
46.26=1.38
(+1.01)
(51153))
(-1.22)
TAST (ang atal. atal.22223 2023
37.66+00.48
84.11+1.22
68.6++0.70
47,43+2209
69.46
26.61
60.74
TAST FTOM
38
85/411149
69:05:00922
48/42:11.9
70.31 (40.85)
25. (-1.27)))
59.65 (-1.09
TAST-BN Dang at. 2023
73.52
16:166047
68 58:0.50
41,47:22.88
68.26
13.08
37,82
IAST-BN FPOM
74.5611.77
90.4910.72
69.47111002
42,09.22.53
69.15 (+0.89)
12.44 (+0.64)
36.79 (-1.03
the common setting (Jang et al., 2023) to set the batch size as 32. In Table D we observe that proposed PROGRAM consistently improves upon the ERM baseline and achieves the state- of-the-art performance on all the datasets. Our method improves ERM by 4.16% on average with ResNet- 18 backbone and 3.21% with ResNet-50 backbone. In comparison, other TTA methods do not produce consistent improvement on all datasets. Full results are provided in Appendix H
Image Corruption Benchmarks. Image corruption benchmarks are designed to evaluate the bustness and generalization ability of a classifier on unseen corrupted samples which is pre-trained using clean data. In Table we compare PROGRAM AM with other TTA methods CIFAR-1OC/100C and ImageNet-CC benchmarks. Average error rate (top-1) (oop-)) is reported. ResNet-50 is used as the back- bone of all the methods. We follow TAST (Jang al. 2023) to set the test batch size as 128 on the CIFAR- 10C/1000 datasets and 64 on the ImagNet-C dataset. Experimental results show that our proposed PROGRAM reduces the average error by 23.91 % on average, significantly outperforming all the other TTA methods. Please refer to Appendix H for the details of full results.
4.3 ANALYSIS
Different Batch Sizes. In Fig. B] report the average accuracy of various methods under different batch sizes on the PACS dataset with the ResNet-18 18 backbone. We observe that our approach out- performs other methods under different batch sizes. With the increase of batch size, the superiority of our proposed PROGRAM becomes more remarkable. More analysis can be found in Sec. D.]
Effect of Model Components. In Table 3. we conduct ablation studies to validate the effective- ness of the proposed Prototype Graph Model (PGM) and Robust Self-Training (RST) on the do- main generalization datasets. Both PGM and RST consistently improve the performance of ResNet- 18/50 backbones on all the datasets. Furthermore, we show that our PGM is "plug-and, and-play" for pseudo-label generation in Table 4 PGM is applied typical pseudo-labeling based methods (i.e., T3A (Iwasawa & Matsuo, 2021 and TAST (Jang et al. (023)) and replace their pseudo-label gen- eration stage (refer to Appendix more details). We report the results with ResNet-50 backbone on domain generalization datasets and image corruption datasets. PGM improves T3A and TAST by a large margin, which demonstrates that PGM generates more reliable pscudo-labels compared with other pseudo-labeling approaches. More experiments
be found in Sec. D.2 D.3 and D.4
Different Backbones. In Table 5 we validated our method on various backbone architectures with the test batch size of 128 following TSD (Wang et al.) 2023). Experimental results show that our proposed PROGRAM consistently improves upon different model architectures, including VIT (Dosovitskiy al. 2020 ResNeXt (Xie et al. 2017), EfficientNet (Tan & Le 2019). and MI.P-
8

---

Published as a conference paper at ICLR 2024
Table 5: Results (average accuracy) with different backbones. All baseline models are trained in a stan- dard ERM manner. means higher is better, and de- notes the results from Wang et al. 2023).
Table 6: Runtime analysis with ResNet- 18 backbone on single Titan XP GPU on the PACS dataset.
Method
Runtine (8)
Backhone
PACS 1
Officelome
VLCS
TemCIf Waan 2021a
0.40
TentAdafter (wang
Waing ct
90.30
Text (Wang c R0/4
15.17
PLCI
2013
0.43
ResNeX:
20.75
Waing al.
74.10
T3A mesiawa Miliuo
0.58
TAST Dallyy & 2015
6.92
Dificien
TAST-BN (Jang cl
SHOT (Liang et 2020
20.97
Whole
SHUTT Lomn 27700
20.73
+TSD* (Wang al. 2023
$4.99
76.53
79.75
TSD (Wang
19.73
+PROnIeXW
PROGKAM
17.92
mixer (Tolstikhin al. 202Tp. Compared with TSD (Wang al. 2023), PROGRAM achieves better performance across all the model architectures under the same setting.
Runtime Analysis. In Table we report the speed of TTA methods with ResNet-188 backbone on the PACS dataset, which is the average runtime of fine-tuning the model using batch of test samples with batch size on Titan XP GPU. Compared with these methods that update the "whole" feature extractors (e.g., SHOT (Liang et al., (020) and TSD (Wang et al.) (023)), the efficiency of
PROGRAM is comparable. Please refer to Sec. for more details. also present a partial-update variant of PROGRAM in Sec. D.6 to explore the trade-off between effectiveness and efficiency.
520
ML.
Accuracybla
88.0
08.0
250
86.0
10.0
860
020
PROGRAM
Figure 4: Sensitivity analysis regarding À and 3 on PACS dataset. Accuracy of ERM baseline is shown with the dotted black lines. Our PRO- GRAM is robust to different hyperparaters.
Figure 5: t-SNE visualization of learned feature embeddings extracted by (a) TSD and (b) PRO- GRAM on CIFAR- 10C dataset. Different colors denote different classes.
Sensitivity to hyper-parameters. We investigate the sensitivity of PROGRAM the cost balance coefficient À (cf. Eq. 5) and the loss balance term 3 (cf. Eq. 7 As shown in Fig. 4 our method is insensitive to the hyper-parameters and consistently improves upon the ERM baseline with different prperpparameters In our implementation. we choose À 0.5 and 3 = 0.4 for best performance.
Qualitative Analysis. In Fig. we visualize the I-SNE MMateen & Hinton 2008 of feature em- beddings extracted by the line-tuned models on CIFAR- -FAAR-IC dataset. The TSD (Wang et al. (023) learned features of different categories are not well separated, and some test samples are hard to distinguish due to the large domain shift. In comparison, our method generates compact and dis- criminative feature embeddings with tight clusters, demonstrating the superiority of PROGRAM.
5 CONCLUSIONS
In this work, we propose a novel pseudo-labeling based TTA method, termed PROtotype GRAph Model based pseudo-label learning (PROGRAM). In the pseudo-label generation stage, we pro- pose Prototype Graph Model (PGM) that combines the superiority of prototype based and nearest neighbor based methods to produce reliable pseudo-labels. In the self-training stage, Robust Self- Training (RST) is applied for test-time adaptation to resist noisy pseudo-labels. Extensive exper- iments demonstrate that our proposed PROGRAM consistently outperforms the existing methods on various domain generalization and image corruption benchmarks. Besides, we show that PRO- GRAM is "plug-and and and-play" and can be easily integrated into different backbone networks and various TTA methods.

---

Published as a conference paper at ICLR 2024
Acknowledgement. This paper is partially supported by the National Key R&D Program of China No.2022220161000 and the General Research Fund of Hong Kong No. 172062....
REFERENCES
Eric Arazo, Diego Ortego. Paul Albert, Noel Connor, and Kevin McGuinness. Pseudo-labeling and confirmation bias in deep semi-supervised learning. In International Joint Conference Neural Networks (IJCNN, pp. 1-8. IEFE, 2020.
Philip Bachman, Ouais Alsharif, and Doina Precup. Learning with pseudo-ensembles. Adv. Neural Inform. Process. Syst., 27, 2014.
Sara Beery, Grant Van Horn, and Pictro Perona. Recognition in terra incognita. In Eur. Conf. Comput. Vis., pp. 456-473, 2018.
Malik Boudiaf, Romain Mueller, Ismail Ben Ayed, and Luca Bertinetto. Parameter-free online test- time adaptation. In IEEE Conf. Comput. Vis. Puttern Recog- pp. 8344-8353, 2022.
Sungha Choi, Seunghan Yang, Seokeon Choi, and Sungrack Yun. Improving test-time adaptation via shift-agnostic weight regularization and nearest source prototypes. In Eur. Conf. Comput. Vis., pp. 440-458, 2022.
K. R. Chowdhary. Statistical learning theory. Fundamentals of Artificial Intelligence, pp- 415 443, 2020.
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE Conf. Comput. Vis. Pattern Recog., pp. 248-255, 2009.
Mario Döbler, Robert A Marsden, and Bin Yang. Robust mean teacher for continual and gradual test-time adaptation. In JEEE Conf. Comput. Vis. Pattern Recog., pp. 7704-7714, 2023.
Jeff Donahue, Yangqing Jia, Oriol Vinyals, Judy Hoffman, Ning Zhang, Eric Tzeng, and Trevor Darrell. Decaf: A deep convolutional activation feature for generic visual recognition. In Int. Conf. Mach. Learn., pp. 647-655. PMLR, 2014.
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x 16 words: Transformers for image recognition scale. arXiv preprint arXiv:2010.11929, 2020.
Geoffrey French, Michal Mackiewiez, and Mark Fisher. Self-ensembling for visual domain adapta- tion. arXiv preprint arXiv: / 1706.05208 2017.
Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv: 1803.0788, 2018.
Taesik Gong, Jongheon Jeong, Taewon Kim, Yewon Kim, Jinwoo Shin, and Sung-Ju Lee. Note: Robust continual test-time adaptation against temporal correlation. Adv. Neural Inform. Process. Syst., 35:27253-27266. 2022.
Raghuraman Gopalan, Ruonan Li, and Rama Chellappa. Domain adaptation for object recognition: An unsupervised approach. In Int. Conf. Comput. Vis., pp. 999-1006. IEEE, 2011.
Ishaan Guirajani and David Lopez-Paz. In search of lost domain generalization. arXiv preprint arXiv:2007.01434, 2020.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recog- nition. In IEEE Conf. Comput. Vis. Pattern Recog., pp. 770-778, 2016.
Dan Hendrycks and Thomas Dietterich. Benchmarking neural network robustness to common cor- ruptions and perturbations. Int. Conf. Learn. Represent., 2019.
Yusuke Iwasawa and Yutaka Matsuo. Test-time classifier adjustment module for model-agnostic domain generalization. Ady. Neural Inform. Process. Syst., 34:2427-2440, 2021.
10

---

Published as a conference paper at ICLR 2024
Minguk Jang. Sae- Young Chung, and Hye Won Chung. Test-time adaptation via self- self-training with nearest neighbor information. Int. Conf. Learn. Represent, 2023.
Li Jing, Pascal Vincent, Yann LeCun, and Yuandong Tian. Understanding dimensional collapse in contrastive self-supervised learning. arXiv preprint arXiv:2110.09548, 2021.
Takeshi Kojima, Yutaka Matsuo, and Yusuke Iwasawa. Robustifying vision transformer with- out retraining from scratch by test-time class-conditional feature aligmment. arXiv preprint (.XXi::2266139551 2022.
A Krizhevsky. Learning multiple layers of features from tiny images, Master's thesis, University of Tront, 2009.
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convo- lutional neural networks. Adv. Neural Inform. Process. Syst., 25, 2012.
Vinod K Kurmi, Venkatesh K Subramanian, and Vinay P Namboodiri. Domain impression: A source data free domain adaptation method. IEEE/CVF winter conference on applications of computer vision, pp. 615 625, 2021.
Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. arXiv preprint arXiv:1610.02242, 2016.
Dong-Hyun Lee al. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on challenges in representation learming, ICML, 896. Atlanta, 2013.
Da Li, Yongxin Yang, Yi-Zhe Song, and Timothy M Hospedales. Deeper, broader and artier domain generalization. In Int. Conf. Comput. Vis., pp. 5542-5550, 2017.
Zhi Li, Shaoshuai Shi, Bernt Schiele, and Dengxin Dai. Test-time domain adaptation for monocular depth estimation. In IEEE International Conference Robotics and Automation (ICRA), pp- 4873-4877 2023.
Jian Liang. Dapeng Hu, and Jiashi Feng. Do really need to access the source data? source hypothesis transfer for unsupervised domain adaptation. Int. Conf. Mach. Learn., pp. 6028-6039, 2020.
Jian Liang, Ran He, and Tieniu Tan. A comprehensive survey on test-time adaptation under distri- bution shifts. arXiv preprint arXiv:2303. 15361, 2023.
Hongbin Lin, Yifan Zhang, Zhen Qiu, Shuaicheng Niu, Chuang Gan, Yanxia Liu, and Mingkui Tan. Prototype-guided continual adaptation for llass-incremental unsupervised domain adaptation. In Eur. Conf. Comput. Vis., pp. 351-368, Springer, 2022.
Yuejiang Liu, Parth Kothari, Bastien Van Delft, Baptiste Bellot-Gurlet, Taylor Mordan, and Alexan- dre Alahi. Ttt++ When does self-supervised test-time training fail or thrive? Adv. Neural Inform. Process. Syst., 34:21808-21820 2021.
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint 1000001711.05101,, 2017.
László Lovász. Random walks graphs. Combinatorics, Paul endos is eighty, 2(1-46):4, 1993.
Laurensvander Maaten and GeoffreyE. Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, Jan 2008.
Russell Merris. Laplacian matrices of graphs: survey. Linear algebra and its applications, 197: 143-176, 1994.
M Jehanzeb Mirza, Jakub Micorek, Horst Possegger, and Horst Bischof. The norm must go Dynamic unsupervised domain adaptation by normalization, In IEEE Conf. Comput. Vis. Pattern Recog,, pp. 14765-14775, 2022.

---

Published as a conference paper at ICLR 2024
Pietro Morerio, Riccardo Volpi, Ruggero Ragonesi, and Vittorio Murino. Generative pseudo refinement for unsupervised domain adaptation. In /EEE/CVE Winter Conference on Applications of Computer Vision, pp. 3130-3139 2020.
Jishnu Mukhoti, Viveka Kulharia, Amartya Sanyal, Stuart Golodetz, Philip Torr, and Puneet Doka- nia. Calibrating deep neural networks using focal loss. Adv. Neural Inform. Process. Syst., 33: 15288-15299, 2020.
A Tuan Nguyen, Thanh Nguyen-Tang, Ser-Nam Lim, and Philip HS Torr. Tipi: Test time adaptation with transformation invariance. In IEEE Conf. Comput. Vis. Pattern Recog,, pp. 24162-24171, 2023.
Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen, Shijian Zheng, Peilin Zhao, and Mingkui Tan. Efficient test-time model adaptation without forgetting. In Inf. Conf. Mach. Learn., pp- 16888-16905. PMLR, 2022.
Sinno Jialin Pan and Qiang Yang. A survey on transfer learning. IEEE Transactions Knowledge and Data Engineering, 22(10):1345-135, 2009.
Zhongyi Pei, Zhangjie Cao, Mingsheng Long, and Jianmin Wang. Multi-adversarial domain adap- tation. In AAAI, 2018.
Mamshad Nayeem Rizve, Kevin Duarte, Yogesh S Rawat, and Mubarak Shah. In defense of pseudo- labeling: An uncertainty-awar pseudo-label selection framework for semi-supervised learning. arXiv preprint vrXiv22101.06325 2021.
Olga Russakovsky, Jia Deng. Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, al. Imagenet large scale visual recognition challenge. Int. J. Comput. Vis., 115:211-255 2015.
Kuniaki Saito, Kohei Watanabe, Yoshitaka Ushiku, and Tatsuya Harada. Maximum classifier dis- crepancy for unsupervised domain adaptation. In IEEE Conf. Comput. Vis. Pattern Recog., pp- 3723-3732, 2018.
Mehdi Sajjadi, Mehran Javanmardi, and Tolga Tasdizen. Regularization with stochastic transforma- tions and perturbations for deep semi-supervised learning. Adv. Neural Inform. Process. Syst., 29, 2016.
Steffen Schneider, Evgenia Rusak, Luisa Eck, Oliver Bringmann, Wieland Brendel, and Matthias Bethge, Improving robustness against common corruptions by covariate shift adaptation. Adv. Neurul Inform. Process. Syst., 13:11559-11551 2020.
Kihyuk Sohn, David Berthelot, Nicholas Carlini, Zizhao Zhang, Han Zhang, Colin A Raffel, Ekin Dogus Cubuk, Alexey Kurakin, and Chun-Liang Li. Fixmatch: Simplifying semi-supervised learning with consistency and confidence. Adv. Neural Inform. Process. Syst. 33:596-660 608966668,400 2020.
Fun-Yun Sun, Jordan Hoffmann, Vikas Verma, and Jian Tang. Infograph: Unsupervised and semi-supervised graph-level representation learning via mutual information maximization. arXiv preprint arXiv: 01000, 2019.
Ke Sun, Zhouchen Lin, and Zhanxing Zhu. Multi-stage self-supervised learning for graph convolu- tional networks on graphs with few labeled nodes. In AAAI, pp. 5892-5899, 2020a.
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 Int. Conf. Mach. Learn., pp. 9248. PMLR, 2020b.
Martin Szummer and Tommi Jaakkola. Partially labeled classification with markov random walks. Adv. Neural Inform. Process. Syst., 14, 2001.
Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural net- works. In Int. Conf. Mach. Learn., pp. 6105-6114 14. PMLR, 2019.
12

---

Published as a conference paper at ICLR 2024
Song Tang, Yan Yang. Zhiyuan Ma, Norman Hendrich, Fanyu Zeng, Shuzhi Sam Ge, Changshui Zhang, and Jianwei Zhang. Nearest neighborhood- based deep clustering for source data-absent unsupervised domain adaptation. arXiv preprint arXtv:2107.12585, 2021.
yya O Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Un- terthiner, Jessica Yung, Andreas Steiner, Daniel Keysers, Jakob Uszkoreit, et al. MIp-mixer: An all-mlp architecture for vision. Adv. Neural Inform. Process. Syst., 14:24261-242777 2021.
Antonio Torralba and Alexei A Efros. Unbiased look at dataset bias. IEEE Conf. Comput. Vis.
Pattern Recog,, pp. 1521-1528, 2011.
Hemanth Venkateswara, Jose Eusebio, Shayok Chakraborty, and Sethuraman Panchanathan. Deep hashing network for unsupervised domain adaptation. In IEEE Conf. Comput. Vis. Pattern Recog., pp. 5018-5027, 2017.
Sheng Wan, Shirui Pan, Jian Yang. and Chen Gong. Contrastive and generative graph convolutional networks for graph-based cuni-supervised learning. In AAAI, pp. 10049-10057, 2021.
Can Wang, Sheng Jin, Yingda Guan, Wentao Liu, Chen Qian, Ping Luo, and Wanli Ouyang. Pscudo- labeled auto-curriculum learning for semi-supervised keypoint localization. arXiv preprint 1oXiv:2201.08613 2022a.
Dequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno Olshausen, and Trevor Darrell. Tent: Fully test-time adaptation by entropy minimization. Int. Conf. Learn. Represent., 202
Qin Wang, Olga Fink, Lue Van Gool, and Dengxin Dai. Continual test-time domain adaptation. In IEEE Conf. Comput. Vis. Puttern Recog., pp. 7201-7211, 1, 2022b.
Shuai Wang, Daoan Zhang, Zipei Yan, Jianguo Zhang, and Rui Li. Feature alignment and uniformity for time adaptation. In IEEE Conf. Comput. Vis. Pattern Recog. pp. 20050-20060, 2023.
Yisen Wang, Xingjun Ma, Zaiyi Chen, Yuan Luo, Jinfeng Yi, and James Bailey. Symmetric cross entropy for robust learning with noisy labels. In Int. Conf. Comput. Vis., pp. 322-330, 2019.
Yuxi Wang, Jian Liang, and Zhaoxiang Zhang, Source data-free cross-domain semantic segmenta- tion: Align, teach and propagate. arXiv preprint arXiv:2106. 1653, 2021b.
Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual trans- formations for deep neural networks. In IEEE Conf. Comput. Vis. Patlern Recog, pp. 1492-1500, 2017.
Hao Yan, Yuhong Guo, and Chunsheng Yang. Augmented self-labeling for source-free unsuper- vised domain adaptation. NeurIPS Workshop on Distribution Shifts: Connecting Methods and Applications, 2021.
Shiqi Yang, Joost van de Weijer, Luis Herranz, Shangling Jui, et al. Exploiting the intrinsic neigh- borhood structure for source-free domain adaptation. Advances in neural information processing systems, 34:29393-29405. 2021.
Zhilin Yang, William Cohen, and Ruslan Salakhudinov. Revisiting sumi-supervised learning with graph embeddings. In Int. Conf. Mach. Learn., pp. 40-48, PMLR, 2016.
Jason Yosinski, Jeff Clune, Yoshua Bengio, and Hod Lipson. How transferable are features in deep neural networks? Adv. Neural Inform. Process. Syst., 27, 2014.
Fuming You, Jingjing Li, and Zhou Zhao. Test-time batch statistics calibration for covariate shift. arXiv preprint ar 1xXx:2110000066. 2021a.
Fuming You, Jingjing Li, Lei Zhu, Zhi Chen, and Huang. Domain adaptive semantic segmentation without source data. In ACM Int. Conf. Multimedia, pp. 3293-3302, 2021b.
Yifan Zhang, Ying Wei. Qingyao Wu, Peilin Zhao, Shuaicheng Niu, Junzhou Huang, and Mingkui Tan. Collaborative unsupervised domain adaptation for medical image diagnosis. IEEE Trans. Image Process., 29:7834-7844, 2020.
13

---

Published as a conference paper at ICLR 2024
Bowen Zhao, Chen Chen, and Shu-Tao Xia. Delta: degradation- -free fully test-time adaptation. Int. Conf. Learn. Represent. 2023.
Dengyong Zhou, Olivier Bousquet, Thomas Lal, Jason Weston, and Bernhard Schölkopf. Learning with local and global consistency. Adv. Neural Inform. Process. Syst., 16, 2003.
Qianyu Zhou, Yue Zhang, Taiping Yao, Ran Yi, Kekai Sheng. Shouhong Ding, and Lizhuang Ma. Generative domain adaptation for face anti-spoofing. In Eur. Conf. Comput. Vis., pp. 335- 356. Springer, 2022.
Hao Zhu and Piotr Koniusz. Transductive few-shot learning with prototype- based label propagation by iterative graph refinement. In Proceedings of the IEEE/CVF Conference Computer Vision and Pattern Recognition, pp. 23996- 24006, 2023.
Xiaojin Zhu, Zoubin Ghahramani, and John D Lafferty. Semi-supervised learning using gaussian fields and harmonic functions. In Int. Conf. Mach. Learn., pp. 912-919, 2003.
14

---

Published as a conference paper at ICLR 2024
A THEORETICAL ANALYSIS
A.1 DERIVATION OF EQUATIONS FOR PROTOTYPE GRAPH BASED LABEL PROPAGATION
We rewrite Eq. 4 as follows:
K+N ((Y) 2 Σ
K+N
Why w.ylly. vs112 1
Σ i=1
11: - 2211)).
(A1)
4,1=1
This defines the cost function L associated with Y.
Y = arg min L(Y).
(A2)
Y
Differentiating L(Y) with respect to Y, we have
ac
= =Y - WY + u( Z) =
(A3)
0Y Y-Y-
We expand the parentheses at the end to obtain the following expression:
dc
= -1+ - WY - pZ = 0.
(A4)
0Y Y=Y-
Dividing both sides of the equation by (1 + (t), we get:
Y 1 WY 1 1z O.
(A5)
14
Introducing a new variable
I+u wc get
(W-X = (1 ()
(A6)
Since (I AW) is generally invertible (see details in Sec. A.2). we have
Y Y'= (1 A)(I-(XXII) A
(A7)
A.2 MATRIX INVERTIBILITY PROOF
In this section, we provide a detailed proof of the invertibility of (1 - AW).
(I AW) can be rewritten as:
I (1- -)I X(1 W).
(A8)
As À 1_ matrix. And the matrix I W is a Laplacian matrix (we will prove it later), which is positive semidefinite matrix. Therefore, the matrix II XW = (1 A)I+ A(I - W) is a positive definite matrix. Furthermore, due to the symmetry of the matrix, (II - AW) is invertible.
I+a is a number greater than and less than matrix (1 A)lI positive definite
Proof of Laplacian matrix. In the following section, we will prove I - W is a Laplacian matrix, and thus is positive semidefinite
Starting from Eq. we express (I - AW) as:
(T - AW) =I- -Z=
(A9)
Given the matrices:
TRxx] SNXK
(A10)
(TR*K- Tx and
15

---

Published as a conference paper at ICLR 2024
D
ZD-
(A11)
SNNK Kxk
SNNK D
Let sum_row i) denote the sum of the ith row in the matrix X, and sum_col (X,, i) represent the sum of the ith column in the matrix X. According to the definition in the main text. D be a diagonal matrix, and the diagonal element D signifies the sum of the matrix Z i-th column, expressed as:
Dj = com_ i) + sum_col( S, i) = 1 + (om_co)((S1)
(A12)
According to the definition in the main text, sum sum_row(S is 1. For Si K compute the sum of the i-th row of W as follows:
row W ,t) sum row D .1) sum row ( ,))
num_row(S'. i)
D is
D
sum_col i)
Di D
(A13)
For i 2 K, we have:
sum_row W, i) sum sam_ro((SD) (1) sum_row(SD ST
(mim)
k-1K-1
(Sim Smm)
Dmn
Dmm
K-
(Sim
K- 1
(Sim Σn=o Smm)
+
D
Dam
m=0
m 0
(Sim)
(Sim summcol(S m))
D mm
D
m=0
m=0
(Sim (1 + sum.col(S, m)))
Dun
K-1
S.m
(A14)
Thus, the sum of rows in the matrix W is always 1. Therefore, the diagonal elements of I and the sum of elements in each of W are equal. According Merris (1994), the definition of the Laplacian matrix is as follows: "The function C' is most conveniently described as an n n, symmetric, nonnegative matrix C (cg) with the property that Cú 0 if and only if (v,, E E. C."
With denoting the i-th row sum of C, define L(G) = diag(r1, ,2.
The matrix W satisfies the above requirements; thus, a Laplacian matrix. And Laplacian matrices are always positive semidefinite, which is pointed out by Merris (1994).
A.3 THEORETICAL ANALYSIS ABOUT RST
In this section, we present a theoretical analysis to elucidate the effectiveness of our RST. For a given test sample x, we denote the probability distribution of the output class & predicted by the model as Pk = p()]z)), and the probability distribution predicted by PGM as qı = (() The total number of classes is K.
The gradient of the LSCE loss with respect to the logits 2j can be derived as follows:
ÔLsCE
Σ
K
qk Opk
Σ
K Opk log qk:
(A15)
0zj
Pk
dzg
dzz
k=
k=
16

---

Published as a conference paper at ICLR 2024
where
0pk
①
D
dzj
k
j== 6
-
012 e²
82y
(A16)
dzj
02g
( e²3
2
In the case of k j. we have:
Öpk
0pk
e* ( k= eat)
K
- (e#t)²
e*
e#k
dzj Ozk
Ex -= c
ΣK K
eck
k=
= Pk
Pk
Pk (1 Pt).
(A17)
In the case of + j. we have:
0. (D/r --== e
E
Öpk
e
0z, EXpn ets
[Ee= ets
Σ e*
Σ K
PPaP
(A18)
Simplifying the expression, we obtain:
dLsCe
9k Öpk
Opk log Qi
0zj
Pk Ozj
グzj
K
Qk (-PjPk)
Li (p,( p2))
Σ
(-pppk) log q:- - -P,(1 Pÿ) log qj
Pk
Pj
Anp
= (p, 93)) + Pj
Σ P& log 9s log qi
(A19)
First, we analyze the gradient of the first term in the SCE loss function, referring to it as LCR = Pj 9z. The gradient of consistency regularization Lon is:
θLCR 0zj
P2 1
4j 0,
Pj 5
(A20)
9; 0
p; 9;
When the Pj for category j is greater than gj. the gradient positive, indicating that this category treated negative sample, thereby causing the Pj to decrease. Conversely, when the pj is less than qj. the gradient is negative, indicating that this category is treated as a positive sample, thereby causing the Pj to increase. Therefore, the role of the loss Len is to align the predicted probability Pj with the target probability Qj-
Next, analyze the gradient of the second term in the SCE loss function, referring to it Ltopk K
Pj
Pk log 9k log 4j
Let Qenin be the minimum value in lo and Zmux be the maximum value in gk- Since the sum of p; is 1,
log Gmin
Pk log Gmin
Ph log Qh
Pk log Gmax log Qmax
(A21)
1=1
Therefore, there exists Izero such that,
K
Σ
Pke log qk-
log Jsero = 0,
(A22)
and when 9j < Azero. the above term is positive, and when qj > Izero: the above term is negative.
Otuopk 0zj
=
Σ
K
Pk log qu - log
=
> 0, 4 < Azero
S 0,
q 2 Gsero
(A23)
17

---

Published as a conference paper at ICLR 2024
Table Al: Detailed runtime performance analysis with the ResNet-18 backbone on single Titan XP GPU on the PACS dataset.
Exp ID
Method
Runtime (s)
#1
ERM (ResNet-18)
11.15
#2
+SHOT (Liang et al. 2020
11,15 20.97 32.12
#3
+SHOTIM (Liang ct al. 2020
11.15+ 20.73 31.88
#4
+TSD (Wang et al. 2023
11.15 19.73 30.88
#5
+PGM
11.15 12.36
#6
+RST
11.15 16.78 = 27.93
#7
+PGM RST (PROGRAM)
11.15 17.92 29.07
#8
+PGM CE Loss
11.15 + 17.54 = 28.69
#9
+PGM KI. Loss
11.15 17.65 28.80
The Ltopk increases the prediction probability several creases the prediction probability of several low-pre oww-robability predictions. Consequently, Leoph treats classes with high-prou high-probability predictions as positive samples while considering the remaining classes as negative samples.
predictions and de-
Note that the gradient of Cross-Entropy (CE) LCE is:
θLCE
Pj 15
0,
(A24)
Ōzj
Pp 0,
L =0
Therefore, the gradient of our overall loss function as follows:
Pj - 1, 0j
ÖLRST dz,
\p,.
9j 0*
reliable pseudo-label
(A25)
Pj 4j + Ps ( Pk log 9k log 4j) unreliable pseudo-label
When pscudo-labels generated by the PGM are reliable, we use the Cross-Entrope (CE) loss func- tion, which treats the class with the unique maximum probability as the positive sample. This enables the loss function converge quickly. When pseudo-labels
less reliable, employ the
Symmetric Cross Entropy (SCE) loss function. The first gradient term of the SCE loss, as shown in Eq. A20 brings the predictions of the model closer the predictions of the PGM. This can be seen as consistency regularization. The gradient of the second term of the SCE loss, as shown in Eq A23] will increase the prediction probability of several gigbbbbbbayility predictions and reduce the predic- tion probability of several low- low-probability predictions (categories with high predicted probabilities are likely contain the correct labels). Therefore, the SCE loss more robust noise labels.
B LIMITATIONS
It is still under exploration that how extend proposed PROGRAM widespread computer vision tasks. Similar to the previous TTA methods, PROGRAM is currently applied to classification task and not adapted regression problems such object detection and semantic segmentation. We are actively working on creating a unified TTA framework that can be applied across all vision tasks. Another problem that is hard evaluate or estimate the model's behaviour in real application scenarios because the model is constantly updated with the test data. This may raise some ethical concerns in some sensitive applications. It's worth noting that the existing TTA methods, such as T3A, TAST, Tent, and TSD, also encounter similar challenges.
C MORE DETAILED RUNTIME ANALYSIS
We report the breakdown PROGRAM's runtime Table AI Our PGM module exhibits a rela- tively short computational time (comparing #1 and #5), making it efficient for reliable pseudo-label
18

---

Published as a conference paper at ICLR 2024
Table A2: Effect of batch sizes on OfficeHome dataset with ResNet-50 backbone. Average accu- racy(%% is reported. The higher the better.
Method
16
128
ERM (ResNet-50)
67.13:10.99
67.13-10.99
67.13-10.99
67.13.0.99
67.13:1.999
TTent
62.10+
1.88
66.29++0.77
1.267+1.26
67.00 1.80
+SHOT
66.07=0.85
67.00+1.220
67.65=+0.72
6..73=1.37
67.99=1.41
+PL
57.5113..26
60.70.13.12
62.8511.005
63.32.11.92
63.701
+T3A
68.60+0.90
68.55++1223
68.26++0884
68.35+0.72
68.47-1.26
+ TAST
68.70+0..0
68.76:+0.97
68.63-1.0.0
68.60#0.53
68.99 - 1.24
TAST-BN
68.04+1.67
68.42+11112
68.88+0.500
19.23=1.555
69.36=11 1.98
+TSD
6..59111663
68.02.11.00
68 43.4.3.0774
68.72.10.96
69. 1.11
+PROGRAM
1..3
1..93+1.225
69.05+0.666
69.58 1.46
69.76 1.29
Table A3: Effect of batch sizes CIFAR- 100C dataset with ResNet-50 backbone. Average error rate (%) is reported. The lower the better.
Method
16
32
64
128
FRM (ResNet-50)
60.35
60.35
60.35
60.35
60.35
Tent
45.56
43.25
41.54
40.16
39.04
+SHOT
47.48
45.13
43.71
42.27
41.54
+PL
46.18
44.78
42.13
41.48
40.06
+Т3A
59.89
59.03
58.75
58.32
58.28
+TAST
64.12
62.63
61.54
60.96
60.74
TTAST-N
43.45
41.87
39.12
38.48
37.82
TTIP
39.36
39.14
38.86
38.65
38.33
+TSD
39.61
39.20
38.74
38. 16
37.67
+PROGRAM
38.97
38.63
37.95
37.28
36.42
generation. And the main time consumption occurs during the back prockpropagation phase in RST. However, the computational time required for the RST module is comparable to other self-training modules that employ different loss functions (compare #7 with #8 and #9). Overall, our method demonstrates smaller computational costs compared TTA methods such as SHOT (#2), SHOTIM (#3), and TSD (#4) that involve adjusting the whole model parameters. This highlights the practical- ity and feasibility of incorporating our method into real-world applications, as it achieves significant performance gains while maintaining reasonable computational efficiency.
D MORE EXPERIMENTAL ANALYSIS
D.1 EFFECT OF BATCH SIZE.
have incorporated OfficeHome (Venkateswara et al. 2017) and CIFAR-I00C (Hendrycks & Dietterich 2019) benchmarks into our evaluation to assess the impact of batch size. The results are in Table A2 and Table A33 respectively. We observe that our method consistently outperforms other approaches across various batch sizes. Moreover, the batch size increases, the superiority of our proposed PROGRAM becomes even more pronounced, highlighting the advantages of our approach.
D.2 ACCURACY OF PSEUDO-LABELS GENERATED BY PGM.
To further demonstrate the effectiveness of PGM in generating more reliable pseudo-labels, we con- ducted an additional experiment. The quality of pseudo-labels generated by PGM was explicitly evaluated in Table A4 Previous TTA methods commonly utilize the pseudo-labels generated by ERM directly (# l). The accuracy the generated pseudo-labels by PGM is reported in #2. By comparing results #1 and #2, demonstrate that PGM can produce superior pseudo-labels com- pared to the original ERM (68.90 vs. 68.25). We then leverage these generated pseudo-labels for robust telf-training, resulting in the improved performance of model #3 (71.46). And in #4, report the results obtained by applying PGM to generate the next round of pseudo-labels after fine- tuning. Consistent improvement observed (71. 9988 vs. 71.46), highlighting the potential for iterative
19

---

Published as a conference paper at ICLR 2024
Table A4: Effect of PGM in generating more reliable pseudo-labels, All experiments are conducted based on the ResNet-50 backbone. Average accuracy (%) is reported on domain generalization benchmarks. means higher is better.
Exp ID
Method
VLCS
PACS
OfficeHome f
Terralncognita
Avg. 1
ERM (ResNet-50)
76.71+0.500
83.21
67.13:0.99
1..93:11.34
68.25
+PGM (before fine-tune)
77.36:10.61
84.1611093
67.6911.35
46.38:1.79
68.90
+PROGRAM
78.17:10.92
90.78:1.40
69.05:10.66
47.84111.23
71.46
+PGM (after fine-tune)
78.73:11.77
91.3011.63
69.5710.88
48.3111142
71.98
Table A5: Ablation study of PGM. All experiments are conducted based on the ResNet-50 backbone. Average accuracy (%) is reported on domain generalization benchmarks. ? means higher is better.
Exp ID
Method
VLCS f
PACS 1
OfficeHomc
TerraIncognita
Avg.
#1
ERM (ResNet-50)
76.71++0.50
83.21-+1.14 14
0..99-0.99
45.93-t 1.34
68.25 28.25
+PGM (with dol-product) + RST
90.15:10.2 77.92.11.43
68.62.10.91
1..2
70.98
+Non Soon-paramettic Attention RST
1.51
1,28
68.29 1.35
47.12+2..03
70.73
#4
+PROGRAM
7..17+0.92
90.78+ 0.40
69.05 0.66
47.84 1.23
71.46
refinement. However, to ensure fair comparisons with other TTA methods, we do not report the re- sults of #4 the outcome of iterative refinement. These findings demonstrate that method can produce more reliable pseudo-labels, leading to enhanced performance when compared with other TTA methods.
D.3 ABLATION STUDY OF PGM
Prototype-based graph construction based on the idea that we can use small number of proto- types to turn sample-to-san sa-sa affinity computations into much simpler topootottee affinity computations. In addition, as prototypes contain global class-level information, they provide more robust and stable representations. This helps mitigate the impact of noisy test samples. In Ta- ble A5
we conducted an ablative analysis for PGM.
Comparisons with dot-product affinity computation. We first compare our sample-to-pen prottttype affinity computations with the sample-to-sample affinity computations by dot-product. comparing #2 and #4, we observe that dot-product produces inferior performance. 'he reason for this discrepancy could be that the prototypes represented by linear layers and the test features may reside in different feature spaces and not follow the same distribution, leading suboptimal perfor- mance when using dot-product as the affinity measure. In contrast, our proposed probability-ban graph construction circumvents this issue, resulting in better performance. These results provide clear validation of the effectiveness of our proposed prototype- based graph construction and label propagation.
Comparisons with non-parametric attention modules. We further compare our PGM with the non-paren con-parmetrrc attention modules #3 in Table A5 Given the predefined graph, the non corpaarmettiic attention module first updates each node in graph with the help of adjacency matrix, and then use the updated class prototypes to make predictions of each updated test feature. The attention module have difficulty efficiently exchanging message between prototypes represented by lincar layers and the test features that may reside in different feature spaces and not follow the same distribution, which lead to inferior performance. construction circumvents this issue, resulting in better performance. These findings demonstrate that our PGM outperforms the attention module alternative (71.46 (71.46% vs 70.73%), confirming the effectiveness of proposed prototype-based graph construction.
contrast, our proposed probability-ban
graph
D.4 ABLATION STUDY OF RST
We have conducted additional ablation studies to validate the effectiveness of our RST module in Table A6 We compare our RST approach with different strategies used in various TTA approaches,
20

---

Published as a conference paper at ICLR 2024
Table A6: Ablation study of RST. All experiments are conducted based on the ResNect-50 backbone. Average accuracy (%) is reported on domain generalization benchmarks. 1 means higher is better.
Exp ID
Method
VLCC
PACS
OffecHome
Teralncoguina:
Avg.
A1
ERM (ResNet-5O) -50)
76.7120..0
83:2121.14
67.1310.99
45.9311.34
68.25
R2
PGM CE Loss (Wan al 20216 Liang et
XD0
77.72=083
90.45-0.77
68.25+0.78
46.92=1.00
70.83
-PGM CE with confooeneee mettan--y
2013
77.76=:222 1.66
90.56=0.76
68.28:0.89
47.01=0922
70.90
44
-PGM CE
largest esteopy
77.77-1.71
90.60-1.15
68.32+0.94
47,03+1.35 1.28
70.91
68.96+1.54
47,67+1.25
70.9%
46
-GGM Loss
77.67_1633
89.72:1100
69.0011.65
47.80.10.77
71.05
87
PGM RST (PROGRAM)
78.17=0.22
90.78-044
69:05-00.66
47.84+11.25
71 71:46
Table A7: Ablation study of normalized weights. All experiments are conducted based on the ResNet-50 backbone. Average accuracy (%) is reported domain generalization benchmarks. means higher is better.
Exp ID
Method
VLCS
PACS
OfficeHome 1
Terralncognita
Avg.
#1
ERM (ResNet-50)
76.71=t0.50
83.21=1.14
67.13 99
45.93= 1.34
68,
(with unnormalized weights)
77.85+11.26
90.22-
68.92400.1
47.76+
71.19 47,84#1 1.23
#3
+PGM (with normalized weights) RST
78.17:40.2
90,78=0.40
69.05-+0.66
71.46
Table A8: Effect of partial updates. All experiments are conducted based on the ResNet- back- bone, Average accuracy (%) is reported on domain generalization benchmarks. 1 means higher is better.
Exp ID
Method
VLCS f
PACS
OfficeHome
Terralncognita 1
Avg. f
Runtime (s)
ERM (ResNet-18)
76.71=0.50
83.21=11.14
67.13:#0.99
45.93=1.34
68.25
11.15
#2
+PROGRAM (Ane-tune linear)
77.52:10.86
82.27:1:1099
63.88:11100
42.73=1.75
66.60
13.05
+PROGRAM
77.7511.37
88.03.10.44
64.59.0..55
29.07
such Tent /Wang et al. bb. SHOT (Liang et al. 2020), PL (Lee al. 2013), and T3A (Iwa- sawa & Matsuo, 2021). The results are shown below. All experiments are conducted based on the ResNet-50 backbone. #1 is the baseline ERM. #2 replaces our RST module with the CE loss func- tion, as done in Tent (Wang et al. 2021b) and SHOT (Liang et al. 2020). #3 improves upon #2 by introducing confidence threshold=0.9 as done in PL (Lee et al. 2013). #4 further improves upon #2 by selecting only the pseudo-labels with lower Shannon entropy, filtering out 20% low-quality data, done in T3A (Iwasawa & Matsuo 2021). #5 applies only the KI. loss, which is commonly used for consistency regularization. #6 applies only the SCE (symmetric cross entropy) loss. Com- paring all these alternatives, our RST module (#7) achieves the best results. Comparing all these alternatives, our RST module achieves the best results.
D.5 EFFECT OF NORMALIZATION IN COMPUTING SOFT LABELS
In Eq. the soft labels are estimated with the normalized prototypes. This is because the magni- tudes of prototypes may vary. Without normalization, prototypes with larger magnitudes will exert stronger influence on the computed value, which is not desired. We have conducted additional exper- iments to compare the results with and without normalization of prototypes. The results are shown in AA The experiments clearly demonstrate the necessity of using normalized prototypes (#3) instead unnormalized ones (#2).
D.6 PARTIAL-UPPATTE VARIANTS OF PROGRAM
We have conducted additional experiments to further analyze the computational efficiency of PRO- GRAM and explore the trade-off between effectiveness and efficiency. In Table we investigated alternative fine-tuning approaches. Specifically, we design partial-update variant of PROGRAM that only fine-tune the linear classification layer (#2). Based on the experimental results, fine-tuning only the linear layer shows promise and achieves a good trade-off between accuracy (66.60%) and efficiency (13.05s). However, it may perform suboptimally on datasets with large domain gaps, such as PACS. In order to achieve a model that performs well across all benchmark datasets, we choose to fine-tune all parameters in default setting (#3).
21

---

Published as a conference paper at ICLR 2024
E DISCUSSION OF RELATED WORKS
Table A9: Adaptation settings differ by their data and therefore losses during training and testing. We denote z for data and for labels. Source and target domain are denoted with subscript and t.
Setting
Source Data
Target Data
Train Loss
Test Loss
Fine-tuning
Te. Ve De
L(x,, yc) L Uo) I(rr))
Unsupervised Domain Adaptation
Ta Us
Source-free Domain Adaptation
full data at
L(x))
Test-time Training
T.. U/
L(x,,86) + L(xs)
L(xe)
Test-time Adaptation
batch data xee
l(xe)
Domain adaptation addresses model generalization from source domain to target domain. Table A9 summarizes and compare different adaptation settings in terms of source and target data required and types of losses.
Fine-tuning (Donahue et al. pre-trained model using standard supervised loss. Unsupervised domain adaptation (UDA) (Pei) et al. 2018 Saito et al.) 2018 Zhang et al.) 2020; Lin et al. 2022) seeks to use both the labeled source datasets and an unlabeled target dataset to align features across domains. Morcover, the adaption is achieved during the training stage. This assumes that the labeled data from the source domain and unlabeled data from the target domain can be accessible during training, which is not a practical setting for many applications. Source-free domain adaptation (SFDA) You al. 202 Wang et al. 2021b Yan et al.] 2021 Liang et al.] 2020 Morerio et al., 2020; Kurmi et al. 2021 Zhou et al. 2022 Tang et al. 2021) aims to resolve the domain adaptation problem when the source data are not available. In this setup, the model is adapted using the unlabeled data solely from the target domain. However, this adaptation is usually made in an offline manner, requiring all target test data to be available during the adaptation process. In addition, it normally requires multiple epochs to train the model, which hinders the deployment on online testing scenarios. Test-time training (TTT) methods (Gidaris et 2018 Liu et al. 2021 (unn et al.] (020b) also optimize during testing, but alters the training stage to include additional self-supervised loss. We show that our test-time adaptation (TTA) setting is different from these settings. TTA only requires the pre-trained model and online unlabeled target data for adaptation during the inference stage.
2014 Yosinski et al. 2014) directly use labeled target data to retrain the
More recently, Zhu & Koniusz 2023) propose the prototype- based label propagation to solve the problem of transductive few-shot learning, which is also related to our work. However, there are some distinguishing aspects to be highlighted. (1) Different research topics and settings: Zhu & Koniusz (2023) focus on transductive few-shot learning, where labeled support samples and all unlabeled queries are available, assuming training and testing occur in the same domain. Our paper, on the other hand, addresses online test-time adaptation, which involves fine-tuning pre-trained model using a batch of unlabeled test data from the larget domain, without accessing any labeled data. (2) Distinct graph construction: In (Zhu & Koniusz (023), prototypes are not part of the graph and are updated separately using gradient descent. In contrast, we treat prototypes as graph vertices in our approach.
(3) Varied prototype definitions: Zhhu & Koniusz (2023) initialize prototypes as mean vectors of labeled support samples since labeled data available. In contrast, we initialize prototypes using the model weights of the classification layer. (4) Offline vs. online approach: /Zhu & Koniusz 2023) require access to all unlabeled queries and performs iterative prototype updates in offline manner. In contrast, in our online test-time adaptation, the unlabeled test set arrives in an online manner. Our re- re-initialization design ensures that our prototypes stay up to date with model and maintain their representation of global class characteristics. By highlighting these differences, we emphasize the unique contributions and focus of our work compared to Zhu & Koniusz (203))
22

---

Published as a conference paper at ICLR 2024
F EXPERIMENTAL SETTINGS
F.1 DATASETS.
PACS (Li et al. 2017) contains 9,991 examples and 7 classes that are collected from 4 domains: art, cartoons, photos, and sketches. OfficeHome (Venkateswara al., 2017) consists of 4 domains: art, clipart, product, and real, and includes 15,588 images and 65 classes. VLCS (Torralba Efros 2011] comprises four domains: Caltech101, LabelMe, SUN09, and VOC2007, and includes 10,729 images and classes. TerraIncognita (Beery et al. 2018) is composed of wild animal images taken from 4 different locations (L.100, 1.38, 1.4,, and L646,, and consists of 24,78 24,788 examples of 10 classes.
CIFAR-10C/100C and ImageNet-CC (Hendrycks & Dietterich, 2019) is constructed by corrupting the original clean CIFAR- 10/100 (Krizhevsky) (2099) and Ner (Deng et al., (009 Krizhevsky et al. 2012) datasets. The corruption consists of 15 different types, i.e., Gaussian noise, shot noise, impulse noise, defocus blur, glass blue, motion blur, zoom blur, snow, frost, fog, brightness, con- trast, elastic transformation, pixelation, and JPEG compression, in which each corruption type has 5 different severity levels and the larger severity level means more severe distribution shift. In the experiments, we mainly focus on the most severe corruption level.
F.2 MODELS.
In the main experiments, we compared different methods on ResNet- 18/50 (He et al. 2016), which are mostly widely used in domain adaptation and generalization community. To validate the gener- alization ability of the proposed method, we tested our method on different backbone architectures, including vision transformers (ViT-B/16 (Dosovitskiy et al., 20200), hand-designed convolutional neural network (CNN) based models (ResNeXt-50) (Xie et al. (017)), network architecture search (NAS) based models (EfficientNettBB (Niu et al. 2022)), and multi-layer perceptron (MLP) based models (Mixer-L/16 (Tolstikhin et al. 2021)). For various backbones, we use the torchvis s sion implementation exxepp for ViT-B/16 and MLP-mixer, we use implementation from t immm library
F.3 BASELINES
We compare PROGRAM with several baseline methods. For fair comparisons, we adapt these meth- ods to fit in our online test-time adaptation setting. Empirical Risk Minimization (ERM) CCowdd
hary
2020) represents the standard supervised training baseline. Pseudo Labeling (PL) (Lee et al.
2013
fine-tunes the pre- pre-trained classifier using confident pseudo-labels based on the model predic-
tions.
PI. is a modified version of PL. that fine-tunes only the last linear classifier. Ten Wang
2021a) optimizes the model only the parameters of the BN layers by the minimize the entropy of its predictions. TentAdapter WWang et al. 2021a) is a modified version of Tent that adds a BN layer between the feature extractor and the last linear classifier, and optimizes only the added BN layer. TentCir Wang et al. 202 is modified version of Tent that optimizes the model only the last linear classifier instead of the BN layers. SHOTIM [ (Liang et al., 2020) fine-tunes the whole feature extractor to maximize the mutual information between test data and the model pre- dictions. SHOT Lian et al., 2020) is a modified version of SHOTIM that adds a pseudo-labeling loss. Originally, SHOT is one of the source-free domain adaptation methods which focus on the offline adaption setting. However, for fair comparison, we compare with the online version of SHOT. T [Iwasawa & Matsuo 2021) predicts the labels of the test data by comparing distances generated by the linear classifier. TAST (Jang et al, 2023) fine-tunes the pre-trained model via self-training with nearest neighbor information. TAST- B.
al.
between test data and the
(Jang et al. 2023) a modified version of TAST that adjusts the parameters of the BN layer. Note that the multiple projection layers of TAST can be regarded kind of ensemble learning. and increasing the number of projection layers can improve the accuracy. TSD Wang et al. 2023
haugss//gthhb.ccmm/Dquaaaaaaaag
hhanss/gitthhhcommmiimmaassso
23

---

Published as a conference paper at ICLR 2024
uses test time self-distillation make the target feature as uniform possible and uses memo- rized spatial local clustering to encourage the distance of feature representations to be aligned with the pseudo logits. TIP (gguyen et al., (2023) uses transformation invariance as an unsupervised surrogate loss function for online domain adaptation.
F.4 IMPLEMENTATION
F.4.1 IMPLEMENTATION DETAILS ON DOMAIN GENERALIZATION BENCHMARKS.
We follow the same implementations in TAST (Jang et al. 2023 and TSD (Wang et al. 2023). We splite 80% of data from the source domains for training and 20% for validation. All models initialized with ImageNet-1K3 (Russakovsky et al. 2015) pre-trained weights. For ResNet-18/50, the same hyperparameters are applied for training and test-time adaptation as in TAST (Jang al.) 2023) and DomainBed (Gulrajani& & Lopez- Paz, 2020). We set the batch size as 32 for each source domain and the learning rate as 5e-5 with Adam optimizer. We set dropout probability and weight decay to O. For ViT-B/16 (Dosovitskiy et al. 2020), ResNeXt-50 (Xie et al. 2017), EfficientNet- B4 (Niu et al. 2.22], and Mixer-L/16 (Tolstikhin et al. 202T), we use the same hyperparameters as in TSD (Wang et al. (023). We use the Adam optimizer with a learning rate of 5e-5, weight decay of O, dropout rate of O, and a batch size of 32. We train source model for 5k iterations. All images are resized to 224 x 224 and data augmentation is used in source domain training, which includes random cropping, horizontal flipping, color jittering, and intensity changing. During test- time adaptation, the batch size is 32 unless explicitly stated. At the testing phase. PL (Lee et al. 2013). Tent and SHOT (Liang et al., (020) utilize the SGD optimizer with a learning rate of 0,001 and momentum of 0.9. Tent (Wang et al.) 2021a), TAST (Jang et al. 2023), and TAST-BN (Jang) et al. (023) use the Adam optimizer with a learning rate of 0.001. For TSD (Wang et al.) 2023). official parameters are adopted, using the Adam optimizer with a learning rate of 5e-5, and for TIPI (Nguyen et al.] 2023), the SGD optimizer is used with a learning rate of 0.0025, following official hyperparameters. The confidence threshold for PL and PLCIf is set 0.9. For PL, only the BN layers in the trained model are adjusted. as in TAST (Wang et al.) 2021a). For TAST-BN, the size of the entire support set is limited 150. In all experiments, we use four random seeds {0, 1, 3,3 and report the average results in the main text.
F.4.2 IMPLEMENTATION DETAILS ON IMAGE CORRUPTION BENCHMARKS.
We use the same implementation introduced in TAST (Jang et al. 2023). ResNet-18/50 are trained for 1000 epochs, combining classification and instance discrimination tasks. The instance discrim- ination task weight is set at 0.1 to balance the two tasks. For image corruption datasets, we employ the same data augmentation methods as in TAST (Nguyen et al.) (023), including random cropping, horizontal flipping, color jittering, and intensity changing. The batch size during network training is fixed at 256. test time, for the CIFAR- ImageNet-C dataset, it is 64. At the testing phase, PL, Tent and SHOT use the SGD optimizer with a learning rate of 0.001 and a momentum of 0.9. The confidence threshold for both PL and PLCIf is maintained at 0.9. In PL, only the BN layers in the trained model are adjusted. Tent, TAST, and TAST-BN use the Adam optimizer with a learning rate of 0.001. There are no restrictions on the size of the support learning rate of 5e-5 following official setting. For TIPI (gguyen et al. 2023), the official setting is applied, using the SGD optimizer with learning rate of 0.0025.
datasets, the batch size is set at 128, and for the
for TAST-BN. TSD (Wang al.) 2023) applies the Adam optimizer with
"https://iithu.co "hatp://gituu..cm//atuaaamm http:///gghhb....mmmuuuuggggyg/t http://ggthh..oooocccccccccrsstn
24

---

Published as a conference paper at ICLR 2024
G APPLYING PROTOTYPE GRAPH MODEL (PGM)
In this section, we introduce how we apply Prototype Graph Model (PGM) to the existing pseudo- labeling based TTA methods.
G.1 T3A + PGM
For T3A (Iwasawa & Matsuo 2021). ,. we directly replace its pseudo-label generation process (j arg max q = yk (o))).) with PGM. We input features obtained by the backbone into PGM to generate pscudo-labels: ýPGM PG)(ff(z)). Note that for fair comparison, we do not change the update process of the T3A pseudo-prototype prototype set with pseudo-labels. Our PGM only changes the pseudo-label generation process, and the inference procession follows the standard T3A process. The prototypes in the PGM will be the same as prototypes in Sy. The difference is highlighted with blue colors.
G.2 TAST + PGM AND TAST-BN + PGM
For TAST and TAST-BN (Jang et al. 2023), we also use PGM to replace the pseudo- generation stage in TAST, without changing other parts. The inference process remains the same as the standard TAST TAST-BN. The difference is highlighted with blue color. The prototypes in the PGM will be the same as prototypes S.
Algorithm A1 Algorithm of T3A
Input: Feature extractor fa. the batch of input I8, and support sets Sy available at this point. Output: Prediction for all E IB, where x P(X).
Step Adjust the template for each class using the B. for E B:
y = arg max 9. (Y Uk fo(x))
fa(w) } for yı S Sy U [T)((T)
end for
Filter support sets. Step 2. Predict based on the distance between the adjusted template.
Return: arg max, (Y = yk y=())(())) for all x e IB
Algorithm A2 Algorithm of T3A + PGM
Input: Feature extractor fg, the batch of input IB and support sets Są available at this point. Output: Prediction for æ E B,, where x ~ P(X).
Step Adjust the template for each class using the R.
PGM (z))
S S U
for yk 9
Filter support sets.
Step 2. Predict based the distance between the adjusted template. Return: arg max, (Y = (x)) for all a e IB
25

---

Published as a conference paper at ICLR 2024
Algorithm A3 Algorithm of TAST
Feature extractor fo. number of adaptation modules Ne. adaptation modules (h i== test batch IB, support set S, number gradient steps per adaptation T, number of support examples per each class M, number of nearby support examples Na. learning a Output: Predictions Ys for all x E IB.
Input:
N.
Step 1. Update the support set S. for = 1 7 do for i 1 Na do
for x E B do
PIAST,
Obtain the nearest neighbor- based pseudo label of æ
Pprato,i
(- x) = Compute the prototype-bai based class distribution of x
end for
Φx < Φi a VV EVEB CE(JTAST, a), P x))
end for end for Step 2. Compute the predictions Un
Algorithm A4 Algorithm of TAST PGM
Feature extractor fe. number of adaptation modules Ne. adaptation modules (he, I= test batch IB support set S, number gradient steps per adaptation T, number of support examples per each class M, number of nearby support examples N,, learning rate
Input:
N.
Output: Predictions dr for all x E IB.
Step 1. Update the support set S. for = 1 do for i = 1: N₂ do
for x E B do
PTAST, a(- (X) PGM(ff(z))
Pprata, (. x)) = Compute the prototype-basee based class distribution of x
end for
di < Φi - a Enen CE(ÍTAST,(( x)), Pp x:))
end for end for Step 2. Compute the predictions ý.
26

---

Published as a conference paper at ICLR 2024
H FULL RESULTS
Table A10: Full results on the VLCS dataset with different TTA methods. * from (Wang et al. 2023).
denotes the results
Method
Backbone
C
L
V
Avg.
ERM*
ResNet-18
94.70.1..33
63.79
67.90=11.97
73.15+1.37
74.88
+Tent*
ResNet-18
89.82+42.89
61.98+1.11
65.51
7..21+1.611
72.88
TentAdapter*
ResNet-18
79.80=4.74
58.51=1.44
61.62:1..2
68.1411.74
67.02
+ T
ResNet-18 1..75=1..4
63.74#1441
67.92:2.222
65,40:6.91
72.96
+SHOT*
ResNet-18
91.45-+6.83
48.26+1.77
54.75++2.59
66.51
65.24
+SHOTIM*
ResNet-18 90.28+7.00
1..9
54.66+2.47
66.52+1.19
64.86
+PL*
ResNet-18
93.57:12.24
53.8242.51
50.5819.50
53.9142.78
62.97
+PLCIF*
ResNet-18 94.67+1.38
63.6441.31
67.9042.21
73.34+1.00
74.89
+TAA*
ResNet-18 17.52++1.9
65.32+2.24
70.70=3.48
15.51
77.26
+TAST
ResNet-188
99.17=0.60
1..8
68.13#1.76
75.92+1.75
77.27
+TAST-BN*
ResNet-18 92.60=1.66
64.75=1.229
67.27+3.14
76.2343.73
75.21
+TSD
ResNet-18
97.24+2.01
6..42+1.73
65.57+1.38
67.05+2..20
73.57
+PROGRAM
ResNet-18
9..7242.96
66.37+1.48
71.85+2.62
74.06
77.75
*ERM*
ResNet-50
9..66+0.64
1..87+1.71
71,21+1.52
74.09+2.06
76.71
*
ResNet-50
92.36++2.44
58.4643.29
67.84+2.003
73.19+2.68
72.96
+ TentAdapter*
ResNet-50
85.36.13.49
58.3543.46
66.47
68.4242.11
69.65
TentCIff
ResNet-50
97.61
63.67:2.10
68.77:1.27
73.16+11.31
75.80
*SHOT*
ResNet-50
98.72:t1.50
46.82.12.57
55.70+
67.04
67.07
*SHOTIM*
ResNet-50 9..65+1.44
46.54:2.32
55.81+2.32
66.73+2.82
66.93
+PL*
ResNet-50
98.4840.34
53.45+2.82
59.4549.24
66.2448.63
69.41
+PLCIF*
ResNer-50
9.663++0664
63.36+2.11
69.7440.78
71.56+44.3
75.65
*TA**
ResNet-50
99.17+0.38
64.78+1.61
73.01+3.22
72.20+2.84
77.29
+
ResNet-50
99.35=10.30
6..64
73.63+3.58
72.01
77.66
+TAST-BN
ResNet-50
96.0942.40
60.2246.08
65.78
71.9915.90
73.52
+TSD
ResNet-50 9..34+1.45
65.29+1.668
67.25+2.21
67.97+2.37
74.46
+PROGRAM
ResNet-50
99.39
66.44:2.55
74.32+1.28
72.54:22.57
78.17
27

---

Published as a conference paper at ICLR 2024
Table All: Full results on the PACS dataset with different TTA methods. * denotes the results from [Wang et al. 2023).
Method
Backbone
A
C
S
Avg.
DRM*
ResNet-18
77.78:10.81
75.09
95.19=1..29
69.11
79.29
+Tent*
ResNet-18
82.71
81.20+1.551
95.32=#.33
76.82+1.977
83.89
TentAdapter*
ResNet-18
78.69
77.45+0.82
95.77=00.0
70.89+2.75
80.75
TentCIf*
ResNer-18
78. 1.05
75.01+11.53
95.50++035
65.60-+5.96
78.57
+SHOT*
ResNet-18
01.0
79.68
96.18+0.27
72.48+2.004
82.36
+SHOTIM*
ResNet-18
81.10:10.90
79.66:00.95
96.1810.27
72.35+2.003
82.33
+PL*
ResNet-18
76.42.14.89
61.05
95.7010..56
50.7548.79
70.98
+PLCIP*
ResNet-18 19.09-1..41
75.46+2..93
95.43=10.32
62.48+7.31
78.11
+T3A*
ResNet-18
78.81
77.14+1.20
95.92:00.66
11.44+1.63
80.83
+TAST*
ResNet-18 80.56+00.53
78.26::0.99
96.44+0.20
72.52+0077
81.94
ResNet-18 86.49-10.20
83.70+2.557
97.23+0.11
80.85+L1.42
87.07
+TSD
ResNet-18 16.81+1.22
85.04+1.114
94.39-10.86
82.00++1.03
87.06
+PROGRAM
ResNet-18
17.05+1.117
85.77
97.15
82.16
88.03
ERM*
ResNer-50
1..9
78.05+3..36
96.50+0.32
75.38++..31
83.21
*
ResNet-50
1..54
84.90+1.35
95.45-0.93
1..74
85.16
+ *TnntAapperr*
ResNet-50
82.75+2.01
79.5012.26
96.7810:20
75.73
83.69
+TentCIf*
ResNet-50
83.00+1.87
77.8614.20
96.55
73.25-66.14
82.66
+SHOT*
ResNet-50
84.67=1.70
80.17
96.58+0.52
74.86+22.95
84.07
*SHOTIM*
ResNet-50
84.62+1.79
80.24+1.411
96.5410.46
75.16+2..88
84.11
+PL,
ResNet-50
84.5945.511
76.35+2.57
96.4110.68
69.54
81.72
*PLCIF*
ResNer-50
83.88+2.00
78.9343.66
96.53+0.40
73.96
83.33
+T3A*
ResNet-50
83.56:2..03
79.75=3.14
96.99+0.24
75.36+3.57
83.92
+TAST*
ResNet-50
83.85++2.05
79.15+3.00
96.93+0.27
76.4943.13
84.11
*TAST-BN
ResNet-50
87.11+2..04
88.50+1.93
97.79+0.47
83.23+1.42
89.16
+TSD
ResNet-50
8..5
18.15+1.03
95.72+0.61
85.42+00.8
89.27
+PROGRAM
ResNet-50
89.78+1.077
89.76:10.96
97.86+10.73
85.71
90.78
28

---

Published as a conference paper at ICLR 2024
Table A12: Full results on the OfficeHome dataset with different TTA methods. * denotes the results from [Wang et al. 2023).
Method
Backbone
A
C
P
R
Avg.
DRM*
ResNet-18
15.19:10.49
47.76:11.02
72.22:10.53
73.21
62.10
+Tent*
ResNet-18
53.39:1061
48.28=0088
70.50
71.29::072
60.86
TentAdapter*
ResNet-18
53.53=10.43
49.53
72.47=0.27
73.01
62.64
TentCIf*
ResNer-18
55.17-00.67
36.73+1..94
72.21+0.52
73.22+-0.9
59.33
+SHOT*
ResNet-18
55.14+0.557
50.27+1.118
71.69+00.5
73.2140.91
62.58
+SHOTIM*
ResNet-18
55.08
10.29+1.177
71.71
73.21
62.57
+PL*
ResNet-18
54.4941.06
34.66413.13
71.45:0.37
72.2010.65
58.20
+PLCIP*
ResNet-18
55.14
47.70+1.25
72.21+0.54
72.62+0.96
61.92
+T3A*
ResNet-18
55.1044.74
49.56=11114
74.10=0..5
74.07+#1.18
63.21
+TAST*
ResNet-18
56.15
50.04+1..31
74.3
74.28
63.70
ResNet-18 15.11
51.85
7..88
72.13
62.79
+TSD
ResNet-18
5..93+1.772
53.56
73.05
73.51
64.51
+PROGRAM
ResNet-18
56.91
1..23+1.30
1..9
7..25
64.59
ERM*
ResNer-50
6..32+0069
53.44+1.11
75.84+1.10
77.90+0.92
67.13
*
ResNet-50
60.9810.67
53.9411.24
74.4940.71
75.75
66.29
+ *enttAapper
ResNet-50
62.63:10.45
54.90
76.20+1.009
77.92$1.01
67.91
+TentCIf*
ResNet-50
61.35
52.72
7..23+1.05
1..86+1.07
66.79
+SHOT*
ResNet-50
61.91+0.33
55.58+0.91
1..49+1.55
77.60+0..0
67.65
*SHOTIM*
Re
61.8410.32
55.63+0.92
7..56+11600
77.57
67.65
+PL,
ResNet-50
19.42+1.55
42.40+12.31
73.80+42.26
75.77+1.500
62.85
*PLCIF*
ResNer-50
61.35++0.40
52.87+11.6
7..86++1009
77.94+1.110
67.01
+T3A*
ResNet-50
61.9111.559
55.07=1.114
77.39+1.38
78.6740.61
68.26
+TAST*
ResNet-50
62.43+0.80
55.81+1.26
1.04
78.8340.93
68.63
*TAST-BN
ResNet-50
63.22+40.8
58.20
77.14+1.11
76.94+#0.9
68.88
+TSD
ResNet-50
61.60+1.40
57.25+0.79
78.21+1.31
76.67+L0.76
68.43
+PROGRAM
ResNet-50
6..96
57.31
77.87+1.022
78.05::0.49
69.05
29

---

Published as a conference paper at ICLR 2024
Table A13: Full results on TerraIncognita dataset with different TTA methods. * denotes results from
WWan et al. 2023).
Method
Backbone
L100
L38
L43
L46
Avg.
DRM*
ResNet-18
37.18:2.46
36.12:1..20
53.18::1.27
36.02:1
40.62
+Tent*
ResNet-18
38.29:+0.48
25.82+3.91
11.53=1.59
29.15=
33.70
TentAdapter*
ResNet-18 10.55+1.46
37.44=2.22
46.33=1.32
35.30+
39.91
TentCIf*
ResNer-18
34.44-113.1
34.1945.776
52.71++2.03
31.86-+2.26
38.30
+SHOT*
ResNet-18
03.87++0.66
28.58++2.10
40.99+-2.07
30.83+1.26
33.57
+SHOTIM*
ResNet-18
33.83::1.29
28.13+2..0
40.81
30.6411.44
33.35
+PL*
ResNet-18
51.92::1.19
35.611:20.74
39.97+10.98
22.2648.221
37.44
+PLCIP*
ResNet-18
45.22+42.45
36.03+55.81
52.76=+1.54
33.10++2.27
41.78
+T3A*
ResNet-18
36.22+
40.08+1.98
50.72+1.02
33.79:#1.25
40.20
+TAST*
ResNet-18
43.6742.83
39.2443.79
52.64+3.02
35.01
42.64
ResNet-18
51.06.17.31
32.7447.54
41.7042.86
32.21
39.43
+TSD
ResNet-18 52.85+2.16
36.86
45.10++1.2
35.79442.03
42.65
+PROGRAM
ResNet-18
11.26::1.05
39.38
47.96
34.02:E1.67
43.16
ERM*
ResNer-50
46.84+1.96
43.24422.11
53.32+1.92
40.30+1.993
45.93
*Ten**
ResNet-50
41.2042.71
29.7243.59
41.35+2.92
36.03+2.88
37.08
+ TenttAapter
ResNet-50
46.6411.17
41.1113.16
19.31
38.52:1..04
43,89
+TentCIf*
ResNet-50
49.8743.80
43.3143.19
53.01
28.40:16.19
43.64
*SHOT*
ResNet-50
36.1742.70
29.80=22.92
41.00=10.30
33.83++1.86
35.20
*SHOTIM*
ResNet-50
35.56+2.76
27.4914.01
40.77:00455
33.67+1.84
34.37
+PL,
ResNet-50
56.75115778
46.12+1.03
29.44
20.06:14.65
38.09
*P.CIF*
ResNer-50
52.28+43.95
43.76+22.66
52.78++2.15
37.81++2.49
46.66
+T3A*
ResNet-50
15.13::1226
44.6742.56
52.52+0.78
40.1342.31
45.61
+TAST*
ResNet-50
53.0143.95
43.2743.21
53.7942.72
39.6643.65
47.43
*TAST-BN
ResNet-50 55.75+2.377
33.9249.86
43.87+4.70
32.33
41.47
+TSD
ResNet-50 16.97+11664
42.06+1.900
51.29+2.23
39.32+2.26
47.41
+PROGRAM
ResNet-50
55.15:1..67
43.90+2.02
52.86+11.65
39.45:t1.56
47.84
30

---

Published as a conference paper at ICLR 2024
Table A14: Full results on the CIFAR-1OC dataset with different TTA methods. * denotes the results from (Wang et al. 2023).
Method
brit
contr
defoc
clast
Eog
frost
glass
impui
jpes
mntt
pixel
shot
3BLWW
200m
Avg.
No Adaptation
18.73
7.01
13.27
11.84
23.38
29.41
28.24
50.78
57.00
19.46
23.38
47.85
44.00
21.93
10.84
29.14
-SHOT*
-Tent"
15.91
7.91
7.85
9.27
18.13
16.45
12.62
23.48
24.52
13.19
12.70
10.93
14.59
14.06
7.68
13.95
-PL*
33.56
7.54
11.53
10.60
20.21
23.96
21.78
38.36
43.64
16.88
18.72
29.83
30.43
18.75
9.43
22.31
-T3A*
+1.87
7.30
13.61
11.99
22.06
28.52
27.13
44.10
54.36
18.71
22.54
37.53
37.84
21.97
10.72
26.68
-TAST-BN*
14.91
7.58
7.81
8.62
16.81
15.10
12.25
21.82
22.54
12.38
11.67
10.34
13.77
7.57
13.08
-TIPI
18:44
5.93
5.17
5.68
18.60
16.50
12.88
24.42
26.86
10.53
10.99
10.03
15
16.03
5.47
13,52
-TSD
15.69
6.39
7.08
17.64
15.63
11.56
23.67
11.79
12.17
9,00
10.04
15.70
10.89
8.62
13.05
Table A15: Full results on the CIFAR-100C dataset with different TTA methods. denotes the results from (Wang et al. 2023).
Method
brit
contr
defoc
clast
fog
frost
glass
impul
ipeg
moth
pixel
sbot
Show:
z00m
Avg.
No Adaptation*
80.77
28.86
50.93
39.62
59.54
68.11
60.19
$4.79
82.26
87.75
49.96
54.22
72.27
77.84
54.58
60.35
+SHOT"
+Tenf*
43.02
29.65
30.52
31,48
43.88
44,03
39.21
50.91
53.10
36.22
36.31
31.10
41.58
41.85
29.73
39.01
+PE,
43.94
50.14
31.20
32.11
45.07
46.57
40..1
52.66
$4.48
37.48
36,92
34.59
42.68
42.77
30.19
40.06
+T3A*
76.95
29.54
4K-12
39.64
55.68
65.90
58.45
78.23
86. 86.39
48
28.83
53.46
66.31
74.14
55.01
37.68
58.78
+TAST
>TAST-BN*
42.01
29.00)
30.74
42.97
41,02
38.19
51,20
35.70
35.03
33.38
40.01
29.00
-TIPI
41.91
27.68
30.71
30.69
43.17
42.9%
30.9%
4%.30
50.61
37.04
34.54
34.22
40.18
43.13
79.78
38.33
+TSD
41.41
28.55
29.11
$1.02
41
42.36
37.30
50.01
$1.62
35.71
34.95
34 14.98
38.57
40.15
27.68
37.67
PROGRAM
37.00
31


Reviews:
[{"review_id": "NB3jdtkv9d", "reviewer": "Reviewer_C9fo", "summary": "This paper introduces a novel Test-Time Adaptation method named PROGRAM, which leverages a pseudo-labeling approach to enhance model performance for image corruption benchmarks. PROGRAM is build around two key components: (1) a Prototype Graph Model for generating pseudo-labels and (2) Robust Self-Training to adapt the model at test time. The proposed new method has been validated across various architectures, demonstrating consistent improvements over the existing TTA methods. Extensiv experiments show that PROGRAM not only outperforms other state-of-the-art methods but also maintains its performance across a range of hyperparameters. Additionally, it is designed to be \"plug-and-play\", easily integrating with different networks and TTA methods.", "questions": "Given the PROGRAM TTA approach does nto apply any modifications during training phase, can the effectiveness of PGM and RST in PROGRAM compensate for potential deficiencies in the pre-trained model? I.e. have you checked how the test time adaptation method works when the pre-trained model is suboptimal.\n\nHow does the graph construction technique manages the class imbalance that might be present in the unlabeled target data? Related to the discussion in section 3.2 about initialization of prototypes and constructing a prototype graph.", "limitations": "", "rating": 8, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "The PROGRAM demonstrates consistent performance improvements across a variety of backbone architectures. This versatility suggests that the method is robust and can be applied to a broad set of existing models, and across the range of hyperparameters.\n\nEmpirical validation: The method has been empirically validated with extensive experiments showing that it outperforms existing state-of-the-art methods on various domain generalization and image corruption benchmarks.", "weaknesses": "The paper does not discuss potential limitations or failure modes of the proposed method. While the paper reports on the efficiency of PROGRAM compared to other methods, there is limited discussion on the absolute runtime performance, especially in comparison to the baseline models without TTA.\n\nPractical Integration Challenges: Despite claiming that PROGRAM is a \"plug-and-play\" solution, the paper does not delve into the practical challenges of integrating the method into different systems or architectures.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "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": "", "extra_scores": {}}, {"review_id": "pxYlEABaMg", "reviewer": "Reviewer_DVoa", "summary": "This paper proposes the PROGRAM, a TTA method that is comprised of the Prototype Graph Model (PGM) for pseudo-label generation and Robust Self-training (RST) in self-training. PGM is designed to blend the benefits of both prototype-based and nearest-neighbor based pseudo-labeling. RST combines pseudo-labeling and consistency regularization. Experimental results validate the efficacy of the PROGRAM method.", "questions": "1.\tWhile PROGRAM's runtime is competitive as a whole feature extractor, it noticeably lags behind some partial ones like T3A. Given that the performance edge of PROGRAM over T3A isn't substantial in some tasks (as shown in Table 1), could you shed light on the specific scenarios where PROGRAM would be the preferred choice? Essentially, under what circumstances should one opt for PROGRAM, even at the expense of computational speed?\n\n2.\tCould you provide a breakdown of PROGRAM's runtime between PGM and RST (Table 6)? \n\n3.\tFrom Table 3, RST seems to have a small impact on improving results. Furthermore, ResNet-50 on its shows good results. How do you justify the improvements brought by PGM and RST given their relatively modest contribution to performance?", "limitations": "", "rating": 6, "confidence": 2, "soundness": 3, "presentation": 2, "contribution": 3, "strengths": "1.\tPROGRAM looks like an interesting approach to combine the benefits of prototype-based and nearest-neighbor based pseudo-labeling.\n2.\tThe paper presents extensive experiments to validate the effectiveness of the method.", "weaknesses": "The presentation of the paper could be improved:\n* The explanation for Figure 1 appears to lack details. A clearer description would be helpful, such as specifying that the red line represents the decision boundary. Moreover, the meaning of the red dashed line in 1(b) is ambiguous.\n* The meaning of the symbols ‘+’ used in Tables 1 and 2 is not clear. It would be helpful if their meaning can be clarified.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "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": "", "extra_scores": {}}, {"review_id": "Y2wtScX1OC", "reviewer": "Reviewer_zHCF", "summary": "This paper proposes a new test-time adaptation method, which has two contributions: 1) combines both the prototype-based pseudo label and nearest-neighbor-based pseudo label in a prototype graph to generate a comprehensive pseudo label and 2) Combines hard and soft pseudo-labels to improve the adaptation.", "questions": "see weaknesses", "limitations": "", "rating": 6, "confidence": 3, "soundness": 2, "presentation": 2, "contribution": 3, "strengths": "+The paper is well-written, and the overview figure clearly demonstrates the main contributions of this work.\n+It is interesting to generate the pseudo-label by label propagating within the constructed graph.\n+Experimental results are impressive, the proposed methods got SOTA in all proposed benchmarks.", "weaknesses": "Methodology:\n-PGM is a non-parametric process to generate the pseudo-labels. \nThe motivation for using prototypes to determine the connectivity between two vertices is unclear. Could you use dot-product or cosine similarity to replace this? Some experimental comparisons and analysis could provide more insights.\n\n-PGM lacks comparisons with non-parametric attention modules. Given the predefined graph G, the non-parametric attention module could first update each node in the graph with the help of the adjacency matrix, and then use the updated class prototypes to make predictions of each updated test feature.  \n\n-Could the author provide more insights into why PGM shows more reliable pseudo-labels?  Especially, what does “more reliable” mean?  \n\n-Some confusion about the derivations in A3 and A4. How to simplify A3 as A4. Could the author provide more detailed information?", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "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": "", "extra_scores": {}}, {"review_id": "x2HnyruOqV", "reviewer": "Reviewer_xjYH", "summary": "This paper studies test-time adaptation method and propose a pseudo-label-based method, called PROGRAM. Authors utilize prototype graph construction and prototype graph based label propagation to obtain more accurate pseudo labels. A robust self-training strategy is proposed to employ cross entropy loss or symmetric cross entropy loss to all samples in the batch. Experiments across four domain generalization benchmarks and three corruption benchmarks are provided to evaluate the effectiveness of PROGRAM.", "questions": "1. The experiment of Fig.3 is weak, the class number of PACS is too small, authors should use benchmarks like CIFAR-100-C or OfficeHome to evaluate the sensitivity of batch size.\n\n2. What is the accuracy and percentage of pseudo label after filtering by PGM?\n\nTypo error: the caption of Table 4 : ↑ means higher is better.", "limitations": "", "rating": 5, "confidence": 4, "soundness": 3, "presentation": 2, "contribution": 2, "strengths": "1. The experimental results are rich, which consists of four DG benchmarks and three corruption benchmarks.\n\n2. The proposed method is clear, which is easy to follow.", "weaknesses": "1. The novelty of the paper remains to be discussed. Authors just use Prototype Graph Model directly and the strategy that selects some samples with CE loss and others with consistency regularization is commonly used in unsupervised learning. A similar paper [1] which also provides the derivation of Prototype Graph Model for few shot learning should be cited.\n\n[1] Hao Zhu, and Piotr Koniusz. Transductive Few-shot Learning with Prototype-based Label Propagation by Iterative Graph Refinement. In Proc. CVPR, pages 23996--24006, 2023.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "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": "", "extra_scores": {}}, {"review_id": "d8P32KfxgG", "reviewer": "Reviewer_XKXi", "summary": "This paper presented a novel test-time adaptation method named PROGRAM based on pseudo-label learning. The key motivation of PROGRAM was to leverage label propagation to improve the quality of pseudo-labels and then use robust self-training for model updating. Experiments on several data sets confirmed that PROGRAM was effective and computationally efficient for test-time adaptation.", "questions": "Q1: The Robust Self-Training (RST) combines both pseudo-labels and consistency regularization. The effectiveness of RST can be validated with more ablation studies. For example, compared to simple pseudo-labeling or consistency regularization, how can their combination perform better on the TTA benchmarks?\n\nQ2: The soft labels in Eq. (1) are estimated with the normalized model weights $c_k$ (prototypes). Compared to vanilla soft labels with the raw source model (with unnormalized weights), can these prototypes help provide better pseudo-labels?\n\nQ3: Is the matrix $\\mathbb{I} - \\lambda \\mathbf{Z} \\mathbf{D}^{-1} \\mathbf{Z}^T$ full rank to directly compute the inverse of this matrix?\n\nOverall, this paper introduced an interesting idea for handling the noisy labels within the test-time adaptation and achieved promising performance in several benchmarks. I would like to increase my rating if my concerns can be well addressed.\n\n\n##########################################################################################\n\nMost of my concerns are addressed after rebuttal, thus I would like to increase my score. More discussion can be provided in this paper to validate the high-quality pseudo-labels of the proposed framework. The efficiency of PROGRAM can also be improved when the graph-based method is used to improve pseudo-labels.", "limitations": "", "rating": 6, "confidence": 5, "soundness": 3, "presentation": 4, "contribution": 3, "strengths": "**Originality:** The major contribution of this paper was to introduce a novel PROGRAM method for test-time adaptation, which aimed to adapt a pre-trained source model to the test data. PROGRAM addressed the issues of noisy pseudo-labels by introducing two novel components. One was the Prototype Graph Model (PGM) for generating high-quality pseudo-labels. The other one was the Robust Self-Training (RST) by combining pseudo-labeling and consistency regularization for model updating. Experiments demonstrated that PROGRAM could achieve better prediction accuracy and comparable computational efficiency compared to state-of-the-art TTA baselines.\n\n**Quality:** The motivation of PROGRAM in handling noisy pseudo-labels was clearly illustrated. Previous works using noisy pseudo-labels might lead to sub-optimal solutions in model updates. The graph-based label propagation improved pseudo-labels by enforcing that two similar samples have similar pseudo-labels. Experiments also demonstrated that with improved pseudo-labels, PROGRAM achieved promising performance in test-time adaptation.\n\n**Clarity:** The presentation of this paper is easy to follow. It illustrates the technical details and experimental settings in this paper. Algorithm 1 also clearly illustrates the training and inference process of PROGRAM in test-time adaptation scenarios.\n\n**Significance:** PROGRAM improves the performance of test-time adaptation with respect to various pre-trained source models. Thus it can be a strong baseline in test-time adaptation, especially in understanding the impact of pseudo-labels.", "weaknesses": "W1: The improvement of PROGRAM on the pseudo-labels is not quantitively evaluated. One key intuition behind PROGRAM is to improve pseudo-labels with PGM and RST. Though the ablation studies validate the necessity of PGM and RST in improving prediction accuracy, it is more convincing to explicitly evaluate the impact of these components on the quality of pseudo-labels.\n\nW2: The similarity $w_{ij}$ in constructing the prototype graph is not well explained. In Eq. (2), the similarity $w_{ij}$ is defined over $p(v_i | v_j)$. In this case, $p(v_i | v_j) = p(v_j | v_i)$ for guaranteeing the symmetric similarity matrix. Equivalently, it might hold that $p(v_i , v_j) = p(v_i | v_j) p(v_j) = p(v_j | v_i) p(v_i)$ and then $p(v_i) = p(v_j)$ for all nodes. It is unclear whether it assumes that all samples follow a uniform distribution. This might be a strong assumption in real scenarios.\n\nW3: Another concern is the computational efficiency of PROGRAM. It requires the graph construction and the matrix inverse computation. Besides, it also updates the \"whole\" feature extractors for RST. Both strategies might significantly increase the running time of PROGRAM for test-time adaptation, compared to other partial updating methods. Thus the trade-off between the effectiveness and efficiency of PROGRAM can be further analyzed, e.g., sparse graph construction, partial parameter updates, etc.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "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": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (poster)