Open-set test-time adaptation (OSTTA) addresses the challenge of adapting models to new environments where out-of-distribution (OOD) samples coexist with in-distribution (ID) samples affected by distribution shifts. In such settings, covariate shift-for example, changes in weather conditions such as snow-can alter ID samples, reducing model reliability. Consequently, models must not only correctly classify covariate-shifted ID (csID) samples but also effectively reject covariate-shifted OOD (csOOD) samples. Entropy minimization is a common strategy in test-time adaptation to maintain ID performance under distribution shifts, while entropy maximization is widely applied to enhance OOD detection. Several studies have sought to combine these objectives to tackle the challenges of OSTTA. However, the intrinsic conflict between entropy minimization and maximization inevitably leads to a trade-off between csID classification and csOOD detection. In this paper, we first analyze the limitations of entropy maximization in OSTTA and then introduce an angular loss to regulate feature norm magnitudes, along with a feature-norm loss to suppress csOOD logits, thereby improving OOD detection. These objectives form ROSETTA, a robust open-set test-time adaptation. Our method achieves strong OOD detection while maintaining high ID classification performance on CIFAR-10-C, CIFAR-100-C, Tiny-ImageNet-C and ImageNet-C. Furthermore, experiments on the Cityscapes validate the method's effectiveness in real-world semantic segmentation, and results on the HAC dataset demonstrate its applicability across different open-set TTA setups.
Figures & tables
Figure 1: (a) Examples of csID and csOOD samples. Open-set TTA adapts the model to handle both simultaneously. (b) Comparison with recent state-of-the-art methods. Our method achieves strong performance on both tasks.
Method
CIFAR-10-C
CIFAR-100-C
TinyImageNet-C
ImageNet-C
GMM classifier
74.73
70.74
59.23
55.42
Entropy K-means
70.16
67.73
56.79
58.33
Energy K-means
73.92
65.86
56.78
55.00
Entropy (Best Thre.)
75.98
70.15
59.90
67.08
Energy (Best Thre.)
75.43
68.79
60.54
65.42
Table 1: OOD detector accuracy comparison on CIFAR-10, CIFAR-100, TinyImageNet and ImageNet datasets. All methods show a non-negligible amount of misclassification.
Figure 2: Examples of misclassification under the optimal entropy threshold. Green boxes represent correctly detected samples and red boxes represent misclassified ones, where csID images are often mistaken for csOOD.
Figure 3: l2 -norm of feature vectors on CIFAR-10-C under various corruption types. The x-axis corresponds to corruption types, and the y-axis indicates the l2 -norm of features
Figure 4: Overview of the ROSETTA pipeline.
Figure 5: Mean sorted logits under different adaptation methods.
Method
CIFAR-10-C
CIFAR-100-C
Tiny-ImageNet-C
ImageNet-C
Acc ↑
AUROC ↑
FPR95 ↓
OSCR ↑
Acc ↑
AUROC ↑
FPR95 ↓
OSCR ↑
Acc ↑
AUROC ↑
FPR95 ↓
OSCR ↑
Acc ↑
AUROC ↑
FPR95 ↓
OSCR ↑
Source
81.73
77.89
79.45
68.44
53.25
60.55
94.98
39.87
22.29
53.79
93.41
16.29
28.21
49.63
94.74
19.81
BN Adapt
84.20
80.40
76.84
72.13
57.16
72.45
84.29
47.10
37.00
61.06
90.90
28.50
43.57
55.89
93.39
30.42
CoTTA
85.77
85.89
72.40
77.26
56.46
77.04
80.96
48.95
12.68
41.36
94.43
7.61
47.67
55.58
94.51
33.8
TENT
79.38
65.39
95.94
56.73
54.74
65.00
94.79
42.24
28.96
49.78
95.96
19.02
45.82
51.34
96.47
30.33
+ UniEnt
84.31
92.28
36.74
80.32
59.07
89.28
51.14
56.26
37.23
63.92
89.72
30.18
47.53
56.33
95.21
34.42
Table 2: Results of the baseline methods and the proposed ROSETTA (Ours) on CIFAR-C benchmarks and ImageNet-C benchmarks. FPR95 indicates the False Positive Rate when the True Positive Rate is 95%. The results demonstrate that our method achieves strong performance in both csID classification and csOOD detection simultaneously.
Based Method
LcsID
Lang
Lnorm
CIFAR-10-C
CIFAR-100-C
Acc ↑
AUROC ↑
FPR95 ↓
OSCR ↑
Acc ↑
AUROC ↑
FPR95 ↓
OSCR ↑
TENT+Ours
✗
✗
✗
79.38
65.39
95.94
56.73
54.74
65.00
94.79
42.24
✓
✗
✗
85.04
81.80
68.89
73.57
59.30
86.09
63.65
55.55
✓
✓
✗
85.66
85.63
65.67
77.32
60.88
85.97
65.05
56.90
✓
✓
✓
84.34
93.75
29.91
81.37
59.20
91.80
35.89
56.80
EATA+Ours
✗
✗
✗
80.92
84.32
71.66
72.63
60.63
88.64
50.18
57.24
Table 3: Comparison of methods on CIFAR-10-C and CIFAR-100-C datasets w/ and w/o LcsID , Lang , and the l1 -norm loss Lnorm .
Condition
Fog
Night
Rain
Snow
TENT
69.17
40.70
58.68
57.16
+UniEnt
69.13 (-0.04)
40.60 (-0.10)
58.68 (+0.00)
57.02 (-0.14)
+UniEnt+
69.15 (-0.02)
40.64 (-0.06)
58.59 (-0.09)
56.99 (-0.17)
+Ours
69.24 (+0.07)
40.71 (+0.01)
58.92 (+0.24)
57.41 (+0.25)
Table 4: Semantic segmentation results (mIoU) on the Cityscapes-to-ACDC test-time adaptation task.
H → A
H → C
C → A
C → H
Method
Acc↑
FPR95↓
AUROC↑
H-score↑
Acc↑
FPR95↓
AUROC↑
H-score↑
Acc↑
FPR95↓
AUROC↑
H-score↑
Acc↑
FPR95↓
AUROC↑
H-score↑
Source
57.28
87.53
45.90
25.12
38.79
98.99
22.49
2.83
67.88
65.23
70.81
52.07
61.36
71.67
67.72
45.21
Tent
57.51
78.59
65.63
37.82
41.64
94.03
47.25
14.11
66.78
80.68
63.56
36.38
62.94
78.73
65.22
38.35
SAR
58.50
77.70
68.39
39.19
46.32
95.04
48.67
12.31
66.67
63.91
70.11
52.66
66.91
74.41
66.88
43.49
OSTTA
55.63
76.82
72.14
40.01
44.49
89.98
58.36
21.52
65.56
73.73
64.03
43.52
63.52
78.30
64.44
38.79
UniEnt
60.15
78.04
64.02
38.57
40.99
98.71
31.86
3.61
67.55
54.53
79.28
60.72
66.26
64.38
76.11
53.28
Table 5: Multimodal open-set TTA on the HAC dataset with video and audio modalities. Our method achieves strong performance across diverse domains.
Figure 6: OSCR heatmaps of ROSETTA with TENT adaptation across hyperparameter settings on CIFAR-10-C and CIFAR-100-C, demonstrating consistent robustness under varying configurations.
Figure 7: Effect of increasing OOD loss weight τ on ID classification and OOD detection. Our method achieves balanced and superior performance on both tasks.
Method
0.2
0.4
0.6
0.8
1.0
Δ↓
Mean
Source
40.00
40.03
39.98
39.92
39.87
0.16
39.96
BN Adapt
49.91
49.55
48.92
47.97
47.10
2.81
48.69
TENT
47.68
44.12
44.06
42.90
42.16
5.52
44.18
+ UniEnt
56.84
57.48
57.13
56.77
56.26
1.22
56.90
+ UniEnt+
57.15
57.59
57.24
56.88
56.33
1.26
57.04
+ Ours
56.63
57.51
57.51
57.13
56.80
0.88
57.12
Table 6: OSCR performance under different csOOD-to-csID imbalance ratios on CIFAR-100-C. The Δ column indicates the performance variation, calculated as the difference between the maximum and minimum values across the ratios. ROSETTA achieves the best overall accuracy and the most consistent performance across all imbalance settings.
Method
Cifar-10-C
Cifar-100-C
Tiny-ImageNet-C
ImageNet-C
TENT
85.85
62.86
33.13
45.93
+UniEnt
83.26 (-2.59)
60.01 (-2.85)
36.60 (+3.47)
44.48 (-1.45)
+UniEnt+
83.93 (-1.92)
59.73 (-3.13)
35.98 (+2.85)
39.96 (-5.97)
+Ours
84.01 (-1.84)
60.39 (-2.47)
36.62 (+3.49)
46.99 (+1.06)
Table 7: Experiments without csOOD data. Our method is more robust than UniEnt and UniEnt+, which alternate in yielding their highest accuracy. Tent occasionally achieves higher Acc since it does not account for csOOD.
Method
2
4
6
8
10
Δ↓
Mean
Source
70.84
69.28
69.32
69.18
68.44
2.40
69.41
BN Adapt
72.56
72.48
72.52
72.44
72.14
0.42
72.43
TENT
49.51
48.29
51.74
49.53
50.97
3.45
50.01
+ UniEnt
78.71
78.39
78.28
78.13
77.82
0.89
78.27
+ UniEnt+
78.65
78.23
78.23
78.07
77.68
0.97
78.17
+ Ours
81.50
81.37
81.84
81.87
81.37
0.50
81.59
Table 8: OSCR performance with increasing numbers of unknown classes in the csOOD set. As the number of unknown classes grows from 2 to 10, the task becomes more challenging. ROSETTA maintains consistently strong results and shows minimal performance degradation, as reflected by the lowest Δ value.
Dataset
OOD Score
Acc ↑
AUROC ↑
FPR95 ↓
OSCR ↑
CIFAR-10-C
Energy
84.34
93.75
29.91
81.37
l1 -norm
84.34
94.01
25.19
81.04
NAN
84.34
92.87
35.88
80.50
CIFAR-100-C
Energy
59.20
91.80
35.89
56.80
l1 -norm
59.20
92.40
29.89
56.01
NAN
59.20
91.95
31.91
55.88
Table 9: OOD detection performance comparison across different OOD scores on CIFAR-10-C, CIFAR-100-C, and Tiny-ImageNet-C datasets.
Corruption
Acc ↑
AUROC ↑
FPR95 ↓
OSCR ↑
Gaussian noise
37.99
48.25
95.41
18.54
Shot noise
38.83
52.32
93.90
24.32
Impulse noise
30.75
51.41
94.62
20.19
Defocus blur
38.89
58.68
92.09
27.52
Glass blur
28.96
58.14
91.67
20.76
Motion blur
43.60
65.47
88.92
34.01
Table 10: Performance metrics for each task using l1 -norm as the OOD score of our method on Tiny-ImageNet-C, ordered by task sequence during adaptation. An AUROC below 50 indicates a tendency to classify OOD samples as ID more frequently than random guessing.
Figure 8: T-SNE Visualization on CIFAR-10-C Test Set with SVHN-C as csOOD. Black markers represent csOOD samples, while colored markers represent csID samples. Circles indicate correctly classified csID samples or correctly detected csOOD samples, whereas triangles denote misclassified csID samples or undetected csOOD samples. Stars represent the embeddings of the updated class prototypes, and diamonds represent the fixed weights of the linear classification layer.