Learning and inference on time series can pose significant statistical challenges, including autocorrelated observations, distribution shift over time, and the curse of dimensionality. These challenges complicate the practical application of causal discovery algorithms, which already suffer from high computational and sample complexity in the general case. To mitigate these issues, this work introduces Iterative Temporal Parent Discovery (ITPD): a sound and complete constraint-based procedure for causal structure learning on multivariate time series with causal nonstationarity. ITPD takes a local-to-global learning approach that discovers the global graph by sequentially discovering the parent set for each variable. ITPD exploits temporal structural priors, graph partitioning, and the local Markov condition to swap higher-order conditional independence tests for lower-order alternatives. With an exact oracle, ITPD performed the least number of tests and used the smallest average conditioning set sizes relative to baselines. In benchmarking simulations, ITPD sat on the Pareto frontier with respect to F1 and wall-clock time and was faster than baselines on large graphs (≥ 1000 nodes). For graphs with 2000 nodes, ITPD ran 2.3×, 9.1×, and 40.9× faster than iterative IAMB, DF-PC, and PCMCI, respectively.
Figures & tables
Figure 1: Full time graph G with autocorrelation and causal nonstationarity. Under the false assumption that G can be represented by a stationary window graph with a maximum lag of 2, values at time t>3 would be incorrectly forecasted.
Unique CI tests per candidate
Mean conditioning set
Max conditioning set
Method
d=1
2
3
5
8
d=1
2
3
5
8
d=1
2
3
5
8
ITPD
1.23
1.41
1.32
1.26
1.26
0.7
2.0
3.1
5.0
7.7
4
6
7
10
13
IAMB
6.02
11.83
14.23
16.34
17.67
5.6
8.0
8.6
9.2
9.7
15
20
20
20
20
IPaDL
1.76
2.74
2.98
3.05
3.06
21.7
58.0
65.3
67.3
67.5
211
293
298
299
299
FullCI
1.00
1.00
1.00
1.00
1.00
206
206
206
206
206
299
299
299
299
299
PCMCI
–
–
–
–
–
4.2
7.6
8.3
8.9
9.5
14
20
22
23
27
Table 2: Unique CI tests per candidate and conditioning set sizes under the exact oracle on stationary graphs with N=20 , T=16 , and lag 1. All methods were tested on 200 graphs per column. Under the exact oracle, IAMB cannot rank candidates by dependence strength.
Figure 2: Mean F1 on common targets against the true lag on stationary graphs (left) and nonstationary graphs (right) (linear-Gaussian data, N=10 , T=16 , and T=24 at true lag 8; d=2 , M=2000 ; 20 graphs per lag). PCMCI and DYNOTEARS ran with maximum lag 1 (solid) and with the maximum lag set to the true lag (dashed, hollow marks). Each point is a mean over 20 graphs, and the shaded bands are 95% intervals.
Figure 3: ITPD lies on the Pareto frontier (dashed line) wrt mean F1 and wall-clock time. M=500 and d∈{2,5} , T=16, 200 graphs per methods. Triangles are methods with F1 below the axis, given in the label. The dashed line is the Pareto frontier. Each point is a mean over 20 graphs.
Figure 4: Seconds per run (left) and F1 of ITPD (right) versus total time-indexed variables, using Fisher-z CI tests at M=2000 and d=2 . Left: For each method, numbers in parentheses give the fitted exponent for the power by which wall-clock time scaled with total variables. Open marks are methods timed in separate runs on shared nodes. Each point is a mean over 10 graphs, and the shaded bands are 95% intervals. Asterisks are estimates from the fitted power law at sizes where the method was not run.
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
Figure B.1: Cases of Z5 . Assume no unobserved history. In the temporal DAG at left, Z5a represents Case 1 (removed at Line 9) and Z5b represents Case 3 (removed at Line 9). In the DAG at right, Z5 represents Case 2. This variable would be removed from consideration at Line 14 if tested for candidacy first (before Z1 ). As S={X} under these conditions, Z5 will pass through Line 9. As Z5 has no parents in the observed graph and Z5⊥⊥Y , it will pass through Line 10 as well. By Line 14, Z1 will be in S′ , and Z5⊥⊥Y∣S′∖Z5 .
Figure C.1: A full time graph representing a stochastic process over finite horizon T=5 , featuring autocorrelation and causal nonstationarity. Our cause-effect pair of interest is {C3,C4} . Relative to this pair, we illustrate partitions \mathbf{Z}_{1}=\{{\color[rgb]{0.63,0.79,0.95}B_{1:5}}\} , \mathbf{Z}_{4}=\{{\color[rgb]{0.6,0.8,0.2}A_{1:5}}\} , \mathbf{Z}_{5}=\{{\color[rgb]{1,0.75,0}C_{1:2}}\} , \mathbf{Z}_{6}=\{{\color[rgb]{0.54,0.17,0.89}C_{5}}\} , \mathbf{Z}_{7}=\{{\color[rgb]{0.91,0.67,0.81}D_{4:5}}\} , and \mathbf{Z}_{8}=\{{\color[rgb]{0,0.65,0.58}D_{1:3}}\} . Causal edges that induce autocorrelations are gray. Adjacencies to effect variable C4 are red . All other causal edges are black. Given {C3,C4} , ITPD is expected to return {A2,B3} . Unioned with known parent C3 , this constitutes pa(C4) . Note that Z6,7 will not be relevant when ITPD infers pa(C4) . See Figure C.2 for an example of Z2∈de(Y) .
Figure C.2: Time series causal graph where node B2 is an example of Z2∈de(Y) wrt cause-effect pair {A3,C4} . This example is an M-collider , the culprit behind M-bias [ Liu et al., 2012 , Ding and Miratrix, 2015 ] . Causal edges that induce autocorrelations are gray. All other causal edges are black.
Figure E.1: ITPD lies on the Pareto frontier (dashed line) wrt mean F1 and and unique CI tests per candidate. M=500 and d∈{2,5} . Each point is a mean over 20 graphs.
Figure E.2: Mean F1 against the share of edges redrawn at each time step with d=2 , M=2000 . Share 0 is the stationary graph. Each point is a mean over 20 graphs, and the shaded bands are 95% intervals.
Figure E.3: Mean F1 on all targets against the number of observations M for N=20 (left) and N=80 (right) (nonstationary graph, linear-Gaussian data, T=16 , lag 1, d=2 ; 10 graphs per point). A target at the last step has 299 candidates at N=20 and 1,199 at N=80 . PCMCI did not finish at N=80 , M=2000 . Each point is a mean over 10 graphs, and the shaded bands are 95% intervals.
M
Settings
F1 with α/m
F1 with extended BIC
Change
Higher / level / lower
50
1
0.300
0.436
+0.136
1 / 0 / 0
200
7
0.684
0.718
+0.034
3 / 1 / 3
500
12
0.886
0.875
−0.012
2 / 0 / 10
≥2000
14
0.922
0.910
−0.012
0 / 0 / 14
Appendix
Table E.1: Mean F1 of ITPD with α2=α/m and with the extended-BIC level P(χ12>log(Mm)) in Phase II, on 34 held-out settings grouped by M (3 or 5 graphs per setting). The last column counts the settings where the extended-BIC level was higher, level, or lower by a paired 95% interval.
F1, M=500
F1, M=2000
Method
d=1
d=2
d=3
d=5
d=1
d=2
d=3
d=5
ITPD
0.995 ±.002
0.992 ±.002
0.985 ±.001
0.961 ±.002
0.997 ±.001
0.997 ±.001
0.996 ±.002
0.991 ±.002
IAMB
0.994 ±.002
0.994 ±.002
0.991 ±.001
0.972 ±.002
0.996 ±.002
0.998 ±.001
0.998 ±.001
0.999 ±.001
IPaDL
0.988 ±.003
0.967 ±.003
0.936 ±.004
0.913 ±.003
0.998 ±.001
0.997 ±.001
0.993 ±.002
0.982 ±.002
FullCI
0.967 ±.004
0.935 ±.004
0.894 ±.005
0.815 ±.004
0.996 ±.002
0.998 ±.001
0.998 ±.001
0.998 ±.001
DF-PC
0.967 ±.004
0.926 ±.004
0.895 ±.005
0.837 ±.003
0.996 ±.002
0.985 ±.002
0.966 ±.002
0.931 ±.004
Appendix
Table E.2: Mean F1 in the main finite data setting. Each cell is a mean over 20 graphs; subscripts are the half-widths of the 95% intervals.
Unique CI tests per candidate
Mean conditioning set
Max conditioning set
Method
d=1
2
3
5
d=1
2
3
5
d=1
2
3
5
ITPD
1.35 ±.01
1.38 ±.01
1.40 ±.01
1.42 ±.01
6.7 ±.1
8.2 ±.1
9.4 ±.1
11.6 ±.1
30 ±1
33 ±1
35 ±1
37 ±2
IAMB
2.00 ±.03
2.97 ±.04
3.97 ±.05
5.96 ±.06
1.7 ±.1
2.3 ±.1
2.8 ±.1
3.8 ±.1
6 ±1
7 ±1
9 ±1
12 ±1
IPaDL
1.26 ±.01
1.39 ±.01
1.48 ±.01
1.56 ±.01
1.3 ±.1
3.3 ±.2
5.2 ±.2
7.2 ±.2
42 ±3
55 ±2
64 ±3
71 ±2
FullCI
1.00 ±0
1.00 ±0
1.00 ±0
1.00 ±0
206 ±0
206 ±0
206 ±0
206 ±0
299 ±0
299 ±0
299 ±0
299 ±0
DF-PC
1.31 ±.02
1.83 ±.03
2.58 ±.05
14.61 ±.43
0.3 ±.1
0.6 ±.1
0.9 ±.1
1.8 ±.1
5 ±1
6 ±1
7 ±1
9 ±1
Appendix
Table E.3: Unique CI tests per candidate and conditioning set sizes in the main finite data setting with M=2000 . Each cell is a mean over 20 graphs; subscripts are the half-widths of the 95% intervals.
Stationary graph
Nonstationary graph
N , T
10, 8
10, 8
10, 16
20, 8
10, 8
10, 8
20, 8
20, 8
M
500
2000
2000
2000
500
2000
500
2000
ITPD
0.963 ±.009
0.991 ±.005
0.985 ±.007
0.984 ±.009
0.957 ±.008
0.989 ±.006
0.957 ±.006
0.989 ±.003
IAMB
0.974 ±.009
0.981 ±.007
0.973 ±.008
0.975 ±.007
0.967 ±.005
0.984 ±.005
0.963 ±.003
0.977 ±.004
IPaDL
0.932 ±.022
0.988 ±.009
0.977 ±.012
0.990 ±.006
0.923 ±.014
0.981 ±.012
0.936 ±.012
0.989 ±.002
FullCI
0.944 ±.014
0.990 ±.005
–
–
0.937 ±.006
0.990 ±.003
0.938 ±.008
–
Appendix
Table E.4: Mean F1 with nonlinear causal mechanisms at d=2 , lag 1. A dash indicates that the runs did not finish within the given time budget (4 hours). Each cell is a mean over 10 graphs; subscripts are the half-widths of the 95% intervals.
F1 on common targets
Unique CI tests per candidate
N=50
N=100
N=50
N=100
Method
M=500
2000
500
2000
M=500
2000
500
2000
ITPD
0.994 ±.001
0.998 ±.001
0.992 ±.003
0.998 ±.001
1.15 ±.01
1.18 ±.01
1.08 ±.01
1.10 ±.01
IAMB
0.995 ±.001
0.998 ±.001
0.994 ±.002
0.998 ±.001
2.99 ±.04
3.00 ±.05
2.98 ±.04
3.00 ±.03
IPaDL
0.971 ±.003
0.998 ±.001
0.973 ±.005
0.999 ±.001
1.09 ±.01
1.16 ±.01
1.07 ±.01
1.10 ±.01
FullCI
0.804 ±.009
0.997 ±.001
0.836 ±.011
0.955 ±.004
0.24 ±0
1.00 ±0
0.05 ±0
1.00 ±0
Appendix
Table E.5: Mean F1 and unique CI tests per candidate on larger graphs. At M=500 , the common targets are at early time steps. FullCI tests only the targets with fewer candidates than observations. Each cell is a mean over 5 graphs; subscripts are the half-widths of the 95% intervals.
d=2
d=5
N
ITPD (s)
IAMB (s)
ITPD / IAMB
ITPD (s)
IAMB (s)
ITPD / IAMB
20
3.4 to 3.6
5.5
0.62 to 0.65
3.8 to 4.0
11 to 12
0.34
50
27 to 29
56 to 57
0.48 to 0.50
31 to 33
111 to 119
0.28
100
96 to 99
230 to 231
0.41 to 0.43
109 to 115
450 to 490
0.24
Appendix
Table E.6: Seconds per run of ITPD and IAMB with plain Fisher-z. Each setting has 5 graphs and 3 timed rounds per graph; the 95% interval of the ratio is below 1 in every setting.
No lag-1 self edge
(lag-1 edges)
Share
0
0.1
0.25
0.5
1
ITPD
0.997 ±.001
0.998 ±.001
0.997 ±.001
0.997 ±.001
0.997 ±.001
IAMB
0.998 ±.001
0.997 ±.001
0.997 ±.001
0.997 ±.001
0.997 ±.001
FullCI
0.998 ±.001
0.997 ±.001
0.997 ±.001
0.997 ±.001
0.998 ±.001
Lasso
0.970 ±.002
0.972 ±.003
0.972 ±.003
0.973 ±.003
0.979 ±.002
Appendix
Table E.7: Mean F1 with one assumption violated with d=2 , M=2000 . N=20 , T=16 . Each cell is a mean over 20 graphs; subscripts are the half-widths of the 95% intervals.
Edges within a time step
Edges within a time step
(lag-1 edges)
(Markov boundary)
Share
0.1
0.25
0.5
0.1
0.25
0.5
ITPD
0.889 ±.003
0.744 ±.003
0.527 ±.004
0.968 ±.004
0.894 ±.006
0.733 ±.011
IAMB
0.883 ±.004
0.732 ±.003
0.511 ±.004
0.979 ±.003
0.917 ±.005
0.763 ±.011
FullCI
0.901 ±.004
0.774 ±.004
0.574 ±.005
0.961 ±.004
0.874 ±.006
0.690 ±.011
Lasso
0.849 ±.004
0.687 ±.004
0.452 ±.005
0.945 ±.004
0.885 ±.005
0.754 ±.009
Appendix
Table E.8: Same setting as Table E.7 , with edges moved into the same time step, scored on the remaining lag-1 edges (left, unranked) and on the Markov boundary among earlier variables (right). Each cell is a mean over 20 graphs; subscripts are the half-widths of the 95% intervals.
Regulatory edges
Network 3
Network 5
M
200
500
2000
200
500
2000
ITPD
0.518 ±.022
0.683 ±.006
0.654 ±.003
0.464 ±.013
0.541 ±.007
0.483 ±.004
IAMB
0.510 ±.024
0.644 ±.006
0.639 ±.003
0.423 ±.021
0.500 ±.008
0.468 ±.004
IPaDL
0.439 ±.013
0.593 ±.008
0.652 ±.004
0.352 ±.013
0.472 ±.010
0.542 ±.006
FullCI
0.179 ±.014
0.346 ±.007
0.629 ±.006
0.159 ±.020
0.315 ±.009
0.530 ±.006
Appendix
Table E.9: Mean F1 on re-simulated DREAM4 gene regulatory networks. In Table E.10 , indirect pairs counted neither as true nor as false. Each cell is a mean over 10 data sets; subscripts are the half-widths of the 95% intervals.
Regulatory edges, indirect pairs left out
Network 3
Network 5
M
200
500
2000
200
500
2000
ITPD
0.539 ±.024
0.731 ±.005
0.849 ±.002
0.515 ±.011
0.676 ±.007
0.731 ±.005
IAMB
0.521 ±.025
0.692 ±.006
0.832 ±.003
0.478 ±.021
0.639 ±.008
0.703 ±.008
IPaDL
0.464 ±.015
0.611 ±.009
0.765 ±.003
0.368 ±.013
0.541 ±.010
0.743 ±.006
FullCI
0.182 ±.015
0.351 ±.008
0.719 ±.006
0.164 ±.021
0.332 ±.010
0.704 ±.006
Appendix
Table E.10: Same runs as Table E.9 , with indirect pairs counted neither as true nor as false. Each cell is a mean over 10 data sets; subscripts are the half-widths of the 95% intervals.
Algorithm 1
With Lines 9 ′ and 10 ′
With the Line 11 variant
F1
0.813 to 0.997
0.813 to 0.997
0.610 to 0.881
Precision
0.989 to 0.996
0.989 to 0.996
0.443 to 0.817
Recall
0.689 to 1.000
0.688 to 1.000
0.855 to 1.000
Unique CI tests per candidate
1.30 to 1.42
1.89 to 2.40
1.28 to 1.38
Mean conditioning set
5.97 to 11.56
3.92 to 6.05
6.62 to 11.94
Max conditioning set
26.9 to 37.2
26.6 to 35.8
27.3 to 37.3
Appendix
Table E.11: Steps dropped from Algorithm 1 , each added back alone. Each cell is the range of the setting means over the 12 settings of the main setting ( N=20 , T=16 , d∈{1,2,3,5} , M∈{200,500,2000} ; 20 graphs per setting). The Line 11 variant that was run adds the members of S at the time step of X to pa(Y) without a test.
Exact oracle
Data
Change to Algorithm 1
Exact
∣S∣
Tests
F1
∣S∣
Tests
Z in ascending time order
yes
+63 to +137
+47% to +139%
−0.004 to +0.001
+3 to +26
+5% to +28%
Line 9 given X
yes
+65 to +137
+65% to +141%
−0.004 to 0.000
+6 to +29
+7% to +32%
Line 9 removed
yes
+85 to +137
+20% to +62%
−0.003 to +0.001
+21 to +45
−2% to +5%
Line 10 removed
yes
+5 to +31
−15% to −3%
0.000 to +0.012
+11 to +14
−9% to −7%
Lines 8, 9, 10 at level α
yes
–
–
−0.122 to 0.000
−12 to −10
−21% to −18%
Appendix
Table E.12: One change at a time to ITPD when N=20 . T=16 ; M∈{200,500,2000} ; d∈{1,2,3,5} ; 20 graphs per setting with data.
Data
Oracle
Ver.
Line
Change
Status
Exact
F1
F1 ∗
Tests
∣S∣
Set
∣S∣
0
Line 10 adds Z with its learned ancestors; Line 9’ reads A
Earlier form
no
0.741 ±.005
0.728 ±.004
1.13
110
275
112
1
Line 10
Adds only Z to S
Earlier form
no
0.922 ±.004
0.864 ±.003
1.28
13
30
112
2
Line 9’
A CI test of Z and X
Earlier draft
no
0.913 ±.004
0.859 ±.004
1.82
14
33
112
3
Line 11
Only X becomes a parent without a CI test
Adopted
yes
0.926 ±.004
0.865 ±.003
1.83
14
33
112
4
Line 14
Level α2=α/(Nt−1)
Adopted
yes
0.996 ±.002
0.895 ±.003
1.83
14
33
112
Appendix
Table E.13: Exactness and results of each version. Column Exact for Versions 6 and 7 and row F is checked on 2,359,296 enumerated graphs. Data columns are means over 20 graphs and the Oracle column over 50 graphs. Subscripts of F1 (Versions 0 to 8) are the half-widths of the 95% intervals.
Causal discovery with instantaneous effects in multivariate time series is challenging, as the instantaneous structure must be acyclic. Prior methods enforce this by either separating instantaneous and lagged estimation into multi-stage pipelines or imposing algebraic acyclicity constraints via complex augmented Lagrangian optimization, both of which incur high computational cost. In this work, we propose a different approach: we learn a differentiable permutation of variables using the Gumbel--Sinkhorn operator and triangularize the instantaneous coefficient matrix of a Structural Vector Autoregressive (SVAR) model in the learned order. This converts acyclicity from a hard constraint into a parameterization and keeps it valid throughout optimization. In doing so, our method enables unified, continuous optimization with gradient-based learning, leading to improved efficiency in time--series causal discovery. Across three real-world benchmarks, our method achieves the best overall performance compared with 12 baselines in both discovery accuracy and efficiency. On the large-scale benchmark, it further demonstrates strong scalability, achieving more than a 6x speedup over competing methods.
Causal Bayesian Networks (CBNs) are a powerful tool for reasoning under uncertainty about complex real-world problems. Such problems evolve over time, responding to external shocks as they occur. To support decision-making, CBNs require a cause-and-effect map of the variables under consideration, known as the network's structure. Learning the graphical structure of a causal model from data remains challenging; learning it from time-series data is even harder because dependencies may arise at different time lags. We construct a method that jointly learns a temporal ordering and a dominant lag for each selected ordered variable pair. Our contribution is a decomposable BIC-style objective score for mixed data that combines node-specific sample sizes with a penalty favouring recent lags. We optimise this objective using a Tabu search augmented with change-lag moves and greedy per-child lag tuning, while its node-wise decomposition supports cached and parallel neighbourhood evaluation. We establish acyclicity and complexity results and derive recovery limits when effects are distributed across multiple lags. In simulations, we show that the proposed method outperforms an inflexible lag-1 score-based learner in most evaluated settings, whereas most specialised methods achieve higher recovery accuracy on data that satisfy their assumptions. On a real-world UK COVID-19 dataset, the method learnt an expected short-lag-skewed structure; nevertheless, 46.8% of selected edges had lags greater than one, showing that longer delays can be retained when their improved fit offsets the penalty. Under its no-contemporaneous-edges and causal-sufficiency assumptions, the method provides a computationally tractable subroutine for edge-specific single-lag optimisation, complementing score-based causal discovery methods.
Bruno Petrungaro, Anthony C. Constantinou
Bayesian Artificial Intelligence research lab, MInDS research group, Queen Mary University of London, Mile End Road, London, E1 4NS, UK.
We describe Causal-TS, an open-source Python library that provides a common interface and lagged-graph representation for causal discovery (structure learning) from stationary and nonstationary multivariate time series. It learns lagged and contemporaneous causal graphs with constraint-based (CDNOTS, CDNOTS+, Cedar), score-based (LGES, TGES, GES, LASSO-VAR, VARLiNGAM, Granger) and hybrid (GRACE, REAP) methods. The constraint-based methods share 17 linear and nonlinear conditional independence (CI) tests, nine with PyTorch implementations. It also provides candidate-regime detection with per-regime discovery, latent-confounder correction (LUCID), missing- and mixed-data support, a data-driven configuration recommender, a command-line interface, and an optional DoWhy bridge from a discovered graph to causal effect estimates and counterfactuals. The library is pip-installable, tested on Python 3.10-3.14, and available at https://github.com/bloomberg/causal-ts.