Benchmarking Validation Methods for Unsupervised Domain Adaptation

Kevin Musgrave, Serge J. Belongie, Ser-Nam Lim

Abstract

Changes to hyperparameters can have a dramatic effect on model accuracy. Thus, the tuning of hyperparameters plays an important role in optimizing machine-learning models. An integral part of the hyperparameter-tuning process is the evaluation of model checkpoints, which is done through the use of "validators". In a supervised setting, these validators evaluate checkpoints by computing accuracy on a validation set that has labels. In contrast, in an unsupervised setting, the validation set has no such labels. Without any labels, it is impossible to compute accuracy, so validators must estimate accuracy instead. But what is the best approach to estimating accuracy? In this paper, we consider this question in the context of unsupervised domain adaptation (UDA). Specifically, we propose three new validators, and we compare and rank them against five other existing validators, on a large dataset of 1,000,000 checkpoints. Extensive experimental results show that two of our proposed validators achieve state-of-the-art performance in various settings. Finally, we find that in many cases, the state-of-the-art is obtained by a simple baseline method. To the best of our knowledge, this is the largest empirical study of UDA validators to date.

Introduction: The Model Selection Dilemma in UDA

Unsupervised Domain Adaptation (UDA) aims to leverage a labeled source dataset to train a model that performs well on an unlabeled target dataset. While algorithmic development in UDA has flourished, a "dirty secret" persists: model selection. In standard supervised learning, researchers use a labeled validation set to tune hyperparameters and select the best checkpoint. In UDA, the target domain lacks labels by definition.

Most academic literature bypasses this by using an "oracle validator" — relying on hidden target labels for selection. In real-world applications, this is impossible. Practitioners must rely on "validators" — mathematical proxies that estimate target performance without labels. This paper addresses the critical need for a rigorous benchmark of these validators.

Evaluating Validators: The Need for Weighted Correlation

A key challenge in benchmarking validators is choosing the right evaluation metric. Standard Spearman Correlation (SC) treats all model checkpoints equally. However, in practice, we only care if a validator can distinguish between the best models. A validator that correlates well with poor models but fails to rank the top-performing ones is of little use.

To address this, the authors introduced Weighted Spearman Correlation (WSC), which assigns higher importance to high-accuracy checkpoints. As shown in Figure 4, WSC provides a much clearer picture of a validator's utility. For example, a synthetic "poor" validator might have a high SC (91.6) but a much lower WSC (67.0), revealing its failure to rank the best models correctly.

Comparison of standard Spearman Correlation (SC) and Weighted Spearman Correlation (WSC) across synthetic and real-world validators. WSC better reflects the utility of a validator for selecting high-performing models.

Proposed Validation Methods

The study evaluates five existing validators and introduces three novel approaches:

  1. Batch Nuclear-Norm Maximization (BNM): Adapted from a training loss, BNM rewards predictions that are both confident (low entropy) and diverse across the batch.
  2. ClassAMI: This method uses k-means to cluster target features and calculates the Adjusted Mutual Information (AMI) between these clusters and the model's predictions, improving upon previous cluster-based validation.
  3. DEV with Normalization (DEVN): A modification of Deep Embedded Validation (DEV) that incorporates max-normalization to ensure numerical stability and prevent scores from exploding.

A Massive Benchmark of 1,000,000 Checkpoints

To provide a definitive ranking, the authors created the largest empirical study of UDA validators to date. They saved features and logits from 1,000,000 checkpoints across 10 UDA algorithms (e.g., DANN, CDAN, MCC) and 31 transfer tasks using datasets like MNIST, Office31, OfficeHome, and DomainNet126.

Key Insights

  • The Oracle Gap: Relying on unsupervised validators leads to a significant performance drop compared to oracle selection. In some instances, poor validation causes UDA models to underperform simple source-only baselines.
  • Source Accuracy is a "Sticky" Baseline: Surprisingly, source validation accuracy remains a strong baseline, particularly when domain shift is moderate.
  • SND is Overrated: Soft Neighborhood Density (SND), a popular recent validator, consistently underperformed compared to simpler methods in this large-scale study.
  • Validator Robustness: The study found that WSC is significantly more robust to noise in target-domain accuracy than standard correlation metrics, as shown in Figure 2.
Robustness of different ranking metrics to noise added to target-domain accuracy. Weighted Spearman Correlation shows significantly higher stability compared to standard Spearman.

Results and Conclusion

The proposed ClassAMI and BNM validators achieve state-of-the-art performance. ClassAMI, in particular, is highly effective for standard benchmarks like OfficeHome, while BNM shines on more difficult tasks like DomainNet. For practitioners, the choice of validator is as crucial as the choice of UDA algorithm. While a gap remains between unsupervised selection and oracle performance, this benchmark provides the tools and rankings necessary to make informed decisions in real-world UDA deployments.

Summary updated

BibTeX
@misc{musgrave2022benchmarking,
  author = {Kevin Musgrave and Serge J. Belongie and Ser-Nam Lim},
  title = {{Benchmarking Validation Methods for Unsupervised Domain Adaptation}},
  year = {2022},
  eprint = {2208.07360},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.07360},
}
Figure