Is Spurious Correlation Removal Always Learnable?

Yibo Zhou, Bo Li, Hai-Miao Hu, Hanzi Wang, Xiaokang Zhang, Ruifan Zhang

Machine learning models are notorious for taking shortcuts. If most pictures of cows in a training set feature green pastures, a model might learn that "green background = cow." This is a spurious correlation. When deployed in a different environment—such as a cow on a beach—the model's performance collapses.

Invariant Learning attempts to solve this by analyzing data from multiple environments to isolate features whose relationship with the label remains stable (the "invariant" features). Existing statistical theory suggests that if environments are diverse enough, these invariant features are "identifiable," meaning there is enough information to distinguish them from spurious noise. However, practitioners often find that invariant learning methods, such as Invariant Risk Minimization (IRM) or GroupDRO, are hit-or-miss.

This raises a fundamental question: Is statistical identifiability enough? Or is there a hidden computational barrier that prevents us from actually learning these features in a reasonable amount of time?

The Computational-Statistical Gap

The core contribution of this research is the mathematical proof of a "computational-statistical gap" in invariant learning. The authors demonstrate that even when invariant features are theoretically identifiable, finding them might be computationally impossible for any practical, efficient algorithm.

Using a mix of high-dimensional statistics and computational complexity theory, the researchers built a "hard" problem instance. They wrapped a supervised sparse recovery primitive—motivated by the well-known "Planted Clique" hardness assumption—into a multi-environment learning task. In this linear-Gaussian setting, the "true" invariant signal exists in a lower-dimensional subspace.

The findings are striking: there are regimes where an exhaustive search (which takes exponential time) can easily find the invariant structure using a small number of samples. However, any polynomial-time algorithm would require orders of magnitude more data—or fail entirely—to achieve the same constant-accuracy recovery. In their synthetic experiments, this sample complexity gap was as large as 27x.

The Crucial Role of Environment Diversity

To understand when invariant learning succeeds or fails, the authors introduce a separation parameter, $\gamma$, which quantifies how much the spurious correlations vary across environments. This parameter controls both the identifiability of the features and the curvature of the invariance objectives.

The theoretical results reveal two major insights regarding diversity:

  1. Diversity Trumps Quantity: The number of environments ($|\mathcal{E}|$) matters much less than their diversity ($\gamma$). A few highly diverse environments are significantly more useful than a massive dataset drawn from nearly identical environments. The estimation error scales proportionally to $1/\gamma^2$. If diversity is halved, you need four times as much data to compensate.
  2. The Phase Transition: Learning invariant features isn't a smooth curve. Under label-induced shifts, a phase transition occurs at a critical sample size $n^* \propto k(d-k)/(|\mathcal{E}|\gamma^2)$. Below this threshold, learning is essentially impossible for efficient algorithms. Once crossed, accuracy jumps sharply.

Empirical Validation and Practical Diagnostics

The paper validates its theoretical claims using both controlled simulations and standard distribution shift benchmarks, including ColoredMNIST, CelebA, and Waterbirds.

On synthetic datasets designed to mimic the theoretical "hard" cases, exhaustive search remained near-optimal, while polynomial-time methods like IRM failed completely until the "super-critical" data volume was reached. On ColoredMNIST, increasing the sample size from $N=500$ to $N=2000$ significantly closed the gap between standard Empirical Risk Minimization (ERM) and an "Oracle" model, confirming that invariant learning is exceptionally brittle in the small-sample regime.

For practitioners, the authors propose a simple diagnostic proxy, $\hat{\gamma}_{repr}$, which can be computed directly on training data. If this value is low, it signals a fundamental lack of diversity. In such cases, deploying a more sophisticated algorithm won't help; the solution is to collect more diverse data.

Limitations and Future Directions

While this paper provides a rigorous foundation for understanding the limits of invariant learning, it relies heavily on linear models and Gaussian noise. Real-world deep learning involves complex non-linearities that are not fully captured by this framework. Furthermore, the computational lower bounds represent "worst-case" scenarios—meaning these exceptionally hard problems exist, but not every real-world dataset will hit this computational wall.

Future work will need to extend these bounds to non-linear models and develop sharper frameworks to help practitioners precisely estimate how much diversity is required for specific, real-world tasks. Ultimately, this research serves as a crucial reminder: in the quest for robust AI, algorithmic cleverness cannot always substitute for data diversity.

Reference: Zhou, Y., et al. (2026). Is Spurious Correlation Removal Always Learnable? Proceedings of the 43rd International Conference on Machine Learning (ICML).

Summary updated

BibTeX
@inproceedings{zhou2026is,
  author = {Yibo Zhou and Bo Li and Hai-Miao Hu and Hanzi Wang and Xiaokang Zhang and Ruifan Zhang},
  title = {{Is Spurious Correlation Removal Always Learnable?}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=iwS6Lg1Uwx},
}
Figure