Abstract
FANTOM is a novel framework for causal discovery in multivariate time series designed to handle environments where the underlying rules change and the noise distributions are complex. By combining Bayesian Expectation-Maximization with conditional normalizing flows, FANTOM simultaneously identifies hidden regime shifts (such as a market crash or an epileptic seizure) and reconstructs the unique causal graph for each period, even when noise variance is heteroscedastic (dependent on the data itself).
The Challenge of Real-World Time Series
Causal discovery—figuring out "what causes what"—is notoriously difficult in time series data because the real world is rarely static. Most existing methods rely on two fragile assumptions: stationarity (the causal rules never change) and homoscedastic Gaussian noise (the randomness follows a simple bell curve with constant variance).
In reality, complex systems like financial markets or the human brain exhibit multiple regimes. For instance, a brain might switch from a "normal" state to a "seizure" state, with each state governed by entirely different causal interactions. Furthermore, noise is often heteroscedastic, meaning its variance fluctuates based on the current state of the system or its past values. Existing tools often fail to identify these regime boundaries or produce "hallucinated" causal links because they cannot handle these complex, shifting noise distributions.
The FANTOM Framework
To address these limitations, the authors introduce FANTOM (Flow-based Approach for NoN-stationary Temporal Causal Models), which treats regime detection and graph learning as a joint optimization problem.
The framework operates on several key pillars:
- Bayesian Expectation-Maximization (BEM): FANTOM uses a two-step loop. In the E-step, it estimates the posterior probability that each time point belongs to a specific regime. In the M-step, it learns the Directed Acyclic Graph (DAG) and the functional relationships for each regime.
- Conditional Normalizing Flows (CNFs): Instead of assuming Gaussian noise, FANTOM uses CNFs to model complex, non-Gaussian, and heteroscedastic noise. It learns to map the messy, real-world noise into a simple, tractable distribution.
- Temporal Graph Neural Networks (TGNN): The framework uses a specialized neural architecture to model both instantaneous (happening at the same time step) and lagged (happening across time) causal effects.
- Initialization and Merging: To avoid needing the exact number of regimes upfront, FANTOM starts by dividing the data into many small windows. As the algorithm iterates, it naturally merges similar segments and prunes "empty" regimes until it settles on the true count.
Key Insights and Theoretical Guarantees
A core argument of the paper is that joint inference is essential: you cannot accurately find regime boundaries without knowing the causal structure, and you cannot find the structure without knowing the boundaries. FANTOM’s BEM approach solves these interdependently.
Crucially, the authors provide mathematical proofs that these complex heteroscedastic models are identifiable. This means there is a unique, mathematically correct answer that the algorithm can theoretically find, rather than multiple equally likely graphs. By allowing the noise variance to be a function of the "parents" in the causal graph, FANTOM captures a layer of reality that previous models ignored.
Experimental Validation and Results
The researchers evaluated FANTOM on synthetic data, a real-world physics dataset (Wind Tunnel), and clinical data (Epilepsy EEG).
- Superior Regime Detection: On synthetic data, FANTOM achieved up to 99.4% accuracy in identifying regime indices, significantly outperforming baselines like CASTOR (51.6%).
- Outperforming "Cheating" Baselines: In heteroscedastic settings, FANTOM outperformed stationary models even when those baseline models were explicitly given the ground-truth regime partitions.
- Real-World Success:
- Wind Tunnel: FANTOM detected physical regime changes (like fan speed adjustments) with 99.9% accuracy and achieved the highest F1 score for causal graph reconstruction.
- Epilepsy EEG: In a completely unsupervised manner, it detected seizure boundaries with an average of 82.7% accuracy. It correctly identified that seizure regimes feature much denser, more interconnected causal graphs than normal brain states.
Limitations and Future Work
While powerful, FANTOM has limitations. Its performance degrades if a regime is too short (only a handful of samples) or if the sampling rate is extremely low. Additionally, while the merging trick is clever, the initial window size remains a sensitive hyperparameter; setting it too large might cause the algorithm to "over-prune" and miss brief regimes. Finally, training normalizing flows and GNNs within an EM loop is computationally expensive, though it successfully scales to 40-node graphs.
Future work may involve extending this framework to "continuous" non-stationarity, where causal relationships evolve smoothly over time rather than jumping between discrete regimes.
Summary updated