Abstract Counterfactual explanations (CFEs) have emerged as a key tool in eXplainable Artificial Intelligence (XAI) for interpreting complex machine learning and deep learning models. However, most CFE methods neglect the high computational cost of generating explanations. This limitation can be particularly severe for high-dimensional data such as time series. Moreover, many time-series CFE approaches treat validity, the requirement that the counterfactual actually changes the model prediction, solely as an objective to be optimized rather than as a strict constraint, often leading to invalid explanations and limiting practical applicability. In this work, we propose FastPACE, an efficient method tailored to the generation of CFEs for time-series classification that includes an invalidity penalty to guide the search, while enforcing validity procedurally. FastPACE substantially reduces the runtime of current state-of-the-art methods without compromising the quality of the explanations. Extensive experiments on datasets from the UCR and UEA repositories show that FastPACE matches, and in several cases improves, the explanation quality of existing approaches while being significantly faster.
Refoyo et al. (Fri,) studied this question.