Regularizing towards Causal Invariance: Linear Models with Proxies

Michael Oberst, Nikolaj Thams, Jonas Peters, David A. Sontag

Machine learning models often fail when deployed in the real world because they rely on "spurious" correlations found in training data that don't hold up in new environments. For example, a model predicting health outcomes might accidentally rely on socioeconomic factors that vary across cities. This phenomenon is known as dataset shift.

One way to fix this is Anchor Regression, which regularizes a model to be "invariant" to shifts in an anchor variable $A$. However, Anchor Regression usually assumes you can observe $A$ during training. In reality, $A$ is often unobserved (e.g., we can't perfectly measure "socioeconomic status"). We might only have noisy proxies, like "zip code" or "income level." The challenge is: how do we build robust models when our only window into the cause of the shift is through "blurry" (noisy) measurements?

This paper introduces a way to build linear models that remain accurate even when the underlying environment changes (causal interventions). While previous methods required observing the "anchor" variables causing these shifts, this work proves you can achieve the same robustness using noisy proxies—provided you have at least two of them to cancel out measurement error.

The Causal Setup and Methods

The authors build on the framework of Linear Structural Causal Models (SCMs). Their approach involves a new regularization term that trades off between standard predictive performance (Ordinary Least Squares, or OLS) and robustness to interventions on the unobserved anchor $A$.

Causal graph illustrating the unobserved anchor A, noisy proxies W and Z, and the prediction task from X to Y.
  1. Proxy Anchor Regression (PAR): If you only have one noisy proxy $W$, you can still regularize, but the "robustness set" (the range of shifts the model can handle) is strictly smaller than if you observed $A$ directly. This is due to "regression dilution bias"—the noise in the proxy masks the true causal signal.
  2. Cross-Proxy Anchor Regression (xPAR): The authors' key innovation. They show that if you have two noisy proxies ($W$ and $Z$), you can use their cross-covariance to "identify" the target loss. This effectively cancels out the measurement noise, allowing the model to recover the exact same robustness guarantees as if the unobserved anchor $A$ were perfectly known.
  3. Targeted Anchor Regression (TAR): Standard anchor regression protects against any shift of a certain strength. TAR allows researchers to bake in prior knowledge about a specific expected shift (e.g., "I expect the mean of $A$ to shift by $+2$ at test time").

Key Insights

  • The "Two-Proxy" Trick: Much like Instrumental Variable (IV) estimation in econometrics, having two independent measurements of the same hidden variable allows you to bypass the bias introduced by measurement noise.
  • Robustness is a Spectrum: You don't always want a perfectly "causal" or "invariant" model. If the test environment is similar to the training environment, a causal model might actually perform worse than OLS. The authors' regularization parameter allows practitioners to choose exactly where they want to sit on the trade-off between "optimal for now" and "robust for later."
  • Identifiability Matters: The paper highlights that with only one proxy, the "true" robustness is unidentifiable because you can't tell if a weak correlation is due to a weak causal link or just a very noisy proxy.

Key Results

The authors validated their methods on both synthetic SCMs and a real-world China Air Pollution dataset.

Performance comparison showing xPAR matching true Anchor Regression (AR), while single-proxy PAR degrades with lower signal-to-variance ratios.
  • Recovering Performance: In synthetic tests, xPAR (using two proxies) perfectly matched the performance of Anchor Regression (using the true $A$), even as proxy noise increased. In contrast, the single-proxy version (PAR) quickly degraded toward standard OLS as the signal-to-variance ratio dropped.
  • Real-World Generalization: On the pollution data, the authors tested models by training on three seasons and testing on the fourth. The robust models consistently outperformed standard OLS, reducing the Mean Squared Prediction Error (MSPE) in 9 out of 20 seasonal/city scenarios.
  • Feature Selection: The robust models learned to put more weight on "causal" features and less on "anti-causal" features that were highly sensitive to environmental shifts.

Limitations and Future Work

  • Linearity: The entire framework assumes linear relationships. Extending these proxy-based robustness guarantees to non-linear models (like deep neural networks) remains a significant open challenge.
  • Additive Noise: The proofs rely on the assumption that proxy noise is additive and independent. If the noise is correlated with other variables in the system, the "two-proxy" trick might fail.
  • Proxy Requirements: Finding two high-quality, independent proxies for a hidden confounder isn't always easy in practice. Future work could explore how to handle cases with many weak or correlated proxies.

Summary updated

BibTeX
@inproceedings{oberst2021regularizing,
  author = {Michael Oberst and Nikolaj Thams and Jonas Peters and David A. Sontag},
  title = {{Regularizing towards Causal Invariance: Linear Models with Proxies}},
  booktitle = {International Conference on Machine Learning},
  year = {2021},
  url = {https://openreview.net/forum?id=yuNks3tomjl},
}
Figure