Understanding Cross-Domain Few-Shot Learning Based on Domain Similarity and Few-Shot Difficulty

Jaehoon Oh, Sungnyun Kim, Namgyu Ho, Jin-Hwa Kim, Hwanjun Song, Se-Young Yun

TL;DR

This paper investigates the effectiveness of different pre-training strategies (supervised vs. self-supervised learning) for Cross-Domain Few-Shot Learning (CD-FSL). They discover that self-supervised learning on target domain data is often superior when domains are dissimilar or target data is easy, and propose combined and two-stage learning schemes to further boost performance.

What Problem Does This Paper Address?

Few-Shot Learning (FSL) aims to train models that can learn new classes with very few examples. A common approach is to pre-train a model on a large "source" dataset and then fine-tune it on a smaller "target" dataset with novel classes. However, in real-world scenarios, the source and target domains often differ significantly, leading to poor performance. This is the core challenge of Cross-Domain Few-Shot Learning (CD-FSL).

Recent CD-FSL research has explored using unlabeled data from the target domain during pre-training, often through self-supervised learning (SSL), in addition to supervised learning (SL) on the source domain. However, it's not always clear when SSL is better than SL, or vice-versa. This paper aims to provide a systematic empirical understanding of these pre-training strategies by analyzing their performance in relation to two key factors: domain similarity (how alike the source and target domains are) and few-shot difficulty (how inherently hard it is to learn from few examples on the target domain).

Methods

The paper's core contribution lies in its empirical investigation and analysis. They compare two primary pre-training strategies:

  • Supervised Learning (SL): Standard training on labeled source domain data.
  • Self-Supervised Learning (SSL): Training on unlabeled target domain data using contrastive (e.g., SimCLR, MoCo) or non-contrastive (e.g., BYOL, SimSiam) methods.

To understand the interplay of domain similarity and few-shot difficulty, they introduce:

  • Domain Similarity Metric: Based on Earth Mover's Distance (EMD) between feature representations of source and target domains.
  • Few-Shot Difficulty Metric: Derived from the upper bound of empirical FSL performance on the target domain, indicating inherent hardness.

Beyond these individual strategies, they also propose and evaluate:

  • Mixed-Supervised Learning (MSL): A single-stage approach that combines SL and SSL losses during pre-training.
  • Two-Stage Pre-training: A pipeline where a model is first pre-trained with SL on the source domain and then further trained with SSL (or MSL) on the target domain.

Datasets

The study utilizes a comprehensive set of datasets:

  • Source Datasets: ImageNet, tieredImageNet, and miniImageNet.
  • Target Datasets: Eight datasets are used, including those from the BSCD-FSL benchmark (EuroSAT, CropDisease, ISIC, ChestX) and others (Places, CUB, Cars, Plantae). This selection allows for varying degrees of domain similarity and few-shot difficulty.

The paper also mentions using existing code and models from repositories like PyTorch.

Key Insights and Ideas

  • SSL Shines in Dissimilar Domains: Contrary to some prior beliefs, self-supervised learning on target domain data can significantly outperform supervised learning on source domain data, especially when the target domain is very different from the source. This highlights the value of leveraging target-specific information, even if unlabeled.
  • Domain Similarity Isn't Everything: While intuitive, high domain similarity doesn't always guarantee SL's superiority. The paper shows instances where SSL performs better even with high similarity, suggesting other factors are at play.
  • Few-Shot Difficulty is Crucial: The inherent difficulty of learning from few examples on the target domain is a critical factor. SSL tends to perform better when the target domain has low few-shot difficulty. Conversely, when the target domain is high difficulty, SL can become more advantageous due to the strong supervision signal from the source.
  • Synergy Through Combination: Mixed-Supervised Learning (MSL), which combines SL and SSL, can achieve synergy and improve performance when SL and SSL yield similar results. This suggests that leveraging both supervised and unsupervised signals can be beneficial.
  • Two-Stage is Generally Better: A two-stage pre-training approach (SL then SSL/MSL) consistently outperforms single-stage methods. The SL pre-trained model provides a strong initialization for the subsequent SSL/MSL phase, especially in large similarity scenarios.
  • Augmentation Matters for SSL: Stronger data augmentation techniques significantly boost SSL performance, a benefit not observed to the same extent for SL.

Key Results

  • SSL Outperforms SL: In many cross-domain scenarios, especially those with low domain similarity, SSL methods achieved higher accuracy than SL. For example, on EuroSAT with strong augmentation, SSL methods like MoCo achieved up to 27.50%p higher performance than base augmentation.
  • Two-Stage Gains: The two-stage pre-training schemes (e.g., SL → SSL) generally showed improved performance over their single-stage counterparts. For instance, SL → SSL outperformed SSL by a notable margin in several cases.
  • MSL Benefits from Similar Performance: Synergy was observed in MSL when SL and SSL had comparable performance on datasets like ISIC, ChestX, Places, and Plantae.

Limitations and Future Work

  • Theoretical Analysis Lacking: The paper acknowledges that while it provides extensive empirical findings, it does not cover theoretical analysis of the observed phenomena.
  • Focus on Pre-training: The study primarily focuses on the pre-training phase of CD-FSL, with fine-tuning being standard.
  • Future Work: The authors suggest that their work can inspire further theoretical studies. They also highlight the potential for more sophisticated two-stage approaches and the importance of carefully selecting augmentation strategies for SSL. The findings also suggest that practitioners should consider domain similarity and few-shot difficulty when choosing pre-training strategies.

Summary updated

BibTeX
@inproceedings{oh2022understanding,
  author = {Jaehoon Oh and Sungnyun Kim and Namgyu Ho and Jin-Hwa Kim and Hwanjun Song and Se-Young Yun},
  title = {{Understanding Cross-Domain Few-Shot Learning Based on Domain Similarity and Few-Shot Difficulty}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=rH-X09cB50f},
}
Figure