MASCOTS: Model-Agnostic Symbolic COunterfactual explanations for Time Series

Dawid Płudowski, Francesco Spinnato, Piotr Wilczyński, Krzysztof Kotowski, Evridiki Vasileia Ntagiou, Riccardo Guidotti, Przemysław Biecek · 2025

Read MASCOTS: Model-Agnostic Symbolic COunterfactual explanations for Time Series by Dawid Płudowski, Francesco Spinnato, Piotr Wilczyński, Krzysztof Kotowski, Evridiki Vasileia Ntagiou, Riccardo Guidotti, Przemysław Biecek (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-22389.txt.

Introduction

What-if explanations for time series models are generated by MASCOTS, presented by Dawid Płudowski and co-authors in a 2025 paper. Counterfactual explanations show the smallest changes that would alter a model's outcome, which is an intuitive way to understand a decision. For time series, temporal dependence, high dimension, and the lack of a human-friendly representation make that task hard.

MASCOTS works in a symbolic feature space built from a bag of receptive fields and symbolic transforms inspired by symbolic aggregate approximation. That space boosts interpretability while staying faithful to the data and model. Unlike methods tied to model structure or autoencoder sampling, it directly generates diverse counterfactuals in a model-agnostic way. It works on both univariate and multivariate data, and tests cover both.

Catalog record

CREATORDawid Płudowski, Francesco Spinnato, Piotr Wilczyński, Krzysztof Kotowski, Evridiki Vasileia Ntagiou, Riccardo Guidotti, Przemysław Biecek
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE41 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2503-22389

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

MASCOTS: Model-Agnostic Symbolic COunterfactual explanations for Time Series Dawid Płudowski, Francesco Spinnato, Piotr Wilczyński, Krzysztof Kotowski, Evridiki Vasileia Ntagiou, Riccardo Guidotti, Przemysław Biecek Abstract Counterfactual explanations provide an intuitive way to understand model decisions by identifying minimal changes required to alter an outcome. However, applying counterfactual methods to time series models remains challenging due to temporal dependencies, high dimensionality, and the lack of an intuitive human-interpretable representation. We introduce MASCOTS, a method that leverages the Bag-of-Receptive-Fields representation alongside symbolic transformations inspired by Symbolic Aggregate Approximation. By operating in a symbolic feature space, it enhances interpretability while preserving fidelity to the original data and model. Unlike existing approaches that either depend on model structure or autoencoder-based sampling, MASCOTS directly generates meaningful and diverse counterfactual observations in a model-agnostic manner, operating on both univariate and multivariate data. We evaluate MASCOTS on univariate and multivariate benchmark datasets, demonstrating comparable validity, proximity, and plausibility to state-of-the-art methods, while significantly improving interpretability and sparsity. Its symbolic nature allows for explanations that can be expressed visually, in natural language, or through semantic representations, making counterfactual reasoning more accessible and actionable. 1 Introduction Time series classification (TSC) plays a crucial role in various fields, including healthcare, climate science, and engineering. Its wide-ranging applications have driven the development of increasingly powerful predictors capable of achieving remarkable classification accuracy. Both univariate and multivariate time series classification have gained significant research interest, as demonstrated by recent “bake-offs” [ 28 , 26 ] , which periodically benchmark the top-performing classifiers. The findings from these evaluations are consistent: the most effective classifiers are powerful hybrid ensembles, such as MultiRocket-Hydra [ 9 ] , Hive-Cote 2 [ 25 ] , and InceptionTime [ 14 ] . These models leverage both prediction and feature spaces from multiple underlying algorithms, resulting in state-of-the-art accuracy. However, their complexity renders them black-box models, meaning they lack interpretability from a human perspective. Figure 1: A simplified graphical abstract of mascots . Given a time series X classified by a black-box model b as cylinder , X is transformed into a symbolic representation, \mathbf{z} , using the Bag-of-Receptive-Fields (BoRF) [ 29 ] . In this semantic space, X is represented as symbolic subsequences. To identify a candidate counterfactual, the most important positive and negative patterns ( 0,2,2 and 0,1,2 in the illustration) are selected. The negative pattern is then swapped within the time series to generate a candidate counterfactual. If the black-box model’s predicted class remains unchanged, the process repeats. Otherwise, the final counterfactual is returned. This work aims to enhance the interpretability of black-box models in time series classification through Explainable Artificial Intelligence (XAI) techniques [ 5 ] . While XAI offers diverse tools for explaining complex models, most approaches have been developed for tabular or image data, with time series explainability only recently gaining traction [ 31 ] . In this domain, explanations commonly take the form of saliency maps [ 24 ] , highlighting the most relevant part of observations contributing to the classification outcome, or subsequence-based explanations such as shapelets [ 35 ] focusing on significant sub-patterns within a time series. Instead, this work centers on instance-based explanations, where entire time series serve as the primary explanatory objects. Specifically, we focus on counterfactual explanations, i.e., minimal modifications to an input time series that alter the classification outcome of a black-box model [ 32 ] . Counterfactual explanations are particularly powerful because, unlike feature importance methods [ 24 ] , they indicate what must change in a given instance to achieve a different classification result [ 12 ] . They are useful as they facilitate reasoning about the cause-effect relationships between observed features and classification outputs. In this work, we introduce mascots , a novel model-agnostic method for generating counterfactual explanations in time series. mascots leverages symbolic representations to significantly enhance interpretability while maintaining fidelity. As depicted in Figure 1 , mascots initially converts a given time series into a Bag-of-Receptive-Fields (BoRF) representation [ 29 ] , capturing essential symbolic patterns. It then identifies those patterns most strongly influencing classification outcomes, both positively and negatively. By iteratively substituting negative patterns, mascots modifies the original time series until it obtains a valid counterfactual, ensuring an interpretable and robust explanatory process. Our contributions are as follows. (i) Unlike existing methods that rely on model-specific architectures or autoencoder-based sampling [ 34 , 30 ] , mascots operates in a fully transparent manner, making it broadly applicable to predictive time series models without additional constraints. (ii) To the best of our knowledge, mascots is the first approach that employs a symbolic subsequence-based semantic space for explainability in the time series domain, providing a semantic-rich counterfactual generation process that does not depend on nearest unlike neighbors (NUN) [ 6 ] . (iii) mascots facilitates both visual and natural language counterfactual explanations, improving the interpretability of the counterfactual generation process. (iv) Furthermore, mascots enables explanations for state-of-the-art ensemble models, a task where most existing methods fail due to their reliance on internal model structures. Through extensive evaluation on benchmark datasets, we demonstrate that mascots achieves comparable performance to state-of-the-art techniques regarding validity, proximity, and plausibility while significantly improving the sparsity of counterfactual explanations. By bridging symbolic representations with counterfactual reasoning, mascots represents a significant step forward in explainability for time series models. The structure of this work is as follows: Section 2 examines related research on counterfactuals, while Section 3 outlines the background of our proposed methodology. Section 4 elaborates on the approach, followed by experimental results and analysis in Section 5 . Lastly, Section 6 presents the conclusions. 2 Related Works The simplest counterfactual models for time series rely on classical distance-based algorithms, such as K-Nearest Neighbors (KNN) or Nearest Unlike Neighbor (NUN) [ 6 ] , which identify the closest existing instance of a different class. In this category, we find approaches like Native Guides [ 8 ] and TimeX [ 11 ] , where time series are perturbed to generate counterfactuals while adhering to desirable properties such as proximity, sparsity, plausibility, and diversity. However, these approaches are limited to univariate data. CoMTE [ 1 ] extends this framework to multivariate data by modifying time series from the training set, and computing the minimal number of substitutions necessary to change the original classification. Since CoMTE primarily operates by identifying and substituting similar patterns from different classes, it may struggle to produce meaningful counterfactuals when the dataset lacks sufficiently close examples. AB-CF [ 19 ] and DiscoX [ 3 ] take a different approach by focusing on local patterns. They extract fixed-length subsequences using a sliding window or identify discords via the matrix profile [ 36 ] , replacing them with the nearest counterparts from the desired class. Given their emphasis on locality, these methods may fail to capture global temporal dependencies, potentially leading to counterfactuals that are locally valid but globally unrealistic. Finally, in [ 16 ] , KNN is employed to locally and globally tweak time series, altering the outcome of specific black-box models. However, this approach is also restricted to univariate data. Contrary to classical distance-based approaches, our proposal, mascots , does not rely on NUNs or Euclidean distance, as it performs perturbations in a semantic space produced

Read the complete text