Causal Discovery under Time-Varying Delays

Lénaïg Cornanguer, David Kaltenpoth, Jilles VreekenNeurIPS 2026

TL;DR

Most time-series causal discovery tools assume that if $X$ causes $Y$, the time delay between them is set in stone. In the real world—from rainwater flowing over saturating soil to global climate patterns—those delays stretch and shrink. This paper proves we can untangle these shifting delays from observational data alone and introduces STRETCH, an algorithm that uncovers both the underlying causal graph and the exact timing of how effects ripple through a system.

What Problem Does This Paper Address?

Finding cause-and-effect in observational time series is notoriously tricky, especially when the rules of the system change over time—a challenge known as nonstationarity. Historically, researchers have modeled nonstationarity in two ways: either the causal structure suddenly snaps into a new "regime," or the strength of a causal link gradually drifts.

The authors point out a third, largely ignored dimension: what if the mechanism stays the same, and only the travel time changes? Think of network packets slowing down as hardware degrades, or river discharge peaking much faster after a storm because the ground is already soaked. If you assume a fixed lag, you cannot answer counterfactual questions ("What would happen if we intervened right now?"), because you’ll predict the wrong outcome at the wrong time. Prior attempts to handle variable lags relied on predictive Granger causality and Dynamic Time Warping (DTW), which lack true causal guarantees and can accidentally violate the arrow of time.

Methods

First, the authors build a theoretical foundation: a Structural Causal Model where every causal link has its own time-varying delay function. Crucially, they enforce two physical realities: every cause emits one effect, and effects cannot "cross" in time (a later cause won't arrive before an earlier one). Because delays can speed up or slow down, some target timestamps might receive zero causal inputs, while others get hit by multiple past observations at once.

To learn this from data, they propose STRETCH, which solves a classic chicken-and-egg problem: you need to know the delay to fit the mathematical relationship ($f$) between variables, and you need $f$ to figure out the delay.

  • Hidden Markov Models (HMMs) for Delays (Novel): Instead of learning an infinite number of delay parameters as time goes on, STRETCH models the active parent observations at any moment as the hidden state of an HMM—represented as a binary vector over a maximum lag window. An illustration of how STRETCH encodes shifting delays: at t=8, two past observations of X^i arrive simultaneously at X^j, represented as a binary hidden state vector.

  • Expectation-Maximization & Polynomial Regression (Standard, newly combined): Using EM, the algorithm alternates between estimating the likelihood of different delay states (via the standard forward-backward algorithm) and fitting a weighted polynomial regression to capture linear or non-linear relationships.

  • Minimum Description Length (MDL) Scoring: Grounded in the Algorithmic Model of Causation—the Occam's Razor-like idea that the true causal graph yields the most compact code—STRETCH scores candidate causal edges by summing the bits needed to compress both the model parameters and the data residuals. This edge-scoring engine can be used exhaustively or plugged into standard graph-search wrappers like GLOBE.
An illustration of how STRETCH encodes shifting delays: at t=8, two past observations of X^i arrive simultaneously at X^j, represented as a binary hidden state vector.

Datasets

  • Synthetic Benchmarks: Newly generated time series ($T=1000$) built on Erdős-Rényi graphs (2 and 5 variables). These combine linear and non-linear mechanisms (degree-3 polynomials, sinusoids, quadratics, and ReLU neural networks) with delays that drift via random walks or discretized sinusoids (lags between 0 and 6). Additional tests evaluate constant delays, non-Gaussian noise, and varying causal strengths.
  • Real-World Climate Data: Monthly historical records from 1871 to 2016 (from the KNMI Climate Explorer) tracking the El Niño 3.4 anomaly index and all-India rainfall. As a clever sanity check against false periodic correlations, they also add a third variable: the rainfall series shifted backward by three years.

Key Insights and Ideas

  • Shifting delays are mathematically distinct from shifting strengths: One major "aha" moment is a formal proof (Theorem 3.1 & Corollary 3.2) showing that varying-delay models are uniquely identifiable from observational data—and cannot be mimicked by fixed-delay models with drifting causal strengths. Changing when an effect arrives leaves a completely different conditional independence footprint than changing how hard it hits.
  • Why naive time-warping fails causality: Standard Dynamic Time Warping (used in prior variable-lag methods) stretches series to maximize correlation, permitting physically impossible one-to-many alignments and future-to-past leaks. Enforcing temporal ordering inside an HMM keeps the math tethered to physical reality.
  • Nature bottlenecks causal effects in time: In the climate case study, STRETCH revealed that El Niño anomalies occurring at totally different times of the year don't just shift rainfall uniformly—their effects compress and aggregate, arriving specifically during the June–September Indian monsoon window.

Key Results

Across synthetic benchmarks, STRETCH matches state-of-the-art methods when delays are static and decisively beats them when delays drift.

Comparison of causal graph recovery (F1) and delay estimation error (RMSE) on 50 bivariate synthetic datasets.
  • Bivariate Cases: STRETCH achieves a 1.00 F1 score on both linear and non-linear graphs, with delay estimation errors (RMSE) of 0.32 and 0.52, respectively. Meanwhile, DTW-based VLTimeCausality gets good graph structure (1.00 / 0.88 F1) but misses the true delays badly (1.86 / 2.03 RMSE).
  • Multivariate Cases (5 variables): Exhaustive STRETCH leads with 0.92 F1, 0.47 delay RMSE, and the lowest Structural Interventional Distance (0.73 SID). Wrapping it in the GLOBE search algorithm (STRETCH-GLOBE) cuts runtime over 12x—from 2,623s down to 213.7s—while maintaining an 0.86 F1 score (nearly 100x faster than the runner-up nonstationary method, SpaceTime, at 20,090s).
  • Climate Case Study: STRETCH cleanly isolates the true link from El Niño to current-year Indian rainfall while ignoring the 3-year-shifted decoy variable, whereas baselines (PCMCI+ and RPCMCI) get tangled in seasonal correlations and draw edges between everything.

Limitations and Future Work

  • Local Optima: While the true graph is theoretically identifiable, STRETCH relies on Expectation-Maximization and heuristic graph search in practice, neither of which is guaranteed to find the global optimum.
  • Scaling Trade-offs: Exact factorial HMM inference scales exponentially with the number of causal parents, $O(T \cdot \tau_{max}^{2P})$. The authors bypass this linearly—$O(P \cdot T \cdot \tau_{max}^4)$—by freezing previously fitted parents' parameters, though exhaustive graph search remains slow for larger networks without wrappers like GLOBE.
  • Future Work: Currently, the model assumes the underlying functional mechanism $f$ stays fixed while only the delay moves. Next, the authors aim to combine varying delays and varying causal strengths into a unified framework without losing mathematical identifiability.

Summary updated

Abstract

Causal discovery aims to uncover the causal relationships among variables beyond correlations from observational data. On time series, a major challenge is nonstationarity, which is typically modeled as regime-based shifts or drifting causal strength. In contrast, we consider non-stationarity arising from varying cause-to-effect delay, and introduce a causal model that is identifiable with few assumptions. To discover causal relationships with varying causal delay in practice, we formalize the problem in terms of the algorithmic model of causation, and propose STRETCH to discover causal graphs. We show on synthetic data that our method correctly recovers the causal relationships, and show the relevance of this causal model on a case study on the impact of El Niño climatic phenomenon on Indian monsoon.
BibTeX
@inproceedings{cornanguer2026causal,
  author = {Lénaïg Cornanguer and David Kaltenpoth and Jilles Vreeken},
  title = {{Causal Discovery under Time-Varying Delays}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=T4HWDl4y39},
}
Figure