Invariance Pair Guidance: Robustness to Spurious Correlations via Corrective Gradients
Abstract Machine learning models are inherently bound to the distribution of the training data, often exploiting non-causal shortcuts. As a result, achieving robustness to spurious correlations remains a challenge. While existing approaches rely on data manipulation or re-weighting strategies to achieve robustness, they typically require dense group labels, multiple training domains, or specialized pre-processing. We propose Invariance Pair Guidance (IPG), a method to mitigate reliance on spurious correlations using a sparse set of counterfactual pairs. Unlike other methods demanding extensive supervision, IPG utilizes a novel dual-update mechanism to dynamically correct the optimization trajectory. We generate input pairs that isolate the spurious attribute to define the invariance, a characteristic that should not affect the outcome of the model. Based on these pairs, we define a corrective gradient that complements the traditional gradient descent approach. The correction adapts via a predefined invariance condition. Experiments on ColoredMNIST, Waterbirds-100, and CelebA datasets demonstrate the effectiveness of our approach and its robustness to group shifts, supported by a theoretical convergence analysis. IPG offers a data-efficient and theoretically grounded path to robustness.
Authors
- Ludwig Bothmann (ORCID: https://orcid.org/0000-0002-1471-6582)
- Abdelmajid Khelil (ORCID: https://orcid.org/0000-0002-4536-8058)
- Martin Surner (ORCID: https://orcid.org/0009-0007-4373-6834)
Institutions
- University of Applied Sciences Landshut (DE)
- LMU Klinikum (DE)
- Munich Center for Machine Learning
- Ludwig-Maximilians-Universität München (DE)
Publication Details
- Journal
- Machine Learning
- Published
- 2026-07-25
- DOI
- https://doi.org/10.1007/s10994-026-07092-0
- Primary Topic
- Domain Adaptation and Few-Shot Learning
- Type
- article
- Field-Weighted Citation Impact
- 0.00