ConTex: Reformulating Counterfactual Generation For Time Series Forecasting
Not on the map. Why?
Abstract (arXiv)
Decision-making with deep learning-based time series forecasting requires not only accurate predictions but also actionable insights. However, current architectures do not inherently provide such information. Specifically, guidance is needed on how current conditions must be modified to shift from a predicted outcome to a desired future scenario. Counterfactual explanations provide a natural framework for this task, as they represent minimal input changes that alter the model's prediction, indicating when and how intervention is required. Existing approaches rely on instance-wise optimization, leading to inconsistency across instances, high computational costs, and limited applicability in real-time settings. To address these limitations, we reformulate counterfactual generation for time series forecasting as the problem of learning a globally consistent intervention strategy, allowing counterfactuals to be generated through a single shared function. We propose Counterfactual Time Series Explanations (ConTex), a model-agnostic, decomposed architecture comprising a temporal context encoder and a conditional encoder, followed by two heads that capture interventions in terms of temporal relevance and modification strength. This structure overcomes the instability and inconsistency of instance-based approaches by producing targeted, interpretable interventions across time and feature dimensions in a single forward pass, making it suitable for real-time applications. Across multiple forecasting architectures and benchmark datasets, ConTex achieves state-of-the-art validity while generating sparse counterfactuals that minimize the number of necessary interventions. Additionally, our approach reduces computational cost by at least 12-36x compared to instance-wise generation and supports real-time inference at approximately 0.007 seconds.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 21 of its 31 references that are in the map. First posted on arXiv 16 Jun 2026.
Builds on
21 of 31 references.
References · 21
- 2017FiLM: Visual Reasoning with a General Conditioning Layercited by 2,286
- 2022A Time Series is Worth 64 Words: Long-term Forecasting with Transformerscited by 1,981
- 2018An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modelingcited by 1,447
- 2022Are Transformers Effective for Time Series Forecasting?cited by 1,400
- 2017Counterfactual Explanations without Opening the Black Box: Automated Decisions and the GDPRcited by 1,086
- 2017DeepAR: Probabilistic Forecasting with Autoregressive Recurrent Networkscited by 1,004
- 2019Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecastingcited by 748
- 2023Long-term Forecasting with TiDE: Time-series Dense Encodercited by 327
- 2022N-HiTS: Neural Hierarchical Interpolation for Time Series Forecastingcited by 146
- 2020TimeSHAP: Explaining Recurrent Models through Sequence Perturbationscited by 73
- 2020Instance-based Counterfactual Explanations for Time Series Classificationcited by 64
- 2020Counterfactual Explanations for Machine Learning on Multivariate Time Series Datacited by 49
9 more
- 2024A Comprehensive Survey of Deep Learning for Time Series Forecasting: Architectural Diversity and Open Challengescited by 46
- 2022WindowSHAP: An Efficient Framework for Explaining Time-series Classifiers based on Shapley Valuescited by 24
- 2023Self-Interpretable Time Series Prediction with Counterfactual Explanationscited by 24
- 2023Counterfactual Explanations for Time Series Forecastingcited by 10
- 2021Daily peak electrical load forecasting with a multi-resolution approachcited by 4
- 2026What-If Explanations Over Time: Counterfactuals for Time Series Classificationcited by 4
- 2021Electrical peak demand forecasting- A reviewcited by 3
- 2026EXCODER: EXplainable Classification Of DiscretE time series Representationscited by 1
- 2026Navigating Time's Possibilities: Plausible Counterfactual Explanations for Multivariate Time-Series Forecast through Genetic Algorithmscited by 1
Built on by
Not cited yet.