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.
