Deep learning models are widely used in traffic forecasting and have achieved state-of-the-art prediction accuracy. However, the black-box nature of those models makes the results difficult to interpret by users. This study aims to leverage an Explainable AI approach, counterfactual explanations, to enhance the explainability and usability of deep learning-based traffic forecasting models. Specifically, the goal is to elucidate relationships between various input contextual features and their corresponding predictions. We present a comprehensive framework that generates counterfactual explanations for traffic forecasting and provides usable insights through the proposed scenario-driven counterfactual explanations. The study first implements a deep learning model to predict traffic speed based on historical traffic data and contextual variables. Counterfactual explanations are then used to illuminate how alterations in these input variables affect predicted outcomes, thereby enhancing the transparency of the deep learning model. We investigated the impact of contextual features on traffic speed prediction under varying spatial and temporal conditions. The scenario-driven counterfactual explanations integrate two types of user-defined constraints, directional and weighting constraints, to tailor the search for counterfactual explanations to specific use cases. These tailored explanations benefit machine learning practitioners who aim to understand the model's learning mechanisms and domain experts who seek insights for real-world applications. The results showcase the effectiveness of counterfactual explanations in revealing traffic patterns learned by deep learning models, showing its potential for interpreting black-box deep learning models used for spatiotemporal predictions in general.
翻译:深度学习模型广泛应用于交通预测,并已取得最先进的预测精度。然而,这些模型的黑箱特性导致用户难以解释其结果。本研究旨在利用可解释人工智能方法——反事实解释——来增强基于深度学习的交通预测模型的可解释性和实用性。具体目标在于阐明各种输入上下文特征与其对应预测结果之间的关系。我们提出一个综合框架,用于生成交通预测的反事实解释,并通过所提出的场景驱动反事实解释提供可用洞见。研究首先基于历史交通数据和上下文变量实现一个深度学习模型以预测交通速度。随后,反事实解释被用于阐明这些输入变量的变化如何影响预测结果,从而提升深度学习模型的透明度。我们研究了在不同时空条件下上下文特征对交通速度预测的影响。场景驱动反事实解释整合了两类用户定义的约束——方向约束和权重约束——以根据特定用例定制反事实解释的搜索过程。这些定制化解释有利于旨在理解模型学习机制的机器学习从业者,以及寻求实际应用洞见的领域专家。结果展示了反事实解释在揭示深度学习模型所学交通模式方面的有效性,表明其在解释用于一般时空预测的黑箱深度学习模型方面的潜力。