cs.LGNov 9, 2026

Scalable Counterfactual Explanations for Time Series via Policy Learning

Authors: Peiyu Li, Pouya Hosseinzadeh, Soukaina Filali Boubrahimi, Shah Muhammad Hamdi

Organizations: McComish Department of Electrical Engineering and Computer Science, South Dakota State University, Brookings, SD, USA · Department of Computer Science, Utah State University, Logan, UT, USA

Abstract

Generating counterfactual (CF) explanations for time series is challenging due to complex temporal dependencies and the computational inefficiency of traditional instance-specific optimization. We propose a policy learning framework for counterfactual explanation in time series, trained as a one-step contextual-bandit policy-learning problem. By training an actor-critic agent in the latent space of a pre-trained autoencoder, our method learns a transferable policy that captures global structural regularities. Unlike existing methods that rely on iterative optimization for each new input, the learned policy enables direct generation of valid and plausible counterfactuals through a single forward pass, avoiding per-instance optimization at inference time. Experiments on 13 UCR benchmark datasets show that our framework achieves high validity and strong plausibility across multiple anomaly detection metrics. Overall, by decoupling counterfactual generation from per-instance optimization, the proposed method provides an efficient and scalable alternative to existing approaches for time series counterfactual explanations.

Figures & tables

Explore similar work

CardsList
  1. What-If Explanations Over Time: Counterfactuals for Time Series Classification

    Mar 29, 2026Udo Schlegel, Thomas SeidlGraph Counterfactual ExplanationsCounterfactual Explanations

  2. ConTex: Reformulating Counterfactual Generation For Time Series Forecasting

    Jun 16, 2026Jan Voets, Hasan Tercan, Tobias Meisen +1Explainable Time Series ForecastingCounterfactual Explanations

  3. ConceptCF: Concept-based Counterfactuals for the Explainability of Time Series

    Jul 21, 2026Annemarie Jutte, Faizan Ahmed, Jeroen Linssen +1Counterfactual ExplanationsConcept-Based Explanations