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, \ie, 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, \ie, 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.
STAMP: Outlier-Aware Test-Time Adaptation with Stable Memory Replay
Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);School of Artificial Intelligence, University of Chinese Academy of Sciences(中国科学院大学人工智能学院);University of Science and Technology of China(中国科学技术大学)
Adapt in the Wild: Test-Time Entropy Minimization with Sharpness and Feature Regularization
College of Computing and Data Science, Nanyang Technological University(新加坡南洋理工大学计算机与数据科学学院);School of Software Engineering, South China University of Technology(华南理工大学软件工程学院);ByteDance, China(中国字节跳动);Tencent AI Lab(腾讯AI实验室);School of Computing, National University of Singapore(新加坡国立大学计算机学院);School of Artificial Intelligence, Shanghai Jiao Tong University(上海交通大学人工智能学院)
Stable-LoRA: Stabilizing Feature Learning of Low-Rank Adaptation
Intelligent Software Research Center, Institute of Software, CAS, Beijing, China(软件研究所智能软件研究中心,中国科学院,北京);University of Chinese Academy of Sciences, Beijing, China(中国科学院大学,北京)
Loss Smoothing for Stable Adaptation Under Distribution Shift
Chandar Research Lab(Chandar 研究实验室);Mila – Quebec AI Institute(Mila – 魁北克人工智能研究所);Université de Montréal(蒙特利尔大学);Polytechnique Montréal(蒙特利尔理工学院);Canada CIFAR AI Chair(加拿大 CIFAR 人工智能主席)
An Approach to Stable Gradient Descent Adaptation of Higher-Order Neural Units
CTU in Prague(捷克布拉格技术大学);Tohoku University Graduate School of Medicine(东北大学医学研究生院);Graduate School of Biomedical Engineering, Tohoku University(东北大学生物医学工程研究生院)