Adapt in the Wild: Test-Time Entropy Minimization with Sharpness and Feature Regularization

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Niu, Shuaicheng, Chen, Guohao, Chen, Deyu, Zhang, Yifan, Wu, Jiaxiang, Wen, Zhiquan, Chen, Yaofo, Zhao, Peilin, Miao, Chunyan, Tan, Mingkui
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908521178595328
author Niu, Shuaicheng
Chen, Guohao
Chen, Deyu
Zhang, Yifan
Wu, Jiaxiang
Wen, Zhiquan
Chen, Yaofo
Zhao, Peilin
Miao, Chunyan
Tan, Mingkui
author_facet Niu, Shuaicheng
Chen, Guohao
Chen, Deyu
Zhang, Yifan
Wu, Jiaxiang
Wen, Zhiquan
Chen, Yaofo
Zhao, Peilin
Miao, Chunyan
Tan, Mingkui
contents Test-time adaptation (TTA) may fail to improve or even harm the model performance when test data have: 1) mixed distribution shifts, 2) small batch sizes, 3) online imbalanced label distribution shifts. This is often a key obstacle preventing existing TTA methods from being deployed in the real world. In this paper, we investigate the unstable reasons and find that the batch norm layer is a crucial factor hindering TTA stability. Conversely, TTA can perform more stably with batch-agnostic norm layers, i.e., group or layer norm. However, we observe that TTA with group and layer norms does not always succeed and still suffers many failure cases, i.e., the model collapses into trivial solutions by assigning the same class label for all samples. By digging into this, we find that, during the collapse process: 1) the model gradients often undergo an initial explosion followed by rapid degradation, suggesting that certain noisy test samples with large gradients may disrupt adaptation; and 2) the model representations tend to exhibit high correlations and classification bias. To address this, we first propose a sharpness-aware and reliable entropy minimization method, called SAR, for stabilizing TTA from two aspects: 1) remove partial noisy samples with large gradients, 2) encourage model weights to go to a flat minimum so that the model is robust to the remaining noisy samples. Based on SAR, we further introduce SAR^2 to prevent representation collapse with two regularizers: 1) a redundancy regularizer to reduce inter-dimensional correlations among centroid-invariant features; and 2) an inequity regularizer to maximize the prediction entropy of a prototype centroid, thereby penalizing biased representations toward any specific class. Promising results demonstrate that our methods perform more stably over prior methods and are computationally efficient under the above wild test scenarios.
format Preprint
id arxiv_https___arxiv_org_abs_2509_04977
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Adapt in the Wild: Test-Time Entropy Minimization with Sharpness and Feature Regularization
Niu, Shuaicheng
Chen, Guohao
Chen, Deyu
Zhang, Yifan
Wu, Jiaxiang
Wen, Zhiquan
Chen, Yaofo
Zhao, Peilin
Miao, Chunyan
Tan, Mingkui
Machine Learning
Test-time adaptation (TTA) may fail to improve or even harm the model performance when test data have: 1) mixed distribution shifts, 2) small batch sizes, 3) online imbalanced label distribution shifts. This is often a key obstacle preventing existing TTA methods from being deployed in the real world. In this paper, we investigate the unstable reasons and find that the batch norm layer is a crucial factor hindering TTA stability. Conversely, TTA can perform more stably with batch-agnostic norm layers, i.e., group or layer norm. However, we observe that TTA with group and layer norms does not always succeed and still suffers many failure cases, i.e., the model collapses into trivial solutions by assigning the same class label for all samples. By digging into this, we find that, during the collapse process: 1) the model gradients often undergo an initial explosion followed by rapid degradation, suggesting that certain noisy test samples with large gradients may disrupt adaptation; and 2) the model representations tend to exhibit high correlations and classification bias. To address this, we first propose a sharpness-aware and reliable entropy minimization method, called SAR, for stabilizing TTA from two aspects: 1) remove partial noisy samples with large gradients, 2) encourage model weights to go to a flat minimum so that the model is robust to the remaining noisy samples. Based on SAR, we further introduce SAR^2 to prevent representation collapse with two regularizers: 1) a redundancy regularizer to reduce inter-dimensional correlations among centroid-invariant features; and 2) an inequity regularizer to maximize the prediction entropy of a prototype centroid, thereby penalizing biased representations toward any specific class. Promising results demonstrate that our methods perform more stably over prior methods and are computationally efficient under the above wild test scenarios.
title Adapt in the Wild: Test-Time Entropy Minimization with Sharpness and Feature Regularization
topic Machine Learning
url https://arxiv.org/abs/2509.04977