I-SPEC: An End-to-End Framework for Learning Transportable, Shift-Stable Models

Adarsh Subbaswamy, Suchi SariaarXiv 2020

Abstract

Shifts in environment between development and deployment cause classical supervised learning to produce models that fail to generalize well to new target distributions. Recently, many solutions which find invariant predictive distributions have been developed. Among these, graph-based approaches do not require data from the target environment and can capture more stable information than alternative methods which find stable feature sets. However, these approaches assume that the data generating process is known in the form of a full causal graph, which is generally not the case. In this paper, we propose I-SPEC, an end-to-end framework that addresses this shortcoming by using data to learn a partial ancestral graph (PAG). Using the PAG we develop an algorithm that determines an interventional distribution that is stable to the declared shifts; this subsumes existing approaches which find stable feature sets that are less accurate. We apply I-SPEC to a mortality prediction problem to show it can learn a model that is robust to shifts without needing upfront knowledge of the full causal DAG.

Introduction

Machine learning models are notoriously brittle. A model trained to diagnose pneumonia at one hospital might fail at another simply because the second hospital uses different X-ray machines or follows different lab protocols. This phenomenon, known as dataset shift, is a major barrier to deploying AI in safety-critical fields like healthcare.

Most ML models assume the training data and the deployment data come from the same distribution. In reality, "nuisance" factors—like the specific way a hospital labels its data or the timing of its lab tests—can create correlations that a model might mistakenly rely on. When the model moves to a new environment where those nuisance factors change, its performance collapses.

The I-SPEC Framework

I-SPEC is an end-to-end framework that learns to make predictions that are "transportable" across different environments. By automatically learning a partial causal structure from data, it identifies stable interventional distributions that ignore "spurious" environmental shifts while retaining as much predictive power as possible. Its workflow consists of three main steps:

  1. Learning the Structure: Instead of requiring a human expert to provide a full Directed Acyclic Graph (DAG), I-SPEC uses the FCI (Fast Causal Inference) algorithm to learn a Partial Ancestral Graph (PAG) directly from pooled data across different environments. A PAG represents an equivalence class of possible causal models, capturing what is known (and what is uncertain) about the underlying system.
Comparison of a causal DAG (a) and its corresponding learned PAG (b).
  1. Declaring Mutable Variables: The user identifies "mutable variables" ($M$)—factors they suspect might change across environments (e.g., "Lab Timing" or "Equipment Type").
  2. Finding the Stable Distribution: The framework uses the CIDP algorithm to search for an "interventional distribution" $P(Y | do(M), Z)$. Unlike standard conditional distributions, this interventional approach mathematically "deletes" the influence of the shifting variables, ensuring the resulting model is stable by design.

Key Insights and Ideas

  • Interventional > Conditional: The core innovation is moving beyond finding stable features to finding stable distributions. By using the "do-operator" from causal calculus, I-SPEC can use features that are normally "unstable" by mathematically adjusting for their shifting mechanisms.
  • PAGs are Sufficient: You don't need a full, perfect causal DAG to get the benefits of causal reasoning. A PAG—which accounts for uncertainty and unobserved confounders—provides enough information to identify which interventions are stable.
  • Selective Protection: I-SPEC allows for "surgical" stability. You can choose to protect against shifts in administrative policies (like lab timing) while allowing the model to remain sensitive to meaningful physiological changes (like a patient's age or heart rate).

Experimental Results

The authors evaluated I-SPEC using real-world healthcare data from 24,787 ICU patients across three hospitals and simulated linear Gaussian systems to control shift magnitude.

  • Generalization: In the 3-hospital study, the "unstable" model (which used all features) saw its performance drop significantly when moved between sites. In contrast, I-SPEC maintained a high and consistent AUROC (0.82–0.87) across all sites.
  • Accuracy vs. Stability: I-SPEC outperformed "conservative" stable models. While the conservative models were stable, they were too cautious and threw away useful predictive signals, resulting in lower overall accuracy.
  • Shift Magnitude: Simulated results showed that while standard "unstable" models perform best when shifts are tiny, their error grows exponentially as the environment changes. I-SPEC’s error remained flat, proving its robustness to shifts of arbitrary strength.

Conclusion

I-SPEC bridges the gap between graph-based causal methods and data-driven invariance methods. By learning PAGs from data, it removes the requirement for a pre-specified causal graph while providing stronger stability guarantees than purely statistical methods. Future work includes addressing the computational complexity of searching for optimal conditioning sets and extending the framework to handle heterogeneous datasets where different environments record different features.

Summary updated

BibTeX
@misc{subbaswamy2020i,
  author = {Adarsh Subbaswamy and Suchi Saria},
  title = {{I-SPEC: An End-to-End Framework for Learning Transportable, Shift-Stable Models}},
  year = {2020},
  eprint = {2002.08948},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.08948},
}
Figure