Enhancing Information Maximization with Distance-Aware Contrastive Learning for Source-Free Cross-Domain Few-Shot Learning

Huali Xu, Li Liu, Shuaifeng Zhi, Shaojing Fu, Zhuo Su, Ming-Ming Cheng, Yongxiang Liu

TL;DR

This paper introduces a novel framework for Source-Free Cross-Domain Few-Shot Learning (SF-CDFSL), a setting where a model must adapt to a completely new target domain with only a few labeled examples without accessing the original source training data. The authors propose IM-DCL, a method combining transductive Information Maximization with a soft, distance-aware contrastive learning strategy to successfully map out target decision boundaries.

What Problem Does This Paper Address?

Few-Shot Learning (FSL) helps machines learn new concepts from just a few examples. However, conventional FSL assumes the source data (used for pre-training) and target data come from the same distribution. Cross-Domain FSL (CDFSL) relaxes this assumption but still requires access to massive source datasets during the adaptation phase.

In the real world, accessing source data is often impossible due to data privacy laws (e.g., medical records), high transmission costs, or copyright restrictions. To solve this, the authors define the Source-Free CDFSL (SF-CDFSL) task. Here, you only get a pre-trained source model and a tiny, labeled target dataset.

Fig. 1. Contrast the proposed SF-CDFSL problem with existing closely related problem settings. (a) Vanilla UDA: Both source and target tasks share the same label space, but the data of these two domains are from different distributions. (b) SFDA: the source data are not accessible in UDA. Contrasted with the DA problem, (c) Vanilla CDFSL: including sufficient labeled source data and a few labeled target data (there are both domain gaps and task shift between source and target task). While (d) Our proposed SF-CDFSL: in which the source data is not accessible (like SFDA) and contains both domain gaps and task shift (like CDFSL), is more challenging. In SF-CDFSL, we solve the FSL problem in the target domain with limited target data and a pretrained source model without accessing any source data. This effectively eliminates the potential information leakage from the source domain. The lock means that the corresponding part is not accessible when retraining the target task, accessible only for pre-training.

The challenges are twofold: you have severely limited target samples, and you cannot perform traditional domain alignment because the source data distribution is completely unknown.

Methods

The authors propose IM-DCL (Enhanced Information Maximization with Distance-Aware Contrastive Learning), which operates in two main phases per epoch: a supervised inductive phase using the support set, and an unsupervised transductive phase leveraging both support and query sets.

Overview of the proposed IM-DCL framework.

Key components include:

  1. Transductive Learning: Instead of traditional inductive learning, the model incorporates unlabeled query instances directly into the adaptation process, optimizing performance specifically for the task at hand.
  2. Information Maximization (IM): IM forces the model to output predictions with individual certainty (low entropy per sample) and global diversity (ensuring predictions are evenly distributed across all categories). This helps the source model fit the target data distribution without needing explicit source-target alignment.
  3. Distance-Aware Contrastive Learning (DCL): A known flaw of IM is that it can confidently cluster features into the completely wrong classes if they lie near a decision boundary. To fix this, the authors introduce a "Schrödinger-inspired" soft contrastive learning strategy. Instead of rigidly splitting data into positive and negative sets, every feature in a memory bank acts as both a positive and negative sample simultaneously. Weights are assigned based on feature distance: closer features get higher positive weights, while distant features get higher negative weights.

Datasets

The method was evaluated using the BSCD-FSL benchmark, which consists of four datasets representing a spectrum of domain shifts from natural scenes to highly specialized images:

  • CropDiseases: Crop leaf images (closest to natural source domains).
  • EuroSAT: Satellite images.
  • ISIC 2018: Dermoscopic skin lesion images.
  • ChestX: Chest X-ray images (most distant from natural source domains).

Key Insights and Ideas

  • The IM Blindspot: Information Maximization is powerful but blind to actual class boundaries; it happily optimizes for uniform, highly confident, yet completely incorrect classifications.
  • Soft Contrastive Learning: Traditional contrastive learning fails on unlabeled query sets because hard positive/negative labels don't exist. Treating the entire feature set as a dual-state (both positive and negative via continuous distance-based weighting) provides a smooth optimization landscape that corrects IM's boundary errors.
  • Distant Domain Superiority: While training-strategy-based methods (which alter the pre-training phase) excel at near-domain tasks, adaptation-driven methods like IM-DCL show much better robustness when the target domain is radically different from the source (e.g., medical imagery).

Key Results

The authors evaluated IM-DCL on 5-way 1-shot (5W1S) and 5-way 5-shot (5W5S) tasks:

  • State-of-the-Art (SOTA) in Source-Free Settings: IM-DCL achieved an average accuracy of 55.91% on 5W1S tasks, outperforming all existing adaptation-driven methods.
  • Competitive with Source-Dependent Methods: Remarkably, despite having zero access to source data, IM-DCL achieved performance on par with, and occasionally superior to, traditional CDFSL methods that require heavy source-data retraining.
  • Distant Domain Breakthrough: On the challenging ChestX dataset (5W5S), IM-DCL achieved a SOTA result of 28.93%, proving its capability to handle extreme domain gaps.

Limitations and Future Work

  • Background Interference: IM-DCL experienced a performance drop on the ISIC dataset. Because it relies heavily on feature distances, complex backgrounds (like hair in skin lesion images) introduce noise that skews the distance weights.
  • Extreme Domain Gaps: While it beats current baselines on ChestX, sub-30% accuracy leaves significant room for improvement.
  • Future Directions: The authors suggest integrating attention mechanisms to isolate foreground objects from background noise, as well as exploring multi-modal information and large vision-language foundation models to provide richer context for complex medical imaging tasks.

Summary updated

BibTeX
@article{xu2024enhancing,
  author = {Huali Xu and Li Liu and Shuaifeng Zhi and Shaojing Fu and Zhuo Su and Ming-Ming Cheng and Yongxiang Liu},
  title = {{Enhancing Information Maximization with Distance-Aware Contrastive Learning for Source-Free Cross-Domain Few-Shot Learning}},
  journal = {IEEE Trans. Image Process.},
  year = {2024},
  doi = {10.1109/tip.2024.3374222},
}
Figure