[Paper Review] Towards Stable Test-Time Adaptation in Dynamic Wild World
The paper introduces SAR, a sharpness-aware and reliable entropy minimization method, to stabilize fully test-time adaptation (TTA) under wild test conditions by filtering noisy samples and promoting flat minima.
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.
Motivation & Objective
- Motivate and analyze stability challenges of test-time adaptation (TTA) under realistic wild test settings.
- Identify batch normalization as a key obstacle to stable TTA and evaluate batch-agnostic norms (GN/LN).
- Develop a robust optimization framework (SAR) that filters noisy samples and enforces flat minima for reliable online adaptation.
- Empirically validate normalization layer effects and compare SAR against state-of-the-art TTA methods on ImageNet-C under various wild scenarios.
Proposed method
- Argues BN hinders stable TTA due to biased mean/variance estimation under small batches and distribution shifts.
- Investigates normalization layers and proposes using batch-agnostic norms (GN/LN) for TTA.
- Introduces reliable entropy minimization by selectively using samples with entropy E(x;Θ) below a threshold E0.
- Defines sharpness-aware entropy minimization E^SA as a max perturbation of entropy within a radius ρ to encourage flat minima.
- Uses a bi-level optimization that minimizes S(x)E^SA(x;Θ), where S(x) selects reliable samples based on entropy, and employs a Model Recovery Scheme to reset if collapse is detected.
- Implements parameter updates limited to affine parameters of GN/LN layers, following Tent/EATA settings for efficiency.
- Compares SAR against MEMO, DDA, Tent, and EATA on ImageNet-C under mixture shifts, small batch sizes, and online label imbalances.
Experimental results
Research questions
- RQ1How does normalization choice (BN, GN, LN) affect stability of online TTA under wild test conditions?
- RQ2Can a single, efficient online optimization overcome model collapse and instability in GN/LN-based TTA?
- RQ3Does selectively filtering high-gradient/noisy samples and promoting flat minima improve robustness of entropy-based TTA methods?
- RQ4How does SAR perform relative to state-of-the-art TTA methods across mixed shifts, small batch sizes, and online imbalanced label shifts?],
- RQ5key_findings':['Batch-agnostic norm layers GN/LN are more stable than BN for TTA under wild test scenarios but still have failure cases.',
- RQ6SAR improves stability by removing high-gradient/noisy samples based on entropy and by enforcing sharpness-aware (flat) minima during adaptation.
- RQ7SAR with GN and LN achieves competitive or superior accuracy across ImageNet-C mixtures, including under online imbalanced label shifts, compared with MEMO, DDA, Tent, and EATA.
- RQ8Under mixture corruptions at severity levels 5 and 3, SAR attains the best average accuracy among the evaluated methods for GN and LN models.
- RQ9When batch size is 1, SAR often yields the best results across several corruption types and models, while MEMO and DDA remain more computationally demanding.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.