Towards Stable Test-time Adaptation in Dynamic Wild World
Shuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Zhiquan Wen, Yaofo Chen, Peilin Zhao, Mingkui Tan
Abstract
Test-time adaptation (TTA) has shown to be effective at tackling distribution shifts between training and testing data by adapting a given model on test samples. However, the online model updating of TTA may be unstable and this is often a key obstacle preventing existing TTA methods from being deployed in the real world. Specifically, TTA may fail to improve or even harm the model performance when test data have: 1) mixed distribution shifts, 2) small batch sizes, and 3) online imbalanced label distribution shifts, which are quite common in practice. 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. By digging into the failure cases, we find that certain noisy test samples with large gradients may disturb the model adaption and result in collapsed trivial solutions, i.e., assigning the same class label for all samples. To address the above collapse issue, we propose a sharpness-aware and reliable entropy minimization method, called SAR, for further 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. Promising results demonstrate that SAR performs more stably over prior methods and is computationally efficient under the above wild test scenarios. The source code is available at https://github.com/mr-eggplant/SAR .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 8dae7c15-2c8c-4414-a398-aa7c2ca9aa1eCited by top-tier papers214
- AdaMerging: Adaptive Model Merging for Multi-Task LearningEnneng Yang, Zhenyi Wang, Li Shen, Shiwei Liu et al.ICLR 2024 · 230 citations
- Entropy is not Enough for Test-Time Adaptation: From the Perspective of Disentangled FactorsJonghyun Lee, Dahuin Jung, Saehyung Lee, Junsung Park et al.ICLR 2024 · 106 citations
- SoTTA: Robust Test-Time Adaptation on Noisy Data StreamsTaesik Gong, Yewon Kim, Taeckyung Lee, Sorn Chottananurak et al.NeurIPS 2023 · 89 citations
- Test-Time Model Adaptation with Only Forward PassesShuaicheng Niu, Chunyan Miao, Guohao Chen, Pengcheng Wu et al.ICML 2024 · 77 citations
- On Pitfalls of Test-Time AdaptationHao Zhao, Yuejiang Liu, Alexandre Alahi, Tao LinICML 2023 · 72 citations
Builds on27
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 citations
- A ConvNet for the 2020sZhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer et al.CVPR 2022 · 6,782 citations
- The Many Faces of Robustness: A Critical Analysis of Out-of-Distribution GeneralizationDan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath et al.ICCV 2021 · 2,294 citations
- Sharpness-aware Minimization for Efficiently Improving GeneralizationPierre Foret, Ariel Kleiner, Hossein Mobahi, Behnam NeyshaburICLR 2021 · 1,861 citations
Related papers
- Towards Real-World Test-Time Adaptation: Tri-net Self-Training with Balanced NormalizationYongyi Su, Xun Xu, Kui JiaAAAI 2024
- Bayesian Weight Enhancement with Steady-State Adaptation for Test-time Adaptation in Dynamic EnvironmentsJae-Hong LeeICML 2025
- Efficient Test-Time Model Adaptation without ForgettingShuaicheng Niu, Jiaxiang Wu, Yifan Zhang, Yaofo Chen et al.ICML 2022 · 579 citations
- NOTE: Robust Continual Test-time Adaptation Against Temporal CorrelationTaesik Gong, Jongheon Jeong, Taewon Kim, Yewon Kim et al.NeurIPS 2022 · 227 citations
- MedBN: Robust Test-Time Adaptation against Malicious Test SamplesHyejin Park, Jeongyeon Hwang, Sunung Mun, Sangdon Park et al.CVPR 2024 · 1 citation
