Mechanistic Interpretability for Transformer-based Time Series Classification

Matīss Kalnāre, Sofoklis Kitharidis, Thomas Bäck, Niki van Stein
11/26/2025
cs.LGcs.AI

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Transformer-based models have become state-of-the-art tools in various machine learning tasks, including time series classification, yet their complexity makes understanding their internal decision-making challenging. Existing explainability methods often focus on input-output attributions, leaving the internal mechanisms largely opaque. This paper addresses this gap by adapting various Mechanistic Interpretability techniques; activation patching, attention saliency, and sparse autoencoders, from NLP to transformer architectures designed explicitly for time series classification. We systematically probe the internal causal roles of individual attention heads and timesteps, revealing causal structures within these models. Through experimentation on a benchmark time series dataset, we construct causal graphs illustrating how information propagates internally, highlighting key attention heads and temporal positions driving correct classifications. Additionally, we demonstrate the potential of sparse autoencoders for uncovering interpretable latent features. Our findings provide both methodological contributions to transformer interpretability and novel insights into the functional mechanics underlying transformer performance in time series classification tasks.

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. 5 weaker matches are 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{kalnre2025mechanistic,
  title  = {Mechanistic Interpretability for Transformer-based Time Series Classification},
  author = {Matīss Kalnāre and Sofoklis Kitharidis and Thomas Bäck and Niki van Stein},
  year   = {2025},
  eprint = {2511.21514},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.21514v1}
}

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/2511.21514.svg)](https://codeofpaper.com/paper/2511.21514)

Discussion