LaTIM: Measuring Latent Token-to-Token Interactions in Mamba Models
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.
Community
We introduce a novel token decomposition method that allows users to break down how relevant each context token is towards producing a particular output for Mamba models.
We verify that our attention plots are superior to alternatives through experiments in the synthetic copying, machine translation and retrieval-based tasks from RULER.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Llamba: Scaling Distilled Recurrent Models for Efficient Language Processing (2025)
- Exploring Translation Mechanism of Large Language Models (2025)
- Emergent Stack Representations in Modeling Counter Languages Using Transformers (2025)
- Efficient Language Modeling for Low-Resource Settings with Hybrid RNN-Transformer Architectures (2025)
- LCIRC: A Recurrent Compression Approach for Efficient Long-form Context and Query Dependent Modeling in LLMs (2025)
- Rethinking Addressing in Language Models via Contexualized Equivariant Positional Encoding (2025)
- Tensor Product Attention Is All You Need (2025)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper