NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Simple Test-time Adaptation Method for Source-free Domain Generalization

Vaasudev Narayanan, Sai Srinivas Kancheti, Sriranjani Ramakrishnan, Vineeth N. BalasubramanianDG @ ICLR 2023

TL;DR

This paper introduces TEPLA, a novel test-time adaptation method for Source-Free Domain Generalization (SFDG). TEPLA leverages unlabeled target data during inference to dynamically adapt multiple pre-trained source models, achieving state-of-the-art performance on benchmark datasets without requiring access to source data.

What Problem Does This Paper Address?

In real-world machine learning deployments, models often encounter data from domains different from their training distribution, leading to performance degradation. Domain Generalization (DG) aims to build models robust to such shifts. A more challenging setting, Source-Free Domain Generalization (SFDG), assumes that only pre-trained source models are available at inference time, with no access to the original source data. This is crucial due to increasing privacy concerns and data management challenges. The paper tackles SFDG by proposing a method that adapts these source models using only unlabeled target data available during inference.

Methods

The core of the proposed method, TEPLA (Test-time Pseudo-Labeling & Averaging), operates during inference time. For each incoming batch of unlabeled target data:

  1. Forward Pass: The test batch is passed through each of the available pre-trained source models.
  2. Pseudo-Label Generation: The class with the highest average probability score across all source models is selected as a "pseudo-label" for the batch.
  3. Model Adaptation: Each source model is then fine-tuned by minimizing its cross-entropy loss with respect to this generated pseudo-label. This step is performed using only the current test batch.
  4. Final Prediction: After adaptation, the models are used to make predictions on the same batch, and the final prediction is an average of the adapted models' outputs.

This approach is "source-free" because it never accesses the original source data, and it's "test-time" because the adaptation happens dynamically as new data arrives during inference. The paper also explores a "soft pseudo-labeling" variant.

Datasets

The authors evaluate TEPLA on four standard domain generalization benchmark datasets:

  • PACS: Contains images from Photo, Art, Cartoon, and Sketch domains.
  • OfficeHome: Includes images from Product, Art, Clipart, and Real World domains.
  • VLCS: A combination of Caltech101, LabelMe, SUN09, and VOC2007 datasets.
  • TerraIncognita: A dataset for autonomous navigation with images from four domains (L100, L38, L43, L46).

Key Insights and Ideas

  • Leveraging Multiple Source Models is Key: The paper demonstrates that by aggregating predictions and adapting multiple source models simultaneously, significant performance gains can be achieved in the SFDG setting, outperforming methods that might only consider a single source model or rely on more complex offline adaptation.
  • Test-Time Adaptation for SFDG is Effective: The core idea of adapting models during inference using unlabeled target data proves to be a powerful strategy for SFDG, allowing models to dynamically adjust to the specific characteristics of the incoming data.
  • Simplicity Can Be Powerful: TEPLA's straightforward approach of pseudo-labeling and cross-entropy minimization, when applied to multiple source models, achieves state-of-the-art results, suggesting that complex multi-objective pipelines might not always be necessary for effective SFDG.
  • Hard Pseudo-Labels Outperform Soft: Empirically, the hard pseudo-labeling strategy in TEPLA was found to work better than its soft counterpart.

Key Results

TEPLA consistently outperforms a wide range of baselines, including common sense methods, competing SFDG methods, and adapted SF-UDA/MSF-UDA methods.

  • On average accuracy across the four datasets, TEPLA achieved 69.2%, outperforming baselines by significant margins. For instance, it improved upon DEKAN by 5.3% and SF-UDA methods by 0.9% to 3.8%.
  • TEPLA exhibits lower variance in performance compared to UDA baselines, indicating greater stability.
  • The method is shown to be robust to batch size, maintaining performance across different batch sizes, which is crucial for real-world TTA scenarios where batch sizes can vary.
  • In a domain-incremental setting, TEPLA shows that performance improves as more source models are introduced.

Limitations and Future Work

  • Performance Guarantees: The authors acknowledge that in the SFDG setting, due to the absence of labeled data in both source and target domains, providing performance guarantees is challenging, and models might silently degrade.
  • Unsupervised Monitoring: Reliable unsupervised monitoring of model performance remains an open problem. Periodic manual checks in deployed models are suggested, especially for safety-critical applications.
  • Future Work: The paper suggests that while TEPLA is effective, there is still room for improvement in SFDG methods, particularly in bridging the gap with traditional DG methods that have access to labeled source data. Further exploration into more sophisticated adaptation strategies within the SFDG framework could be beneficial.

Summary updated

BibTeX
@inproceedings{narayanan2023simple,
  author = {Vaasudev Narayanan and Sai Srinivas Kancheti and Sriranjani Ramakrishnan and Vineeth N. Balasubramanian},
  title = {{A Simple Test-time Adaptation Method for Source-free Domain Generalization}},
  booktitle = {DG @ ICLR},
  year = {2023},
  url = {https://openreview.net/forum?id=Ran2xUWG2n},
}
Figure