Traffic crashes profoundly impede traffic efficiency and pose economic challenges. Accurate prediction of post-crash traffic status provides essential information for evaluating traffic perturbations and developing effective solutions. Previous studies have established a series of deep learning models to predict post-crash traffic conditions, however, these correlation-based methods cannot accommodate the biases caused by time-varying confounders and the heterogeneous effects of crashes. The post-crash traffic prediction model needs to estimate the counterfactual traffic speed response to hypothetical crashes under various conditions, which demonstrates the necessity of understanding the causal relationship between traffic factors. Therefore, this paper presents the Marginal Structural Causal Transformer (MSCT), a novel deep learning model designed for counterfactual post-crash traffic prediction. To address the issue of time-varying confounding bias, MSCT incorporates a structure inspired by Marginal Structural Models and introduces a balanced loss function to facilitate learning of invariant causal features. The proposed model is treatment-aware, with a specific focus on comprehending and predicting traffic speed under hypothetical crash intervention strategies. In the absence of ground-truth data, a synthetic data generation procedure is proposed to emulate the causal mechanism between traffic speed, crashes, and covariates. The model is validated using both synthetic and real-world data, demonstrating that MSCT outperforms state-of-the-art models in multi-step-ahead prediction performance. This study also systematically analyzes the impact of time-varying confounding bias and dataset distribution on model performance, contributing valuable insights into counterfactual prediction for intelligent transportation systems.
翻译:交通事故严重阻碍交通效率并带来经济挑战。准确预测事故后交通状态为评估交通扰动和制定有效解决方案提供了关键信息。先前研究已建立一系列深度学习模型来预测事故后交通状况,然而这些基于相关性的方法无法处理时变混杂因素引起的偏倚及事故的异质性效应。事故后交通预测模型需要估计假设事故在不同条件下引发的反事实交通速度响应,这凸显了理解交通因素间因果关系的必要性。为此,本文提出边际结构因果Transformer(MSCT)——一种专为反事实事故后交通预测设计的新型深度学习模型。为解决时变混杂偏倚问题,MSCT融合了受边际结构模型启发的架构,并引入平衡损失函数以促进不变因果特征的学习。该模型具备处理干预的感知能力,特别关注在假设事故干预策略下交通速度的理解与预测。在缺乏真实数据的情况下,本文提出合成数据生成流程以模拟交通速度、事故及协变量间的因果机制。通过合成数据与真实数据的验证表明,MSCT在多步超前预测性能上优于现有最优模型。本研究还系统分析了时变混杂偏倚与数据集分布对模型性能的影响,为智能交通系统的反事实预测提供了重要见解。