Improving Entropy-Based Test-Time Adaptation from a Clustering View
Abstract
Domain shift is a common problem in the realistic world, where training data and test data follow different data distributions. To deal with this problem, fully test-time adaptation (TTA) leverages the unlabeled data encountered during test time to adapt the model. In particular, entropy-based TTA (EBTTA) methods, which minimize the prediction's entropy on test samples, have shown great success. In this paper, we introduce a new clustering perspective on the EBTTA. It is an iterative algorithm: 1) in the assignment step, the forward process of the EBTTA models is the assignment of labels for these test samples, and 2) in the updating step, the backward process is the update of the model via the assigned samples. This new perspective allows us to explore how entropy minimization influences test-time adaptation. Accordingly, this observation can guide us to put forward the improvement of EBTTA. We propose to improve EBTTA from the assignment step and the updating step, where robust label assignment, similarity-preserving constraint, sample selection, and gradient accumulation are proposed to explicitly utilize more information. Experimental results demonstrate that our method can achieve consistent improvements on various datasets. Code is provided in the supplementary material.
Empirical ResultsBrowse all benchmarks →
| Benchmark | Method | Metric | Score | Protocol / Evidence |
|---|---|---|---|---|
| CIFAR-10-C | TTC | average accuracy | 83.1\% | test-time-adaptation · backbone=WideResNet28-10 · optimizer=Adam · batch-size=100 · learning-rate=0.001Source quoteL291: The results are shown in Table~\ref{c10}. We can see that our method achieves the best average accuracy 83.1%, which is 1.6% superior to the second best method TENT. Besides, TTC performs better TENT on all corruption types. |
| CIFAR-100-C | TTC (HorFlip augmentation) | average accuracy | 51.8 | test-time-adaptation · backbone=WideResNet28-10 · optimizer=Adam · batch-size=100 · augmentation=horizontal-flip · learning-rate=0.001Source quoteL362: \multicolumn{1}{l|}{ HorFlip } │ 83.1 │ 51.8 │ 45.0 |
| ImageNet-C | TTC | average accuracy | 45.0\% | test-time-adaptation · backbone=ResNet50 · optimizer=SGD · batch-size=100 · learning-rate=0.002Source quoteL296: ImageNet-C. The results of Table~\ref{ima} show that our method achieves the best average accuracy 45.0%, and the ACC of second best model ETA is 43.6%. Note that previous entropy-based methods achieve excellent performance, even so, our method performs better than them. |
Reported baseline / comparator measurements (2)
| Benchmark | Method | Metric | Score | Protocol / Evidence |
|---|---|---|---|---|
| CIFAR-10-C | TENT baseline | average accuracy | 81.5 | test-time-adaptationSource quoteL345: \multicolumn{1}{l|}{ TENT } │ 81.5 │ 48.8 │ 42.3 |
| ImageNet-C | ETA baseline | accuracy (ACC) | 43.6\% | test-time-adaptation · backbone=ResNet50 · optimizer=SGD · batch-size=100 · learning-rate=0.002Source quoteL296: ImageNet-C. The results of Table~\ref{ima} show that our method achieves the best average accuracy 45.0%, and the ACC of second best model ETA is 43.6%. Note that previous entropy-based methods achieve excellent performance, even so, our method performs better than them. |
BibTeX
@misc{lin2023improving,
author = {Guoliang Lin and Hanjiang Lai and Yan Pan and Jian Yin},
title = {{Improving Entropy-Based Test-Time Adaptation from a Clustering View}},
year = {2023},
eprint = {2310.20327},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2310.20327},
}Ask Althea to put this paper to the test.
Loading related content...