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 2026
TL;DR. Using mechanistic interpretability, we show Mamba recalls via hash-like mechanisms and derive scaling laws that predict its recall capacity.
Abstract. Associative Recall (AR) is the cognitive ability to learn and retrieve links between items in memory. In NLP, AR is used as a benchmark for evaluating the in-context memory capacity of architectures such as Mamba, and has been found to strongly correlate with language modeling performance. This paper explores AR from the perspective of mechanistic interpretability, aiming to reverse-engineer the exact internal algorithm used by Mamba to perform recall. Our key insight is that Mamba performs recall by implicitly learning linear hash functions, and we identify the low-level circuit that enables this behavior. Building on these findings and inspired by theoretical tools in similarity-preserving hashing, such as the Johnson–Lindenstrauss lemma, we develop a theoretical framework for analyzing AR, which we term \textit{Recall Scaling Laws}. Given the vocabulary size and the number of facts in context, this framework allows us to (1) predict the embedding and state dimensions required for Mamba to achieve perfect recall, (2) predict recall success probability given the model dimensions, and (3) analyze multi-layer models and multi-head SSM patterns. Empirical results show that our theoretical findings are accurate and predictive, offering insights into how AR capacity scales with vocabulary, state, embedding size, and architecture.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:42 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
The paper focuses on Mamba architecture, and provides theoretical analysis for why and when it can solve AR an MQAR. They provide a mechanism of how Mamba can efficiently solve such tasks (with small hidden dimension N), and perform mechanistic interpretability (essentially show that learned Mamba satisfies a particular property that is also satisfied by their algorithm).
The reviewers generally praise the contributions: improved understanding of recall abilities on modern models. Specifically for Mamba, recall should be hard due to limited hidden state dimension. The "mechanistic interpretability" experiments are also valued. There are a few (somewhat smaller order) concerns: 1) focus on simple Mamba model, 2) inadequate comparison to and acknowledgement of prior literature.
The main concern that this AC have is that the theoretical results (recall scaling laws) are misleading in the way they are stated. The main theorem is 3.2 (further expanded in theorems 4.1, 4.2). Theorem 3.2 states the hidden state as being N=O(log V) for V=vocab size. But inspecting the actual bounds (Theorem 4.1), one actually requires N=Omega(N^f log V) or Omega(L * log V), i.e., scaling linearly with the sequence length. That is a huge difference: the main concern with Mamba is that with N<<L it can't remember the entire sequence in it's hidden state to do AR. This paper suggests that it can, which is misleading. There's possibly further value in the remaining statement that Mamba with N = linear in sequence length can solve AR/MQAR, as well as the mechanistic interpretability (though 11mg's comments weaken that), but I find this to be too thin to merit acceptance in the current form of the paper.
Final justification
Given authors' promise to pivot the paper to clarify what is being improved precisely (from V^2 or N_f^2 to ~N_f), I'm recommending accepting the paper.
Read meta-review
Meta-review
The paper focuses on Mamba architecture, and provides theoretical analysis for why and when it can solve AR an MQAR. They provide a mechanism of how Mamba can efficiently solve such tasks (with small hidden dimension N), and perform mechanistic interpretability (essentially show that learned Mamba satisfies a particular property that is also satisfied by their algorithm).
The reviewers generally praise the contributions: improved understanding of recall abilities on modern models. Specifically for Mamba, recall should be hard due to limited hidden state dimension. The "mechanistic interpretability" experiments are also valued. There are a few (somewhat smaller order) concerns: 1) focus on simple Mamba model, 2) inadequate comparison to and acknowledgement of prior literature.
The main concern that this AC have is that the theoretical results (recall scaling laws) are misleading in the way they are stated. The main theorem is 3.2 (further expanded in theorems 4.1, 4.2). Theorem 3.2 states the hidden state as being N=O(log V) for V=vocab size. But inspecting the actual bounds (Theorem 4.1), one actually requires N=Omega(N^f log V) or Omega(L * log V), i.e., scaling linearly with the sequence length. That is a huge difference: the main concern with Mamba is that with N<<L it can't remember the entire sequence in it's hidden state to do AR. This paper suggests that it can, which is misleading. There's possibly further value in the remaining statement that Mamba with N = linear in sequence length can solve AR/MQAR, as well as the mechanistic interpretability (though 11mg's comments weaken that), but I find this to be too thin to merit acceptance in the current form of the paper.
Final justification
Given authors' promise to pivot the paper to clarify what is being improved precisely (from V^2 or N_f^2 to ~N_f), I'm recommending accepting the paper.
4 comments
Thanks for the update. I now see the main improvement here, and acknowledge its significance. That said, this perspective is NOT mentioned explicitly anywhere in the paper, as far as I can tell -- and it should be, as it is the main theoretical contribution (in my opinion).
To confirm I understand correctly, you are saying that:
- the default exact statement requires D, N ~= V (or N_f, the "effective" vocab size). Thm 3.1
- hence the state space is DN = V^2 (or about N_f^2),
- the exact compressive circuit gets D and N ~= N_f and hence still DN ~= N_f^2 (Thm 3.2, Lemma 4.1)
- statements 4.2 and 4.3 show that DN ~=N_f is enough (e.g., D,N ~= sqrt{N_f}).
This is genuine improvement indeed, and the results should be presented correspondingly. This is very hard to extract from the manuscript as currently written.
Follow-up questions:
- is it clear that D, N = V (or N_f) is needed for default exact statement ("perfect non-compressive recall circuit") ? Perhaps there's another exact circuit that can obtain DN= O(V) ?
If you could provide such a lower bound, that would be a really strong argument for analyzing the compressive one, justifying your Thm 4.2/4.3.
Response to the Area Chair - Part 1/2
Part 1/2
Dear Area Chair,
We appreciate your fast response and your openness in re-examining the contribution. If any further clarification or correction seems needed after reading this two-part response, we would greatly appreciate a quick note, so we can respond before the approaching deadline.
We fully agree with you that the following ladder of required state size is the main theoretical contribution of the paper, and that it should be presented explicitly as such: from (exact, non-compressive; Thm 3.1), through (exact, worst-case; Lemma 4.1), down to (high-probability, mean-case; Thm 3.2, Thm 4.2, Rem 4.3), together with an information-theoretic floor (see below) showing the last level is optimal. This ladder will be stated and clearly emphasized in the revised manuscript, via the suggested edits listed below. Importantly, this clarification does not affect our main contribution or the real-world implications of our results (Sec. 3, Sec. 4): the validated recall scaling laws hold for actual trained Mamba models, as we showed both mechanistically (Sec. 3.2) and empirically across all accuracy grids, scaling curves, and multi-layer / multi-head experiments (Sec. 5).
Specifically, we will clarify these points in the revised manuscript via the following dedicated edits:
- Rewrite "our main contributions" paragraph (lines 42-52) around the ladder above; emphasize that required model dimensions are linear in , logarithmic in .
- Add a "roadmap and main results" paragraph, optionally containing the table below, to make the exact / compressive / high-probability hierarchy explicit (as well as mean-case / worst-case).
- Restate Thm 3.2 with the explicit dependence (as in our previous comment).
- Add a new information-theoretic Lemma (see below) and a remark that the validated law sits at the information-theoretic floor.
Let us now refer to your updated understanding of the paper (your 4 bullets). As before, we use the standard MQAR setting , so all requirements are stated in terms of alone.
Your insights above are generally correct, up to several gentle corrections below.
- The default exact statement requires D, N ~= V. (Thm 3.1)
- Hence the state space is ND = V^2,
- The exact compressive circuit gets D and N ~= (N_f logV), and hence still ND ~= (N_f logV)^2 (Lemma 4.1)
- Statements 3.2, 4.2 and 4.3 show that ND ~= (N_f logV) is enough (e.g., D,N ~= sqrt{N_f logV}).
The required corrections are:
- Generally, cannot replace (see Part 2/2).
- The construction of Thm 3.1 uses , but this is sufficient, not necessary, even for exact recall (see our answer to your follow-up Q1 below).
- Only Lemma 4.1 (which demands perfect recall on every context, worst-case) sits at the level. The revised Thm 3.2 claims recall w.h.p. at , so it belongs on your fourth bullet, together with Thm 4.2 / Rem 4.3.
Paper roadmap.
To clarify the importance of our results and to make clear which requirement holds in which setting, we present the following paper roadmap:
- Exact recall can be achieved by a non-compressive circuit, with (Thm 3.1; sufficient).
- Exact recall can be achieved by a compressive circuit, with (Lemma 4.1; sufficient, worst-case).
- High-probability recall can be achieved by a compressive circuit, with (Thm 3.2, Thm 4.2, Rem 4.3; mean-case).
To complete the picture, we further show the existence of lower bounds. The full roadmap is provided in the following table:
Table: paper roadmap. Each row states only the direction the statement actually proves.
| Statement | Guarantee type | Direction | Requirement | Scope / Notes |
|---|---|---|---|---|
| Thm 3.1 | perfect, every context | sufficient only | a specific construction, explicit, with | |
| Lemma 4.1 | perfect, every context | sufficient only | a specific construction (JL route) | |
| Thm 3.2 (revised) | w.h.p. | sufficient only | a specific construction | |
| Rem 4.4 (derived from Thm 4.2 / Rem 4.3) | w.h.p., success prob | necessary (within the law) | derived from Thm 4.2's law; shares its assumptions | |
| New Lemma (proposed) | success prob | necessary, unconditional | any fixed-state architecture with bits per state entry; exact statement (see Q2 in Part 2/2) |
We will add this roadmap to the revised manuscript.
The main correction above ( cannot replace ) and your two follow-up questions are addressed in Part 2/2.
Response to the Area Chair - Part 2/2
Part 2/2
Why cannot replace .
cannot serve as an "effective vocab size" instead of , because the recall circuit must handle all possible AR/MQAR contexts, rather than a single drawn context of key-value pairs: the weights (the embeddings , , hence the effective operators , ) are fixed before the context is drawn, and any of the tokens can appear as a key, value, or query. The two parameters play different, non-interchangeable roles: sets the per-token representation cost, while sets how many tokens must coexist in the state. Concretely, in the non-compressive circuit (Thm 3.1) each key/value is represented by a one-hot -dimensional vector; in the compressive circuit (Thm 3.2, Lemma 4.1) each is hashed to a -dimensional nearly-orthogonal code. The residual is irreducible (all tokens must remain distinguishable):
- Information: each value is one of symbols, carrying bits regardless of . (For the full statement, see Q2 below.)
- Packing: the maximum number of unit vectors in with pairwise inner products at most is , so hashing all keys/queries into the state space forces . Similarly, embedding all values into forces . In both cases the JL construction is essentially optimal.
- Readout: the retrieved value competes against all output logits, which is the origin of the noise term in Thm 4.2.
The new -dependence experiment we ran during this rebuttal (see tables in our response to Reviewer nPJH, W3/Q1) confirms this directly: varying up to 50k at fixed model dimensions (, ) and fixed (four values of ; see table), indeed is linear in rather than . Thus, the experimental result itself distinguishes from . We will include these -vs.- insights, with the new experiment, in the revised manuscript (or a dedicated appendix).
Q1. Is needed for exact recall?
No. is sufficient, not necessary. Lemma 4.1 itself is an exact statement: JL matrices satisfying the pairwise bounds exist deterministically, and with them recall is perfect (probability 1) on every context at , e.g. below. In particular, an exact circuit with exists whenever . So the exact-recall requirement was never tied to polynomially; it is tied to , with entering only through the hash width .
A concrete exact-recall example (compressive circuit, explicit constants). Take ; then , hence for every , and Lemma 4.1 guarantees perfect AR recall, deterministically, for every context. (Thm 4.2 and Rem 4.4 allow smaller under high-probability rather than exact recall.)
Q2. Can we provide a lower bound on for exact / perfect recall? (justifying the compressive analysis)
Yes. We formalize the bound from our previous comment as a new Lemma, to be added to the revised manuscript:
Lemma (information-theoretic lower bound). Consider a model with a finite state size, where the context is summarized in a hidden state of scalar entries at bits of precision each (for simplified Mamba, ). If such a model solves AR over contexts with facts drawn uniformly from a vocabulary of size with success probability , then . For simplified Mamba, this reads at fixed precision .
The proof is short (Fano's inequality, applied per fact): the state at the end of the key-value segment is a deterministic function of the context, each queried value must be decodable from it, a state of entries at bits carries at most bits, and for independent uniform values the per-fact information adds up.
This answers your question in the strongest sense: it applies to any fixed-state architecture, exact or high-probability, so no alternative circuit can escape state memory linear in . Moreover, our validated law (Rem 4.3) matches this floor up to a small explicit constant, so the compressive circuit is within a constant factor of the information-theoretic optimum, precisely the justification for analyzing it (Thm 4.2/4.3) rather than the non-compressive one.
Again, we would gladly clarify any remaining points before the deadline; please let us know.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
In this paper, the authors study in-context memory capacity of Mamba models by reverse-engineering their internal algorithms for associative recall and Multi-Query Associative Recall. By using mechanistic interpretability, the paper attempts to prove that Mamba implicitly learns similarity preserving linear hash functions. The authors first create a simplified linear Mamba and then show that the SSM update rule functions as a compression-decompression scheme. It is mapped to the Johnson-Lindenstraus lemma to theoretically bound the embedding dimension and state size required for perfect recall. They also provide equivalent analysis for multi-layer and multi-head models.
Following are the claims for the paper: Claim 1: Mamba learns an implicit hash-table retrieval algorithm Claim 2: Recall capacity follows JL compression bounds Claim 3: Recall also obeys the scaling laws Claim 4: Layer and head scaling reduce to effective state size
Strengths and weaknesses
Strengths of the paper:
- The authors provide mechanistic proof that the model acts like a hash table by explicitly constructing the exact required weights. This integration of mechanistic interpretability and theory is strong.
- In Section 3.2, the authors find a critical issue of non-uniqueness of solutions in their mechanistic interpretability due orthogonal linear matrix . To address this issue, two invariant operators and . Given that, equation 11 establishes an isomorphism between their theoretical circuit and the actual learned weights.
- The authors extend their single layer theory to ulti-layer, multi-head capacity.
- The experiments are carried out with varying embedding dimension, state size, effect of additional layers, multi-head models etc., thus being exhaustive.
- The appendix is thorough and provides a lot of information, including detailed step-by-step proofs, algorithms, training and implementation details, hyperparameters, etc.
Weakness of the paper:
- It seems the core mathematical proof are built on the simplified linear mamba architecture where gating, discretization, nonlinearities are removed. This helps simply the framing and the subsequent theoretical claims. However, the results show alignment with the full model.
- It is unclear if Mamba learns low-rank memory or compressed attention instead of just hashing. There is no discussion/evidence about this.
- The experiments do not evaluate the scaling laws and other claims on larger vocabularies and realistic corpora.
Originality: The mechanistic interpretability use to prove that Mamba implicitly learns similarity preserving linear hash functions seems quite original
Questions
How would the scaling laws and other claims hold larger vocabularies and realistic corpora? Adding an experiment would help elevate the paper with real world evaluations.
Limitations
yes
Final justification
The authors have addressed my concerns with clean experiments and numbers. I don't have any more concerns
Formatting concerns
Did the authors reduce the spacing between lines? I am not sure it is allowed if the authors did so. I will leave the decision to the area chair.
2 comments
Rebuttal
Thank you for the thorough review and for pointing out the formatting issue directly. In addition to our responses to your inquiries, you may also be interested in our reply to the AC, which is included at the end of our response to Reviewer 11mg.
W1. Proofs are for the simplified model; full-model results show alignment, not proof. (See our response to Reviewer 4GL6, W2, for the component-by-component mechanistic argument: gating, discretization, and Conv1D each improve constants for a different reason, but none removes the underlying -width bottleneck.) We agree, and should state this more explicitly: the theory covers the simplified model, and full-model agreement is empirical evidence rather than a formal equivalence, which is standard practice in this line of work. To make the intuition more concrete, there is an informal argument from viewing recall as a signal-to-noise problem: the margin works out to roughly with , which is a plausible reason nonlinearities shift the constant rather than the exponent.
W2. Hashing vs. low-rank memory or compressed attention, no discriminating evidence. or, equivalently, in the general rotated form. Thus, the attention weight is the inner product of the hashed key and query, computed using the same operator under either interpretation.
Both readings are supported by the same evidence in the paper. The matrices and , computed from the trained weights, match the block structure predicted by the JL circuit almost exactly (Fig. 12). The resulting attention map also reproduces the non-compressive one (Fig. 10). This is the functional consequence of the former observation, rather than independent confirmation of a different mechanism.
Treating low-rank memory as a distinct third option adds nothing beyond what (D,N<V) already implies. Moreover, such a mechanism is not readily implementable here: and are fixed after training and reused for every newly sampled sequence, so they cannot adapt their basis to the particular facts in each sequence.
As an additional analysis, we could compare the singular-value spectra of the learned (E) and (\widetilde{E}) with those of random JL projections. Under the JL interpretation, we would expect graceful degradation as the sketch dimension decreases, rather than a sharp rank cutoff. We have not yet run this experiment.
W3 / Q1. No larger vocabularies or realistic corpora. We ran new MQAR experiments at vocabulary sizes up to 50k and sequence lengths up to 4k (), holding fixed:
| V | L=1000 | L=2000 | L=3000 | L=4000 |
|---|---|---|---|---|
| 1K | 0.95 | – | – | – |
| 1.5K | 0.91 | – | – | – |
| 2.4K | 0.89 | 0.54 | – | – |
| 3.7K | 0.83 | 0.47 | 0.27 | – |
| 5.7K | 0.80 | 0.40 | 0.21 | 0.13 |
| 8.8K | 0.76 | 0.38 | 0.18 | 0.10 |
| 13.6K | 0.68 | 0.31 | 0.13 | 0.07 |
| 21K | 0.62 | 0.24 | 0.12 | 0.06 |
| 32K | 0.58 | 0.20 | 0.09 | 0.05 |
| 50K | 0.52 | 0.15 | 0.07 | 0.04 |
The same data, linearized ( vs. ):
| L=1000 | L=2000 | L=3000 | L=4000 | |
|---|---|---|---|---|
| 2.63 | 1.61 | – | – | – |
| 2.71 | 1.34 | – | – | – |
| 2.79 | 1.22 | 0.11 | – | – |
| 2.87 | 0.97 | −0.07 | −0.60 | – |
| 2.94 | 0.85 | −0.27 | −0.81 | −1.11 |
| 3.01 | 0.70 | −0.32 | −0.93 | −1.29 |
| 3.08 | 0.47 | −0.50 | −1.13 | −1.45 |
| 3.15 | 0.30 | −0.69 | −1.19 | −1.51 |
| 3.22 | 0.21 | −0.83 | −1.35 | −1.66 |
| 3.29 | 0.06 | −1.02 | −1.47 | −1.78 |
Across all four sequence lengths, behaves almost exactly as the theory predicts: linear in , with fitted slopes = 2.32, 2.19, 2.00, and 1.82 for = 1000, 2000, 3000, 4000 respectively ( in every fit), all close to the theory's , indicating that recall degrades linearly in rather than dropping off in some other way. The intercept decreases with , consistent with . The law holds all the way out to realistic vocabulary sizes, not only the smaller tested in the main paper. For realistic corpora specifically, see our pretrained-model results above (response to Reviewer 4GL6, W1/Q1). We are happy to include this vocabulary/length sweep as a new appendix.
W4. Possibly reduced line spacing. The reviewer is correct, and we appreciate the direct flag. This was not intended as a way to gain space, and we will restore normal spacing and re-fit the page count in the revision.
Thank you for the clear rebuttal and performing the experiments and providing the numbers. I hope you can add the experiments in the camera version
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 4/4
- Clarity
- 3/4
- Significance
- 4/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper provides a mechanistic study of how (simplified) Mamba models perform associative recall (AR / MQAR), and provides theoretical + empirical analysis of the recall capacity and how it depends on architecture and problem parameters.
Strengths and weaknesses
Understanding the in-context recall abilities of language models is an important question in the science of deep learning, and the paper provides a careful study of this question in controlled settings, along with extensive theoretical and empirical analysis via mechanistic interpretability and scaling laws. The paper is well-written.
A few things could be improved:
-
The paper is framed as if it focuses on the Mamba architecture, but essentially all of the analysis seems to focus on a "simplified Mamba" architecture which seems to be just a linear attention model (with a convolution just before attention), and ignores other specifics of Mamba such as gating/etc. Changing paper framing to generic linear attention could also increase its scope to more general architectures.
-
Inspecting weight matrices and activations in vocabulary space is not a novel idea, see e.g. these works, though using this to visualize the memory of SSM hidden states does seem interesting and novel to the best of my knowledge. Note also that there has been previous work on mechanistic interpretability of Mamba on associative recall problems (e.g. here), though it does not address capacity scaling / sketched embeddings.
-
Other works have studied capacity of similar memory mechanisms and seem to be missing from related work, e.g. this work for similar SSM-like architectures, or this for in-weight memories.
Questions
How would the provided analysis extend to more general variants of MQAR, e.g. where the keys may appear multiple times in the prompt, perhaps with additional irrelevant noisy tokens?
Limitations
yes
Final justification
Thanks you for the response, I remain in support of acceptance.
Formatting concerns
n/a
1 comment
Rebuttal
Thank you for the careful review and the framing suggestion.
W1. Reframe around linear attention, not just Mamba. (See our response to Reviewer 4GL6, W2, for why gating, discretization, and Conv1D specifically improve constants rather than the asymptotic scaling.) This is a fair point, and we agree: the model we analyze is linear attention with a preceding short convolution, which also covers GLA-style architectures, and we will note this more clearly. We would still like to keep Mamba as the paper's framing, since the mechanistic-interpretability experiments are run on trained Mamba specifically, and the convolution is not incidental there: removing it breaks recall in our ablations. We will describe the model explicitly as simplified Mamba, i.e. linear attention with a preceding conv, so both points are clear at once.
W2. Vocabulary-space inspection is not new; prior Mamba interpretability exists. We agree that the projection technique itself is not novel: we will add the works linked in the review, since they inspect transformer weights and activations in embedding space in a similar way, along with the prior Mamba-specific mechanistic-interpretability work also linked there. What we consider new here is not the inspection technique but the invariant operators and , which resolve the non-identifiability of the learned weights (the same circuit can be realized by many different orthogonal reparameterizations) and allow the capacity-scaling law to be checked directly against trained weights. That combination is absent from the prior Mamba interpretability work we are aware of.
W3. Missing related work on capacity of similar memory mechanisms. We agree that this is a gap on our current manuscript. We will add the two works linked in the review to the related-work section, since one addresses capacity of similar (SSM-like) memory mechanisms and the other in-weight memory capacity, and position our contribution against them: the latter in particular shows in-weight storage capacity scaling linearly with parameter count, whereas our result is about in-context KV capacity, scaling with , with an explicit constant and a verified mechanism rather than a parameter-count bound.
Q1. Repeated keys and noisy tokens. This is the same material as our answer to Reviewer 4GL6, Q3: single-layer accuracy tracks under repeated keys, while depth recovers near-perfect recall via the overwrite mechanism described there. Irrelevant noisy tokens are a related but distinct case we have not run separately; we would expect them to be handled the same way, since the mechanism only responds to genuine key tokens, but we do not have that experiment available yet.
We use the space below to share our reply with the AC, as it can only be posted confidentially.
Dear Area Chair,
Thank you for engaging closely with the theorem statements. In short: we agree that Theorem 3.2, as currently worded, is misleading: its unqualified "" hides the dependence on the number of facts . But this is a framing inaccuracy localized to that single statement; the paper's mathematics is otherwise exact and internally consistent, and the constraint you point to is information-theoretically unavoidable for any fixed-state architecture.
Throughout, we assume the standard MQAR setting (Arora et al., 2023; see App. B and derivations in App. F); since , all requirements below are stated in terms of alone.
What the paper states.
- Thm 3.1: exact statement for an ideal circuit at : recall probability ; flagged as impractical.
- Thm 3.2: qualitative compressive circuit, stated as " solves MQAR w.h.p." (the misleading wording).
- Lemma 4.1: exact worst-case sufficient conditions for perfect recall; in the large- regime they amount to for both AR and MQAR. Deliberately loose: all noise terms are stacked additively (triangle inequality + union bound).
- Thm 4.2, Rem 4.3: the mean-case law, accounting for noise cancellation: , for AR, for MQAR; this is the result every accuracy grid and collapse plot in the paper validates.
- Rem 4.4: solving AR with probability requires .
Consistency. Except for Thm 3.2's wording, these results are mutually consistent, and none claims recall with state independent of : worst-case ; mean-case . Concretely, at : Lemma 4.1 (worst-case) gives , linear in (precisely the meta-review's figure), while Thm 4.2 / Rem 4.4 (mean-case) give , sub-linear. The " linear in sequence length" reading takes the loose lemma's sufficient condition as the actual requirement; the validated law is its square root per dimension.
The linear-in- cost is an information-theoretically unavoidable bound. We agree that Mamba's fixed-size state cannot hold arbitrarily many facts: facts carry bits, while the hidden state has finite-precision entries; this gives as a floor for any architecture, which no theorem could avoid. Our contribution is the exact boundary: the validated law sits at this floor with an explicit constant, verified mechanistically and empirically. The remaining true statement is stronger than " linear in sequence length": the product is linear in , so for instance at each dimension grows only as .
The fix. Thm 3.2's statement gives only the -scaling, valid only at fixed ; a reader stopping there would draw exactly the conclusion you describe. We will restate it as:
Theorem 3.2 (revised). Given an MQAR task with vocabulary size , facts and context length , a single-layer simplified Mamba with dimensions satisfying (e.g. ) can solve the task with high probability. For a fixed number of facts , this reduces to . (See Thm 4.2 for the quantitative law.)
We will also add a remark on the information-theoretic floor, and propagate the explicit dependence to the abstract and introduction, so the laws are never presented as scaling in alone.
Simplified Mamba. The simplification isolates the S6 layer, the only component mixing information across tokens, making the analysis tractable. Gating, discretization, and Conv1D improve constants but do not remove the -width bottleneck, and the full nonlinear model empirically collapses onto the same law with a better constant (see response to Reviewer 4GL6, W2).
Prior literature. Appendix I already gives a six-point comparison with the closest work, Huang et al. (2025): tighter bounds, trained-weight validation, scaling laws, multi-layer and multi-head extensions, and a minimality ablation. We will surface a condensed version in the main-text related work, and add the references linked by reviewer 11mg.
All three reviewers independently rated the paper 5 (Accept), and the meta-review calls their remaining concerns "somewhat smaller order"; with Theorem 3.2 restated, we believe what remains is a solid contribution: the first constant-level, empirically validated recall law at the information-theoretic bound, with a mechanistically verified circuit and multi-layer/multi-head extensions. Thank you for the careful reading, which will make the headline claim more precise.
- Rating
- 5/6
- Confidence
- 2/5
- Quality
- 4/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- theory
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The paper studies associative recall in Mamba, mainly on AR/MQAR synthetic recall tasks. Its central idea is that Mamba solves recall by learning a hash-like compressed key-value memory: keys/queries and values are projected into lower-dimensional spaces, stored in the SSM hidden state, matched by approximate inner products, and decoded back to vocabulary space. The authors connect this to the Johnson–Lindenstrauss lemma and derive recall scaling laws predicting how recall depends on vocabulary size , number of facts, embedding dimension , state size , number of layers, and multi-head SSM patterns
The paper then derives a non-compressive exact circuit and a more realistic compressive circuit where can solve MQAR with high probability under JL-style approximate orthogonality assumptions.
Empirically, the authors show that the theory aligns with trained simplified Mamba models and full Mamba models on accuracy grids; they also find an inverse tradeoff, scaling-curve collapse, layer scaling via effective state size, and improved recall only for certain multi-head pattern.
Strengths and weaknesses
Strengths
-
The main strength is the tight connection between mechanism and theory. The paper does not only propose an abstract bound; it also gives a concrete circuit and tries to verify that trained models implement an equivalent computation. The use of invariant effective operators is a good way to handle non-identifiability of learned weights.
-
A second strength is the interpretability of the hidden state. The paper argues that the SSM state behaves like a compressed key-value table, and then projects it back to vocabulary space to recover an interpretable table-like structure. This is a compelling mechanistic story: the hidden state itself looks random, but after the right decompression it resembles the original key-value memory.
Weaknesses
-
The paper is centered on synthetic AR/MQAR tasks. These are useful for studying memory capacity, but the connection to natural language modeling and realistic long-context behavior remains mostly indirect.
-
The theory also relies on simplified Mamba variants, where several components of the full architecture are removed or idealized. The full-model experiments help, but they do not completely explain the role of gating, nonlinearities, and other architectural details.
Questions
- Can the proposed scaling laws predict behavior on more natural long-context or language-modeling tasks?
- How reliably do trained models converge to the proposed mechanism across seeds, especially near the capacity boundary?
- Does the same mechanism appear when keys are repeated, noisy, semantically structured, or ambiguous?
Limitations
Yes
Final justification
I maintain my Accept recommendation.
The rebuttal resolves or partially resolves several issues: the seed analysis reduces concern about best-of-seeds reporting, the repeated-key experiments strengthen the mechanistic story, and the clarification to Theorem 3.2 addresses a potentially misleading statement by making the -dependence explicit.
The AC discussion also clarifies the significance of the main theoretical contribution: the improvement from exact/worst-case scaling toward the mean-case law should be presented much more clearly. However, some concerns remain unresolved, including limited transfer to pretrained language models, only partial theoretical treatment of full Mamba components, and the absence of a lower bound ruling out more efficient exact circuits.
I weigh the core theoretical/mechanistic contribution and empirical validation strongly enough to support acceptance. The remaining issues affect clarity, scope, and broader generality, but do not undermine the main contribution within controlled associative-recall settings.
Formatting concerns
No violations of formatting or anonymity.
3 comments
Rebuttal
Thank you for the detailed and constructive review. In addition to our responses to your inquiries, you may also be interested in our reply to the AC, which is included at the end of our response to Reviewer 11mg.
W1. Synthetic tasks vs. natural language. We agree that the direct evidence here is limited to controlled synthetic tasks. This is a deliberate choice: studying expressivity where the ground truth is known is what allows a clean comparison between theory and practice, and it follows precedent in this line of work. The language modeling connection is not absent, however: our multi-head ordering result already matches the perplexity ablations reported for Mamba-2 (Dao et al., Table 5). Due to this question, we have conducted 4 zero-shot associative-recall experiments on natural-language-trained models, with varying size, Mamba2-370M to Mamba2-2.7B, evaluating accuracy as the number of key-value pairs to remember () grows:
| 10 | 30 | 50 | 70 | 90 | 110 | 130 | 150 | 170 | 190 | 210 | 230 | 250 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Mamba2-780M accuracy | 1.00 | 0.98 | 0.94 | 0.79 | 0.66 | 0.59 | 0.46 | 0.37 | 0.28 | 0.24 | 0.18 | 0.15 | 0.11 |
(All 4 Mamba2 sizes behave similarly: accuracy declines with in essentially the same way regardless of parameter count, with no consistent ordering by size.) This gap appears architecture-specific and is consistent with Ben-Kish et al. (COLM 2025); we regard closing it as a genuinely open problem rather than something this paper resolves.
W2. Role of gating and nonlinearities. We do not see a mechanism by which gating, discretization, or Conv1D would change the asymptotic scaling rather than the constant:
- Gating can suppress nuisance transitions and improve selectivity, but at write time the model does not know which key will later be queried, so every key-value pair remains potentially relevant: it cannot safely discard a nontrivial fraction of stored facts, and the -many associations still have to be superposed into the same recurrent state.
- Discretization faces a similar limit: in AR/MQAR, keys and values are exchangeable, so there is little symmetry-breaking signal that would let the model route a privileged subset of facts into a qualitatively different dynamical regime; it can improve conditioning, but we do not see evidence that it creates a distinct asymptotic retrieval mechanism here.
- Conv1D is the exception in terms of practical importance (removing it breaks recall completely in our ablations), but its role is to align and place information before it is written into the recurrent state, not to add memory of its own: it still feeds into the same single bottleneck of width .
Empirically, this matches what we observe: the full nonlinear model collapses onto the same 1D law as the linear theory, with a better constant, and increasing , , or shifts recall the same way in both models rather than escaping the same one-dimensional collapse; further gating, nonlinearity, and bias ablations show the same pattern. We see the simplified model as a theory of the leading-order scaling law, with the full architecture contributing finite-size constant-factor gains, not a demonstrated change in asymptotic regime.
Q1. Do the laws predict natural long-context or LM behavior? Partly. The multi-head ordering prediction already correlates with real LM perplexity trends - see 5.4, line 313. However, direct transfer of the synthetic AR law to pretrained LLMs does not hold, for the architecture-specific reasons above - see, again, our detailed answer above to W1.
Q2. Seed reliability near the capacity boundary. For the linear model, optimization is close to deterministic: we trained a single seed per throughout, so the reported phase boundary is not a best-of-seeds artifact. For the full nonlinear model we did use best-of-5 near the boundary. To make this concrete, we ran two additional experiments: a single-seed grid, and a second grid with five seeds per point, where a seed is counted as "converged" if it reaches accuracy at least 0.1. Binning grid points by their single-seed accuracy regime and estimating, from the two experiments, both the per-seed convergence rate and the probability that at least one of five seeds converges:
| Accuracy regime | 1-seed convergence rate | Best-of-5 convergence rate |
|---|---|---|
| (0.00, 0.25) | ~75% | ~95% |
| (0.25, 0.50) | ~75% | ~100% |
| (0.50, 0.75) | ~85% | ~100% |
| (0.75, 1.00) | ~95% | ~100% |
A single seed is noticeably less reliable right at and below the boundary, and steadily more reliable as accuracy rises; taking the best of 5 seeds closes most of that gap, though not quite all of it right at the bottom, which is why best-of-5 sharpens the transition rather than manufacturing it.
Q3. Repeated keys. We agree that this generalization beyond MQAR is important. In response to this request, we ran experiments on MQAR with repeated keys, where each key appears times in the context, each time paired with a different value, and the model must retrieve the value from the key's last occurrence. A single layer struggles with this task: every occurrence writes its value into the same hidden-state slot, so the slot ends up holding a roughly equal mix of all values instead of just the last one, and retrieval reduces to guessing among them, with accuracy . Depth resolves this: with two layers, the first layer can read back whatever value is currently stored for that key, and the second layer writes in the difference between the new value and the old one, overwriting the stale entry instead of blending with it. This matches what we observe experimentally:
| =1 | =2 | =3 | =4 | =5 | ||
|---|---|---|---|---|---|---|
| 1 | 1.00 | 0.98 | ~1.00 | ~1.00 | ~1.00 | 0.99 |
| 2 | 0.50 | 0.52 | 0.95 | 0.97 | 1.00 | 0.99 |
| 3 | 0.33 | 0.36 | 0.95 | ~0.96 | 0.98 | 0.97 |
| 4 | 0.25 | 0.27 | 0.94 | 0.96 | 0.96 | 0.98 |
| 5 | 0.20 | 0.21 | 0.90 | 0.97 | 1.00 | 0.98 |
The single-layer column tracks almost exactly, while every multi-layer model stays near-perfect regardless of . Semantically structured or ambiguous keys remain a distinct, genuinely open question; we could offer a small correlated-embedding MQAR run during the discussion period if that would help, though we do not have one available yet.
I thank the authors for the detailed rebuttal, additional experiments, and clarification in response to the AC. The response addresses several of my concerns, especially regarding optimization reliability and repeated-key settings. The added seed analysis makes it clearer that the observed phase boundary is not simply a best-of-seeds artifact, and the repeated-key experiments usefully extend the proposed mechanism by distinguishing single-layer blending from multi-layer overwriting.
I also appreciate the clarification around Theorem 3.2. The original statement could be read as hiding the dependence on the number of facts , and I agree with the AC that the main theoretical improvement should be made much more explicit in the paper. In particular, the distinction between the exact/worst-case regime and the mean-case scaling law appears central to the contribution and should be surfaced clearly in the abstract, introduction, and theorem statements.
Some concerns remain. The additional experiments on natural-language-trained Mamba2 models suggest that direct transfer from the synthetic AR/MQAR scaling law to pretrained language models remains limited. The role of full Mamba components such as gating, nonlinearities, and discretization also remains only partially theoretically characterized.
Finally, the AC’s question about more efficient exact circuits is helpful. It would strengthen the presentation to clarify whether the exact construction is merely a baseline or whether a lower bound rules out smaller .
Overall, the rebuttal strengthens my confidence in the paper’s claims within its stated scope.
Thank you for the careful follow-up. We fully agree with you that the distinction between the exact/worst-case requirement (Lemma 4.1) and the validated mean-case law (i.e. , Thm 4.2) should be stated explicitly, together with a new lower bound showing the latter is information-theoretically optimal (see below). This distinction will be stated and clearly emphasized in the revised manuscript (the concrete edit list is in the AC response thread). This clarification does not affect the validated scaling laws themselves, which hold for actual trained models (Sec. 3.2, Sec. 5).
We also appreciate your acknowledgement of our rebuttal points:
- The seed analysis shows the observed phase boundary is not a best-of-seeds artifact.
- The repeated-key experiments extend the proposed mechanism, distinguishing single-layer blending from multi-layer overwriting.
- The clarification of Theorem 3.2 resolves the hidden dependence, with the exact/worst-case vs. mean-case distinction to be surfaced explicitly in the revision.
Exact construction vs. lower bound. Your question is answered in our latest response to the AC, which we briefly summarize here:
- The exact non-compressive construction (Thm 3.1, ) is indeed a pedagogical baseline: it is sufficient but not necessary, and Lemma 4.1 already certifies an exact (perfect recall on every context) compressive circuit at , far below .
- As a concrete example, see the AC thread: we show that there exists an exact recall circuit with , which gives whenever .
- In the other direction (the lower bound), we have formalized a new information-theoretic Lemma (see the AC thread), to be added to the revised manuscript: for any model whose context information passes through a finite state of entries at bits each, solving AR with success probability requires . For simplified Mamba () this reads . So a lower bound does rule out smaller , for any architecture, and our validated mean-case law sits at this floor up to a small explicit constant.
(The two regimes and their sources are summarized in the paper-roadmap table in the AC thread.)
Presentation. As detailed in the AC thread, the revision will rewrite the contributions paragraph around this hierarchy, add a "roadmap and main results" paragraph with the summary table, restate Thm 3.2 with the explicit dependence, and add the new Lemma with a remark that the validated law sits at the floor.
Remaining scope. We agree on both points and will state them explicitly as limitations: direct transfer of the synthetic AR/MQAR law to pretrained language models remains limited (an open, known, architecture-specific gap; see e.g. Ben-Kish et al., 2025 for analysis), and gating, nonlinearities, and discretization are characterized only at the level of constants, with the asymptotic scaling argument and ablations of our W2 response, not by a full theory.
Thank you again for the constructive engagement throughout, which has materially sharpened the paper's headline claims.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Response to the Area Chair
Dear Area Chair,
Thank you for engaging closely with the theorem statements. In short: we agree that Theorem 3.2, as currently worded, is misleading: its unqualified "D,N=O(logV)" hides the dependence on the number of facts Nf. But this is a framing inaccuracy localized to that single statement; the paper's mathematics is otherwise exact and internally consistent, and the constraint you point to is information-theoretically unavoidable for any fixed-state architecture.
Throughout, we assume the standard MQAR setting L=4Nf (Arora et al., 2023; see App. B and derivations in App. F); since L=Θ(Nf), all requirements below are stated in terms of Nf alone.
What the paper states.
Consistency. Except for Thm 3.2's wording, these results are mutually consistent, and none claims recall with state independent of Nf: worst-case ND=Ω(NflogV); mean-case ND=Ω(NflogV). Concretely, at D=Θ(N): Lemma 4.1 (worst-case) gives N=Ω(NflogV), linear in Nf (precisely the meta-review's figure), while Thm 4.2 / Rem 4.4 (mean-case) give N=Θ(NflogV), sub-linear. The "N linear in sequence length" reading takes the loose lemma's sufficient condition as the actual requirement; the validated law is its square root per dimension.
The linear-in-Nf cost is an information-theoretically unavoidable bound. We agree that Mamba's fixed-size state cannot hold arbitrarily many facts: Nf facts carry Nflog2V bits, while the hidden state has 2DN finite-precision entries; this gives ND=Ω(NflogV) as a floor for any architecture, which no theorem could avoid. Our contribution is the exact boundary: the validated law ND≈2(aNf+N)logV sits at this floor with an explicit constant, verified mechanistically and empirically. The remaining true statement is stronger than "N linear in sequence length": the product ND is linear in Nf, so for instance at D=Θ(N) each dimension grows only as NflogV.
The fix. Thm 3.2's statement gives only the V-scaling, valid only at fixed Nf; a reader stopping there would draw exactly the conclusion you describe. We will restate it as:
We will also add a remark on the information-theoretic floor, and propagate the explicit Nf dependence to the abstract and introduction, so the laws are never presented as scaling in V alone.
Simplified Mamba. The simplification isolates the S6 layer, the only component mixing information across tokens, making the analysis tractable. Gating, discretization, and Conv1D improve constants but do not remove the N-width bottleneck, and the full nonlinear model empirically collapses onto the same law with a better constant (see response to Reviewer 4GL6, W2).
Prior literature. Appendix I already gives a six-point comparison with the closest work, Huang et al. (2025): tighter bounds, trained-weight validation, scaling laws, multi-layer and multi-head extensions, and a minimality ablation. We will surface a condensed version in the main-text related work, and add the references linked by reviewer 11mg.
All three reviewers independently rated the paper 5 (Accept), and the meta-review calls their remaining concerns "somewhat smaller order"; with Theorem 3.2 restated, we believe what remains is a solid contribution: the first constant-level, empirically validated recall law at the information-theoretic bound, with a mechanistically verified circuit and multi-layer/multi-head extensions. Thank you for the careful reading, which will make the headline claim more precise.