NeurIPS 2026QuestionsPapersAreasAboutMarkdown

On the Recall Scaling Laws in Mamba: A Theoretical and Mechanistic Study via Hashing

Yuval Koren, Assaf Ben-Kish, Raja Giryes, Lior Wolf, Itamar Zimerman

NeurIPS page · OpenReview · Open on the map

Category: Interpretability & Model Adaptation › Transformer Attention Theory · Type: theory · Keywords: associative recall, Mamba, mechanistic interpretability, hashing, scaling laws, theoretical analysis

Areas: Memory › Memory mechanisms › Associative Memory; Interpretability › Mechanistic Interpretability › Mechanistic Interpretability

Summary

The paper introduces recall scaling laws, a theoretical framework that predicts a lower bound on vocabulary size for perfect associative recall in Mamba by modeling its internal hashing mechanism.

Explained to a 5-year-old

The researchers looked at how a type of computer brain called Mamba remembers connections between things. They discovered that Mamba uses a simple trick similar to hashing to store and find those connections. They also created a set of rules that tell us how big the memory can be based on the model's size. Tests showed that these rules match what the computer actually does very well. This helps us understand how powerful such models can become and how to make them better.

Explained to a 5-year-old, longer

A computer model called Mamba is used to understand language. One important skill for such a model is remembering links between different pieces of information. The researchers wanted to find out how Mamba does this remembering. They looked inside the model and saw that it creates simple math functions that act like a hash. This hash helps the model store items and later retrieve them quickly. By studying this hash, they came up with a theory that predicts how many items the model can remember perfectly. The theory says that bigger models with more memory space can remember more things. They tested the theory on real data and found it matches the model's actual performance. The findings show that the model's memory capacity grows in a predictable way. This knowledge can help designers build even smarter language models. It also tells us why some models perform better than others on memory tasks. Overall, the study gives us a clearer picture of how computer brains can store and recall information.

For a technical reader

The paper investigates how Mamba architectures store and retrieve associative information in context, focusing on the capacity of this memory. Through mechanistic analysis, the authors discover that Mamba implicitly learns linear hash functions to implement recall and identify the underlying circuit. Leveraging similarity-preserving hashing theory, they derive a theoretical scaling law that provides a lower bound on the maximum vocabulary size that can be perfectly recalled given state size, context length, and embedding dimensions. Empirical evaluations confirm that this bound is tight and accurately predicts how recall capacity varies with model size and architecture. The work offers both a deeper understanding of Mamba's internal algorithms and a practical tool for estimating memory limits in sequence models.

Problem

How much associative memory capacity do sequence models such as Mamba have, and how does this capacity scale with model size, context length, and embedding dimensions?

Method

The authors perform mechanistic interpretability analysis to uncover that Mamba implements recall via learned linear hash functions, and they construct a theoretical analysis inspired by similarity-preserving hashing and the Johnson-Lindenstrauss lemma to derive scaling relationships for associative recall capacity.

Results

Empirical validation confirms that the derived bound is tight and accurately predicts how associative recall capacity scales with vocabulary size, state size, embedding size, and model architecture.

Contributions

The paper reveals that Mamba implements recall via implicit linear hashing, identifies the underlying circuit, and provides a theoretical scaling law framework that predicts recall capacity limits.

Research questions this paper is counted under

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction