Causal Discovery in Semi-Stationary Time Series

Shanyun Gao, Raghavendra Addanki, Tong Yu, Ryan A. Rossi, Murat Kocaoglu

Abstract

Discovering causal relations from observational time series without making the stationary assumption is a significant challenge. In practice, this challenge is common in many areas, such as retail sales, transportation systems, and medical science. Here, we consider this problem for a class of non-stationary time series. The structural causal model (SCM) of this type of time series, called the semi-stationary time series, exhibits that a finite number of different causal mechanisms occur sequentially and periodically across time. This model holds considerable practical utility because it can represent periodicity, including common occurrences such as seasonality and diurnal variation. We propose a constraint-based, non-parametric algorithm for discovering causal relations in this setting. The resulting algorithm, PCMCI$_{\Omega}$, can capture the alternating and recurring changes in the causal mechanisms and then identify the underlying causal graph with conditional independence (CI) tests. We show that this algorithm is sound in identifying causal relations on discrete time series. We validate the algorithm with extensive experiments on continuous and discrete simulated data. We also apply our algorithm to a real-world climate dataset.

Introduction

Causal discovery is the process of inferring "what causes what" from observational data. In time series analysis, the standard assumption is stationarity: the idea that if variable $A$ causes variable $B$ today, it will do so in the exact same way tomorrow. However, real-world systems—from retail sales to climate patterns—rarely exhibit such consistency. Causal relationships often fluctuate periodically, such as between day and night or across seasons.

Traditional algorithms often fail in these scenarios. They might look at a year of data and conclude that two variables are weakly related, failing to see that they are strongly related in the summer and completely unrelated in the winter. This paper introduces PCMCI$\Omega$, a framework designed for "semi-stationary" time series where underlying rules repeat over a finite period.

The Semi-Stationary Model

A semi-stationary time series is characterized by a structural causal model (SCM) where a finite number of different causal mechanisms occur sequentially and periodically across time. This allows the model to represent common real-world phenomena like seasonality and diurnal variation.

Figure 1: Illustration of a semi-stationary time series where causal mechanisms ($Z$) repeat periodically across time steps $t$.

As shown in Figure 1, the dependencies between variables $X^1, X^2,$ and $X^3$ are not static. Instead, they follow a periodic pattern. Standard methods often misinterpret these shifting mechanisms as "illusory parents"—false causal links that appear simply because a variable correlates with the change in the mechanism itself.

The PCMCI$\Omega$ Algorithm

The proposed PCMCI$\Omega$ algorithm is a non-parametric approach that operates in two main stages:

  1. Candidate Selection: It uses a high-recall version of the standard PCMCI algorithm to find a "superset" of all possible parents for every variable. This pool likely contains the true causes but also many false positives caused by the shifting periodic mechanisms.
  2. Periodicity Search & Pruning: The algorithm iterates through a range of possible periods ($\omega$). For each guess, it partitions the data into subsets that should share the same causal mechanism and performs Conditional Independence (CI) tests to prune the parent set.

The Sparsity Principle

The core insight of the method is that the correct periodicity leads to the sparsest causal graph. If the algorithm guesses the wrong period, it ends up mixing different causal mechanisms together, which makes the graph look more complex (denser) than it actually is. By picking the $\omega$ that minimizes the number of edges, the algorithm identifies both the true period and the true causal structure.

Experimental Results

The researchers evaluated PCMCI$\Omega$ using synthetic simulations with varying lengths ($T=500$ to $8000$) and a real-world climate dataset.

Figure 4: Accuracy of period recovery (left) and computational runtime (right) as the search space ($\omega_{max}$) and sample size ($T$) vary.

As illustrated in Figure 4, the algorithm is highly accurate at identifying the true period, especially as the time series length ($T$) increases. However, accuracy decreases as the search space ($\omega_{max}$) grows, particularly for smaller sample sizes. The runtime also increases with both $T$ and $\omega_{max}$, reflecting the computational cost of performing multiple CI tests for each candidate period.

In synthetic tests, PCMCI$\Omega$ significantly outperformed standard methods like VARLiNGAM and DYNOTEARS in precision. While standard methods often found the true edges, they were overwhelmed by false positives because they could not account for periodic changes.

Real-World Application: Climate Discovery

When applied to a climate dataset (1948–2022), the algorithm discovered that the Central Pacific air temperature exhibits a periodicity of 3 months. It suggested that the causal influence of Atlantic temperatures on the Pacific might disappear every quarter—a nuance that stationary models would simply average out and miss.

Conclusion and Limitations

PCMCI$\Omega$ provides a robust way to discover time-varying causal relationships without assuming linear functional forms. However, it comes with a higher computational cost than stationary methods and requires the user to provide an upper bound for the potential periodicity. Additionally, like many causal discovery tools, it currently assumes "causal sufficiency" (no hidden common causes), an area noted for future research.

Summary updated

BibTeX
@inproceedings{gao2023causal,
  author = {Shanyun Gao and Raghavendra Addanki and Tong Yu and Ryan A. Rossi and Murat Kocaoglu},
  title = {{Causal Discovery in Semi-Stationary Time Series}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=dYeUvLUxBQ},
}
Figure