LaTIM: Measuring Latent Token-to-Token Interactions in Mamba Models

Hugo Pitorro, Marcos Treviso
2/21/2025
cs.CL

No confident code implementation found for this paper.

Abstract

State space models (SSMs), such as Mamba, have emerged as an efficient alternative to transformers for long-context sequence modeling. However, despite their growing adoption, SSMs lack the interpretability tools that have been crucial for understanding and improving attention-based architectures. While recent efforts provide insights into Mamba's internal mechanisms, they do not explicitly decompose token-wise contributions, leaving gaps in understanding how Mamba selectively processes sequences across layers. In this work, we introduce LaTIM, a novel token-level decomposition method for both Mamba-1 and Mamba-2 that enables fine-grained interpretability. We extensively evaluate our method across diverse tasks, including machine translation, copying, and retrieval-based generation, demonstrating its effectiveness in revealing Mamba's token-to-token interaction patterns.

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. Any repos shown below are weak matches — 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{pitorro2025latim,
  title  = {LaTIM: Measuring Latent Token-to-Token Interactions in Mamba Models},
  author = {Hugo Pitorro and Marcos Treviso},
  year   = {2025},
  eprint = {2502.15612},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.15612v2}
}

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

Discussion