TL;DR
KarmaTS is an interactive, human-in-the-loop simulation platform designed to generate synthetic multivariate time series (MTS) data with known causal dynamics. By combining expert domain knowledge with algorithmic causal discovery, it allows researchers to build executable spatiotemporal causal models, creating safe data proxies for privacy-restricted domains and providing a rigorous framework for benchmarking causal discovery algorithms.
What Problem Does This Paper Address?
In domains like healthcare, geosciences, and finance, analyzing multivariate time series (MTS) data is crucial for understanding complex systems. However, researchers face two major hurdles:
- Data Scarcity and Privacy: High-quality datasets—such as electronic health records or fMRI brain scans—are heavily access-restricted due to privacy concerns.
- Limitations of Purely Data-Driven Causal Discovery: Algorithms designed to infer causal relationships from data often struggle with noise, confounding variables, and measurement errors. They can easily miss weak but structurally vital dependencies that a domain expert would consider unquestionable (e.g., anatomical constraints in medical data).
While simulating data can solve these issues, building custom, realistic simulation models from scratch for every new study is incredibly tedious. Existing benchmarking platforms lack interactive, time-series-native features that allow experts to easily inject their knowledge into the simulation loop.
Methods
KarmaTS introduces a mixed-initiative, human-in-the-loop workflow that bridges the gap between human expertise and machine learning.
The platform is built on the mathematical foundation of a Discrete-time Structural Causal Process (DSCP). Key components include:
- Interactive Graph Editor: A user interface where experts can define, visualize, and refine causal graphs. It natively supports both contemporaneous effects (happening at the same time step) and lagged effects (delayed over time), as well as mixed variable types (continuous, binary, and categorical).
- Modular Edge Functionals: Instead of forcing a single mathematical paradigm, the relationships between variables (edges) can be modeled using simple Parameterized Templates (e.g., if variable X exceeds a threshold, trigger Y) or data-driven Neural Network Templates (such as a Variational Autoencoder combined with a Gated Recurrent Unit to model complex, nonlinear histories).
- Additive Decomposition: To make defining complex interactions manageable, KarmaTS assumes that the joint causal effect on a variable can be broken down into the sum of local causal effects from subsets of its parent variables.
Datasets
The authors evaluated KarmaTS using two distinct approaches:
- Real-World fMRI Dataset: To demonstrate a privacy-conscious data synthesis use case, they utilized a movie-watching resting-state functional Magnetic Resonance Imaging (fMRI) dataset mapped to the Multi-Subject Dictionary Learning (MSDL) atlas via the
Nilearnlibrary. - Synthetic Benchmarks: To test causal discovery algorithms, they generated multiple synthetic datasets featuring prototypical graph structures (Star, Tree, and Cycle). These datasets were systematically varied across dimensions like time series length (200 to 1000 steps), maximum lag (5 vs. 10 time units), edge density, graph size (number of nodes), and the percentage of latent (hidden) variables (0% to 80%).
Key Insights and Ideas
- Privacy Without Loss of Structure: By training neural network functionals on real fMRI data within the expert-defined causal graph, KarmaTS generated synthetic data that successfully decoupled from subject-specific temporal events while perfectly preserving global, large-scale community structures (like left-right brain mirror pairs).
- No Single Algorithm Rules Them All: The benchmarking process highlighted that causal discovery performance is highly context-dependent. For instance, the attention-based TCDF method excelled on Star graph structures, whereas the constraint-based PCMCI method dominated on Tree structures.
- The Nuanced Impact of Hidden Variables: Interestingly, increasing the number of latent variables did not cause a simple, monotonic degradation in algorithm performance. Instead, metrics like the F1-score fluctuated, reinforcing the idea that hidden variables can sometimes reveal or obscure structure depending on specific network topologies.
Key Results
The authors benchmarked six state-of-the-art causal discovery methods: PCMCI, DYNOTEARS, VarLiNGAM, TCDF, NGM, and CUTS+.
- Overall Performance: As time series length increased, PCMCI emerged as the top performer in structural accuracy, reaching an F1-score of ~0.58.
- Stability: DYNOTEARS demonstrated the highest stability across all series lengths, maintaining a steady F1-score of ~0.52 and achieving the lowest error rate in Structural Intervention Distance (SID ~16.5).
- Qualitative Fidelity: In the fMRI synthesis task, the VAE-based functional model achieved a "matrix correlation" score of 0.5097, indicating a strong alignment with the real-world brain connectivity patterns.
Limitations and Future Work
While promising, the authors note a few limitations:
- User Validation: The platform has yet to undergo comprehensive user studies to validate its usability and effectiveness across different target groups (e.g., medical practitioners vs. data scientists).
- Proxy Benchmarks: The current benchmarking suite relies on template-based synthetic motifs rather than fully organic, expert-elicited structures.
Future Directions: The team plans to conduct formal user studies, refine the expert-elicitation protocols, incorporate more sophisticated statistical methods for uncertainty estimation, and develop robust quantification approaches for learned causal relationships.
Summary updated