Reproduce “Mechanistic Interpretability for Transformer-based Time Series Classification” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Matīss Kalnāre, Sofoklis Kitharidis, Thomas Bäck, Niki van Stein

Researchers at the Leiden Institute of Advanced Computer Science adapted mechanistic interpretability methods to Transformer-based Time Series Classifiers, showing that early encoder layers are causally dominant and that sparse autoencoders can reveal class-specific temporal motifs. Their approach identified discrete, manipulable internal circuits within these models, with a single early-layer patch restoring true-class probability by approximately 0.89 in misclassified examples.

Key insights

  • Early encoder layers, particularly Layer 0, concentrate the most causal influence, establishing foundational signals for correct classification in Time Series Transformers.
  • Specific attention heads within early layers form sparse, manipulable causal circuits, where even single patches can substantially restore true-class probability in misclassified instances.
  • The aggregation of multiple critical patches can lead to non-additive and sometimes interfering effects, highlighting the complex, non-linear interactions within the Transformer's internal architecture.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.