JOURNAL ARTICLE

Counterfactual explanations for deep learning-based traffic forecasting

Rushan WangYanan XinYatao ZhangFernando Pérez‐CruzMartin Raubal

Year: 2025 Journal:   Communications in Transportation Research Vol: 5 Pages: 100176-100176   Publisher: Elsevier BV

Abstract

Deep learning models are widely used in traffic forecasting and have achieved state-of-the-art prediction accuracy. However, their black-box nature presents challenges for interpretability and usability, particularly when predictions are significantly influenced by complex urban contextual features. This study aims to leverage an explainable artificial intelligence (AI) approach, counterfactual explanations, to enhance the explainability of deep learning-based traffic forecasting models and elucidate their relationships with various contextual features. We present a comprehensive framework that generates counterfactual explanations for traffic forecasting. The study first implements a graph convolutional network (GCN) to predict traffic speed based on historical traffic data and contextual variables. Counterfactual explanations are generated through a multi-objective optimization process, with four objectives, validity, proximity, sparsity, and plausibility, each emphasizing different aspects of optimization. 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 traffic domain experts who seek insights for necessity factors to alter traffic condition. The results showcase the effectiveness of counterfactual explanations in revealing traffic patterns learned by deep learning models and explaining the relationship between traffic prediction and contextual features, demonstrating its potential for interpreting black-box deep learning models.

Keywords:
Counterfactual thinking Artificial intelligence Deep learning Computer science Econometrics Economics Machine learning Psychology Social psychology

Metrics

3
Cited By
8.12
FWCI (Field Weighted Citation Impact)
71
Refs
0.92
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Traffic Prediction and Management Techniques
Physical Sciences →  Engineering →  Building and Construction
Time Series Analysis and Forecasting
Physical Sciences →  Computer Science →  Signal Processing
Anomaly Detection Techniques and Applications
Physical Sciences →  Computer Science →  Artificial Intelligence
© 2026 ScienceGate Book Chapters — All rights reserved.