Introduction
Deep learning models often struggle with domain shift, where a model trained on one type of data (e.g., photos) fails to generalize to another (e.g., sketches). While traditional Domain Generalization (DG) relies on diverse, labeled source datasets, Source-Free Domain Generalization (SFDG) leverages Vision-Language Models (VLMs) like CLIP to simulate domains through text prompts. However, existing SFDG methods frequently fail to disentangle object features from domain-specific "noise" or confounders.
TDCRL (Text-Driven Causal Representation Learning) addresses this by integrating causal inference into the SFDG framework. By treating domain style as a confounder and applying causal interventions, TDCRL enables the learning of truly domain-invariant features without requiring any source-domain images.
Methodology
The TDCRL framework operates in two primary stages: text-driven data augmentation and causal representation learning.
1. Text Embedding Generation
To simulate visual variety, TDCRL uses a data augmentation strategy involving mixup and random sampling of style word vectors. This process generates a diverse set of simulated visual representations within CLIP’s shared feature space, moving beyond static, manually defined prompts.
2. Causal Representation Learning
The core of TDCRL is the implementation of Pearl’s "do-operation" to break the statistical correlation between domain styles and class labels. This is achieved through:
- Confounder Dictionary ($Z$): A collection of style embeddings representing various domains (e.g., cartoon, photo).
- Causal Intervention Network: A module trained to "intervene" on features by transforming them to incorporate different styles from the dictionary.
- Invariant Learning: The model is trained to maintain consistent object classification regardless of the style intervention applied, forcing the extraction of domain-invariant features.
During inference, the Causal Intervention Network processes image features from CLIP and uses the confounder dictionary to "average out" stylistic influences, resulting in a "cleaned" feature for final classification.
Experimental Results
The authors evaluated TDCRL on four major benchmarks: PACS, VLCS, OfficeHome, and DomainNet. The method consistently achieved state-of-the-art (SOTA) performance across various backbones, including ResNet-50 and Vision Transformers (ViT).
Key Findings
- Superior Accuracy: TDCRL reached a peak accuracy of 99.0% on the PACS dataset using a ViT-L/14 backbone, surpassing both source-free and source-dependent competitors.
- Cross-Modal Transfer: A significant discovery is that the causal intervention network, though trained on text embeddings, generalizes effectively to image embeddings due to CLIP's aligned latent space.
- Efficiency: TDCRL is computationally efficient, requiring significantly less training time than generative methods like PromptStyler (e.g., ~255 min vs ~511 min).
- Stability: The method exhibits lower performance variance across different environments, suggesting high robustness to domain shifts.
Conclusion and Future Work
TDCRL demonstrates that causal inference can significantly enhance the robustness of vision-language models in source-free settings. By explicitly modeling and intervening on domain confounders, it achieves superior generalization. Future research may focus on automating the selection of confounder dictionaries and extending the framework to handle more complex, multi-object scenes with environmental confounders like lighting and weather.
Summary updated