TL;DR
Standard invariant learning often fails because models latch onto a single invariant feature that might be missing at test time. This paper introduces Sufficient Invariant Learning (SIL) and the ASGDRO algorithm, which forces models to learn a diverse set of invariant features by seeking common "flat minima" across different environments, leading to significantly better robustness under distribution shifts.
What Problem Does This Paper Address?
Machine learning models often crumble when the test data distribution differs from the training data—a phenomenon known as distribution shift. A common defense is invariant learning, where the goal is to find features that remain constant across different training environments (e.g., the shape of a bird) while ignoring "spurious" features that change (e.g., the background color).
However, the authors identify a critical "Single Feature Trap." Most existing methods are satisfied once they find any invariant feature that helps minimize training loss. In practice, an object might have multiple invariant features (a bird has a beak, wings, and feet). If a model only learns to recognize "feet" and those feet are hidden underwater at test time, the model fails—even if the "beak" is perfectly visible.
Methods
The authors propose a new framework called Sufficient Invariant Learning (SIL). The goal isn't just to find an invariant mechanism, but to find a sufficient set of them so the model remains robust even if some features are occluded.
To achieve this, they introduce Adaptive Sharpness-aware Group Distributionally Robust Optimization (ASGDRO). This algorithm combines two powerful ideas:
- Group DRO (GDRO): Minimizes the loss of the worst-performing environment to eliminate spurious correlations.
- Adaptive SAM (ASAM): A technique that finds "flat minima" in the loss landscape.
The core intuition is that relying on a narrow set of features often leads to "sharp" minima—small changes in parameters cause huge spikes in loss. By forcing the model to find a common flat minimum across all training environments, ASGDRO discourages the model from favoring "easy" single-feature solutions. Instead, it pushes the model to distribute its attention across a diverse range of invariant mechanisms.
Datasets
The authors evaluate their method on a wide array of benchmarks:
- H-CMNIST (Heterogeneous ColoredMNIST): A new synthetic benchmark introduced in this paper. It contains two invariant features (color and shape) and one spurious feature (box position). It specifically tests if a model can learn a "hard" invariant feature (shape) when an "easy" one (color) is already available.
- Subpopulation Shift: Standard tasks like Waterbirds, CelebA, and CivilComments, where models often rely on spurious attributes like background or gender.
- Wilds Benchmark: Real-world distribution shifts including Camelyon17 (medical imaging) and FMoW (satellite imagery).
- DomainBed: A suite for domain generalization (PACS, VLCS, etc.).
Key Insights and Ideas
- The Non-Uniqueness of Invariance: There isn't just one "correct" invariant model. Many different combinations of features can be invariant during training, but they aren't equally robust during testing.
- Flatness = Diversity: The paper theoretically demonstrates (Theorem 1) that minimizing the gradient norm (finding flat minima) acts as a regularizer that prevents the model from putting all its "predictive eggs" in one basket.
- Spurious Feature Suppression: ASGDRO doesn't just balance invariant features; it also actively removes spurious ones. The authors show that the sharpness penalty effectively "turns off" neurons that encode unstable, spurious information by pushing their activations into the negative range of the ReLU function.
Key Results
ASGDRO consistently outperformed state-of-the-art baselines across nearly all datasets:
- H-CMNIST: While standard GDRO failed to learn the "shape" feature when "color" was present, ASGDRO successfully captured both, leading to a ~9% improvement in accuracy on the most difficult test bed.
- Waterbirds: ASGDRO achieved a 91.4% worst-group accuracy, surpassing standard GDRO (90.6%) and significantly beating ERM (63.7%).
- Visual Evidence: Grad-CAM visualizations (Figure 4) show that ASGDRO actually "looks" at more parts of the object. For a bird, it focuses on the head, body, and tail, whereas baselines often focus only on a small patch or the spurious background.
Limitations and Future Work
- Computational Overhead: Like other SAM-based methods, ASGDRO requires two forward and backward passes per training iteration, roughly doubling the training time compared to standard SGD.
- Synthetic Benchmarks: While H-CMNIST is a useful diagnostic tool, the authors note the need for more complex, real-world SIL benchmarks with rich attribute annotations.
- Hyperparameter Tuning: The performance depends on the neighborhood radius $\rho$, which may require careful tuning for different architectures and datasets.
The authors suggest that future work could focus on reducing the computational cost and applying the SIL principle to even more complex modalities like large language models.
Summary updated