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 Directed Acyclic Graph (DAG) that delivers coherent observational and interventional predictions, as well as counterfactuals through the natural encoding-decoding mechanism of continuous normalizing flows (CNFs). We also provide a supporting counterfactual recovery theory under certain assumptions. Beyond forecasting, DoFlow provides explicit likelihoods of future trajectories, enabling principled anomaly detection. Experiments on synthetic datasets with various causal DAG structures 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.
翻译:时间序列预测不仅日益要求准确的观测预测,更需要在多元系统中实现针对干预与反事实查询的因果预测。本文提出DoFlow——一种基于因果有向无环图(DAG)构建的流式生成模型,该模型通过连续标准化流(CNFs)固有的编码-解码机制,能够提供连贯的观测与干预预测以及反事实推断。我们在特定假设下建立了相应的反事实恢复理论支撑。除预测功能外,DoFlow可显式计算未来轨迹的似然度,从而实现基于原理的异常检测。在具有多种因果DAG结构的合成数据集,以及真实世界水电系统与癌症治疗时间序列上的实验表明:DoFlow能够实现精确的系统级观测预测,支持针对干预与反事实查询的因果预测,并能有效检测异常。本工作为推动复杂动态系统中因果推理与生成建模的统一提供了重要贡献。