DoFlow: Causal Generative Flows for Interventional and Counterfactual Time-Series Prediction
Dongze Wu, Feng Qiu, Yao Xie
TL;DR
DoFlow tackles the challenge of causal time-series forecasting by marrying a causal DAG with time-conditioned continuous normalizing flows, enabling observational, interventional, and counterfactual trajectory generation within a single probabilistic framework. It introduces an autoregressive, node-specific CNF conditioned on past histories and parent histories, trained with conditional flow matching, and supports abduction-action-prediction for counterfactuals along with explicit likelihoods for anomaly detection. Theoretical results establish a counterfactual recovery property under monotone SCM assumptions, while experiments across synthetic DAGs and real domains (hydropower, cancer treatment) demonstrate strong forecasting, credible causal query responses, and practical anomaly signals. This framework advances trustworthy causal inference in dynamical systems and suggests directions toward digital twins and physics-informed extensions that reason under interventions and uncertainty.
Abstract
Time-series forecasting increasingly demands not only accurate observational predictions but also causal forecasting under interventional and counterfactual queries in multivariate systems. We present DoFlow, a flow based generative model defined over a causal DAG that delivers coherent observational and interventional predictions, as well as counterfactuals through the natural encoding and decoding mechanism of continuous normalizing flows (CNFs). We also provide a supporting counterfactual recovery result under certain assumptions. Beyond forecasting, DoFlow provides explicit likelihoods of future trajectories, enabling principled anomaly detection. Experiments on synthetic datasets with various causal DAG and real world hydropower and cancer treatment time series show that DoFlow achieves accurate system-wide observational forecasting, enables causal forecasting over interventional and counterfactual queries, and effectively detects anomalies. This work contributes to the broader goal of unifying causal reasoning and generative modeling for complex dynamical systems.
