Causal-TS: A Python Library for Causal Discovery in High-Dimensional and Nonstationary Time Series

2026-07-27Machine Learning

Machine Learning
AI summary

The authors present Causal-TS, a free Python tool designed to find cause-and-effect relationships in complex time series data that changes over time. It includes several specialized algorithms and supports multiple methods under one framework that uses fast mathematical tests powered by GPUs. Their tool can detect when data behavior shifts, apply the right settings for each period, and even estimate the impact of causes. They also provide features like a command-line interface and synthetic data generation to help users start from raw data to analyzing causal effects. The software works on recent Python versions and is openly available online.

causal discoverytime seriesnonstationary dataconditional independence testGPU accelerationchangepoint detectionregime detectionPython librarycausal effect estimationalgorithm wrappers
Authors
Mohammad Fesanghary
Abstract
We describe Causal-TS, an open-source Python library for causal discovery in high-dimensional and nonstationary multivariate time series. Causal-TS provides four specialized algorithms-CDNOTS, CDNOTS+, CEDAR, and GRACE-along with wrappers for GES, Granger, LASSO-VAR, and LGES, all sharing a unified conditional independence (CI) test layer with GPU acceleration via PyTorch. A regime discovery pipeline detects structural breaks via pluggable changepoint detectors and runs discovery per regime with regime-specific parameters. A command-line interface, synthetic data generators, and optional DoWhy integration provide an end-to-end pipeline from raw time series to causal effect estimates. The library is pip-installable, tested on Python 3.10--3.12, and available at https://github.com/bloomberg/causal-ts.