# Generating Counterfactual Explanations Under Temporal Constraints

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

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Builds on 9 of its 23 references that are in the map.
- First posted on arXiv 3 Mar 2025.

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

- [Counterfactual Explanations without Opening the Black Box: Automated Decisions and the GDPR](https://mlsanity.com/paper/1711.00399/) (2017)
- [Multi-Objective Counterfactual Explanations](https://mlsanity.com/paper/2004.11165/) (2020)
- [GeCo: Quality Counterfactual Explanations in Real Time](https://mlsanity.com/paper/2101.01292/) (2021)
- [Finding Regions of Counterfactual Explanations via Robust Optimization](https://mlsanity.com/paper/2301.11113/) (2023)
- [DiCE4EL: Interpreting Process Predictions using a Milestone-Aware Counterfactual Approach](https://mlsanity.com/paper/2107.08697/) (2021)
- [Counterfactual Explanations for Predictive Business Process Monitoring](https://mlsanity.com/paper/2202.12018/) (2022)
- [Monitoring Constraints and Metaconstraints with Temporal Logics on Finite Traces](https://mlsanity.com/paper/2004.01859/) (2020)
- [Monitoring Arithmetic Temporal Properties on Finite Traces](https://mlsanity.com/paper/2211.17166/) (2022)
- [CREATED: Generating Viable Counterfactual Sequences for Predictive Process Analytics](https://mlsanity.com/paper/2303.15844/) (2023)

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

- [Optimal Robust Recourse with Lp-Bounded Model Change](https://mlsanity.com/paper/2509.21293/) (2025)
- [CID: Measuring Feature Importance Through Counterfactual Distributions](https://mlsanity.com/paper/2511.15371/) (2025)
- [Algorithmic Recourse Under Competition](https://mlsanity.com/paper/2609.39877/) (2026)

## Abstract (arXiv)

Counterfactual explanations are one of the prominent eXplainable Artificial Intelligence (XAI) techniques, and suggest changes to input data that could alter predictions, leading to more favourable outcomes. Existing counterfactual methods do not readily apply to temporal domains, such as that of process mining, where data take the form of traces of activities that must obey to temporal background knowledge expressing which dynamics are possible and which not. Specifically, counterfactuals generated off-the-shelf may violate the background knowledge, leading to inconsistent explanations. This work tackles this challenge by introducing a novel approach for generating temporally constrained counterfactuals, guaranteed to comply by design with background knowledge expressed in Linear Temporal Logic on process traces (LTLp). We do so by infusing automata-theoretic techniques for LTLp inside a genetic algorithm for counterfactual generation. The empirical evaluation shows that the generated counterfactuals are temporally meaningful and more interpretable for applications involving temporal dependencies.
