Invariant Causal Prediction for Sequential Data

Niklas Pfister, Peter Bühlmann, Jonas PetersJournal of the American Statistical Association 2017

Abstract

We investigate the problem of inferring the causal predictors of a response $Y$ from a set of $d$ explanatory variables $(X^1,\dots,X^d)$. Classical ordinary least squares regression includes all predictors that reduce the variance of $Y$. Using only the causal predictors instead leads to models that have the advantage of remaining invariant under interventions, loosely speaking they lead to invariance across different "environments" or "heterogeneity patterns". More precisely, the conditional distribution of $Y$ given its causal predictors remains invariant for all observations. Recent work exploits such a stability to infer causal relations from data with different but known environments. We show that even without having knowledge of the environments or heterogeneity pattern, inferring causal relations is possible for time-ordered (or any other type of sequentially ordered) data. In particular, this allows detecting instantaneous causal relations in multivariate linear time series which is usually not the case for Granger causality. Besides novel methodology, we provide statistical confidence bounds and asymptotic detection results for inferring causal predictors, and present an application to monetary policy in macroeconomics.

Introduction

Inferring causality from observational data remains one of the most significant challenges in statistics and machine learning. While randomized controlled trials are the gold standard for establishing causal links, they are often unethical or logistically impossible in fields such as macroeconomics, climate science, or biology.

Traditional approaches to causal discovery often rely on the framework of Invariant Causal Prediction (ICP). The core tenet of ICP is that a causal relationship $X \to Y$ should remain stable (invariant) even when the distribution of the predictors $X$ is perturbed by external interventions. However, the original ICP framework required researchers to have prior knowledge of the different "environments" or "regimes" (e.g., different experimental conditions or distinct geographic locations) where these interventions occurred. This paper extends ICP to sequential and time-series data, enabling environment-free causal discovery by exploiting non-stationarity as a source of information rather than a nuisance.

The Invariance Principle in Sequential Data

In many sequential datasets, we observe systems that change over time, but we rarely know the exact "change points" or the nature of the underlying perturbations. The authors propose that time itself can serve as a proxy for changing environments.

The goal is to identify a subset of variables $S^*$ such that the conditional distribution $P(Y_t | X_t^{S^*})$ remains constant across the entire sequence, even as the predictors themselves fluctuate. A set of variables is defined as "invariant" if the residuals of a linear regression of $Y$ on those variables are i.i.d. Gaussian across all time points. If a model is truly causal, its predictive power and error structure should not shift just because the background environment (the distribution of $X$) has changed.

Methodology

To detect these invariant sets without known environment labels, the authors introduce a framework based on goodness-of-fit tests applied to regression residuals:

  1. Scaled Residual Tests: Instead of estimating change points directly, the method fits a global model and performs statistical tests on the residuals to check for stability. They utilize a resampling procedure to maintain a controlled Type I error rate.
  2. Aggregation over Grids: The method defines a grid of potential segments and calculates test statistics (such as the Chow test) across all pairwise comparisons.
  3. Decoupled Testing: A key technical insight is the use of "Decoupled Tests," which test for shifts in regression coefficients and residual variance separately before combining them via Bonferroni correction. The authors prove that this approach often provides better detection rates than standard combined tests.
  4. Time Dependencies: The framework is extended to multivariate time series (Structural Vector Autoregressive or SVAR models) by including lagged versions of variables. This allows the model to distinguish between effects that take time to propagate and those that occur within the same observation window.

Advantages Over Granger Causality

One of the most significant contributions of this work is its ability to detect instantaneous causal relations ($X_t \to Y_t$). Traditional Granger causality relies on the principle that causes must precede their effects in time. However, in many real-world datasets (like macroeconomic indicators), the temporal resolution is low, meaning a cause and its effect might appear in the same time bin. By looking for invariance rather than temporal precedence, this method can identify these contemporaneous causal hits that Granger causality typically misses.

Empirical Results and Applications

Synthetic Simulations

Using various Structural Causal Models (SCMs), the authors demonstrated that the method is asymptotically consistent. As the sample size $n$ grows, the probability of identifying the correct set of causal parents approaches 1, with a detection rate scaling at approximately $1/\sqrt{n}$. The method proved robust to outliers; while extreme values might lead the model to return an empty set (indicating misspecification), they rarely resulted in the selection of incorrect causal predictors.

Monetary Policy in Macroeconomics

The authors applied their method to a real-world dataset from the Swiss National Bank (SNB) covering monthly data from 1999 to 2017. The task was to identify the causal predictors of the EUR/CHF exchange rate log returns ($Y$).

The model identified Foreign Currency Investments and Swiss GDP as significant causal predictors. This result aligns with economic theory and historical context, as foreign currency interventions are a primary tool used by the SNB to manage the value of the Swiss Franc. Notably, the method remained conservative; if assumptions were violated, it preferred to return an empty set rather than a false positive.

Conclusion and Limitations

This framework transforms non-stationarity from a statistical hurdle into a powerful feature for causal discovery. By requiring that causal relationships remain invariant across unknown shifts in data distribution, the method provides a robust tool for analyzing sequential data.

However, some limitations remain. The current theoretical guarantees rely on linear Gaussian assumptions. While non-parametric extensions (using tools like the Hilbert-Schmidt Independence Criterion) are possible, their power analysis is still developing. Additionally, the method's computational complexity is $O(2^d)$, requiring pre-selection methods like Lasso for high-dimensional datasets. Despite these challenges, Invariant Causal Prediction for sequential data represents a major step toward reliable causal inference in complex, evolving systems.

Summary updated

BibTeX
@article{pfister2017invariant,
  author = {Niklas Pfister and Peter Bühlmann and Jonas Peters},
  title = {{Invariant Causal Prediction for Sequential Data}},
  journal = {Journal of the American Statistical Association},
  year = {2017},
}
Figure