TL;DR
This paper introduces "Direct-Effect Risk Minimization" (DRM), a novel approach to domain generalization that leverages causal inference to disentangle stable causal relationships from spurious correlations. By learning to minimize the "direct effect" of features on labels, DRM significantly improves model robustness to domain shifts, particularly in challenging "correlation shift" scenarios.
What Problem Does This Paper Address?
Machine learning models often struggle when deployed in environments different from their training data. This is especially true when the relationships between features and labels change, a phenomenon known as "correlation shift." For example, a model trained to identify cats might learn that "furry" and "four legs" are strong indicators of "cat." However, if in a new domain, dogs also frequently exhibit these traits, the model's performance can degrade. This paper tackles the problem of correlation shift in domain generalization, aiming to build models that learn the true causal relationships rather than relying on superficial, domain-specific correlations.
Methods
The core of DRM is a two-stage approach inspired by causal inference:
- Stage 1: Recovering Indirect Effects: The first stage uses a "discriminator" and an "extractor" to learn a representation of the "indirect effect" (spurious correlations) from the input data. The extractor learns to produce a representation that can predict the domain label, effectively capturing the domain-specific information.
- Stage 2: Eliminating Indirect Effects (Training and Validation Balancing):
- Training Balancing (TB): In this stage, the model is trained on "balanced batches." These batches are constructed by pairing samples that share the same indirect-effect representation (learned in Stage 1) but have different class labels. This forces the model to learn from the stable causal relationships, not the spurious ones.
- Validation Balancing (VB): To address the common issue of validation sets not accurately reflecting test distributions (especially in correlation shift), DRM uses a similar balancing technique for the validation set. This ensures that model selection is based on robust performance rather than spurious correlations present in the validation data.
DRM is designed to be compatible with existing domain generalization methods, aiming to improve their performance when combined.
Datasets
The authors evaluate DRM on several correlation-shifted datasets:
- Colored MNIST (CMNIST): Creates spurious correlations between digit colors and labels.
- 3DShapes: Uses "floor hue" and "orientation" for correlation shift.
- DSprites: Employs "Position X" and "Position Y" for correlation shift.
- CelebA-HB and CelebA-NS: These datasets are derived from the CelebA dataset and introduce correlation shifts based on attributes like "No Beard" vs. "Wearing Hat" and "Smiling" vs. "Wearing Necktie," simulating selection bias.
They also report results on diversity-shifted datasets (PACS, VLCS, Office-Home, TerraIncognita, DomainNet) to show that DRM does not negatively impact performance in these scenarios.
Key Insights and Ideas
- Causal Inference for Robustness: The paper makes a strong case for using causal concepts like direct and indirect effects to understand and solve domain generalization problems, particularly correlation shift.
- Disentangling Stable vs. Spurious: The core idea is that by explicitly learning and then mitigating the "indirect effect" (spurious correlations), models can focus on the "direct effect" (stable causal relationships), leading to better generalization.
- Validation Set Inconsistency is Key: The authors highlight that a major reason for the failure of many domain generalization methods is the inconsistency between validation and test distributions, especially when correlation shifts occur. Their validation balancing (VB) directly addresses this.
- Foundation Models Aren't a Silver Bullet for Correlation Shift: The paper shows that while large foundation models excel at diversity shift, they don't inherently solve correlation shift problems, suggesting DRM's approach is still crucial.
Key Results
- Significant Performance Gains: DRM achieves substantial improvements on correlation-shifted datasets. For example, on the most difficult "-90%" environment of Colored MNIST, DRM reaches 69.7% accuracy, a nearly 60% improvement over other methods.
- Average Improvements: On average, DRM outperforms ERM by about 20% and previous state-of-the-art methods by 15% on correlation-shifted datasets.
- Ablation Studies: Both training balancing (TB) and validation balancing (VB) contribute significantly to DRM's performance, with their combination yielding the best results.
- Compatibility: DRM can be combined with existing methods (like IRM, VREX, CORAL) to boost their performance, demonstrating its general applicability.
- Visualizations: t-SNE plots of the learned indirect effect representation (Z) show clear clustering based on spurious features, indicating effective disentanglement. Attention maps also show DRM models focusing on stable features while ERM models rely on spurious ones.
Limitations and Future Work
- Observability of Indirect Effects: The paper acknowledges that the indirect-effect representation (Z) is not always observable and needs to be learned. The quality of this learned representation is crucial.
- Compatibility with Other Methods: While DRM is shown to be compatible, further exploration of optimal combinations with various existing domain generalization techniques could be beneficial.
- Broader Applicability: While tested on several datasets, exploring DRM's effectiveness on a wider range of real-world correlation shift scenarios would be valuable.
- Theoretical Guarantees: While the paper argues for the robustness of learning direct effects, further theoretical analysis of the conditions under which this holds could strengthen the approach.
Summary updated