Introduction
Deep neural networks frequently encounter distribution shifts when deployed—ranging from sensor noise to varying weather conditions—which can lead to catastrophic performance degradation. While Unsupervised Domain Adaptation (UDA) offers a solution, it typically requires access to the original source training data, which is often restricted due to privacy or storage constraints. This paper explores fully test-time adaptation, where a pretrained model is updated on-the-fly using only unlabeled target data.
The current standard for this task, Test Entropy Minimization (TENT), forces models to make highly confident predictions. However, TENT suffers from two critical issues: vanishing gradients as confidence increases and a tendency for the model to "collapse" by predicting a single class for all inputs. This work introduces non-saturating likelihood ratio losses and a learnable input transformation module to overcome these hurdles.
Non-Saturating Confidence Maximization
The core innovation lies in the replacement of standard entropy minimization with Hard Likelihood Ratio (HLR) and Soft Likelihood Ratio (SLR) losses. These losses are designed to be non-saturating. In traditional entropy-based methods, once a model becomes highly confident in a prediction, the gradient approaches zero, effectively halting the learning process for the most reliable samples.
As shown in the figure above, HLR and SLR maintain a meaningful gradient even at high confidence levels ($y_1 \to 1$). This allows the model to continuously refine its feature representations using its most trustworthy predictions as self-supervision. To prevent model collapse, the authors also employ a moving-average diversity regularizer that encourages the distribution of predicted classes to remain approximately uniform across batches.
Test-Time Input Transformation
Beyond updating the model's internal parameters (specifically the affine parameters of normalization layers), the authors propose a Test-Time Input Transformation module. This is a small, trainable convolutional network prepended to the main model. Remarkably, this module learns to "undo" corruptions—such as denoising or adjusting contrast—using only the unsupervised SLR/HLR loss. This demonstrates that the pretrained model's internal representations contain sufficient structural priors to guide pixel-level image restoration without ever seeing a "clean" reference image.
Key Results and Stability
The proposed methods were evaluated on challenging benchmarks including ImageNet-C and ImageNet-R. A significant finding is the stability of the SLR and HLR methods over multiple epochs compared to TENT.
As detailed in the table above, on ImageNet-C (severity level 5), TENT's performance often degrades significantly by the fifth epoch due to model collapse. In contrast, SLR achieves a robust 41.52% accuracy under identical conditions. Furthermore, the method generalizes well; adapting on a small subset of corrupted data or classes improves accuracy across the entire unseen target domain. When applied to already-robust models (e.g., those trained with AugMix), SLR further pushes performance, reaching up to 68.6% mean corruption accuracy.
Conclusion and Limitations
This work demonstrates that maintaining gradients for high-confidence samples is key to effective test-time adaptation. While the method significantly improves robustness, it faces challenges such as "logit explosion" due to the unbounded nature of the likelihood ratio losses. Additionally, while accuracy improves, the resulting models can be overconfident, suggesting that test-time calibration remains an important area for future research. Despite these challenges, the combination of non-saturating losses and input transformation sets a new state-of-the-art for fully test-time adaptation.
Summary updated