Composable Causality: A Toolkit for Systematic Time-Series Causal Discovery and Treatment-Effect Benchmarking
Organizations: Causal AI Lab, Department of Information Systems, University of Maryland, Baltimore County
Abstract
Real-world multivariate time series rarely come with verified ground-truth causal structure, so research on time-series causal discovery and treatment-effect estimation depends on synthetic data. Existing tools are either fixed datasets that cannot be modified after release or script-based generators in which each script fixes one combination of mechanism, confounding, and missingness. Neither supports controlled experiments that vary a single property, such as sparsity, noise distribution, or missingness mechanism, while holding the others fixed. Counterfactual evaluation has the same gap, since existing simulators are built per paper with hardcoded mechanisms or produce observational data only. We introduce DTCD (Datasets and Toolkit for Causal Discovery), a data generation library that produces multivariate time series with ground-truth contemporaneous and lagged adjacency matrices. Topology, mechanism, noise, observational mask, and intervention policy are independent components that compose through configuration alone. Paired counterfactual twins, produced by caching the stochastic realization during the factual rollout and re-injecting it during the interventional rollout, recover individual treatment effects to numerical precision. A reference benchmark of eight discovery algorithms on eighty-one configurations and four treatment-effect estimators on eighteen configurations exposes failure modes that aggregate metrics hide. These include the inability of standard discovery methods to handle missing values, regardless of whether the missingness mechanism is informative, and a marginal-variance shortcut (varsortability) that we measure and remove by standardization. Code and data: https://github.com/hferdous/Composable_Causality
Figures & tables
| Linear | Nonlinear | |||||
|---|---|---|---|---|---|---|
| SHD | TPR | FDR | SHD | TPR | FDR | |
| DYNOTEARS | 0.02 0.05 | 1.00 0.02 | 0.01 0.04 | 0.02 0.05 | 0.99 0.03 | 0.01 0.03 |
| PCMCI_GPDC | 0.38 0.17 | 0.67 0.12 | 0.05 0.11 | 0.41 0.15 | 0.67 0.12 | 0.07 0.13 |
| VARLiNGAM | 0.52 0.40 | 0.80 0.17 | 0.27 0.20 | 0.50 0.41 | 0.79 0.22 | 0.25 0.20 |
| VARLiNGAM_imp | 0.52 0.40 | 0.80 0.17 | 0.27 0.20 | 0.50 0.41 | 0.79 0.22 | 0.25 0.20 |
| PCMCI_ParCorr | 0.45 0.14 | 0.65 0.07 | 0.12 0.13 | 0.42 0.12 | 0.65 0.07 | 0.08 0.10 |
| MNAR | MCAR | |||||
|---|---|---|---|---|---|---|
| SHD | TPR | FDR | SHD | TPR | FDR | |
| VARLiNGAM_imp | 0.96 0.37 | 0.52 0.26 | 0.47 0.23 | 0.79 0.43 | 0.64 0.26 | 0.40 0.24 |
| CUTS+ | 0.94 0.45 | 0.73 0.18 | 0.42 0.16 | 0.67 0.43 | 0.94 0.10 | 0.35 0.13 |
| CATE Linear | CATE Nonlinear | |||
|---|---|---|---|---|
| PEHE | Runtime (s) | PEHE | Runtime (s) | |
| TARNet | 0.491 0.173 | 1.639 0.349 | 0.427 0.135 | 1.639 0.351 |
| SNet | 0.674 0.220 | 11.571 1.436 | 0.509 0.129 | 12.444 1.988 |
| FlexTENet | 0.663 0.201 | 6.385 1.244 | 0.518 0.129 | 6.636 1.302 |
| X-Learner | 0.757 0.155 | 1.380 0.078 | 0.617 0.129 | 1.374 0.078 |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Value | Variant |
|---|---|---|
| Trajectory length | 1000 | all |
| Within-graph variables | all | |
| Maximum lag | all | |
| Edges per graph | (sparsity calibrated) | all |
| Innovation distribution | Gaussian, , homoscedastic | all |
| Structural weight magnitude | all |
| Condition | DYNOTEARS | SortnRegress | RandomRegress | |
|---|---|---|---|---|
| Raw (as shipped) | 0.93 | 0.99 | 0.93 | 0.79 |
| Standardized | 0.50 | 0.82 | 0.81 | 0.79 |
| Method | Hyperparameter | Search Space | Notes |
| VARLiNGAM | none | — | Nothing tuned |
| VARLiNGAM_imp | none | — | Mean imputation pre-fit; not tuned |
| PCMCI-ParCorr | pc_alpha | {0.001, 0.01, 0.05} | |
| PCMCI-GPDC | pc_alpha | {0.001, 0.01, 0.05} | 5 trials per cell; only |
| DYNOTEARS | lambda_w | log-uniform | 5 trials per cell |
| lambda_a | log-uniform |
| Precision | Recall | F1 | |
|---|---|---|---|
| DYNOTEARS | 0.99 | 1.00 | 0.99 |
| PCMCI_GPDC | 0.95 | 0.67 | 0.78 |
| VARLiNGAM | 0.73 | 0.80 | 0.76 |
| VARLiNGAM_imp | 0.73 | 0.80 | 0.76 |
| PCMCI_ParCorr | 0.88 | 0.65 | 0.74 |
| CUTS+ | 0.64 | 0.87 | 0.74 |
| SHD | Runtime (s) | |||||
|---|---|---|---|---|---|---|
| d | 4 | 6 | 8 | 4 | 6 | 8 |
| CDNOD | 1.00 | 1.03 | 1.06 | 0.01 | 0.01 | 0.02 |
| CUTS+ | 0.67 | 0.36 | 0.40 | 0.06 | 0.06 | 0.06 |
| DYNOTEARS | 0.00 | 0.02 | 0.03 | 0.15 | 0.41 | 0.59 |
| GrangerF | 1.75 | 1.78 | 1.97 | 0.02 | 0.04 | 0.07 |
| PCMCI_GPDC | 0.38 | - | - | 41.78 | - | - |
| PEHE | |||
|---|---|---|---|
| d=4 | d=6 | d=8 | |
| TARNet | 0.440 0.222 | 0.594 0.127 | 0.438 0.097 |
| SNet | 0.458 0.218 | 0.750 0.143 | 0.814 0.076 |
| FlexTENet | 0.478 0.215 | 0.753 0.132 | 0.756 0.091 |
| X-Learner | 0.841 0.155 | 0.820 0.112 | 0.611 0.060 |
| Mechanism | Property | SHD ( ) | F1 ( ) |
|---|---|---|---|
| Linear ( ) | identity | ||
| Nonlinear ( ) | monotonic, saturating | ||
| Non-monotonic ( ) | non-monotonic, bounded |
| Drift | |||
|---|---|---|---|
| SHD | TPR | FDR | |
| DYNOTEARS | 0.04 0.07 | 0.98 0.05 | 0.01 0.04 |
| PCMCI_GPDC | 0.38 0.17 | 0.67 0.12 | 0.06 0.12 |
| VARLiNGAM | 0.51 0.36 | 0.81 0.14 | 0.27 0.17 |
| VARLiNGAM_imp | 0.51 0.36 | 0.81 0.14 | 0.26 0.17 |
| PCMCI_ParCorr | 0.45 0.16 | 0.65 0.07 | 0.12 0.13 |
| Completed | Skipped (no missing support) | Skipped (compute budget) | Errored | |
|---|---|---|---|---|
| CDNOD | 630 | 180 | 0 | 0 |
| CUTS+ | 810 | 0 | 0 | 0 |
| DYNOTEARS | 630 | 180 | 0 | 0 |
| GrangerF | 630 | 180 | 0 | 0 |
| PCMCI_GPDC | 210 | 60 | 540 | 0 |
| PCMCI_ParCorr | 630 | 180 | 0 | 0 |
| status | Completed | Errored | Total attempted |
|---|---|---|---|
| Linear | 90 | 0 | 90 |
| Nonlinear | 90 | 0 | 90 |
| Drift | 90 | 0 | 90 |
| Trend | 90 | 0 | 90 |
| Seasonal | 90 | 0 | 90 |
| Trend+Seasonal | 90 | 0 | 90 |
| DYNOTEARS F1 | SortnRegress F1 | DYNOTEARS | ||||
|---|---|---|---|---|---|---|
| raw | std. | raw | std. | runtime (s) | ||
| 4 | 1000 | 1.00 | 1.00 | 0.70 | 0.85 | 0.2 |
| 4 | 5000 | 1.00 | 1.00 | 0.70 | 0.55 | 0.3 |
| 4 | 10000 | 1.00 | 1.00 | 0.55 | 0.85 | 0.4 |
| 8 | 1000 | 1.00 | 0.82 | 0.70 | 0.75 | 0.3 |
| 8 | 5000 | 1.00 | 0.82 | 0.74 | 0.71 | 0.6 |
| DYNOTEARS (std.) | ||||
|---|---|---|---|---|
| 1.00 | 0.94 | 0.92 | 0.98 | |
| 1.00 | 0.96 | 0.95 | 0.91 | |
| 1.00 | 1.00 | 0.97 | 0.98 |
| Seconds per fit, | |||
|---|---|---|---|
| DYNOTEARS | 5 | 9 | 16 |
| VARLiNGAM | 25 | 24 | 21 |
| PCMCI-ParCorr | 22 | 47 | 118 |
| GrangerF | 14 | 45 | 187 |
| full ( ) | seasonal ( ) | mechanism ( ) | ||||
|---|---|---|---|---|---|---|
| Method | raw | std. | raw | std. | raw | std. |
| DYNOTEARS † | 0.13 | 0.19 | 0.21 | 0.24 | 0.00 | 0.49 |
| SortnRegress | 0.14 | 0.11 | 0.11 | 0.09 | 0.51 | 0.48 |
| RandomRegress | 0.11 | 0.11 | 0.10 | 0.10 | 0.44 | 0.44 |
| VARLiNGAM | 0.11 | 0.11 | 0.09 | 0.09 | 0.44 | 0.44 |
| GrangerF | 0.06 | 0.06 | 0.09 | 0.09 | 0.30 | 0.30 |
Time-Series Causal Discovery
Time-series causal discovery seeks to infer which variables influence others over time and when those effects occur.
See all 70 papers