Introduction
Machine learning models frequently encounter "domain shift," where the target data in real-world applications differs significantly from the source data used during training. While Unsupervised Domain Adaptation (UDA) typically addresses this by accessing both datasets, privacy concerns often necessitate Source-Free Domain Adaptation (SFDA). In SFDA, only a pre-trained source model and unlabeled target data are available.
The Challenge of Non-Causal Factors
Traditional SFDA methods focus on aligning "causal" factors—features directly tied to an object's identity, such as shape. However, this research argues that ignoring "non-causal" factors (e.g., background, lighting, or texture) leads to failure when spurious correlations change between domains. For instance, a model trained to recognize a "ball" on "grass" may fail when it encounters a "ball" on "clay."
Methodology: C-SFTrans
The researchers propose C-SFTrans (Causality-enforcing Source-Free Transformer), a framework designed to disentangle and align these factors using the inherent strengths of Vision Transformers (ViTs).
Key Components
- Style Characterizing Input (SCI): To isolate non-causal style from causal identity, the model uses "patch shuffling." By randomizing image patches, global shape is destroyed while local textures and colors are preserved.
- Causal Influence Score (CIS): This metric identifies which attention heads in the Transformer focus on causal factors (shape) versus non-causal factors (style).
- Two-Stage Alignment:
- Stage A (Non-causal): Style-focused heads are trained on a subsidiary task using image augmentations to establish global alignment.
- Stage B (Causal): Identity-focused heads are adapted to the specific target task.
- These stages alternate to maintain the structural relationship between shape and style.
Experimental Evaluation
C-SFTrans was evaluated on four major benchmarks: Office-Home, Office-31, VisDA, and DomainNet.
Key Results
- Office-Home: Achieved 70.3% average accuracy, a 2.5% improvement over the previous best source-free method (SHOT-B).
- VisDA: Reached 88.3% accuracy, demonstrating robust synthetic-to-real adaptation.
- DomainNet: On this large-scale dataset (345 categories), it achieved 42.5% accuracy, outperforming other transformer-based methods like CDTrans and SSRT.
Insights and Conclusion
The study highlights that Vision Transformers are naturally better suited for domain adaptation than CNNs due to their inherent "shape bias." Crucially, the researchers found that aligning "non-causal" features first provides a foundational global alignment that significantly improves the subsequent alignment of "causal" features. This counter-intuitive approach—focusing on context to better understand the object—sets a new state-of-the-art for privacy-preserving domain adaptation.
Summary updated