NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Causal Framework for Distribution Generalization

Rune Christiansen, Niklas Pfister, Martin Emil Jakobsen, Nicola Gnecco, Jonas Peters · DOI

Abstract

Standard machine learning models often fail under distribution shift because they rely on the independent and identically distributed (i.i.d.) assumption. This paper introduces a rigorous causal framework for distribution generalization, defining it as the identification of a minimax solution across a class of interventions in Structural Causal Models (SCMs). We propose the Non-linear Intervention-robust Linear Extrapolator (NILE), an algorithm that leverages instrumental variables and linear extrapolation to achieve robustness. Our results demonstrate that while causal models are robust, they are not always predictive-optimal unless interventions are sufficiently strong.

Introduction

The success of modern machine learning is largely predicated on the assumption that training and test data share the same distribution. However, in real-world applications—ranging from autonomous driving to clinical decision support—this assumption is frequently violated. Distribution shifts, where the relationship between features ($X$) and targets ($Y$) changes, render standard models brittle.

Causal inference provides a potential remedy by focusing on invariant mechanisms. If a model captures the true causal relationship, that relationship should remain stable across different environments. This paper by Christiansen et al. formalizes this intuition, exploring the conditions under which a model can generalize to unseen distributions and introducing a practical algorithm, NILE, to handle non-linear confounding.

Problem Formulation and Causal Framework

The authors define distribution generalization through the lens of Structural Causal Models (SCMs). In this framework, distribution shifts are modeled as interventions on specific variables within a causal graph.

Causal graph and structural equations defining the relationship between features X, target Y, anchor A, and hidden confounder H.

The goal is to find a minimax solution—a predictor that minimizes the maximum risk across a set of possible environments $\mathcal{E}$. The paper distinguishes between different types of interventions:

  • Confounding-removing interventions: These break the dependence between features and hidden noise.
  • Confounding-preserving interventions: These shift the features while maintaining the underlying noise structure.

Methodology: The NILE Algorithm

To address the challenge of non-linear relationships and hidden confounding, the authors propose NILE (Non-linear Intervention-robust Linear Extrapolator). NILE integrates several key components:

  1. B-splines: Used to model complex non-linearities within the observed data range.
  2. Instrumental Variables (IV): Leverages "anchors" (variables that affect $X$ but not $Y$ directly) to identify causal effects in the presence of hidden confounders $H$.
  3. Linear Extrapolation: NILE assumes that the causal function becomes linear outside the training support. This allows the model to extrapolate into unseen regions of the feature space.
  4. Regularization: A data-driven penalty term balances the trade-off between standard Ordinary Least Squares (OLS) and causal IV estimation, allowing the model to "fail gracefully" when instruments are weak.

Theoretical Insights

A central finding of the paper is that the "causal" model (regressing only on direct causes) is not always the minimax optimal choice. If the potential distribution shifts are bounded or "weak," a non-causal model that utilizes correlations might yield lower worst-case risk. The causal model only becomes optimal when interventions are unbounded.

Furthermore, the authors establish an "impossibility result": without structural assumptions like NILE's linear extrapolation, it is mathematically impossible to guarantee generalization to regions of the feature space not represented in the training data.

Experimental Results

The framework was evaluated using synthetic datasets where the ground truth causal structure was known. Key findings include:

  • Extrapolation Performance: NILE significantly outperformed standard OLS and non-parametric IV methods (like NPREGIV) when test data shifted outside the training range.
  • Robustness: Unlike traditional IV methods that exhibit high variance with weak instruments, NILE's regularization allows it to revert to a stable OLS-like solution.
  • Comparison with Deep Learning: NILE demonstrated superior performance compared to deep-learning-based IV methods (e.g., Deep IV, Kernel IV) on the training support, particularly as sample sizes increased.

Conclusion

This work provides a formal bridge between causal inference and distribution generalization. By framing generalization as a minimax problem within SCMs, the authors clarify when causal models are preferred. The NILE algorithm offers a robust tool for non-linear prediction under shift, though it relies on the assumption of linear extrapolation. Future work includes extending this framework to classification tasks and finite-sample analysis.

Summary updated

BibTeX
@article{christiansen2022causal,
  author = {Rune Christiansen and Niklas Pfister and Martin Emil Jakobsen and Nicola Gnecco and Jonas Peters},
  title = {{A Causal Framework for Distribution Generalization}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2022},
  doi = {10.1109/tpami.2021.3094760},
}
Figure