Towards plausibility in time series counterfactual explanations

Marcin Kostrzewa, Krzysztof Galus, Maciej Zięba
3/9/2026
cs.LGcs.AIstat.ML

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

We present a new method for generating plausible counterfactual explanations for time series classification problems. The approach performs gradient-based optimization directly in the input space. To enforce plausibility, we integrate soft-DTW (dynamic time warping) alignment with $k$-nearest neighbors from the target class, which effectively encourages the generated counterfactuals to adopt a realistic temporal structure. The overall optimization objective is a multi-faceted loss function that balances key counterfactual properties. It incorporates losses for validity, sparsity, and proximity, alongside the novel soft-DTW-based plausibility component. We conduct an evaluation of our method against several strong reference approaches, measuring the key properties of the generated counterfactuals across multiple dimensions. The results demonstrate that our method achieves competitive performance in validity while significantly outperforming existing approaches in distributional alignment with the target class, indicating superior temporal realism. Furthermore, a qualitative analysis highlights the critical limitations of existing methods in preserving realistic temporal structure. This work shows that the proposed method consistently generates counterfactual explanations for time series classifiers that are not only valid but also highly plausible and consistent with temporal patterns.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{kostrzewa2026towards,
  title  = {Towards plausibility in time series counterfactual explanations},
  author = {Marcin Kostrzewa and Krzysztof Galus and Maciej Zięba},
  year   = {2026},
  eprint = {2603.08349},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.08349v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2603.08349.svg)](https://codeofpaper.com/paper/2603.08349)

Discussion