# Counterfactual Explanations for Deep Learning-Based Traffic Forecasting

arXiv: https://arxiv.org/abs/2405.00456 · HTML: https://mlsanity.com/paper/2405.00456/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 25 of its 52 references that are in the map.
- First posted on arXiv 1 May 2024.

## Builds on (most cited first, 25 of 25)

- [A Unified Approach to Interpreting Model Predictions](https://mlsanity.com/paper/1705.07874/) (2017)
- [A Comprehensive Survey on Graph Neural Networks](https://mlsanity.com/paper/1901.00596/) (2019)
- [Counterfactual Explanations without Opening the Black Box: Automated Decisions and the GDPR](https://mlsanity.com/paper/1711.00399/) (2017)
- [Graph WaveNet for Deep Spatial-Temporal Graph Modeling](https://mlsanity.com/paper/1906.00121/) (2019)
- [Explaining Machine Learning Classifiers through Diverse Counterfactual Explanations](https://mlsanity.com/paper/1905.07697/) (2019)
- [Graph Neural Network for Traffic Forecasting: A Survey](https://mlsanity.com/paper/2101.11174/) (2021)
- [FACE: Feasible and Actionable Counterfactual Explanations](https://mlsanity.com/paper/1909.09369/) (2019)
- [Explaining by Removing: A Unified Framework for Model Explanation](https://mlsanity.com/paper/2011.14878/) (2020)
- [Multi-Objective Counterfactual Explanations](https://mlsanity.com/paper/2004.11165/) (2020)
- [Counterfactual Explanations for Machine Learning on Multivariate Time Series Data](https://mlsanity.com/paper/2008.10781/) (2020)
- [Diffusion Convolutional Recurrent Neural Network: Data-Driven Traffic Forecasting](https://mlsanity.com/paper/1707.01926/) (2017)
- [Generative Counterfactual Introspection for Explainable Deep Learning](https://mlsanity.com/paper/1907.03077/) (2019)
- [Deep Sequence Learning with Auxiliary Information for Traffic Prediction](https://mlsanity.com/paper/1806.07380/) (2018)
- [A Survey on Graph Counterfactual Explanations: Definitions, Methods, Evaluation, and Research Challenges](https://mlsanity.com/paper/2210.12089/) (2022)
- [AST-GCN: Attribute-Augmented Spatiotemporal Graph Convolutional Network for Traffic Forecasting](https://mlsanity.com/paper/2011.11004/) (2020)
- [Towards Relatable Explainable AI with the Perceptual Process](https://mlsanity.com/paper/2112.14005/) (2021)
- [Explaining Data-Driven Decisions made by AI Systems: The Counterfactual Approach](https://mlsanity.com/paper/2001.07417/) (2020)
- [Counterfactual Explanations for Arbitrary Regression Models](https://mlsanity.com/paper/2106.15212/) (2021)
- [Explaining Visual Models by Causal Attribution](https://mlsanity.com/paper/1909.08891/) (2019)
- [An Unsupervised Random Forest Clustering Technique for Automatic Traffic Scenario Categorization](https://mlsanity.com/paper/2004.02121/) (2020)
- [Counterfactual Explanation Based on Gradual Construction for Deep Networks](https://mlsanity.com/paper/2008.01897/) (2020)
- [Vision Paper: Causal Inference for Interpretable and Robust Machine Learning in Mobility Analysis](https://mlsanity.com/paper/2210.10010/) (2022)
- [Deep Recurrent Neural Networks for Time Series Prediction](https://mlsanity.com/paper/1407.5949/) (2014)
- [Deep Learning for Medical Imaging From Diagnosis Prediction to its Counterfactual Explanation](https://mlsanity.com/paper/2209.02929/) (2022)
- [Counterfactual Graph Transformer for Traffic Flow Prediction](https://mlsanity.com/paper/2308.00391/) (2023)

## Built on by (most cited first, 3 of 3)

- [DyC-STG: Dynamic Causal Spatio-Temporal Graph Network for Real-time Data Credibility Analysis in IoT](https://mlsanity.com/paper/2509.06483/) (2025)
- [Discovering Sparse Counterfactual Factors via Latent Adjustment for Survey-based Community Intervention](https://mlsanity.com/paper/2605.04460/) (2026)
- [A Survey on End-to-End Autonomous Driving Training from the Perspectives of Data, Strategy, and Platform](https://mlsanity.com/paper/2610.00926/) (2026)

## Abstract (arXiv)

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.
