Table of Contents
Fetching ...

EXCODER: EXplainable Classification Of DiscretE time series Representations

Yannik Hahn, Antonin Königsfeld, Hasan Tercan, Tobias Meisen

TL;DR

This work tackles the explainability challenge in time series classification by leveraging discrete latent representations to create structured, compact explanations. It adapts a suite of XAI techniques to discrete codes derived from VQ-VAE, DVAE, and SAX, and introduces a patch-based linkage of codes to $25$-timesteps along with a new Similar Subsequence Accuracy (SSA) metric to quantify explanation relevance. Across Welding, CNC, and ECG datasets, the approach achieves comparable classification performance to raw-space models while yielding more interpretable explanations and higher cross-method agreement in the latent space. The findings suggest a practical pathway to faithful, efficient explanations for time series, with future work focusing on XAI methods specifically designed for discrete spaces and joint learning of representation and classification.

Abstract

Deep learning has significantly improved time series classification, yet the lack of explainability in these models remains a major challenge. While Explainable AI (XAI) techniques aim to make model decisions more transparent, their effectiveness is often hindered by the high dimensionality and noise present in raw time series data. In this work, we investigate whether transforming time series into discrete latent representations-using methods such as Vector Quantized Variational Autoencoders (VQ-VAE) and Discrete Variational Autoencoders (DVAE)-not only preserves but enhances explainability by reducing redundancy and focusing on the most informative patterns. We show that applying XAI methods to these compressed representations leads to concise and structured explanations that maintain faithfulness without sacrificing classification performance. Additionally, we propose Similar Subsequence Accuracy (SSA), a novel metric that quantitatively assesses the alignment between XAI-identified salient subsequences and the label distribution in the training data. SSA provides a systematic way to validate whether the features highlighted by XAI methods are truly representative of the learned classification patterns. Our findings demonstrate that discrete latent representations not only retain the essential characteristics needed for classification but also offer a pathway to more compact, interpretable, and computationally efficient explanations in time series analysis.

EXCODER: EXplainable Classification Of DiscretE time series Representations

TL;DR

This work tackles the explainability challenge in time series classification by leveraging discrete latent representations to create structured, compact explanations. It adapts a suite of XAI techniques to discrete codes derived from VQ-VAE, DVAE, and SAX, and introduces a patch-based linkage of codes to -timesteps along with a new Similar Subsequence Accuracy (SSA) metric to quantify explanation relevance. Across Welding, CNC, and ECG datasets, the approach achieves comparable classification performance to raw-space models while yielding more interpretable explanations and higher cross-method agreement in the latent space. The findings suggest a practical pathway to faithful, efficient explanations for time series, with future work focusing on XAI methods specifically designed for discrete spaces and joint learning of representation and classification.

Abstract

Deep learning has significantly improved time series classification, yet the lack of explainability in these models remains a major challenge. While Explainable AI (XAI) techniques aim to make model decisions more transparent, their effectiveness is often hindered by the high dimensionality and noise present in raw time series data. In this work, we investigate whether transforming time series into discrete latent representations-using methods such as Vector Quantized Variational Autoencoders (VQ-VAE) and Discrete Variational Autoencoders (DVAE)-not only preserves but enhances explainability by reducing redundancy and focusing on the most informative patterns. We show that applying XAI methods to these compressed representations leads to concise and structured explanations that maintain faithfulness without sacrificing classification performance. Additionally, we propose Similar Subsequence Accuracy (SSA), a novel metric that quantitatively assesses the alignment between XAI-identified salient subsequences and the label distribution in the training data. SSA provides a systematic way to validate whether the features highlighted by XAI methods are truly representative of the learned classification patterns. Our findings demonstrate that discrete latent representations not only retain the essential characteristics needed for classification but also offer a pathway to more compact, interpretable, and computationally efficient explanations in time series analysis.
Paper Structure (19 sections, 5 equations, 4 figures, 2 tables, 1 algorithm)

This paper contains 19 sections, 5 equations, 4 figures, 2 tables, 1 algorithm.

Figures (4)

  • Figure 1: Implementation invariance of explanations over all datasets
  • Figure 2: Exemplary SSA Scores with different subsequence lengths (VQ-VAE Transformer on Welding Dataset)
  • Figure 3: Distribution of SSA improvement over random baselines across the CNC, ECG, and Welding datasets. Boxplots show the difference between SSA achieved by each XAI method (SM, IG, LIME, RISE, ATM) and a random baseline (SSA(XAI) - SSA(RND)).
  • Figure 4: Explanations for random samples from CNC (a, d), ECG (b, e), and Welding (c, f) datasets. Top row (a-c): Explanations from best-performing models (via perturbation), with darker colors indicating higher feature importance. Bottom row (d-f): Explanations with highest Similar Subsequence Accuracy (SSA), highlighting the subsequence used for SSA calculation. SSA percentages and neighbor counts are shown below (d-f).