CausalExoFormer: End-to-End Causal Discovery for Exogenous Variables in Environmental Time Series Forecasting
Jingru Chen, Baoshan Chen, Yang Liu, Yancheng Chen, Xiaotong Wu, Ran Ran, Xu Kefu, Bin Chong
2026/5/4
摘要
Environmental time series forecasting is crucial for environmental protection. However, forecasting is often complicated by exogenous variables whose causal relevance and temporal lag structures are heterogeneous and largely unknown. Existing deep forecasting models typically treat all external drivers uniformly, while two-stage approaches that first infer causal structure and then perform forecasting are prone to error propagation. To address this gap, we introduce CausalExoFormer, an end-to-end Transformer that embeds differentiable causal discovery directly into cross-attention. The framework has three key innovations: (1) a multi-lag variate embedding that produces lag-specific representations for each exogenous variable, (2) a DAG-constrained causal adjacency module that learns both exogenous-to-endogenous and inter-exogenous causal gates, and (3) a causal-gated cross-attention layer that suppresses non-causal pathways using log-space additive masking. We prove that CausalExoFormer recovers the true causal support with high probability and achieves low prediction risk, matching the minimax rate for sparse regression. Experiments on 12 datasets, including 6 standard benchmarks and 6 lake water-quality datasets, demonstrate that CausalExoFormer matches or outperforms state-of-the-art methods while producing interpretable causal graphs that reveal which exogenous variables matter and at what temporal lags. Our code is available at https://anonymous.4open.science/r/CausalExoFormer-C42C