TL;DR
This paper introduces Feature Augmentation based Test-time Adaptation (FATA), a novel approach to adapt pre-trained models to new, unseen data domains during inference. FATA tackles the problem of limited data availability in test-time adaptation by augmenting features within the model, leading to improved performance across various scenarios and architectures.
What Problem Does This Paper Address?
Deep learning models excel in many tasks, but their performance often degrades when encountering data from a different domain than what they were trained on (domain shift). Test-time adaptation (TTA) aims to address this by adapting a pre-trained model to the target domain during inference, without access to the original training data or labels. However, practical TTA methods often face a data scarcity problem. Many existing TTA techniques rely on filtering input data based on reliability metrics like entropy. While this helps remove noisy samples, it drastically reduces the amount of data available for adaptation, thereby limiting the model's potential to learn and adapt effectively. This paper highlights that this data filtering can lead to a significant performance gap, especially for under-represented classes.
Methods
The core innovation of FATA lies in its Feature Augmentation strategy and a corresponding FATA Loss.
- Feature Augmentation: Instead of traditional image-space augmentation, FATA operates in the feature space. It injects a "Normalization Perturbation" technique (specifically, a variant called NP+ inspired by AdaIN) into an intermediate layer of the model. This perturbation modifies the channel statistics of the features, creating augmented representations that are more diverse and representative of the target domain. The authors propose a specific augmentation mechanism that uses an exponential moving average of normalized standard deviation and replaces variance with standard deviation to better adapt to the target domain. This augmentation is designed to be a plug-in module, compatible with various model architectures.
- FATA Loss: To leverage these augmented features, FATA introduces an augmentation loss. This loss compares the output of the augmented features with a pseudo-label generated from the original, non-augmented features. Specifically, it uses the cross-entropy between the prediction of the augmented feature and the pseudo-label derived from the original feature's prediction (using
stop-gradto prevent gradients from flowing back through the pseudo-label generation). This loss encourages the model to produce similar outputs for both original and augmented features, thereby facilitating adaptation.
FATA also incorporates sample selection and weighting based on entropy, similar to existing methods like EATA and SAR, to focus on more reliable samples. The final loss is a combination of the original TTA loss (e.g., entropy minimization) and the FATA augmentation loss, weighted by the sample selection and weighting functions.
Datasets
The paper evaluates FATA on two benchmark datasets:
- ImageNet-C: This dataset consists of corrupted images from the ImageNet dataset, covering 15 different types of corruptions (e.g., noise, blur, weather). It's used to test the model's robustness to various real-world degradations.
- Office-Home: This dataset comprises images from four different domains (Art, Clipart, Product, and Real-World) and 65 classes, used to evaluate domain adaptation performance across different scenarios.
Key Insights and Ideas
- Data scarcity is a critical bottleneck in TTA: The paper convincingly demonstrates that filtering data based on entropy, while seemingly logical, severely limits the available data for adaptation, directly impacting performance.
- Feature augmentation is more effective than image augmentation for TTA: By operating in the feature space, FATA can create richer, more diverse representations without the computational overhead of full image transformations.
- Augmenting features helps models learn more generalized representations: This allows the model to better cope with domain shifts, even with limited target data.
- Pseudo-labeling with augmented features is key: Using the original feature's prediction as a pseudo-label for the augmented feature's output provides a stable and effective learning signal.
- FATA is a general-purpose add-on: The method is designed to be model-agnostic and can be seamlessly integrated with existing TTA frameworks that use entropy-based sample selection.
Key Results
FATA consistently improves the performance of existing TTA methods across various architectures (ResNet-50 with BN/GN, ViT-B with LN) and challenging scenarios:
- Normal Scenario: FATA integration led to significant accuracy improvements, with an average gain of up to 7.97 points when used with ResNet-50 and GN on ImageNet-C.
- Batch Size of One Scenario: FATA generally enhanced adaptation performance, even under the highly constrained condition of processing one image at a time.
- Imbalanced Label Shifts Scenario: The most dramatic improvements were observed here, with FATA boosting accuracy by up to 17.12 points when combined with EATA.
- Office-Home Dataset: FATA consistently improved performance across domain shifts with minimal computational overhead compared to other methods like COTTA.
Limitations and Future Work
- Model Collapse: The authors acknowledge that FATA, like some other TTA methods, does not fully prevent the model collapse phenomenon, particularly in challenging corruption types like "Fog" on ImageNet-C. They suggest that future research should explore methods to explicitly address this.
- Theoretical Analysis: While empirical results are strong, the authors note that further theoretical analysis of the FATA loss would be beneficial.
- Location of Augmentation: Ablation studies showed that inserting feature augmentation after the third layer of ResNet-50 yielded the best results, suggesting that the optimal layer might vary and warrants further investigation.
Summary updated