COME: Test-time Adaption by Conservatively Minimizing Entropy

## Abstract

Abstract Machine learning models must continuously self-adjust themselves for novel data distribution in the open world. As the predominant principle, entropy minimization (EM) has been proven to be a simple yet effective cornerstone in existing test-time adaption (TTA) methods. While unfortunately its fatal limitation (i.e., overconfidence) tends to result in model collapse. For this issue, we propose to Co nservatively M inimize the E ntropy ( COME ), which is a simple drop-in replacement of traditional EM to elegantly address the limitation. In essence, COME explicitly models the uncertainty by characterizing a Dirichlet prior distribution over model predictions during TTA. By doing so, COME naturally regularizes the model to favor conservative confidence on unreliable samples. Theoretically, we provide a preliminary analysis to reveal the ability of COME in enhancing the optimization stability by introducing a data-adaptive lower bound on the entropy. Empirically, our method achieves state-of-the-art performance on commonly used benchmarks, showing significant improvements in terms of classification accuracy and uncertainty estimation under various settings including standard, life-long and open-world TTA, i.e., up to 34.5 % percent 34.5 34.5\% 34.5 % improvement on accuracy and 15.1 % percent 15.1 15.1\% 15.1 % on false positive rate.

## 1 Introduction

Endowing machine learning models with self-adjust ability is essential for their deployment in the open world, such as autonomous vehicle control and embodied AI systems. To this end, test-time adaption (TTA) emerges as a promising strategy to enhance the performance in the open world which often encounters unexpected noise or corruption (e.g., data from rainy or snowy weather). Unsupervised losses play a crucial role in model adaptation, which can improve the accuracy of a model on novel distributional test data without the need for additional labeled training data. The representative strategy entropy minimization (EM) adapts classifiers by iteratively increasing the probabilities assigned to the most likely classes, and is an integral part in the state-of-the-art TTA methods (Press et al., ; Wang et al., ; Zhang et al., ; Niu et al., ; Wang et al., ; Iwasawa & Matsuo, ; Niu et al., ; Yang et al., ).
The initial intuition behind using entropy minimization, given by (Wang et al., ) is based on the observation that models tend to be more accurate on samples for which they make predictions with higher confidence. The natural extension of this observation is to encourage models to bolster the confidence on test samples.

However, this intuition may not always be true since there always exists irreducible uncertainty which arises from the natural complexity of the data or abnormal outliers. Naturally, one might expect a machine learning model to adapt itself to test data and favor higher confidence on right prediction, but of course not absolute certainty for the erroneous. This contradiction challenges the suitability of EM in TTA tasks, which greedily pursues low-entropy on all test samples. A notable example in recent research concerns that EM can be highly unstable and frequently lead to model collapse when the models encounter unreliable samples in the wild (Niu et al., ). In this work, we hypothesize that due to the nature of EM, previous TTA methods tend to be highly overconfident ignoring the reliability of various test samples, which further results in the unsatisfactory performance.

For the above issues, we propose a simple yet effective model-agnostic learning principle, termed Conservatively Minimizing Entropy (COME) to stabilize TTA. We first consider the model output as opinion which explicitly models the uncertainty of each sample from a Theory of Evidence perspective. Then, we encourage the model to favor definitive opinions for TTA and meanwhile take the uncertainty information into consideration. This offers two-fold advantages compared to EM learning principle. First, our COME leverages subjective logic (Jsang, ), which is an off-the-shelf uncertainty tool in Bayesian toolbox to effectively perceive the uncertainty raised upon varying test samples without altering the original model architecture or training strategy. Second, when encountering unreliable outliers, the model is regularized to favor conservative confidence and be able to explicitly express "I do not know", i.e., reject to classify them to any known classes, which meets our expectation on model trustworthiness. Theoretically, our COME takes inspiration from Bayesian framework, and can be proved to correspond with a data-adaptive upper bound on the model confidence, which is a desirable property for TTA where the reliability of test samples are often varying from time. The contributions of this work are summarized as follows:

- •
As a principled alternative beyond entropy minimization, we propose a simple yet effective driven strategy for test-time adaption called Conservatively Minimizing Entropy (COME) which improves previous methods by exploring and exploiting the uncertainty.
- •
We provide theoretical analysis with insight in contrast to EM, the model confidence of our COME is provably upper bounded in a data-adaptive manner, which enables TTA methods to focus on reliable samples and conservatively handle abnormal test samples.
- •
We perform extensive experiments under various settings, including standard, open-world and lifelong TTA, where the proposed COME achieves excellent performance in terms of both classification accuracy and uncertainty quantification.

## 2 Related work

Test-time adaption aims to bridge the gaps between source and target domains during test-time without accessing the training-time source data. The model could be adapted by performing the unsupervised task on test samples. Entropy minimization performs an important role in test-time adaption, which has been integrated as a part of numerous TTA methods (Press et al., ; Wang et al., ; Niu et al., ; Wang et al., ; Iwasawa & Matsuo, ; Yang et al., ; Chen et al., ). However, it has been observed that the performance of EM can be highly sub-optimal and unstable when encounter unreliable environments. To this end, previous works incorporate many strategies including i) Samples selection, which selectively filter out the unreliable samples before adapting the model to them. For example, (Iwasawa & Matsuo, ; Niu et al., ) manually set an entropy threshold and reject the high-entropy samples before model adaption. ii) Constrained optimization, which heuristically enforces that the updated parameters do not diverge too much compared to the original pretrain model during adaption. iii) Model recovery, which lively monitor the state of the adapting model and frequently reset it when detecting performance collapse (Niu et al., ; Wang et al., ). Although these strategies have shown promising performance, the underlying reasons of the EM’s sub-optimal performance are still largely unexplored. In contrast, this work aims to handle the inherent issues of EM overlooked by the existing studies and validate the necessity and effectiveness in various TTA settings.

Uncertainty quantification is one key aspect of the model reliability, which aims to quantitatively characterize the probability that predictions will be correct. With accurate uncertainty estimation ability, further processing can be taken to improve the performance of machine learning systems (e.g., human assistance) when the predictive uncertainty is high. This is especially useful in high-stake scenarios such as medical diagnosis (Wang et al., ). To obtain the uncertainty, Bayesian neural networks (BNNs) (Denker & LeCun, ; Mackay, ) have been proposed to replace the deterministic weight parameters of model with distribution. Unlike BNNs, ensemble-based methods obtain the epistemic uncertainty by training multiple models and ensembling them (Rahaman et al., ; Abe et al., ). Uncertainty quantification has been successfully equipped to model the trustworthiness of varying environments in many fields such as multimodal learning (Han et al., ; Zhang et al., ) and reinforcement learning (Li et al., ; Kalweit & Boedecker, ). In this paper, we focus on estimating and exploiting uncertainty under the theory of subjective logic (SL, (Jsang, )). Unlike BNNs or ensemble, SL explicitly models the uncertainty in a single forward pass without modifying the training strategy or model architecture, which meets our expectation of computational effectiveness for TTA tasks.

## 3 Motivation

We consider the fully test-time adaption setting in $K$-classification task where $\mathcal{X}$ is the input space and $\mathcal{Y}=\{1,2,...,K\}$ denotes the target space. Given a classifier $f:\mathcal{X}\rightarrow\mathbb{R}^{K}$ parameterized by $\theta$ which has been pretrained on training distribution $P^{\rm train}$, our goal is to boost $f$ by updating its parameters $\theta$ online on each batch of test data drawn from test distribution $P^{\rm test}$. Note that in fully TTA setting, the training data $P^{\rm train}$ is inaccessible and one can only tune $\theta$ on unlabeled test data. This is derived from realistic concerns of privacy, bandwidth or profit.
Entropy minimization (EM) algorithm iteratively optimizes the model to minimize the predictive entropy on test sample $x$

$$ $H(p(y|x))=-\sum_{k=1}^{K}p(y=k|x)\log p(y=k|x),$ (1) $$

where $p(y|x)$ is the class distribution calculated by normalizing the output logits $f(x)$ with softmax function, i.e., $p(y=k|x)=\frac{\exp f_{k}(x)}{\sum\exp f(x)}$. $H$ is the Shannon’s entropy.

Other learning objectives. Besides EM, there also exists several TTA methods which explore other unsupervised learning objectives. Notable examples include 1) Pseudo label (PL): $\mathcal{L}_{\rm PL}=-\mathbb{E}\log p(y=\hat{y}|x)$ which encourages the adapted model to fit the pseudo label $\hat{y}$ predicted by the pretrained model, 2) Module adjustment (T3A) which adjusts the parameters in the last fully connected layer, and can be viewed as an implicit way to minimize entropy (Iwasawa & Matsuo, ), 3) Energy minimization:
$\mathcal{L}_{\rm TEA}=-\mathbb{E}\log\sum_{k=1}^{K}\exp f(x)$ which aims to minimize the free energy during adaption, and takes inspiration from energy model (Yige et al., ), 4) Contrastive learning objective: $\mathcal{L}_{\rm infoNCE}=-\log\frac{\exp{\rm query}\cdot{\rm key^{+}}}{\sum
\exp{\rm query}\cdot{\rm key}}$ which strives to minimize the cosine distance between the query and positive samples ($\rm key^{+}$) while maximizing the cosine distances between query and negative samples (Chen et al., ), 5) The recent advanced FOA (Niu et al., ) which uses evolution strategy to minimize the test-training statistic discrepancy and model prediction entropy.

The overconfident issue of EM. We begin by testing EM in standard TTA setting, and put forward the following observations to detail its unsatisfying performance.

Figure: Figure 1: Empirical observations of Entropy Minimization when equipped to Tent (Wang et al., ). Along the TTA process, the uncertainty of models tuned with EM quickly drops, and the false positive rate decreases temporarily for a very short time horizon before quickly increasing. Along the same adaption trajectory, the model accuracy also improves for a short time compared to the initial model and then quickly decreases, after which the model collapses to a trivial solution. We manually tune an entropy threshold to filter out a proportion of (100-m)% unreliable samples with highest entropy and only conduct entropy minimization on the rest m% low-entropy samples. However, the resultant methods still suffer from aforementioned issues. Therefore, we believe that the entropy minimization learning principle is inherently problematic in TTA, which necessitates a more principled solution.
Refer to caption: extracted/5921447/figs/snow1.png

Figure: Figure 2: Comparison on two representative TTA methods, i.e., the seminal Tent (Wang et al., ) and recent SOTA SAR (Niu et al., ). By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate. Besides, the model confidence of our COME is much more conservative, which implies fewer risks of overconfidence and a more accurate uncertainty awareness.
Refer to caption: extracted/5921447/figs/snow.png

As shown in Figure 1, after TTA, EM tends to give overconfident prediction and assign extremely high probability to one certain class. While we believe that tuning the model to favor confident prediction can boost classification accuracy, the unlimited low entropy on all test samples is obviously a rather undesired characteristic. The most straightforward way to overcome this limitation is to filter out unreliable samples. However, similar issues remain in the resultant methods. This urges the demand of a more principled solution demonstrated in Figure 2, where the proposed COME explicitly models uncertainty and regularizes the model for conservative predictive confidence during TTA. We test on ImageNet-C under snow corruption of severity level 5 as a typical showcase, and refer interested readers to Appendix C.8 for more similar results.

## 4 Methodology

We propose to conservatively minimize the entropy under uncertainty modeling, a simple alternative to EM algorithm. The key idea of COME is to quantify and then regularize the uncertainty during TTA without altering the model architecture or training strategy, which avoids the overconfident nature of EM at minimal cost. We first introduce uncertainty quantification by the theory of evidence which is the the fundamental block of COME and then present how to regularize the uncertainty during TTA.

### 4.1 Modeling Uncertainty by the Subjective Logic

To overcome the greediness of EM, we need to effectively perceive the trustworthiness of diverse test samples firstly. Given a well trained classifier $f:\mathcal{X}\rightarrow\mathcal{Y}$, the most simple way to quantify the uncertainty of each sample is using the softmax probability as confidence in prediction. A few pioneer works propose to filter out the test samples with high-entropy predicted softmax probability for stable TTA (Niu et al., ; ). However, it has been shown that softmax probability often leads to overconfident predictions, even when the predictions are wrong or the inputs are abnormal outliers (Moon et al., ; Van Amersfoort et al., ). Thus this simple strategy may not be satisfied enough and highlights the necessity of better uncertainty modeling. To this end, we propose to obtain the uncertainty through the theory of subjective logic, which defines a framework for obtaining the probabilities (belief masses) of different classes and the overall uncertainty (uncertainty mass) based on the evidence (^1^11In Bayesian context, evidence refers to the metrics collected from the input to support the classification.) collected from data. Specifically, in $K$ classification task, SL formalizes the belief assignments over a frame of discernment as a Dirichlet distribution. In contrast to softmax function that directly normalizes the model output logits $f(x)$ to model predictive class distribution $p(y|x)$, SL considers the model output as evidence (denoted as $\boldsymbol{e}$) to model a Dirichlet distribution which represents the density of all possible probability assignment $\boldsymbol{\mu}=[p(y=1|x),p(y=2|x),\dots,p(y=K|x)]$. That is, the predicted categoricals $\boldsymbol{\mu}$ is also a random variable itself, which yields a Dirichlet distribution as follow

$$ $p(\boldsymbol{\mu}|x)={\rm Dir}(\boldsymbol{\mu}|\boldsymbol{\alpha})=\frac{1} {B(\boldsymbol{\alpha})}\prod_{k=1}^{K}\mu^{\alpha_{k}-1}_{k},\ \boldsymbol{ \alpha}=\boldsymbol{e}+1,$ (2) $$

where ${\rm Dir}(\boldsymbol{\mu}|\boldsymbol{\alpha})$ is the Dirichlet distribution characterized by parameters $\boldsymbol{\alpha}$. The summation of all $\alpha_{k}\in\boldsymbol{\alpha}$ is so called the strength $S$ of the Dirichlet distribution, i.e., $S=\sum_{k}\alpha_{k}=\sum_{k}e_{k}+1$. Then SL tries to assign a belief mass $b_{k}$ to each class label $k$ and an overall uncertainty mass $u$ to the whole frame based on the collected evidence as follow

$$ $b_{k}=\frac{e_{k}}{S}=\frac{\alpha_{k}-1}{S}\ {\rm and}\ u=\frac{K}{S},\ {\rm subject \ to}\ u+\sum_{k=1}^{K}b_{k}=1,$ (3) $$

where $S$ is the Dirichlet strength which denotes the total evidence we collected and $K$ is the total classes number. Eq. 3 actually describes the phenomenon where the more evidence observed for the $k$-th category, the greater the belief mass assigned to the $k$-th class. Correspondingly, the less total evidence $S$ observed, the greater the total uncertainty $u$. Such assignment is so called the subjective opinion

$$ $\mathcal{M}(x)=[b_{1},b_{2},\cdots,b_{k},u],$ (4) $$

which not only describes the belief of assigning $x$ to each class $k$ but also explicitly models the uncertainty due to lack-of-evidence. At a high-level, the Dirichlet distribution can be considered as the distribution of distribution (Malinin & Gales, ) parametrized over evidence, which represents the density of all the possible class probability assignments. Hence it models second-order probabilities and uncertainty.

Given an opinion, the final predicted probability is calculated by taking the expectation of the corresponding Dirichlet distribution and computed as

$$ $p(y=k|x)=\int p(y=k|\boldsymbol{\mu})p(\boldsymbol{\mu}|x)d\boldsymbol{\mu}= \frac{\alpha_{k}}{S}.$ (5) $$

If an exponential output function is used for obtaining the parameters of Dirichlet distribution from the model output $f(x)$ (i.e., logits), where $\boldsymbol{\alpha}=\exp f(x)$ and $\boldsymbol{e}=\boldsymbol{\alpha}-1$, then the expected posterior probability of a label $k$, i.e., $p(y=k|x)$ is calculated in the same way with standard softmax output function (Malinin & Gales, ). Given the above analysis, standard DNNs for classification with a softmax output function can be viewed as predicting the expected categorical distribution under a Dirichlet prior. And thus we can directly mode uncertainty with subjective logic for a model pretrained with softmax function and standard cross-entropy loss, without modifying its architecture or training strategy. We refer interested readers to Malinin & Gales () for more details of implementation.

Benefits of modeling uncertainty based on subjective opinion. It has been widely recognized that using the softmax output as the confidence often leads to overconfidence phenomenon (Guo et al., ; Hendrycks & Gimpel, ; Liu et al., ). Other advanced uncertainty measurement methods such as MC-dropout (Gal & Ghahramani, ), deep ensemble (Lakshminarayanan et al., ; Rahaman et al., ), calibration (Guo et al., ; Han et al., ) usually require additional computations during inference or a separated validation set, which can not be seamlessly integrated into existing TTA methods. By contrast, the introduced SL is model-agnostic, which can avoid these issues by constructing a Dirichlet prior over the model output and directly deducing an additional uncertainty mass through one single forward pass. Besides these conveniences, we empirically show that the SL obtains more reliable uncertainty quantification than softmax probability in the Appendix, which is consistent with existing works Sensoy et al. (); Malinin & Gales ().

### 4.2 Model adaption by sharpening the Opinion

Vanilla EM minimizes the softmax entropy of the predicted class distribution $p(y|x)$, which inevitably results in assigning rather high probability to one certain class. In contrast, we propose the learning principle to minimize the entropy of opinion

$$ $\underset{\theta}{\rm minimize}\ H(\mathcal{M}(x))=-\sum_{k=1}^{K}b_{k}\log b_ {k}-u\log u.$ (6) $$

Compared to entropy minimization on softmax probability which ultimately assigns all the probability to one certain class, the above learning principle offers the model with an additional option, i.e., express high overall uncertainty and reject to classify when the observed total evidence is insufficient. Since subjective logic provides an additional uncertainty mass function $u(x)$ in the opinion. In other words, by assigning all belief masses (probability) to uncertainty $u$, the model can now express “I do not know” as its predicted opinion.

### 4.3 Regularizing uncertainty in an unsupervised manner

While subjective logic offers an opportunity to modeling uncertainty and reject to classify unreliable samples, naively minimizing the entropy of opinion for TTA may still be problematic. As shown in previous works, model pretrained with softmax output function frequently suffers from overconfidence issue (Guo et al., ; Nguyen et al., ; Hendrycks et al., ). Therefore, the belief mass assigned to the one certain class $k$ by the pretrained model is usually much larger than the uncertainty mass $u$. This results in the model tendency of increasing the belief mass during the entropy minimization process, while neglecting the uncertainty function u. Motivated by the above analysis, our next goal is to devise an effective regularization strategy for the uncertainty mass. In supervised learning tasks, previous works leverage labeled training data to constrain the uncertainty mass (Sensoy et al., ; Malinin & Gales, ). However, these strategies is inapplicable due to the unsupervised nature of TTA task where the training data is unavailable. This motivates us to explore the uncertainty information lies in the pretrained model itself for regularization without additional supervision. As one of the simplest yet effective design choices, we propose to constrain the uncertainty mass predicted by the adapted model not to diverge too far from the pretrained model. This results in the following constrained optimization objective

$$ $\underset{\theta}{\rm minimize}\ H(\mathcal{M}(x))\ \ {\rm subject\ to}\ |u_{ \theta}(x)-u_{\theta_{0}}(x)|\leq\delta,$ (7) $$

where $\theta$, $\theta_{0}$ denote the adapted and pretrained model respectively, and $u$ is the uncertainty estimated by Eq. 3 and $\delta$ is a threshold. Considering the difficulty of constrained optimization in modern neural networks, our next target is to find a way to convert Eq. 7 into an unconstrained form. To this end, we introduce the following Lemma.

###### Lemma 1 .

For any $x\in\mathcal{X}$, we have

$$ $\frac{K}{||f(x)||_{p}+\log K}\leq u\leq\frac{K^{1+1/p}}{||f(x)||_{p}},$ (8) $$

where $f(x)$ is the model output logits, $K$ is the total class number and $||\cdot||_{p}$ denotes the $p$-norm.

Lemma 1 shows that the uncertainty mass of subjective opinion is bounded by the norm of the total evidence collected from the model output. Thus instead of directly constraining on $u(x)$, we can alternatively constrain on the $p$-norm of model output logits, which is more flexible. Taking inspiration from previous work in supervised learning literature (Wei et al., ), this can be achieved by factorize $f(x)$ into $f(x)/||f(x)||_{p}\cdot||f(x)||_{p}$ and then enforcing the gradient on the second term to be equal to zero during optimization. Specifically, the final minimizing objective of COME is

$$ $\underset{\theta}{\rm minimize}\ H(\mathcal{M}(x))\ \ {\rm where}\ f(x)=\frac{ f(x)}{||f(x)||_{p}}\cdot||f(x)||_{p}^{\rm no_grad}\cdot\tau,$ (9) $$

and $||f(x)||_{p}^{\rm no_grad}$ is the $p$-norm of $f(x)$ with zero gradient. This can be achieved by applying the detach operation which is a common used function in modern deep learning toolbox like PyTorch and TensorFlow. By doing so, minimizing the entropy of opinion would not influence $||f(x)||_{p}$. $\tau$ is a hyper-parameter which controls the magnitude of recovered logits. In our experiments, we choose $p=2$ and $\tau=1$ for simplicity. Our COME can be implemented by modifying only a few lines of code in the original EM algorithm (shown as Algorithm 1).

Figure: Algorithm 1 Pseudo code of COME in a PyTorch-like style.

Stability of COME. We provide preliminary theoretical understanding of the superiority of COME. As we mentioned before, one notable limitation of EM is that it enforces low entropy for all test samples while ignores the instinct complexity of wild test data. Thus at the end of TTA progress, EM ultimately produces model that yields overconfident prediction. Our COME resolves this issue and introduces an upper bound for each test sample $x$ according to its trustworthiness. This property is formalized as follows

###### Theorem 1 (Model confidence upper bound) .

For any $x\in\mathcal{X}$, if $|u(x)-u_{0}(x)|\leq\delta$ holds, then we have

$$ $\underset{k}{\rm max}\ p(y=k|x)\leq\frac{1}{1+(K-1)\exp{(-\frac{K}{u_{0}- \delta})}},$ (10) $$

where $\max\limits_{k}p(y=k|x)$ is the model confidence (class probability assigned to the most likely class) and $K$ is the total class number. $u_{0}$ is the shorthand of $u_{\theta_{0}}(x)$.

From Theorem 1, we find that the model confidence in COME has a sample-wise upper bound according to $u_{0}(x)$. In particular, it implies that the model confidence upper bound of the most likely class decreases according to $u_{0}(x)$. For this reason, one can suspect that if the test model is uncertain about some sample $x$ (with a rather large $u_{0}$), it will be difficult to further increase the model confidence on such $x$, which is a desirable property for TTA in the wild.

###### Lemma 1 .

###### Theorem 1 (Model confidence upper bound) .

## 5 Experiments

We conduct experiments on multiple datasets with distributional shift to answer the following questions. Q1. In the standard TTA setting, does the proposed method outperform other algorithms? Q2. How does COME perform in various settings, such as open-world TTA or lifelong TTA? Q3. Uncertainty quantification is both the motivation behind COME and the reason for its effectiveness, does our method achieves more reliable uncertainty estimation during TTA? Q4. Ablation study - what is the key factor of performance improvement in our method?

### 5.1 setup

Datasets. Following the common practice (Niu et al., ; ), we perform experiments under both standard covariate-shifted distribution dataset ImageNet-C, a large-scale benchmark with 15 types of diverse corruption belong to 4 main categories (noise, blur, weather and digital). Besides, we also consider open-world test-time adaption setting, where the test data distribution $P^{\rm test}$ is a mixture of both normal covariate-shifted data $P^{\rm Cov}$ and abnormal outliers $P^{\rm Outlier}$ of which the true labels do not belong to any known classes in $P^{\rm train}$. Following previous work in outlier detection literature, $P^{\rm Outlier}$ is a suit of diverse datasets introduced by (Yang et al., ), including iNaturalist, Open-Image, NINCO and SSB-Hard.
Compared methods. We compare our COME with a board line of test-time adaption methods, including both EM-based and non-EM methods. $\circ$ EM-based methods choose entropy minimization as their learning objective, including Tent (Wang et al., ), EATA (Niu et al., ), CoTTA (Wang et al., ) and recent advanced SAR (Niu et al., ). $\circ$ Non-EM methods employ other learning objectives including Pseudo Label (PL), module adjustment (Iwasawa & Matsuo, ) (T3A) and energy minimization (Yige et al., ) (TEA). To be consistent with previous works (Niu et al., ), we use the ViT-base architecture as our backbone and refer insterested readers to the Appendix for results on ResNet. The test batch size is 64. When equipped to previous EM-based TTA baselines, we only replace the learning objective with our COME and keep all the other configures unchanged (consistent to the official implementation).
Tasks and Metrics. For classification performance comparison, we report the accuracy (Acc) on covariate-shifted data. Besides, for uncertainty estimation evaluation, we report the average false positive rate (FPR). The mis-classified samples and outliers are considered as positive samples which should be of higher uncertainty compared to correct classification that is considered as negative.

### 5.2 Experimental results

Performance comparison in standard TTA settings (Q1). As shown in Table 1, our COME establishes strong overall performance in terms of both classification and uncertainty estimation tasks. We highlight a few essential observations. Compared to EM learning principle, our COME consistently outperforms it when equipped to the same baseline methods, including Tent (Wang et al., ), EATA (Niu et al., ), CoTTA (Wang et al., ) and SAR (Niu et al., ). As an example of our method’s improved performance, when equipped to the recent SAR, our method yields an accuracy of $64.2\%$ and FPR95 of $63.8\%$, which outperforms the original implementation based on EM of $10.1\%$ and $2.9\%$ in terms of accuracy and FPR95 respectively. Besides, we also compare to Non-EM TTA methods, including TEA, T3A and PL. These methods do not rely on EM learning objective, yet are less effective than EM in terms of classification and uncertainty estimation performance.

**Table 1: Classification accuracy comparison on ImageNet-C (level 5). Substantial ($\geq 0.5$) improvement and degradation compared to the baseline are highlighted in blue or brown respectively. We only report average FPR$\downarrow$ here and defer the detailed results on each corruption to Appendix C.5.**
|  |  | Noise | Blur | Weather | Digital | Avg. |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Methods | COME | Gauss. | Shot | Impul. | Defoc | Glass | Motion | Zoom | Snow | Frost | Fog | Brit. | Contr. | Elast. | Pixel | JPEG | Acc$\uparrow$ | FPR$\downarrow$ |
| No Adapt | ✗ | 35.1 | 32.2 | 35.9 | 31.4 | 25.3 | 39.4 | 31.6 | 24.5 | 30.1 | 54.7 | 64.5 | 49.0 | 34.2 | 53.2 | 56.5 | 39.8 | 67.5 |
| PL | ✗ | 49.9 | 48.6 | 51.1 | 48.0 | 41.0 | 52.8 | 43.1 | 22.6 | 40.7 | 63.8 | 73.0 | 65.4 | 43.5 | 63.9 | 62.7 | 51.3 | 69.1 |
| T3A | ✗ | 34.5 | 31.5 | 35.4 | 32.6 | 27.5 | 40.8 | 33.6 | 25.7 | 31.0 | 56.4 | 64.9 | 50.8 | 37.9 | 54.3 | 58.4 | 41.0 | 67.7 |
| TEA | ✗ | 44.6 | 39.2 | 45.9 | 38.0 | 36.0 | 46.5 | 38.4 | 9.1 | 46.7 | 59.9 | 72.3 | 59.9 | 45.6 | 62.4 | 59.0 | 46.9 | 68.3 |
| LAME | ✗ | 34.8 | 31.9 | 35.5 | 31.0 | 24.4 | 39.0 | 30.7 | 23.4 | 29.6 | 53.3 | 64.2 | 40.9 | 32.7 | 52.8 | 56.0 | 38.7 | 69.7 |
| FOA | ✗ | 47.4 | 42.6 | 48.2 | 47.6 | 40.3 | 49.4 | 42.8 | 54.5 | 52.4 | 65.9 | 76.4 | 63.2 | 49.0 | 61.5 | 64.0 | 53.7 | 63.6 |
| Tent | ✗ | 52.6 | 52.1 | 53.5 | 52.9 | 47.7 | 56.7 | 47.5 | 10.5 | 28.6 | 67.2 | 74.4 | 67.3 | 50.7 | 66.3 | 64.6 | 52.8 | 70.1 |
| ✓ | 53.9 | 53.9 | 55.3 | 55.9 | 51.9 | 59.8 | 52.6 | 58.7 | 61.2 | 71.3 | 78.2 | 68.9 | 58.0 | 70.5 | 68.2 | 61.2 | 66.5 |  |
| Improve | $\bigtriangleup 1.2$ | $\bigtriangleup 1.8$ | $\bigtriangleup 1.8$ | $\bigtriangleup 3.1$ | $\bigtriangleup 4.3$ | $\bigtriangleup 3.1$ | $\bigtriangleup 5.1$ | $\bigtriangleup 48.2$ | $\bigtriangleup 32.5$ | $\bigtriangleup 4.1$ | $\bigtriangleup 3.8$ | $\bigtriangleup 1.6$ | $\bigtriangleup 7.3$ | $\bigtriangleup 4.2$ | $\bigtriangleup 3.6$ | $\bigtriangleup 8.4$ | $\bigtriangledown 3.6$ |  |
| EATA | ✗ | 55.7 | 56.5 | 57.2 | 57.3 | 53.2 | 58.3 | 58.6 | 61.8 | 60.1 | 71.1 | 75.3 | 68.5 | 62.5 | 68.7 | 66.3 | 62.1 | 65.1 |
| ✓ | 56.2 | 56.6 | 57.2 | 58.1 | 57.6 | 62.5 | 59.5 | 65.5 | 63.9 | 72.5 | 78.1 | 69.7 | 66.5 | 72.4 | 70.7 | 64.5 | 63.8 |  |
| Improve | $\bigtriangleup 0.5$ | $\bigtriangleup 0.1$ | $\bigtriangleup 0.0$ | $\bigtriangleup 0.9$ | $\bigtriangleup 4.3$ | $\bigtriangleup 4.2$ | $\bigtriangleup 0.9$ | $\bigtriangleup 3.7$ | $\bigtriangleup 3.8$ | $\bigtriangleup 1.4$ | $\bigtriangleup 2.8$ | $\bigtriangleup 1.2$ | $\bigtriangleup 4.0$ | $\bigtriangleup 3.8$ | $\bigtriangleup 4.4$ | $\bigtriangleup 2.4$ | $\bigtriangledown 1.3$ |  |
| SAR | ✗ | 51.8 | 51.7 | 52.9 | 50.8 | 48.6 | 55.3 | 49.2 | 23.3 | 46.5 | 65.6 | 73.0 | 65.8 | 51.1 | 64.0 | 62.6 | 54.2 | 66.7 |
| ✓ | 56.3 | 56.5 | 57.4 | 58.6 | 57.0 | 62.8 | 58.4 | 65.2 | 64.3 | 72.8 | 78.5 | 69.6 | 64.3 | 71.9 | 69.6 | 64.2 | 63.8 |  |
| Improve | $\bigtriangleup 4.5$ | $\bigtriangleup 4.8$ | $\bigtriangleup 4.5$ | $\bigtriangleup 7.8$ | $\bigtriangleup 8.3$ | $\bigtriangleup 7.5$ | $\bigtriangleup 9.2$ | $\bigtriangleup 42.0$ | $\bigtriangleup 17.8$ | $\bigtriangleup 7.2$ | $\bigtriangleup 5.4$ | $\bigtriangleup 3.9$ | $\bigtriangleup 13.2$ | $\bigtriangleup 7.9$ | $\bigtriangleup 7.0$ | $\bigtriangleup 10.1$ | $\bigtriangledown 2.9$ |  |
| CoTTA | ✗ | 40.6 | 37.8 | 41.7 | 33.7 | 29.5 | 43.8 | 35.6 | 38.1 | 43.3 | 59.2 | 70.5 | 59.3 | 40.1 | 57.9 | 59.7 | 46.1 | 67.9 |
| ✓ | 43.5 | 41.4 | 45.4 | 36.8 | 29.6 | 47.6 | 38.2 | 42.1 | 42.7 | 62.4 | 73.4 | 62.9 | 43.0 | 63.2 | 63.7 | 49.1 | 67.5 |  |
| Improve | $\bigtriangleup 2.9$ | $\bigtriangleup 3.6$ | $\bigtriangleup 3.7$ | $\bigtriangleup 3.1$ | $\bigtriangleup 0.1$ | $\bigtriangleup 3.8$ | $\bigtriangleup 2.5$ | $\bigtriangleup 4.0$ | $\bigtriangledown 0.6$ | $\bigtriangleup 3.2$ | $\bigtriangleup 2.8$ | $\bigtriangleup 3.6$ | $\bigtriangleup 2.9$ | $\bigtriangleup 5.3$ | $\bigtriangleup 4.0$ | $\bigtriangleup 3.0$ | $\bigtriangledown 0.3$ |  |
| MEMO | ✗ | 39.7 | 36.5 | 39.8 | 32.4 | 25.8 | 40.3 | 34.7 | 27.5 | 32.8 | 53.5 | 66.2 | 56.0 | 35.7 | 55.9 | 58.2 | 42.3 | 72.1 |
| ✓ | 40.6 | 37.5 | 40.6 | 33.4 | 26.7 | 41.2 | 35.4 | 28.7 | 33.7 | 54.7 | 67.1 | 55.9 | 36.6 | 57.2 | 59.3 | 43.2 | 70.8 |  |
| Improve | $\bigtriangleup 0.8$ | $\bigtriangleup 1.0$ | $\bigtriangleup 0.8$ | $\bigtriangleup 1.0$ | $\bigtriangleup 0.9$ | $\bigtriangleup 1.0$ | $\bigtriangleup 0.7$ | $\bigtriangleup 1.2$ | $\bigtriangleup 0.9$ | $\bigtriangleup 1.2$ | $\bigtriangleup 0.8$ | $\bigtriangledown 0.1$ | $\bigtriangleup 0.9$ | $\bigtriangleup 1.3$ | $\bigtriangleup 1.1$ | $\bigtriangleup 0.9$ | $\bigtriangledown 1.3$ |  |

**Table 2: Classification and uncertainty estimation comparisons under open-world TTA settings, where $P^{\rm test}$ is a mixture of both covariate-shifted samples (Gaussian noise of severity level 3) and a suit of diverse abnormal outliers. Additional results with various mix ratios are in Appendix C.7.**
|  |  | None | NINCO | iNaturist | SSB-Hard | Texture | Places | Avg. |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Method | COME | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ |
| No Adapt | ✗ | 64.4 | 63.7 | 64.5 | 69.9 | 64.4 | 69.5 | 64.4 | 72.5 | 64.8 | 65.6 | 64.3 | 56.8 | 64.4 | 66.3 |
| PL | ✗ | 69.1 | 62.8 | 65.6 | 71.6 | 68.8 | 69.5 | 68.4 | 75.9 | 66.1 | 66.0 | 66.6 | 59.7 | 67.4 | 67.6 |
| T3A | ✗ | 64.4 | 71.2 | 64.3 | 70.0 | 64.2 | 75.0 | 63.7 | 80.7 | 64.4 | 69.0 | 63.8 | 69.5 | 64.1 | 72.6 |
| TEA | ✗ | 63.9 | 63.8 | 60.5 | 72.5 | 62.3 | 74.6 | 63.3 | 79.4 | 61.0 | 67.8 | 61.9 | 64.5 | 62.2 | 70.4 |
| LAME | ✗ | 64.1 | 64.4 | 64.1 | 72.3 | 64.1 | 72.4 | 64.2 | 74.0 | 64.7 | 68.8 | 64.0 | 61.3 | 64.2 | 68.9 |
| FOA | ✗ | 67.8 | 61.2 | 66.4 | 70.5 | 67.4 | 66.1 | 67.1 | 75.6 | 65.8 | 61.4 | 66.6 | 54.1 | 66.8 | 64.8 |
| Tent | ✗ | 70.8 | 63.2 | 66.2 | 71.9 | 69.9 | 70.7 | 69.8 | 77.4 | 66.4 | 66.5 | 68.3 | 59.9 | 68.6 | 68.3 |
| ✓ | 72.6 | 64.7 | 68.9 | 64.3 | 72.5 | 63.7 | 72.7 | 70.7 | 68.4 | 60.4 | 70.7 | 45.9 | 71.0 | 61.6 |  |
| Improve | $\bigtriangleup 1.7$ | $\bigtriangleup 1.6$ | $\bigtriangleup 2.7$ | $\bigtriangledown 7.6$ | $\bigtriangleup 2.6$ | $\bigtriangledown 7.0$ | $\bigtriangleup 2.9$ | $\bigtriangledown 6.7$ | $\bigtriangleup 2.1$ | $\bigtriangledown 6.1$ | $\bigtriangleup 2.4$ | $\bigtriangledown 14.0$ | $\bigtriangleup 2.4$ | $\bigtriangledown 6.6$ |  |
| EATA | ✗ | 70.3 | 63.7 | 66.4 | 68.6 | 70.3 | 71.5 | 70.0 | 77.4 | 67.3 | 67.1 | 68.8 | 61.9 | 68.8 | 68.4 |
| ✓ | 73.4 | 62.7 | 70.1 | 60.5 | 73.2 | 63.3 | 73.0 | 70.5 | 70.5 | 55.8 | 72.3 | 45.6 | 72.1 | 59.7 |  |
| Improve | $\bigtriangleup 3.1$ | $\bigtriangledown 1.0$ | $\bigtriangleup 3.7$ | $\bigtriangledown 8.2$ | $\bigtriangleup 2.9$ | $\bigtriangledown 8.2$ | $\bigtriangleup 3.0$ | $\bigtriangledown 6.9$ | $\bigtriangleup 3.2$ | $\bigtriangledown 11.3$ | $\bigtriangleup 3.6$ | $\bigtriangledown 16.3$ | $\bigtriangleup 3.3$ | $\bigtriangledown 8.6$ |  |
| SAR | ✗ | 69.7 | 62.3 | 64.9 | 71.4 | 66.9 | 70.9 | 67.7 | 78.1 | 64.4 | 64.5 | 66.1 | 58.6 | 66.6 | 67.6 |
| ✓ | 73.1 | 62.9 | 69.8 | 66.3 | 73.2 | 65.2 | 73.5 | 71.8 | 69.5 | 59.4 | 72.3 | 49.8 | 71.9 | 62.6 |  |
| Improve | $\bigtriangleup 3.5$ | $\bigtriangleup 0.6$ | $\bigtriangleup 4.9$ | $\bigtriangledown 5.1$ | $\bigtriangleup 6.3$ | $\bigtriangledown 5.6$ | $\bigtriangleup 5.9$ | $\bigtriangledown 6.3$ | $\bigtriangleup 5.1$ | $\bigtriangledown 5.1$ | $\bigtriangleup 6.3$ | $\bigtriangledown 8.8$ | $\bigtriangleup 5.3$ | $\bigtriangledown 5.1$ |  |
| CoTTA | ✗ | 67.6 | 63.4 | 65.3 | 69.7 | 70.4 | 69.5 | 70.3 | 76.0 | 65.8 | 66.2 | 66.6 | 59.2 | 67.6 | 67.3 |
| ✓ | 70.5 | 62.5 | 66.2 | 68.8 | 72.4 | 73.5 | 72.2 | 78.7 | 66.5 | 64.7 | 68.9 | 55.0 | 69.4 | 67.2 |  |
| Improve | $\bigtriangleup 2.9$ | $\bigtriangledown 0.9$ | $\bigtriangleup 0.9$ | $\bigtriangledown 0.9$ | $\bigtriangleup 2.0$ | $\bigtriangleup 4.0$ | $\bigtriangleup 2.0$ | $\bigtriangleup 2.7$ | $\bigtriangleup 0.7$ | $\bigtriangledown 1.5$ | $\bigtriangleup 2.3$ | $\bigtriangledown 4.2$ | $\bigtriangleup 1.8$ | - |  |
| MEMO | ✗ | 64.8 | 69.8 | 64.8 | 77.5 | 64.7 | 71.9 | 64.8 | 77.3 | 65.0 | 79.3 | 64.6 | 71.5 | 64.8 | 74.5 |
| ✓ | 65.2 | 67.8 | 65.9 | 76.4 | 65.2 | 70.8 | 65.3 | 75.0 | 65.4 | 76.7 | 65.3 | 67.6 | 65.4 | 72.4 |  |
| Improve | $\bigtriangleup 0.5$ | $\bigtriangledown 1.9$ | $\bigtriangleup 1.1$ | $\bigtriangledown 1.1$ | $\bigtriangleup 0.5$ | $\bigtriangledown 1.1$ | $\bigtriangleup 0.5$ | $\bigtriangledown 2.3$ | - | $\bigtriangledown 2.6$ | $\bigtriangleup 0.7$ | $\bigtriangledown 3.9$ | $\bigtriangleup 0.6$ | $\bigtriangledown 2.2$ |  |

Performance comparison in open-world and lifelong TTA settings (Q2). In Table 2 and 3, we present the results under open-world and lifelong TTA settings respectively. In open-world TTA, the test data distribution is a mixture of both normal covariate-shifted data and abnormal outliers. The mixture ratio of $P^{\rm Cov}$ and $P^{\rm Outlier}$ is 0.5 following previous work (Bai et al., ), i.e., $P^{\rm test}=0.5P^{\rm Cov}+0.5P^{\rm Outlier}$. Such outliers arise from unknown classes that are not present in training data, which should not be classified into any class $k\in\mathcal{Y}$ for model trustworthiness. According to the experimental results, it is observed that our COME can consistently improve the performance of existing TTA methods.

Reliability of uncertainty estimation (Q3). We visualize the distribution of model confidence, i.e., the maximum predicted class probability(^2^22For our COME, the class probability is calculated according to Eq. 5.) in open-world TTA setting, where the covariate-shifted samples is ImageNet-C (Gaussian noise level 3), and outliers are Ninco. As shown in Figure 3, the model confidence of our COME can effectively perceive incorrect predictions, which establishes an distinguishable margin. In contrast to the model confidence of EM which is almost identical for correct-classified samples, mis-classified samples and outliers, the model confidence of our method can provide more meaningful information with which to differentiate them.

**Table 3: Classification and uncertainty estimation comparisons under lifelong TTA settings. The model is online adapted and the parameters will never be reset, yet the test input distribution might exhibit a continual shift over time. Performance on each individual corruptions are in Appendix C.6**
|  |  | Noise | Blur | Weather | Digital | Avg. |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Methods | COME | Gauss. | Shot | Impul. | Defoc | Glass | Motion | Zoom | Snow | Frost | Fog | Brit. | Contr. | Elast. | Pixel | JPEG | Acc$\uparrow$ | FPR$\downarrow$ |
| No Adapt | ✗ | 35.1 | 32.2 | 35.9 | 31.4 | 25.3 | 39.4 | 31.6 | 24.5 | 30.1 | 54.7 | 64.5 | 49.0 | 34.2 | 53.2 | 56.5 | 39.8 | 68.4 |
| PL | ✗ | 49.9 | 53.4 | 56.7 | 46.7 | 46.1 | 56.6 | 51.4 | 52.6 | 60.2 | 68.1 | 77.7 | 64.5 | 51.0 | 69.0 | 68.8 | 58.2 | 69.0 |
| FOA | ✗ | 46.5 | 47.0 | 51.1 | 44.8 | 45.5 | 52.3 | 48.1 | 49.7 | 57.9 | 68.0 | 76.4 | 63.6 | 51.7 | 62.2 | 65.3 | 55.3 | 64.8 |
| Tent | ✗ | 52.4 | 56.2 | 58.7 | 50.9 | 51.1 | 57.7 | 52.7 | 54.7 | 60.5 | 68.4 | 77.3 | 64.6 | 53.8 | 69.3 | 68.6 | 59.8 | 71.8 |
| ✓ | 54.7 | 59.0 | 60.3 | 51.2 | 53.7 | 60.6 | 57.4 | 64.1 | 65.8 | 71.0 | 78.6 | 66.9 | 62.7 | 71.8 | 70.5 | 63.2 | 67.1 |  |
| Improve | $\bigtriangleup 2.3$ | $\bigtriangleup 2.8$ | $\bigtriangleup 1.6$ | - | $\bigtriangleup 2.6$ | $\bigtriangleup 2.9$ | $\bigtriangleup 4.7$ | $\bigtriangleup 9.5$ | $\bigtriangleup 5.3$ | $\bigtriangleup 2.6$ | $\bigtriangleup 1.3$ | $\bigtriangleup 2.3$ | $\bigtriangleup 9.0$ | $\bigtriangleup 2.5$ | $\bigtriangleup 1.9$ | $\bigtriangleup 3.4$ | $\bigtriangledown 4.7$ |  |
| EATA | ✗ | 55.9 | 59.5 | 60.9 | 56.2 | 59.2 | 63.0 | 61.6 | 65.7 | 67.5 | 72.5 | 78.6 | 66.8 | 67.1 | 72.2 | 71.7 | 65.2 | 70.3 |
| ✓ | 57.9 | 60.6 | 61.5 | 57.0 | 59.8 | 63.7 | 62.3 | 67.2 | 68.3 | 73.7 | 78.8 | 69.7 | 68.6 | 73.1 | 71.8 | 66.3 | 66.7 |  |
| Improve | $\bigtriangleup 2.0$ | $\bigtriangleup 1.0$ | $\bigtriangleup 0.6$ | $\bigtriangleup 0.8$ | $\bigtriangleup 0.6$ | $\bigtriangleup 0.8$ | $\bigtriangleup 0.7$ | $\bigtriangleup 1.5$ | $\bigtriangleup 0.8$ | $\bigtriangleup 1.2$ | - | $\bigtriangleup 2.9$ | $\bigtriangleup 1.4$ | $\bigtriangleup 0.9$ | - | $\bigtriangleup 1.0$ | $\bigtriangledown 3.6$ |  |
| SAR | ✗ | 52.0 | 54.8 | 56.2 | 50.2 | 52.3 | 56.1 | 52.8 | 50.8 | 26.5 | 0.1 | 3.1 | 0.1 | 0.1 | 0.1 | 0.3 | 30.4 | 80.8 |
| ✓ | 56.0 | 60.0 | 61.1 | 56.4 | 58.1 | 62.9 | 60.4 | 66.1 | 67.4 | 72.2 | 78.7 | 68.0 | 66.0 | 72.6 | 70.9 | 65.1 | 65.7 |  |
| Improve | $\bigtriangleup 4.0$ | $\bigtriangleup 5.3$ | $\bigtriangleup 4.9$ | $\bigtriangleup 6.2$ | $\bigtriangleup 5.8$ | $\bigtriangleup 6.8$ | $\bigtriangleup 7.6$ | $\bigtriangleup 15.3$ | $\bigtriangleup 41.0$ | $\bigtriangleup 72.1$ | $\bigtriangleup 75.6$ | $\bigtriangleup 67.9$ | $\bigtriangleup 65.9$ | $\bigtriangleup 72.5$ | $\bigtriangleup 70.6$ | $\bigtriangleup 34.8$ | $\bigtriangledown 15.1$ |  |
| COTTA | ✗ | 40.3 | 49.2 | 57.1 | 39.8 | 50.4 | 55.6 | 48.3 | 53.1 | 61.3 | 63.9 | 73.3 | 62.0 | 56.5 | 67.5 | 66.7 | 56.3 | 69.9 |
| ✓ | 49.7 | 61.7 | 64.2 | 45.7 | 57.0 | 59.0 | 51.1 | 58.2 | 63.1 | 66.0 | 73.4 | 62.9 | 58.0 | 68.9 | 68.2 | 60.5 | 65.7 |  |
| Improve | $\bigtriangleup 9.4$ | $\bigtriangleup 12.4$ | $\bigtriangleup 7.1$ | $\bigtriangleup 5.9$ | $\bigtriangleup 6.6$ | $\bigtriangleup 3.4$ | $\bigtriangleup 2.8$ | $\bigtriangleup 5.1$ | $\bigtriangleup 1.8$ | $\bigtriangleup 2.1$ | - | $\bigtriangleup 1.0$ | $\bigtriangleup 1.5$ | $\bigtriangleup 1.3$ | $\bigtriangleup 1.5$ | $\bigtriangleup 4.1$ | $\bigtriangledown 4.2$ |  |

Ablation study. Finally, we conduct the ablation study on different components in our COME, i.e., with and without the uncertainty constraint in Eq. 7. The experimental results are shown in Table 4, where SL indicates minimizing entropy of the subjective logic opinion and UC means the uncertainty constraint described by Eq. 7. Compared with non-constrained optimization, naively minimizing the entropy of subjective opinion can only slightly improve uncertainty estimation performance. Combining with the uncertainty constraint, the average and worst-case accuracy can be both substantially improved, which indicates the optimal design of our COME.

Figure: Figure 3: Distribution of model confidence.
Refer to caption: extracted/5921447/figs/uncertainty_distribution.png

## 6 Conclusion

In this paper, we propose a novel learning principle called COME to improve existing TTA methods. Our COME explicitly models the uncertainty raising upon unreliable test samples using the theory of evidence, and then regularizes the model to in favor of conservative prediction confidence during inference time. Our method takes inspiration from Bayesian framework, and consistently outperforms previous EM-based TTA methods on commonly-used benchmarks.

## Appendices

## Appendix A Proofs

To proof Lemma 1 and Theorem 1, we need the following lemma firstly.

###### Lemma 2 .

Let $p,q$ be two real numbers. Assuming that $p\leq q$, then the $p$-norm (also called $\ell^{p}$-norm) and $q$-norm of vector $x=(x_{1},\cdots,x_{n})$ satisfied

$$ $||x||_{p}\leq n^{(1/q-1/p)}||x||_{q}.$ (11) $$

where $n$ is the length of the vector.

###### Proof.

Recall Hölder’s inequality

$$ $\sum_{i=1}^{n}|a_{i}||b_{i}|\leq(\sum_{i=1}^{n}|a_{i}|^{r})^{1/r}(\sum_{i=1}^{ n}|b_{i}|^{\frac{r}{r-1}})^{1-\frac{1}{r}}.$ (12) $$

Apply this inequality to the case that $|a_{i}|=|x_{i}|^{p}$, $|b_{i}|=1$ and $r=q/p\geq 1$, we can derive to

$$ $\sum_{i=1}^{n}|a_{i}||b_{i}|\leq(\sum_{i=1}^{n}((x_{i})^{p})^{\frac{q}{p}})^{ \frac{p}{q}}(\sum_{i=1}^{n}1^{\frac{q}{q-p}})^{1-{\frac{p}{q}}}=(\sum^{n}_{i=1 }|x_{i}|^{q})^{\frac{p}{q}}n^{1-\frac{p}{q}}.$ (13) $$

Then we have

$$ $\begin{split}||x||_{p}&=(\sum_{i=1}^{n}|x_{i}|_{p})^{1/p}\\ &\leq((\sum_{i=1}^{n}|x_{i}|^{q})^{\frac{p}{q}}n^{1-\frac{p}{q}})^{1/p}\\ &=(\sum_{i=1}^{n}|x_{i}|^{q})^{\frac{1}{q}}n^{\frac{1}{p}-\frac{1}{q}}\\ &=n^{1/p-1/q}||x||_{q}\end{split}$ (14) $$

∎

Now we proceed to proof our main results.

###### Proof.

Proof of Lemma 1. Let $f_{\max}=\max\limits_{i}\ f_{i}(x)$, then we have

$$ $\exp(f_{\max})\leq\sum_{i=1}^{K}\exp(f_{i})\leq K\exp(f_{\max}),$ (15) $$

Applying the logarithm to the inequality, then

$$ $f_{\max}\leq{\rm LSE}(f)\leq f_{\max}+\log K,$ (16) $$

where $\rm LSE$ is the shorthand of LogSumExp function, i.e., ${\rm LSE}(x):=\log\sum\limits_{i=1}^{K}\exp x_{i}$.

Since we assume that all the elements in logits $x$ are all positive, then $f_{\max}=||f||_{\infty}$. Thus combining with Lemma 1 we can derive that

$$ $K^{-1/p}||f||_{p}\leq{\rm LSE}(x)\leq||f||_{p}+\log K,$ (17) $$

Noted that $u=K/{\rm LSE}(f)$, then we have

$$ $\frac{K}{||f||_{p}+\log K}\leq u\leq\frac{K^{1+1/p}}{||f||_{p}}.$ (18) $$

∎

###### Proof.

Proof of Theorem 1. Assuming that the uncertainty mass $u$ is constrained as

$$ $u_{0}-\delta\leq u\leq u_{0}+\delta,$ (19) $$

then the ${\rm LSE}$ function of model output is also bounded by

$$ $\frac{K}{u_{0}+\delta}\leq{\rm LSE}(f(x))\leq\frac{K}{u_{0}-\delta}.$ (20) $$

Noted that

$$ $\max f(x)\leq{\rm LSE}(f(x)),$ (21) $$

and thus

$$ $\max f(x)\leq\frac{K}{u_{0}-\delta}.$ (22) $$

According to Eq. 5, the model confidence is calculated by

$$ $\max_{k}\mu_{k}(x)=\frac{\alpha_{k}}{S}=\frac{\exp f_{\max}}{\sum_{i=1}^{K} \exp f_{i}},$ (23) $$

where $\alpha_{i}=\exp f_{i}(x)$.

Assuming the $f_{j}$ is the largest element in $f(x)$, then

$$ $\begin{split}\max_{k}\mu_{k}(x)&=\frac{1}{1+\sum_{i=1,i\neq j}^{K}\exp{(f_{i}- f_{\max})}}\\ &\leq\frac{1}{1+(K-1)\exp{(f_{\min}-f_{\max})}}\\ &\leq\frac{1}{1+(K-1)\exp{(-\frac{K}{u_{0}-\delta})}}\end{split}$ (24) $$

∎

###### Lemma 2 .

###### Proof.

###### Proof.

###### Proof.

## Appendix B Experimental details

### B.1 Datasets

Covariate-shifted OOD generalization datasets. We conduct experiments on ImageNet-C (Hendrycks & Dietterich, ), which consists of 15 types of algorithmically generated corruptions from noise, blur, weather, and digital categories. Each type of corruption has 5 levels of severity, resulting in 75 distinct corruptions.

Abnormal outliers for open-world TTA experiments.
We follow the settings of (Zhang et al., ), where OpenImage-O (Wang et al., ), SSB-hard (Vaze et al., ), Textures (Cimpoi et al., ), iNaturalist (Van Horn et al., ) and NINCO (Bitterwolf et al., ) are selected as outliers for ImageNet. $\circ$ OpenImage-O contains 17632 manually filtered images and is 7.8 $\times$ larger than the ImageNet dataset. $\circ$ SSB-hard is selected from ImageNet-21K. It consists of 49K images and 980 categories. $\circ$ Textures (Describable Textures Dataset, DTD) consists of 5,640 images depicting natural textures. $\circ$ iNaturalist consists of 859000 images from over 5000 different species of plants and animals. $\circ$ NINCO consists with a total of 5879 samples of 64 classes which are non-overlapped with ImageNet-C.

### B.2 Implementation details

Pretrained models. The pretrained ViT model is ViT-Base (Dosovitskiy et al., ). The model is trained on the source ImageNet-1K training set and the model weights(^3^33https://huggingface.co/google/vit-base-patch16-224) are directly obtained from timm respository. Specifically, the pretrained ResNet model in  C.2 is ResNet-50-BN (He et al., ). The model is trained on the source ImageNet-1K training set and the model weights(^4^44https://download.pytorch.org/models/resnet50-19c8e357.pth) are directly obtained from torchvision library.

TEA(^5^55https://github.com/yuanyige/tea) (Yige et al., ) We follow all hyperparameters that are set in TEA unless it does not provide. Specifically, we use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.00025 for ViT/ResNet models. The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.

T3A(^6^66https://github.com/matsuolab/T3A) (Iwasawa & Matsuo, ) We follow all hyperparameters that are set in T3A unless it does not provide. Specifically, the batch size is set to 64. The number of supports to restore M is set to 20 for all experiments.

LAME(^7^77https://github.com/fiveai/LAME) (Boudiaf et al., ) We follow all hyperparameters that are set in LAME unless it does not provide. For fair comparison, we maintain a consistent batch size of 64 for LAME, aligning it with the same batch size used by other methods in our evaluation. We use the kNN affinity matrix with the value of $k=5$.

FOA(^8^88https://github.com/mr-eggplant/FOA) (Niu et al., ) We follow all hyperparameters that are set in FOA unless it does not provide. Specifically, the batch size is set to 64. The number of supports to restore M is set to 20 for all experiments.

Tent(^9^99https://github.com/DequanWang/tent) (Wang et al., ) We follow all hyperparameters that are set in Tent unless it does not provide. Specifically, we use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.00025 for ViT/ResNet models. The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.

EATA(^10^1010https://github.com/mr-eggplant/EATA) (Niu et al., ) We follow all hyperparameters that are set in EATA. Specifically, the entropy constant $E_{0}$ (for reliable sample identification) is set to $0.4\times ln1000$, where $1000$ is the number of task classes. The $\epsilon$ for redundant sample identification is set to 0.05. The trade-off parameter $\beta$ for entropy loss and regularization loss is set to 2,000. The number of pre-collected in-distribution test samples for Fisher importance calculation is 2,000. We use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.00025 for ViT/ResNet models. The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.

SAR(^11^1111https://github.com/mr-eggplant/SAR) (Niu et al., ) We follow all hyperparameters that are set in SAR. Specifically, the entropy threshold $E_{0}$ is set to $0.4\times ln1000$, where $1000$ is the number of task classes. We use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.00025 for ViT/ResNet models. For model recovery, we follow all strategy that are set in SAR(except for the experiments of life-long).The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.

CoTTA(^12^1212https://github.com/qinenergy/cotta) (Wang et al., ) We follow all hyperparameters that are set in CoTTA unless it does not provide. Specifically, we use SGD as the update rule, with a momentum of 0.9, batch size of 64 and learning rate of 0.001/0.01 for ViT/ResNet models. The augmentation threshold $p_{th}$ is set to 0.1. For images below threshold, we conduct 32 augmentations including color jitter, random affine, Gaussian blur, random horizonal flip, and Gaussian noise. The restoration probability of is set to 0.01 and the EMA factor $\alpha$ for teacher update is set to 0.999. The trainable parameters are all affine parameters of layer/batch normalization layers for ViT/ResNet models.

MEMO(^13^1313https://github.com/zhangmarvin/memo) (Zhang et al., ) We follow all hyperparameters that are set in MEMO. Specifically, we use the AugMix(^14^1414https://github.com/google-research/augmix) (Hendrycks et al., ) as a set of data augmentations and the augmentation size is set to 32. We use SGD as the optimizer,with learning rate 0.00025 and no weight decay. The trainable parameters are the entire model.

## Appendix C Additional results

### C.1 In-Distribution Performance

We compare the In-Distribution Performance of proposed COME to EM-based methods introduced by (Niu et al., ). As shown in Table 5, our method consistently improves the performance of all EM methods on classification tasks.

**Table 5: Comparison w.r.t. in-distribution performance, $i.e.$, on clean/original ImageNet validation set, with ViT as the base model. Substantial ($\geq 0.5$) improvement and degradation compared to the baseline are highlighted in blue or red respectively.**
|  | TENT | SAR | EATA | CoTTA | MEMO | Avg. |
| --- | --- | --- | --- | --- | --- | --- |
| COME | Acc$\uparrow$ | Acc$\uparrow$ | Acc $\uparrow$ | Acc $\uparrow$ | Acc$\uparrow$ | Acc$\uparrow$ |
| ✗ | 81.4 | 80.7 | 81.3 | 82.1 | 80.3 | 81.2 |
| ✓ | 83.1 | 83.1 | 83.1 | 82.8 | 80.6 | 82.6 |
| Improve | $\bigtriangleup 1.7$ | $\bigtriangleup 2.5$ | $\bigtriangleup 1.8$ | $\bigtriangleup 0.7$ | - | $\bigtriangleup 1.4$ |

### C.2 Comparison on ResNet-50

As shown in previous work (Niu et al., ), the TTA performance can varying a lot from different model architecture, especially various types of normalization layers, i.e., batch normalization, group normalization, layer normalization and instance normalization. Thus we conduct additional experiments to further evaluate the proposed method on resnet-50 with batch normalization layers under open-world TTA settings. The experimental results in Table 6 show that our COME still achieves superior performance compared to EM learning principle when equipped to Tent.

**Table 6: Classification and uncertainty estimation comparisons under open-world TTA settings with ResNet-50-BN, where $P^{\rm test}=0.5P^{\rm Cov}+0.5P^{\rm Sem}$(Gaussian noise of severity level 3) and a suit of diverse abnormal outliers as same with Table 2. Substantial ($\geq 0.5$) improvement and degradation compared to the baseline are highlighted in blue or red respectively.**
|  |  | None | NINCO | iNaturist | SSB-Hard | Texture | Places | Avg. |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Method | COME | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ |
| No Adapt | ✗ | 3.0 | 81.6 | 3.0 | 91.2 | 3.0 | 89.4 | 3.0 | 90.2 | 3.0 | 88.3 | 2.8 | 90.7 | 3.0 | 88.6 |
| PL | ✗ | 26.9 | 71.2 | 16.1 | 84.3 | 12.9 | 88.4 | 15.9 | 87.8 | 18.1 | 86.1 | 16.9 | 82.9 | 17.8 | 83.5 |
| TEA | ✗ | 28.5 | 73.5 | 17.6 | 84.0 | 9.6 | 84.5 | 11.8 | 88.3 | 19.9 | 84.2 | 16.8 | 82.9 | 17.4 | 82.9 |
| Tent | ✗ | 52.5 | 67.5 | 43.7 | 79.6 | 52.1 | 78.3 | 51.9 | 82.1 | 44.4 | 78.6 | 48.7 | 73.2 | 48.9 | 76.6 |
| ✓ | 55.0 | 67.6 | 46.3 | 75.5 | 54.3 | 75.1 | 54.4 | 81.9 | 45.8 | 75.6 | 50.8 | 64.0 | 51.1 | 73.3 |  |
| Improve | $\bigtriangleup 2.6$ | - | $\bigtriangleup 2.6$ | $\bigtriangledown 4.2$ | $\bigtriangleup 2.2$ | $\bigtriangledown 3.2$ | $\bigtriangleup 2.5$ | - | $\bigtriangleup 1.4$ | $\bigtriangledown 3.1$ | $\bigtriangleup 2.2$ | $\bigtriangledown 9.2$ | $\bigtriangleup 2.2$ | $\bigtriangledown 3.3$ |  |
| EATA | ✗ | 55.9 | 68.2 | 47.8 | 80.8 | 53.1 | 78.4 | 52.2 | 82.0 | 48.7 | 75.3 | 49.3 | 74.5 | 51.2 | 76.5 |
| ✓ | 58.0 | 66.2 | 52.9 | 74.8 | 57.6 | 73.2 | 57.4 | 81.3 | 52.5 | 70.7 | 55.4 | 62.9 | 55.6 | 71.5 |  |
| Improve | $\bigtriangleup 2.0$ | $\bigtriangledown 2.0$ | $\bigtriangleup 5.1$ | $\bigtriangledown 6.0$ | $\bigtriangleup 4.5$ | $\bigtriangledown 5.1$ | $\bigtriangleup 5.2$ | $\bigtriangledown 0.7$ | $\bigtriangleup 3.9$ | $\bigtriangledown 4.6$ | $\bigtriangleup 6.0$ | $\bigtriangledown 11.6$ | $\bigtriangleup 4.5$ | $\bigtriangledown 5.0$ |  |
| SAR | ✗ | 51.8 | 64.6 | 42.4 | 78.3 | 47.6 | 81.3 | 48.1 | 84.4 | 42.7 | 79.1 | 46.0 | 76.7 | 46.4 | 77.4 |
| ✓ | 56.3 | 64.0 | 46.7 | 77.9 | 55.3 | 77.1 | 55.1 | 81.6 | 46.4 | 77.5 | 52.5 | 68.1 | 52.0 | 74.4 |  |
| Improve | $\bigtriangleup 4.5$ | $\bigtriangledown 0.6$ | $\bigtriangleup 4.3$ | $\bigtriangledown 0.3$ | $\bigtriangleup 7.7$ | $\bigtriangledown 4.2$ | $\bigtriangleup 6.9$ | $\bigtriangledown 2.8$ | $\bigtriangleup 3.7$ | $\bigtriangledown 1.6$ | $\bigtriangleup 6.5$ | $\bigtriangledown 8.6$ | $\bigtriangleup 5.6$ | $\bigtriangledown 3.0$ |  |
| COTTA | ✗ | 22.6 | 70.7 | 14.4 | 87.4 | 21.1 | 78.6 | 19.7 | 84.1 | 15.5 | 87.3 | 15.8 | 82.0 | 18.2 | 81.7 |
| ✓ | 24.5 | 69.4 | 14.7 | 86.1 | 21.4 | 81.6 | 19.4 | 86.1 | 16.0 | 85.7 | 16.4 | 82.6 | 18.7 | 81.9 |  |
| Improve | $\bigtriangleup 1.8$ | $\bigtriangledown 1.3$ | - | $\bigtriangledown 1.3$ | - | $\bigtriangleup 2.9$ | - | $\bigtriangleup 2.0$ | $\bigtriangleup 0.5$ | $\bigtriangledown 1.6$ | $\bigtriangleup 0.6$ | $\bigtriangleup 0.7$ | $\bigtriangleup 0.5$ | - |  |
| MEMO | ✗ | 8.0 | 83.6 | 7.5 | 89.0 | 7.9 | 87.9 | 7.9 | 89.8 | 7.8 | 88.6 | 7.7 | 88.4 | 7.8 | 87.9 |
| ✓ | 9.1 | 77.9 | 8.7 | 90.2 | 9.0 | 87.3 | 9.1 | 89.2 | 9.1 | 87.4 | 8.7 | 88.8 | 9.0 | 86.8 |  |
| Improve | $\bigtriangleup 1.1$ | $\bigtriangledown 5.7$ | $\bigtriangleup 1.2$ | $\bigtriangleup 1.2$ | $\bigtriangleup 1.2$ | $\bigtriangledown 0.7$ | $\bigtriangleup 1.2$ | $\bigtriangledown 0.6$ | $\bigtriangleup 1.3$ | $\bigtriangledown 1.2$ | $\bigtriangleup 1.1$ | - | $\bigtriangleup 1.2$ | $\bigtriangledown 1.1$ |  |

### C.3 Time-consuming comparison

We compare the time-cost of proposed COME to EM-based methods and Non-EM based methods in Table 7. We run all the experiments on one single NVIDIA 4090 GPU. Our COME does not introduce noticeably extra cost of computation.

**Table 7: Comparisons w.r.t. computation complexity. Accuracy (%) and FPR (%) are average results on ImageNet-C (level 5) with ViT-Base. The Wall-Clock Time (seconds) and Memory Usage (MB) are measured for processing 50,000 images of ImageNet-C on a single RTX 4090 GPU.**
| Method | COME | Acc $\uparrow$ | FPR $\downarrow$ | Memory | Run Time |
| --- | --- | --- | --- | --- | --- |
| No Adapt | ✗ | 39.8 | 67.5 | 853 | 59 |
| LAME | ✗ | 38.7 | 69.7 | 853 | 62 |
| T3A | ✗ | 41.0 | 67.7 | 984 | 179 |
| PL | ✗ | 51.3 | 69.1 | 6393 | 128 |
| FOA | ✗ | 53.7 | 63.6 | 869 | 1687 |
| TEA | ✗ | 46.9 | 68.3 | 17266 | 2865 |
| Tent | ✗ | 52.8 | 70.1 | 6393 | 129 |
| ✓ | 61.2 | 66.5 | 6393 | 130 |  |
| Improve | $\bigtriangleup 8.4$ | $\bigtriangledown 3.6$ | - | - |  |
| EATA | ✗ | 62.1 | 65.1 | 6394 | 135 |
| ✓ | 64.5 | 63.8 | 6394 | 134 |  |
| Improve | $\bigtriangleup 2.4$ | $\bigtriangledown 1.3$ | - | - |  |
| SAR | ✗ | 54.2 | 66.7 | 6393 | 253 |
| ✓ | 64.2 | 63.8 | 6393 | 254 |  |
| Improve | $\bigtriangleup 10.1$ | $\bigtriangledown 2.9$ | - | - |  |
| COTTA | ✗ | 46.1 | 67.9 | 19612 | 738 |
| ✓ | 49.1 | 67.5 | 19611 | 739 |  |
| Improve | $\bigtriangleup 3.0$ | $\bigtriangledown 0.3$ | - | - |  |
| MEMO | ✗ | 42.3 | 72.1 | 5392 | 20576 |
| ✓ | 43.2 | 70.8 | 5392 | 20530 |  |
| Improve | $\bigtriangleup 0.9$ | $\bigtriangledown 1.3$ | - | - |  |

### C.4 Comparison under mixed distributional shifts.

We evaluate the proposed COME in two additional settings introduced by (Niu et al., ). These scenarios include 1) online imbalanced label distribution shifts, where the test data are sorted by class, and 2) mixed domain shifts, where the test data stream includes several randomly mixed domains with different distribution shifts. As shown in Table 8, our COME consistently outperform EM when equipped with all EM methods.

As shown in Table 9, our method consistently improves the performance of all EM methods on both classification and uncertainty estimation tasks, with the exception of a very slight decrease in the uncertainty estimation task of CoTTA.

**Table 8: Comparison w.r.t. imbalanced label shifts performance. Results obtained on ViT and ImageNet-C (level 5) under imbalanced label shifts TTA setting, where the imbalance ratio is $\infty$. Substantial ($\geq 0.5$) improvement and degradation compared to the baseline are highlighted in blue or red respectively.**
|  |  | Noise | Blur | Weather | Digital | Avg. |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Methods | COME | Gauss. | Shot | Impul. | Defoc | Glass | Motion | Zoom | Snow | Frost | Fog | Brit. | Contr. | Elast. | Pixel | JPEG | Acc$\uparrow$ |
| No Adapt | ✗ | 35.1 | 32.2 | 35.9 | 31.4 | 25.3 | 39.4 | 31.6 | 24.5 | 30.1 | 54.7 | 64.5 | 49.0 | 34.2 | 53.2 | 56.5 | 39.8 |
| PL | ✗ | 49.7 | 48.6 | 50.9 | 49.8 | 41.5 | 53.0 | 41.9 | 26.6 | 49.0 | 64.3 | 73.6 | 65.6 | 45.2 | 63.9 | 63.0 | 52.4 |
| T3A | ✗ | 33.4 | 30.3 | 34.2 | 31.3 | 26.8 | 38.7 | 32.1 | 25.1 | 29.3 | 54.5 | 62.8 | 48.8 | 37.4 | 51.9 | 56.2 | 39.5 |
| TEA | ✗ | 44.9 | 40.3 | 46.3 | 39.8 | 35.2 | 46.0 | 12.1 | 14.3 | 46.9 | 60.3 | 72.7 | 60.2 | 48.6 | 62.7 | 58.8 | 45.9 |
| LAME | ✗ | 47.0 | 43.3 | 48.2 | 39.8 | 31.8 | 50.3 | 39.4 | 30.5 | 37.1 | 66.0 | 75.4 | 63.5 | 42.0 | 65.1 | 68.1 | 49.8 |
| FOA | ✗ | 41.5 | 39.2 | 43.6 | 42.5 | 33.7 | 45.5 | 41.0 | 44.9 | 44.5 | 60.1 | 67.7 | 58.8 | 45.7 | 57.3 | 62.7 | 48.6 |
| Tent | ✗ | 52.4 | 51.9 | 53.3 | 53.8 | 48.1 | 57.0 | 46.2 | 10.3 | 53.5 | 67.9 | 74.2 | 67.1 | 52.3 | 66.5 | 64.9 | 54.6 |
| ✓ | 55.0 | 55.0 | 56.2 | 57.1 | 54.6 | 61.6 | 49.3 | 62.9 | 64.0 | 72.3 | 78.1 | 69.3 | 62.7 | 71.3 | 69.0 | 62.6 |  |
| Improve | $\bigtriangleup 2.5$ | $\bigtriangleup 3.2$ | $\bigtriangleup 2.9$ | $\bigtriangleup 3.4$ | $\bigtriangleup 6.5$ | $\bigtriangleup 4.6$ | $\bigtriangleup 3.1$ | $\bigtriangleup 52.6$ | $\bigtriangleup 10.6$ | $\bigtriangleup 4.4$ | $\bigtriangleup 4.0$ | $\bigtriangleup 2.2$ | $\bigtriangleup 10.4$ | $\bigtriangleup 4.9$ | $\bigtriangleup 4.1$ | $\bigtriangleup 7.9$ |  |
| SAR | ✗ | 51.8 | 51.7 | 52.7 | 51.9 | 48.2 | 55.6 | 47.8 | 20.3 | 52.9 | 66.8 | 73.2 | 66.0 | 52.2 | 64.1 | 62.8 | 54.5 |
| ✓ | 56.0 | 56.0 | 57.2 | 58.0 | 56.3 | 62.3 | 54.1 | 64.0 | 64.3 | 72.4 | 78.3 | 69.6 | 64.0 | 71.5 | 69.1 | 63.5 |  |
| Improve | $\bigtriangleup 4.2$ | $\bigtriangleup 4.4$ | $\bigtriangleup 4.5$ | $\bigtriangleup 6.2$ | $\bigtriangleup 8.1$ | $\bigtriangleup 6.6$ | $\bigtriangleup 6.3$ | $\bigtriangleup 43.8$ | $\bigtriangleup 11.4$ | $\bigtriangleup 5.7$ | $\bigtriangleup 5.1$ | $\bigtriangleup 3.6$ | $\bigtriangleup 11.8$ | $\bigtriangleup 7.4$ | $\bigtriangleup 6.2$ | $\bigtriangleup 9.0$ |  |
| EATA | ✗ | 52.0 | 53.6 | 53.9 | 49.3 | 49.5 | 54.4 | 55.6 | 58.1 | 56.9 | 69.6 | 74.9 | 63.6 | 61.1 | 68.0 | 64.2 | 59.0 |
| ✓ | 54.9 | 56.4 | 54.7 | 56.5 | 56.3 | 62.1 | 59.0 | 67.0 | 65.4 | 73.4 | 78.4 | 68.0 | 68.0 | 73.0 | 70.4 | 64.2 |  |
| Improve | $\bigtriangleup 2.8$ | $\bigtriangleup 2.8$ | $\bigtriangleup 0.8$ | $\bigtriangleup 7.3$ | $\bigtriangleup 6.8$ | $\bigtriangleup 7.7$ | $\bigtriangleup 3.4$ | $\bigtriangleup 8.9$ | $\bigtriangleup 8.5$ | $\bigtriangleup 3.9$ | $\bigtriangleup 3.5$ | $\bigtriangleup 4.4$ | $\bigtriangleup 6.8$ | $\bigtriangleup 5.0$ | $\bigtriangleup 6.1$ | $\bigtriangleup 5.3$ |  |
| COTTA | ✗ | 42.9 | 40.0 | 44.6 | 36.0 | 29.7 | 44.8 | 37.2 | 42.3 | 46.4 | 60.7 | 72.9 | 65.0 | 45.4 | 61.6 | 62.9 | 48.8 |
| ✓ | 51.6 | 49.0 | 52.9 | 41.7 | 37.0 | 51.6 | 43.8 | 46.7 | 53.2 | 65.9 | 74.4 | 65.6 | 52.8 | 66.7 | 65.9 | 54.6 |  |
| Improve | $\bigtriangleup 8.6$ | $\bigtriangleup 9.0$ | $\bigtriangleup 8.3$ | $\bigtriangleup 5.7$ | $\bigtriangleup 7.4$ | $\bigtriangleup 6.8$ | $\bigtriangleup 6.6$ | $\bigtriangleup 4.4$ | $\bigtriangleup 6.9$ | $\bigtriangleup 5.2$ | $\bigtriangleup 1.5$ | $\bigtriangleup 0.5$ | $\bigtriangleup 7.4$ | $\bigtriangleup 5.1$ | $\bigtriangleup 3.0$ | $\bigtriangleup 5.8$ |  |
| MEMO | ✗ | 39.7 | 36.5 | 39.8 | 32.4 | 25.8 | 40.3 | 34.7 | 27.5 | 32.8 | 53.5 | 66.2 | 56.0 | 35.7 | 55.9 | 58.2 | 42.3 |
| ✓ | 40.6 | 37.5 | 40.6 | 33.4 | 26.7 | 41.2 | 35.4 | 28.7 | 33.7 | 54.7 | 67.1 | 55.9 | 36.6 | 57.2 | 59.2 | 43.2 |  |
| Improve | $\bigtriangleup 0.8$ | $\bigtriangleup 1.0$ | $\bigtriangleup 0.8$ | $\bigtriangleup 1.0$ | $\bigtriangleup 0.9$ | $\bigtriangleup 1.0$ | $\bigtriangleup 0.7$ | $\bigtriangleup 1.2$ | $\bigtriangleup 0.9$ | $\bigtriangleup 1.2$ | $\bigtriangleup 0.8$ | - | $\bigtriangleup 0.9$ | $\bigtriangleup 1.3$ | $\bigtriangleup 1.1$ | $\bigtriangleup 0.9$ |  |

**Table 9: Comparison w.r.t. mixed shifts performance. Results obtained on ViT and ImageNet-C (level 5) under mixed shifts TTA setting, the performance is evaluated on a single data stream consisting of 15 mixed corruptions. Substantial ($\geq 0.5$) improvement and degradation compared to the baseline are highlighted in blue or red respectively.**
|  | TENT | SAR | EATA | CoTTA | Avg. |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| COME | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ |
| ✗ | 58.0 | 72.3 | 53.6 | 68.2 | 58.8 | 71.3 | 62.0 | 69.7 | 58.1 | 70.4 |
| ✓ | 61.2 | 67.9 | 62.3 | 66.9 | 61.8 | 67.0 | 65.1 | 70.7 | 62.6 | 68.1 |
| Improve | $\bigtriangleup 3.2$ | $\bigtriangledown 4.4$ | $\bigtriangleup 8.6$ | $\bigtriangledown 1.3$ | $\bigtriangleup 3.0$ | $\bigtriangledown 4.3$ | $\bigtriangleup 3.1$ | $\bigtriangleup 0.9$ | $\bigtriangleup 4.5$ | $\bigtriangledown 2.3$ |

### C.5 Additional results w.r.t FPR (supplementary to Table 1 )

We supplement the uncertainty estimation performance from Table 1, as shown in Tables 10. It is evident that our COME method excels in the classification task while simultaneously improving the average uncertainty estimation performance of the EM-based methods.

**Table 10: Uncertainty estimation performance comparison (FPR) on ImageNet-C(severity level5) as the full result of Table 1. Substantial ($\geq 0.5$) improvement and degradation compared to the baseline are highlighted in blue or red respectively.**
|  |  | Noise | Blur | Weather | Digital |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Methods | UEM | Gauss. | Shot | Impul. | Defoc | Glass | Motion | Zoom | Snow | Frost | Fog | Brit. | Contr. | Elast. | Pixel | JPEG | Avg. |
| No Adapt | ✗ | 64.6 | 65.8 | 67.1 | 68.6 | 69.7 | 66.6 | 73.0 | 69.1 | 64.1 | 66.4 | 63.2 | 73.4 | 70.9 | 64.0 | 66.1 | 67.5 |
| PL | ✗ | 66.5 | 65.9 | 66.6 | 67.3 | 70.4 | 67.6 | 71.5 | 88.4 | 78.2 | 64.9 | 63.1 | 63.9 | 70.3 | 64.7 | 67.3 | 69.1 |
| T3A | ✗ | 67.2 | 68.2 | 68.5 | 64.5 | 69.8 | 66.3 | 70.3 | 66.2 | 66.7 | 63.3 | 68.7 | 68.3 | 67.8 | 69.6 | 69.9 | 67.7 |
| TEA | ✗ | 67.2 | 68.3 | 67.2 | 70.0 | 69.3 | 67.1 | 68.5 | 94.0 | 65.2 | 63.9 | 62.8 | 65.2 | 65.6 | 63.7 | 65.9 | 68.3 |
| LAME | ✗ | 65.0 | 66.5 | 67.6 | 70.3 | 71.9 | 67.9 | 75.8 | 73.1 | 66.9 | 70.3 | 63.6 | 80.7 | 74.1 | 64.6 | 67.2 | 69.7 |
| FOA | ✗ | 65.6 | 65.0 | 65.4 | 66.3 | 65.4 | 63.9 | 68.1 | 60.2 | 62.1 | 60.2 | 61.3 | 60.6 | 63.7 | 62.1 | 63.6 | 63.6 |
| Tent | ✗ | 67.6 | 67.2 | 67.2 | 67.1 | 68.7 | 67.7 | 72.2 | 95.1 | 87.7 | 62.7 | 62.3 | 65.2 | 68.7 | 65.3 | 67.0 | 70.1 |
| ✓ | 65.9 | 66.5 | 67.2 | 68.1 | 69.1 | 67.5 | 70.8 | 70.6 | 65.1 | 61.7 | 63.1 | 63.9 | 67.5 | 64.4 | 65.9 | 66.5 |  |
| Improve | $\bigtriangledown 1.7$ | $\bigtriangledown 0.7$ | - | $\bigtriangleup 1.1$ | - | - | $\bigtriangledown 1.4$ | $\bigtriangledown 24.5$ | $\bigtriangledown 22.7$ | $\bigtriangledown 1.0$ | $\bigtriangleup 0.8$ | $\bigtriangledown 1.3$ | $\bigtriangledown 1.3$ | $\bigtriangledown 0.9$ | $\bigtriangledown 1.1$ | $\bigtriangledown 3.6$ |  |
| EATA | ✗ | 66.7 | 67.4 | 67.1 | 67.2 | 67.4 | 66.6 | 65.4 | 62.8 | 62.8 | 63.4 | 63.3 | 63.1 | 64.2 | 64.2 | 64.2 | 65.1 |
| ✓ | 63.9 | 63.7 | 63.6 | 66.6 | 67.1 | 64.8 | 66.9 | 62.5 | 61.9 | 61.2 | 61.3 | 62.6 | 64.3 | 62.0 | 64.4 | 63.8 |  |
| Improve | $\bigtriangledown 2.8$ | $\bigtriangledown 3.7$ | $\bigtriangledown 3.5$ | - | - | $\bigtriangledown 1.9$ | $\bigtriangleup 1.4$ | - | $\bigtriangledown 1.0$ | $\bigtriangledown 2.2$ | $\bigtriangledown 2.0$ | $\bigtriangledown 0.6$ | - | $\bigtriangledown 2.2$ | - | $\bigtriangledown 1.3$ |  |
| SAR | ✗ | 64.9 | 64.2 | 65.4 | 65.6 | 66.3 | 65.4 | 67.6 | 86.9 | 71.8 | 61.5 | 62.9 | 63.6 | 65.2 | 63.5 | 65.1 | 66.7 |
| ✓ | 63.1 | 63.0 | 63.9 | 66.0 | 65.8 | 65.2 | 67.4 | 62.2 | 62.1 | 60.5 | 61.2 | 63.6 | 65.8 | 63.4 | 63.9 | 63.8 |  |
| Improve | $\bigtriangledown 1.9$ | $\bigtriangledown 1.2$ | $\bigtriangledown 1.5$ | - | - | - | - | $\bigtriangledown 24.7$ | $\bigtriangledown 9.7$ | $\bigtriangledown 1.0$ | $\bigtriangledown 1.7$ | - | $\bigtriangleup 0.6$ | - | $\bigtriangledown 1.2$ | $\bigtriangledown 2.9$ |  |
| COTTA | ✗ | 65.6 | 66.0 | 67.8 | 70.7 | 71.5 | 67.3 | 75.3 | 66.5 | 64.5 | 65.1 | 62.9 | 70.8 | 72.3 | 64.8 | 67.1 | 67.9 |
| ✓ | 64.4 | 65.0 | 64.6 | 69.9 | 73.1 | 66.8 | 76.3 | 69.9 | 68.2 | 64.9 | 62.6 | 64.4 | 74.0 | 63.3 | 65.5 | 67.5 |  |
| Improve | $\bigtriangledown 1.2$ | $\bigtriangledown 1.0$ | $\bigtriangledown 3.2$ | $\bigtriangledown 0.8$ | $\bigtriangleup 1.5$ | - | $\bigtriangleup 1.0$ | $\bigtriangleup 3.3$ | $\bigtriangleup 3.7$ | - | - | $\bigtriangledown 6.4$ | $\bigtriangleup 1.7$ | $\bigtriangledown 1.5$ | $\bigtriangledown 1.5$ | - |  |
| MEMO | ✗ | 65.6 | 65.1 | 67.7 | 70.3 | 76.7 | 71.3 | 78.7 | 77.1 | 73.9 | 72.7 | 70.2 | 71.0 | 78.5 | 72.0 | 71.2 | 72.1 |
| ✓ | 63.0 | 63.5 | 65.5 | 69.8 | 73.4 | 69.5 | 77.9 | 74.8 | 72.8 | 71.7 | 69.3 | 70.4 | 77.7 | 71.8 | 70.6 | 70.8 |  |
| Improve | $\bigtriangledown 2.7$ | $\bigtriangledown 1.5$ | $\bigtriangledown 2.2$ | - | $\bigtriangledown 3.3$ | $\bigtriangledown 1.8$ | $\bigtriangledown 0.9$ | $\bigtriangledown 2.3$ | $\bigtriangledown 1.1$ | $\bigtriangledown 0.9$ | $\bigtriangledown 0.9$ | $\bigtriangledown 0.6$ | $\bigtriangledown 0.7$ | - | $\bigtriangledown 0.6$ | $\bigtriangledown 1.3$ |  |

### C.6 Additional results w.r.t FPR (supplementary to Table 3 )

We supplement the uncertainty estimation performance from Table 3, as shown in Table 11. According to the experimental results, our COME method excels in the classification task while consistently improving the uncertainty estimation performance of existing EM-based methods.

**Table 11: Uncertainty estimation performance (FPR) comparison under lifelong TTA setting as the full result of Table 3. Substantial ($\geq 0.5$) improvement and degradation compared to the baseline are highlighted in blue or red respectively.**
|  |  | Noise | Blur | Weather | Digital |  |  |  |  |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Methods | UEM | Gauss. | Shot | Impul. | Defoc | Glass | Motion | Zoom | Snow | Frost | Fog | Brit. | Contr. | Elast. | Pixel | JPEG | Avg. |
| No Adapt | ✗ | 64.6 | 65.2 | 65.8 | 66.6 | 67.9 | 67.6 | 68.7 | 69.4 | 69.2 | 67.9 | 66.1 | 72.1 | 72.5 | 71.8 | 71.1 | 68.4 |
| PL | ✗ | 66.5 | 67.3 | 67.8 | 68.6 | 69.9 | 69.8 | 70.1 | 70.8 | 70.4 | 69.7 | 68.7 | 68.6 | 69.2 | 69.0 | 68.9 | 69.0 |
| FOA | ✗ | 65.0 | 65.5 | 65.3 | 66.0 | 66.6 | 66.3 | 66.7 | 65.9 | 65.6 | 64.7 | 63.3 | 62.9 | 63.0 | 62.9 | 62.8 | 64.8 |
| Tent | ✗ | 67.3 | 68.2 | 69.0 | 72.0 | 74.8 | 72.8 | 74.0 | 79.2 | 72.6 | 70.2 | 67.6 | 71.2 | 75.3 | 70.5 | 71.9 | 71.8 |
| ✓ | 66.9 | 66.7 | 67.0 | 67.3 | 67.8 | 67.9 | 68.1 | 67.9 | 67.5 | 67.2 | 66.2 | 66.7 | 66.6 | 66.4 | 66.3 | 67.1 |  |
| Improve | - | $\bigtriangledown 1.5$ | $\bigtriangledown 2.0$ | $\bigtriangledown 4.7$ | $\bigtriangledown 6.9$ | $\bigtriangledown 5.0$ | $\bigtriangledown 5.8$ | $\bigtriangledown 11.3$ | $\bigtriangledown 5.1$ | $\bigtriangledown 3.0$ | $\bigtriangledown 1.4$ | $\bigtriangledown 4.6$ | $\bigtriangledown 8.6$ | $\bigtriangledown 4.1$ | $\bigtriangledown 5.5$ | $\bigtriangledown 4.7$ |  |
| EATA | ✗ | 68.6 | 70.8 | 70.0 | 72.8 | 73.2 | 72.1 | 72.3 | 70.3 | 70.3 | 69.1 | 65.9 | 70.1 | 70.0 | 69.6 | 69.2 | 70.3 |
| ✓ | 66.8 | 67.0 | 66.9 | 67.2 | 67.4 | 67.5 | 67.6 | 67.2 | 66.9 | 66.5 | 65.8 | 66.0 | 66.0 | 65.8 | 65.8 | 66.7 |  |
| Improve | $\bigtriangledown 1.8$ | $\bigtriangledown 3.8$ | $\bigtriangledown 3.1$ | $\bigtriangledown 5.6$ | $\bigtriangledown 5.9$ | $\bigtriangledown 4.6$ | $\bigtriangledown 4.7$ | $\bigtriangledown 3.0$ | $\bigtriangledown 3.4$ | $\bigtriangledown 2.6$ | - | $\bigtriangledown 4.2$ | $\bigtriangledown 4.0$ | $\bigtriangledown 3.8$ | $\bigtriangledown 3.4$ | $\bigtriangledown 3.6$ |  |
| SAR | ✗ | 65.5 | 65.7 | 65.5 | 67.1 | 68.0 | 67.2 | 69.3 | 76.1 | 92.8 | 100.0 | 99.6 | 75.7 | 100.0 | 100.0 | 99.9 | 80.8 |
| ✓ | 65.0 | 64.5 | 65.0 | 65.8 | 66.1 | 66.3 | 66.7 | 66.4 | 66.1 | 65.9 | 65.1 | 65.8 | 65.7 | 65.5 | 65.3 | 65.7 |  |
| Improve | - | $\bigtriangledown 1.2$ | - | $\bigtriangledown 1.2$ | $\bigtriangledown 1.8$ | $\bigtriangledown 0.9$ | $\bigtriangledown 2.6$ | $\bigtriangledown 9.8$ | $\bigtriangledown 26.7$ | $\bigtriangledown 34.0$ | $\bigtriangledown 34.4$ | $\bigtriangledown 9.9$ | $\bigtriangledown 34.3$ | $\bigtriangledown 34.5$ | $\bigtriangledown 34.6$ | $\bigtriangledown 15.1$ |  |
| COTTA | ✗ | 65.2 | 66.7 | 67.7 | 70.0 | 72.4 | 71.5 | 74.9 | 70.3 | 69.0 | 69.1 | 67.6 | 69.9 | 73.8 | 69.9 | 70.1 | 69.9 |
| ✓ | 64.4 | 64.4 | 64.6 | 65.0 | 65.4 | 65.5 | 66.6 | 66.5 | 66.2 | 66.1 | 65.7 | 66.0 | 66.3 | 66.2 | 66.3 | 65.7 |  |
| Improve | $\bigtriangledown 0.9$ | $\bigtriangledown 2.3$ | $\bigtriangledown 3.1$ | $\bigtriangledown 5.1$ | $\bigtriangledown 7.0$ | $\bigtriangledown 6.0$ | $\bigtriangledown 8.4$ | $\bigtriangledown 3.8$ | $\bigtriangledown 2.8$ | $\bigtriangledown 3.0$ | $\bigtriangledown 1.9$ | $\bigtriangledown 3.9$ | $\bigtriangledown 7.5$ | $\bigtriangledown 3.7$ | $\bigtriangledown 3.8$ | $\bigtriangledown 4.2$ |  |

### C.7 Additional results w.r.t. open-world TTA setting.(supplementary to Table 2 )

We add comparisons of classification and uncertainty estimation under open-world TTA settings with different mix ratios. As observed under $P^{\rm test}=0.7P^{\rm Cov}+0.3P^{\rm Sem}$ setting, our COME method consistently enhances the performance of both classification and uncertainty estimation tasks when applied to existing EM-based methods.

**Table 12: Classification and uncertainty estimation comparisons under open-world TTA settings, , where $P^{\rm test}=0.7P^{\rm Cov}+0.3P^{\rm Sem}$(Gaussian noise of severity level 3) and a suit of diverse abnormal outliers as same with Table 2.**
|  |  | None | NINCO | iNaturist | SSB-Hard | Texture | Places | Avg. |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Method | COME | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ | Acc$\uparrow$ | FPR$\downarrow$ |
| No Adapt | ✗ | 64.4 | 63.7 | 64.2 | 68.2 | 64.4 | 67.9 | 64.4 | 70.2 | 63.9 | 63.6 | 64.4 | 59.5 | 64.3 | 65.5 |
| PL | ✗ | 69.0 | 63.3 | 66.5 | 68.0 | 69.2 | 66.9 | 68.7 | 71.9 | 65.7 | 64.0 | 68.8 | 58.0 | 68.0 | 65.4 |
| T3A | ✗ | 64.4 | 71.4 | 64.1 | 76.1 | 64.2 | 73.4 | 64.2 | 77.9 | 63.7 | 72.5 | 64.2 | 71.2 | 64.1 | 73.7 |
| TEA | ✗ | 64.0 | 63.5 | 61.4 | 69.6 | 63.8 | 71.2 | 63.0 | 75.7 | 61.4 | 66.4 | 64.0 | 63.8 | 62.9 | 68.4 |
| LAME | ✗ | 64.1 | 63.8 | 63.9 | 68.9 | 64.1 | 69.6 | 64.1 | 70.7 | 63.6 | 65.2 | 64.2 | 61.8 | 64.0 | 66.7 |
| FOA | ✗ | 67.8 | 62.4 | 66.8 | 66.7 | 67.6 | 65.1 | 67.7 | 71.4 | 66.5 | 63.1 | 67.7 | 56.1 | 67.3 | 64.1 |
| Tent | ✗ | 70.7 | 63.1 | 68.0 | 67.4 | 70.8 | 67.1 | 70.4 | 72.8 | 67.6 | 64.8 | 70.3 | 59.2 | 69.6 | 65.7 |
| ✓ | 72.6 | 64.9 | 70.2 | 62.3 | 72.6 | 63.2 | 72.7 | 67.8 | 69.6 | 59.1 | 72.0 | 48.4 | 71.6 | 61.0 |  |
| Improve | $\bigtriangleup 1.9$ | $\bigtriangleup 1.8$ | $\bigtriangleup 2.2$ | $\bigtriangledown 5.1$ | $\bigtriangleup 1.8$ | $\bigtriangledown 3.9$ | $\bigtriangleup 2.3$ | $\bigtriangledown 5.0$ | $\bigtriangleup 2.1$ | $\bigtriangledown 5.7$ | $\bigtriangleup 1.7$ | $\bigtriangledown 10.7$ | $\bigtriangleup 2.0$ | $\bigtriangledown 4.8$ |  |
| EATA | ✗ | 70.4 | 63.6 | 67.9 | 67.6 | 70.4 | 69.2 | 70.2 | 73.6 | 67.6 | 64.4 | 69.9 | 62.2 | 69.4 | 66.8 |
| ✓ | 73.3 | 63.3 | 71.4 | 60.2 | 73.3 | 63.2 | 73.1 | 68.0 | 71.9 | 58.2 | 73.0 | 49.4 | 72.7 | 60.4 |  |
| Improve | $\bigtriangleup 2.9$ | - | $\bigtriangleup 3.4$ | $\bigtriangledown 7.3$ | $\bigtriangleup 2.9$ | $\bigtriangledown 6.0$ | $\bigtriangleup 2.9$ | $\bigtriangledown 5.6$ | $\bigtriangleup 4.3$ | $\bigtriangledown 6.2$ | $\bigtriangleup 3.1$ | $\bigtriangledown 12.8$ | $\bigtriangleup 3.3$ | $\bigtriangledown 6.4$ |  |
| SAR | ✗ | 69.0 | 62.6 | 66.3 | 67.6 | 68.0 | 67.8 | 68.0 | 73.5 | 66.7 | 62.3 | 67.9 | 59.9 | 67.6 | 65.6 |
| ✓ | 73.1 | 62.1 | 70.8 | 62.6 | 73.3 | 65.2 | 73.5 | 68.4 | 70.6 | 59.0 | 73.1 | 52.9 | 72.4 | 61.7 |  |
| Improve | $\bigtriangleup 4.1$ | $\bigtriangledown 0.6$ | $\bigtriangleup 4.5$ | $\bigtriangledown 5.0$ | $\bigtriangleup 5.3$ | $\bigtriangledown 2.6$ | $\bigtriangleup 5.6$ | $\bigtriangledown 5.1$ | $\bigtriangleup 3.8$ | $\bigtriangledown 3.3$ | $\bigtriangleup 5.3$ | $\bigtriangledown 6.9$ | $\bigtriangleup 4.8$ | $\bigtriangledown 3.9$ |  |
| COTTA | ✗ | 67.6 | 64.1 | 65.8 | 68.3 | 69.0 | 67.6 | 69.0 | 71.9 | 65.3 | 64.3 | 68.7 | 59.9 | 67.6 | 66.0 |
| ✓ | 70.5 | 63.0 | 67.3 | 65.7 | 71.5 | 67.8 | 71.7 | 72.3 | 66.9 | 62.3 | 70.9 | 55.6 | 69.8 | 64.5 |  |
| Improve | $\bigtriangleup 2.9$ | $\bigtriangledown 1.0$ | $\bigtriangleup 1.5$ | $\bigtriangledown 2.6$ | $\bigtriangleup 2.5$ | - | $\bigtriangleup 2.6$ | - | $\bigtriangleup 1.6$ | $\bigtriangledown 1.9$ | $\bigtriangleup 2.1$ | $\bigtriangledown 4.3$ | $\bigtriangleup 2.2$ | $\bigtriangledown 1.5$ |  |

### C.8 Additional performance visualization of comparison results.(supplementary to Figure 2 )

We provide more results regarding comparison on two representative TTA methods, i.e., the seminal Tent (Wang et al., ) and recent SOTA SAR (Niu et al., ). Our COME method consistently improves the performance of both classification and uncertainty estimation tasks across various corruptions, where the proposed COME explicitly maintains conservative predictive confidence during TTA.

Figure: Figure 4: Comparison on two representative TTA methods on ImageNet-C under Gaussian Noise corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/gaussian_noise.png

Figure: Figure 5: Comparison on two representative TTA methods on ImageNet-C under Shot Noise corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/shot_noise.png

Figure: Figure 6: Comparison on two representative TTA methods on ImageNet-C under Impulse Noise corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/impulse_noise.png

Figure: Figure 7: Comparison on two representative TTA methods on ImageNet-C under Defocus Blur corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/defocus_blur.png

Figure: Figure 8: Comparison on two representative TTA methods on ImageNet-C under Glass Blur corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/glass_blur.png

Figure: Figure 9: Comparison on two representative TTA methods on ImageNet-C under Motion Blur corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/motion_blur.png

Figure: Figure 10: Comparison on two representative TTA methods on ImageNet-C under Zoom Blur corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/zoom_blur.png

Figure: Figure 11: Comparison on two representative TTA methods on ImageNet-C under Frost corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate. Although the SAR method can recover the model when it collapses to a trivial solution, its performance remains poor. Our COME method addresses the issue of overconfidence that leads to model collapse.
Refer to caption: extracted/5921447/figs/appendix/frost.png

Figure: Figure 12: Comparison on two representative TTA methods on ImageNet-C under Fog corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/fog.png

Figure: Figure 13: Comparison on two representative TTA methods on ImageNet-C under Brightness corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/brightness.png

Figure: Figure 14: Comparison on two representative TTA methods on ImageNet-C under Contrast corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/contrast.png

Figure: Figure 15: Comparison on two representative TTA methods on ImageNet-C under Elastic Transform corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/elastic_transform.png

Figure: Figure 16: Comparison on two representative TTA methods on ImageNet-C under Pixelate corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/pixelate.png

Figure: Figure 17: Comparison on two representative TTA methods on ImageNet-C under Jpeg Compression corruption of severity level 5. By contrast to EM, our COME establishes a stable TTA process with consistently improved classification accuracy and false positive rate.
Refer to caption: extracted/5921447/figs/appendix/jpeg_compression.png

## Appendix D Discussion

### D.1 Effects of Design Choice

Choices of output function to obtain the parameters of the Dirichlet distribution. By definitions, the parameters of a Dirichlet distribution $\boldsymbol{\alpha}$ must be greater than 1 and the evidence $\boldsymbol{e}$ should be non-negative. This can be achieved by applying ReLU activation function or exponential function to the output logits as suggested in previous works (Han et al., ; Malinin & Gales, ). That is, we can get the evidence by

$$ $\boldsymbol{e}={\rm ReLU}(f(x))$ (25) $$

or

$$ $\boldsymbol{e}=\exp f(x)-1.$ (26) $$

In this paper, we choose the exponential function. Since we assume the pretrain model is trained with standard cross-entropy loss, using exponential function to get the evidence can keep the training strategy unchanged. Besides, based on our early empirical findings, using exponential function can achieve better classification performance compared to ReLU.

We refer interested readers to (Malinin & Gales, ) and Gal’s PhD Thesis (Gal et al., ) for more detailed implementation instructions and math deviations.

Choices of uncertainty constraint. In Lemma 1, we prove that by constraining on the model output logits, we can control the uncertainty mass $u$ not to diverge too far from the pretrained model. Previous work (Wei et al., ) proposes to mitigate the overconfidence issue by normalizing the logits during pretrain progress in supervised learning tasks. Following their implementation, we propose to optimize on the direction vector of $f(x)$, i.e., $f(x)/||f(x)||_{p}$, and thus we can expect that the optimization progress is not related to the magnitude of $f(x)$, i.e., its norm. Different from Wei et al. (), we recover the magnitude by multiplying the direction vector with its norm (detached), rather than a constant to avoid an additional hyperparameter.

### D.2 Limitations and Future work

Many state-of-the-art TTA methods are equipped with entropy minimization learning principle;, but the potential pitfalls lie in this optimization objective is not well understood. In this paper, we provide empirical analysis towards understanding the failure mode. These findings motivate us to further explore the connection between uncertainty learning and reliable TTA progress, which further implies a principle to design novel learning principle as an alternative to entropy minimization. Finally, we perform extensive experiments on multiple benchmarks to support our findings. In the work, a simple yet effective regularization on the uncertainty mass is devised, and other regularization techniques could be explored. Another interesting direction is further explore the relationship between overconfidence issue and model collapse theoretically.

## Peer Reviews

confidence: 4
contribution: 3
initial_rating: 8
presentation: 4
questions: 1. The tightness for the upper and lower bounds in Lemma 1 is determined by the choice of p. By considering the simple model where f(x) outputs the same logit for all classes, the ratio between the upper and lower bound is minimized by $p=\infty$. Is is a better choice to consider $\| f(x) \|_\infty = \max_k | f_k(x) |$?

2. The usage of exp transformation of logits in the softmax function appears pivotal to the proof of Theorem 1. And if we take b(x) as a general non-negative function of f(x), the upper bound may reduce to 1. And minimizing the entropy of opinion in equation 6 can also lead to the Dirac distribution, which is over-confident.  Is there a characterization for the class of functions that could be used to form a reasonable belief b(x)?
soundness: 3
strengths: This paper accurately spots the paradox of EM's learning objective: minimization of entropy leads to over-confidence. And the paper proposes a simple yet effective solution to minimize entropy with respect to a probability distribution that faithfully estimates the uncertainty without over-confidence. It is a very reasonable idea to differentiate between the statistics used for prediction and for uncertainty estimation, which has long been considered the same in the TTA literature. Therefore, the algorithm enjoys the feature that the entropy minimization can be tailored to samples with different uncertainty, which is also supported by the monotonicity result in Theorem 1. The introduction of SL for uncertainty estimation is natural and perfectly compatible with softmax functions used for training models in most cases. As a result, the implementation is light-weight, model-agnostic, and extremely easy to embed into any TTA algorithms based on the EM objective. The experiments are convincing by covering both standard TTA tasks and more challenging settings of open-world TTA. A surprisingly significant 34.5% improvement on accuracy is reported on the model of SAR. And the algorithm has further addressed uncertainty estimation under continual distribution shift as a side product, which itself is also an important problem.
summary: This paper addresses the model collapse of the popular Entropy Minimization algorithm for Test-Time Adaptation. Motivated by the observation that the amplification of model over-confidence causes model collapse, this paper proposes to minimize entropy with respect to an augmented output distribution that includes the probability to reject a sample, which is an uncertainty estimation technique known as subjective logic. Moreover, a logit normalization is designed in order to avoid degenerated solutions. Theoretical analysis reveals that the resulting approach upper bounds model confidence during adaptation based on the sample-specific confidence of the initial model. The resulting algorithm, COME, can be easily embedded into general EM-based TTA methods with a few lines of code revision. Experiments across TTA, open-world and life long TTA settings demonstrate a significant and consistent improvement upon current EM baselines.
weaknesses: These are not necessarily weaknesses but rather some questions that I would like to confirm with the author.
1. How does the algorithm ensure that $b_k$ is non-negative for the computation of entropy, since $b_k$ is implemented as 
$(e^{f_k(x)}-1)/ \sum_{k'} e^{f_k'(x)}$ which could be negative?

2. Why does the algorithm keep $u$ close to $u_0$? Does it imply that the uncertainty estimation for the pretrained model is trusted? What if the pretrained model is over-confident? What about the alternative constraint $u \geq u_0$ which seems to be more conservative as is the objective of COME?

3. Average false positive rate is used in experiments to assess uncertainty estimation. However, FPR measures the correctness of uncertainty estimation with such a binary perspective: for the samples we predict 1, what is the actual proportion of 0. Uncertainty estimation considers a more sophisticated question: for the samples we predict with a probability 0.7, is the actual proportion of 1 exactly 0.7? Expected calibration error (ECE) is a better metric in this sense.

4. Are there standard errors of the reported results?

---

confidence: 5
contribution: 2
initial_rating: 5
presentation: 3
questions: Please refer to weaknesses.
soundness: 3
strengths: - This paper is well-motivated, and the story makes sense. 
- Extensive experiments have been done to support the proposed method.
summary: The authors propose Conservatively Minimizing Entropy, a method for test-time adaptation (TTA) that improves test-time adaption by managing prediction uncertainty. Unlike traditional entropy minimization, which can lead to overconfidence, COME uses a Dirichlet distribution to model uncertainty, allowing the model to avoid forced classification on unreliable data.
weaknesses: My major concerns include:
- For the proposed method: Why Dirichlet distribution is used? How is the Dirichlet distribution related to the final algorithm in Algorithm 1. In addition, what is the role of delta in Algorithm 1? It seems that the authors tell a long story about their algorithm, but the algorithm itself is rather simple.
- For the theoretical analysis: Could the authors provide a more detailed (theoretical) comparison between the proposed method and traditional EM? What is the benefit?
- For baselines: Some baselines are missing, for example,  [1] and [2].
- For the datasets: I'm curious why the authors follow literatures on outliers detection.
- For Theory 1: What is the exact benefit of the upper bound of model confidence? I think it will also hurt the performance on some "confident" samples. 

[1] Nado, Z., Padhy, S., Sculley, D., D'Amour, A., Lakshminarayanan, B., & Snoek, J. (2020). Evaluating prediction-time batch normalization for robustness under covariate shift. arXiv preprint arXiv:2006.10963.
[2]Zhou, A., & Levine, S. (2021). Bayesian adaptation for covariate shift. Advances in neural information processing systems, 34, 914-927.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: see weakness
soundness: 3
strengths: The proposed algorithm introduces a rejection mechanism for unreliable samples in the TTA process, preventing the model from learning from potentially noisy labeled data. It is simple to integrate into existing TTA frameworks, and the experimental results indicate satisfactory performance.
summary: This paper investigates the issue of model collapse in entropy minimization algorithms for test-time adaptation. The authors propose a novel entropy minimization approach that models prediction uncertainty by defining a Dirichlet prior distribution over model predictions. This method regularizes the model to favor conservative confidence for unreliable samples. Experiments on benchmark datasets demonstrate the effectiveness of the proposed algorithm.
weaknesses: The proposed method and its theoretical analysis rely heavily on existing techniques, which limits its technical novelty.

The core concept shares some similarity with research on learning with rejection. It is recommended to discuss how the proposed loss function compares with the loss functions used in learning with rejection, as outlined in [1].

There is a lack of experiments involving real-world applications with distribution shifts, as exemplified in [2]. Testing the proposed algorithm on real-world data streams in dynamic environments is suggested to validate its robustness.

References:

[1] Cortes, Corinna, Giulia DeSalvo, and Mehryar Mohri. "Learning with rejection." Algorithmic Learning Theory (2016).

[2] Yao, Huaxiu, et al. "Wild-time: A benchmark of in-the-wild distribution shift over time." Advances in Neural Information Processing Systems 35 (2022): 10309-10324.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: - (Eq. (6)) What if a hyperparameter $\lambda \in \mathbb{R}$ is introduced as $-\sum_{k=1}^K b_k \log b_k - \lambda u \log u$? This seems to be a straightforward generalization of Eq. (6).

- Is there any quantitative correspondence between $\tau$ and $\delta$ (Eq. (9) & (7))?

- How can we set $p$ and $\tau$ (or $\delta$) in practice?

- To my understanding, the regularizer (Eq. (9)) effectively prevents spurious training that would drive the second term in Eq. (6) to zero by enforcing $e \rightarrow 0$. Is this correct?

- To me, the proposed method seems to be a simple combination of known techniques (to clarify, I do *not* claim that simplicity  alone is grounds for rejection at all). Could you clarify the differences of the proposed technique from other Bayesian approaches, confidence calibration algorithms, semi-supervised learning, and entropy regularization techniques? A quantitative and objective discussion would be preferable, which would significantly enhance the paper's contribution and clarity.
soundness: 3
strengths: - The motivation of the proposed method is clear. 

- The idea of transforming the optimization problem with a constraint (Eq. (7)) into a simpler form (Eq. (9)) is interesting and effective, which significantly simplifies the problem.

- Several theoretical results, as well as empirical results, are provided. Theorem 1 helps quantitative understanding of the proposed method.

- Code is available.
summary: The paper proposes a Bayesian inference technique to address the overconfidence problem in test-time domain adaptation. Experiments demonstrate its effectiveness, achieving a SOTA performance.
weaknesses: - Experiments on the dependence of the results on $p$ and $\tau$ are lacking. I would like to see the results and discussions when $p \neq 2$ and $\tau \neq 1$.

- (Major) The paper applies a Bayesian inference (Eq. (5)) with a regularization to the overconfidence problem inherent in TTA. The "EM" (entropy minimization) mentioned in the paper is, in a more general context, the unsupervised learning using soft pseudo-label, which has a wide variety of applications beyond TTA.
While the proposed method is technically sound, it would benefit from discussion in a broader context—such as unsupervised learning with a pretrained model, unsupervised domain adaptation, source-free domain adaptation, and semi-supervised learning—to emphasize its wide applicability as a key contribution.

- (Major) Error bars are missing. Could you provide error bars because several performance gains are marginal?

- The performance metric "Avg." in the tables are nonsense, while it is actually a bad convention in the field. Obviously, a "1% gain" is quite different in iNaturalist and SSB-Hard, for example.

- (Minor) A large part of the paper is dedicated to reviewing previously known works, such as the overconfidence problem, which hinders readability.

- (Minor) Much of the paper, particularly the description of the proposed method, is redundant. A more direct tone is generally preferable in academic writing.

- Overall, while the paper is well-written and the proposed method is interesting and effective, the paper would benefit from a more refined articulation of its contributions and focus. Additionally, the reproducibility issue should be addressed.

Meta-review: This paper studies the issue of model collapse in entropy minimization algorithms for test-time adaptation. It proproses a entropy minimization approach that models prediction uncertainty by a Dirichlet prior distribution over model predictions. This method regularizes the model to favor conservative confidence for unreliable samples due to softmax. Experiments on typical benchmark datasets demonstrate the effectiveness of the proposed algorithm. I recommend to accept and suggest the authors to conduct one additional experiment that checks the approximation for Eq. (6). In the experiments, two-layer neural networks are sufficient to verify this if the constrained optimization is non-easy to be solve for deep neural networks.

Decision: Accept (Poster)