Causal Change Point Detection and Localization

Shimeng Huang, Jonas Peters, Niklas PfisterarXiv 2024 · DOI

Abstract

Detecting and localizing change points in sequential data is of interest in many areas of application. Various notions of change points have been proposed, such as changes in mean, variance, or the linear regression coefficient. In this work, we consider settings in which a response variable $Y$ and a set of covariates $X=(X^1,\ldots,X^{d+1})$ are observed over time and aim to find changes in the causal mechanism generating $Y$ from $X$. More specifically, we assume $Y$ depends linearly on a subset of the covariates and aim to determine at what time points either the dependency on the subset or the subset itself changes. We call these time points causal change points (CCPs) and show that they form a subset of the commonly studied regression change points. We propose general methodology to both detect and localize CCPs. Although motivated by causality, we define CCPs without referencing an underlying causal model. The proposed definition of CCPs exploits a notion of invariance, which is a purely observational quantity but -- under additional assumptions -- has a causal meaning. For CCP localization, we propose a loss function that can be combined with existing multiple change point algorithms to localize multiple CCPs efficiently. We evaluate and illustrate our methods on simulated datasets.

Distinguishing Causal from Regression Changes

In many scientific and economic fields, researchers monitor the relationship between a response variable ($Y$) and a set of covariates ($X$) over time. Traditional change point detection methods focus on identifying shifts in the joint distribution, such as changes in the mean, variance, or regression coefficients. However, these "Regression Change Points" (RCPs) can be misleading from a causal perspective.

A regression model might shift simply because the distribution of the input data ($X$) changed, even if the fundamental "laws of nature" connecting $X$ to $Y$ remained constant. This paper introduces the concept of Causal Change Points (CCPs): the specific moments when the actual mechanism producing $Y$ from $X$ undergoes a structural shift.

Illustration of changing causal mechanisms across different time intervals. Hammers indicate changes in the mechanism of a specific variable. A change in the mechanism of $Y$ (as seen between $I_2$ and $I_3$) constitutes a CCP, while changes in $X$ variables (between $I_1$ and $I_2$) are Non-Causal Change Points (NCCPs).

By distinguishing CCPs from Non-Causal Change Points (NCCPs), researchers can focus on fundamental structural shifts rather than mere observational fluctuations.

Methodology: Detection and Localization

The authors define a CCP as a time point where no subset of covariates provides an invariant (stable) relationship with the response variable. Their methodology consists of two primary components:

1. Detection

To determine if a time interval contains a CCP, the authors test the null hypothesis that at least one subset of covariates is "invariant." This involves combining multiple subset-specific statistical tests (such as the Chow test) into a single procedure. If every possible subset of covariates shows a statistically significant shift, a CCP is declared. This approach reverses the logic of Invariant Causal Prediction: instead of finding causal parents via invariance, it uses the absence of invariance to define a change in the causal mechanism.

2. Localization

Once a change is detected, the challenge is to find its exact location. The paper proposes two strategies:

  • Pruning Candidates: This "top-down" approach starts with a set of potential regression change points identified by standard tools and "prunes" them by testing which ones are truly causal.
  • Causal Stability Loss: The authors introduce a novel loss function, $\mathcal{L}_{I,s}$, which measures the degree of "non-invariance" at any given time point. This loss is designed to be minimized at the true CCP and can be integrated into established algorithms like Binary Segmentation or Seeded Binary Segmentation to efficiently locate multiple CCPs.

Experimental Evaluation

The framework was evaluated using simulated datasets based on linear Structural Causal Models (SCMs). These benchmarks were specifically designed to include scenarios where some time points are RCPs but not CCPs, testing the algorithm's ability to discriminate between the two.

Key findings include:

  • Discrimination Power: The "Causal Stability Loss" approach successfully ignored non-causal shifts that traditional regression-based methods (like the strucchange R package) incorrectly flagged as significant.
  • Precision and Scaling: As the number of observations ($n$) increases, the localization of CCPs becomes significantly more precise, with estimates concentrating tightly around the true values.
  • Detection Sensitivity: The proposed testing procedure maintains the correct false positive rate while showing high power to detect CCPs, particularly when changes occur near the center of the observed interval.

Limitations and Future Work

While the current framework provides a robust foundation for causal change point detection, it relies on several assumptions:

  • Linearity: The current methods are built for linear regression models. Generalizing this to semi-parametric or non-parametric models using "invariant functions" is a key area for future research.
  • Independence: The model assumes observations are independent over time given the change points. Addressing serial correlation (autocorrelation) in real-world sequential data is a primary direction for extension.
  • Dimensionality: Testing every possible subset of covariates ($2^d$) is computationally expensive. Scaling to high-dimensional data will require heuristic subset selection or regularization techniques.

Summary updated

BibTeX
@misc{huang2024causal,
  author = {Shimeng Huang and Jonas Peters and Niklas Pfister},
  title = {{Causal Change Point Detection and Localization}},
  year = {2024},
  eprint = {2403.12677},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.12677},
}
Figure