arXiv paper· machine learning (sequence-model theory and mechanistic interpretability)· theoretical study with mechanistic-interpretability and training experiments

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

cs.LG · cs.CL

Quick verdict

Claims Mamba recall runs on implicit JL-hash circuits with ND=Ω(Nf log V) scaling laws; theory matches MQAR experiments despite simplified-model assumptions.

Summary

The paper reverse-engineers how Mamba solves multi-query associative recall (MQAR). Through ablations and invariant-operator analysis, the authors identify a single-layer circuit: the Conv1D copies and shifts token pairs, SSM projections compress keys/queries via a composite matrix Ẽ=FE, the recurrent state stores outer products of value embeddings and hashed keys, and retrieval proceeds by key–query matching plus value decompression — behavior the authors interpret as implicit similarity-preserving (Johnson–Lindenstrauss) hashing. Building on this circuit, they derive quantitative Recall Scaling Laws: a single-layer simplified Mamba recalls with probability p≈Φ(√(ND/(aNf+N))−√(2logV)), giving a requirement N·D=Ω(Nf·logV) that matches an information-theoretic lower bound (Lemma 4.5). Extensions cover multi-layer models (accuracy depends on effective state ΛN, Thm 4.6) and Mamba-2 multi-head patterns (p_MQA=p_MKA≤p_single=p_MVA≤p_MHA, Thm 4.7). Experiments — D–N accuracy grids of roughly 500-1000 points with 3-5 seeds, up to V=50K/L=4K — show designed, theoretical, trained-linear, and full-model results align (Figs 1, 4-6, 11-12). Main limitations: theory covers a simplified linear model (no gating, discretization, or nonlinearity); the full-model fit uses a heuristically chosen constant a_full≈½a_linear; large-scale slopes deviate from theory (1.18-1.56 vs 1); and accuracy is reported as best-of-seeds. Code and hyperparameters are released.

Review complete

Assessment at a glance

machine learning (sequence-model theory and mechanistic interpretability)

4

risk flags identified

● high 0

● medium 2

● low 2

Reproducibility readinesshigh
Code & data availableyes
Review confidencehigh
AI text signal0/20 passages flagged
Deep research viableCode-reproducibleNeeds GPU

4 strengths · 4 weaknesses · 5 author questions

AI text signal = Binoculars zero-shot detector score over 20 sampled passages (Fast-DetectGPT co-reported) — absence does not prove human authorship, and a flag does not imply misconduct.

Levels reflect verification complexity — not a quality score. Evolve never rates your paper.

Key claims under review

  • Mamba solves MQAR via a circuit that implicitly computes similarity-preserving linear hashes (JL-style), verified on trained models through invariant operators and ablations.
  • Recall probability follows p≈Φ(√(ND/(aNf+N))−√(2logV)); high-probability recall requires N·D=Ω(Nf·logV), matching an information-theoretic lower bound (Lemma 4.5).
  • Multi-layer recall accuracy is determined solely by the effective state size Neff=ΛN, independent of how depth and width are traded off.
  • Among Mamba-2 multi-head patterns, only MHA improves recall; MQA and MKA degrade due to shared-value compression, and MVA matches the single-head baseline.

Strengths

  • Falsifiable circuit identification, not just a plausibility argument

    The mechanism is specified weight-by-weight (Eqs. 5, 7), then tested on trained models through operators invariant to orthogonal reparameterizations (Eqs. 9-11; Figs. 15-16) plus a targeted ablation — Table 8 shows removing the Conv1D (dconv=1) collapses MQAR accuracy to 0.06≈1/Nf (V=128, Nf=16), exactly the bag-of-values guessing level.

  • Matching upper and lower bounds make the scaling law tight

    Thm. 4.2 / Rem. 4.4 give N·D=Ω(Nf·logV) from above via JL hashing, Lemma 4.5 gives the general information-theoretic bound bS=Ω(Nf·logV) via Fano's inequality, so the derived scaling is essentially optimal rather than merely sufficient.

  • Predictive quantitative validation across model classes

  • Validation extends beyond toy scales with disclosed deviations

Weaknesses

  • Quantitative theory covers only the simplified linear model

  • Bridge to full Mamba is heuristic

  • Best-of-seeds reporting measures existence, not typical training

  • Quantitative claims validated only on synthetic MQAR

Full Review Report

$1.99 · one-time

Unlock the complete preliminary analysis Evolve produced for this paper.

Report preview

Scope & Claims

The paper (arXiv 2609.07681, Tel Aviv University) asks how Mamba actually solves Multi-Query Associative Recall (MQAR) and what model dimensions recall requires. It makes five linked claims: (i) a specific single-layer circuit underlies trained solutions — Conv1D copy/shift, SSM projections compressing keys/queries via the composite matrix Ẽ=FE, a recurrent state storing outer products of value embeddings and hashed keys, and readout by key-query matching plus value decompression; (ii) this circuit is an implicit similarity-preserving (Johnson–Lindenstrauss) hash; (iii) recall probability follows p≈Φ(√(ND/(aNf+N))−√(2logV)) and the requirement N·D=Ω(Nf·logV) is matched by an information-theoretic lower bound (Lemma 4.5); (iv) multi-layer recall depends only on effective state Neff=ΛN (Thm. 4.6); (v) among Mamba-2 multi-head patterns, p_MQA=p_MKA≤p_single=p_MVA≤p_MHA (Thm. 4.7).

The remaining sections cover Methodology Assessment, Statistical Evidence, Results & Reproducibility, Limitations & Risks, and Verdict & Recommendations.

  • All 4 strengths & 4 weaknesses, analyzed in detail
  • 4 risk flags with severity, section & reviewer questions
  • Methods & statistical evidence assessment
  • 5 questions a peer reviewer would ask
  • Full six-dimension evaluation report & recommendations

One-time purchase · this paper only

One-time purchase, this paper only. AI-generated preliminary analysis — not peer review.

Frequently asked questions

What are the Mamba recall scaling laws?

For a simplified single-layer Mamba on MQAR, the paper predicts recall probability p≈Φ(√(ND/(aNf+N))−√(2logV)), where D is embedding size, N state size, Nf the number of key-value facts and V the vocabulary size. High-probability recall requires N·D=Ω(Nf·logV), and a matching information-theoretic lower bound shows this is essentially optimal.

How does Mamba do associative recall internally?

The paper identifies a circuit: the Conv1D copies and shifts adjacent tokens, SSM projections compress keys and queries through a Johnson–Lindenstrauss-style hash Ẽ=FE, the recurrent state stores outer products of value embeddings with hashed keys, and retrieval happens by key-query matching followed by value decompression. It is validated on trained models via invariant operators and ablations (removing the Conv1D drops accuracy to the guessing level).

Is there code for the Mamba recall scaling laws paper?

Yes. The authors released code at github.com/yuvalko1/mamba-recall-scaling-laws, with full training details in Appendix K (Table 9); the experiments total roughly 10 GPU-days on B200 GPUs.

Which Mamba-2 multi-head SSM pattern is best for recall?

According to Theorem 4.7 and Fig. 6, MHA improves recall because it enlarges the effective key/query state (MN); MVA — the pattern actually used in Mamba-2 — matches single-head performance, while MQA and MKA are worse due to shared-value compression.

About this review

This is an AI-generated preliminary review by Evolve.Pub, produced from the openly available text of the paper. It is not peer review and does not represent the authors' views. The canonical record of the paper is at the publisher link above.

  • Provided text is a sampled excerpt (head+tail with three [...sampling gap...] regions spanning parts of Secs. 3.2-4 and appendices); all judgments above rely only on visible content and could be refined by the skipped middle material.

Go deeper on this paper

Wrote a paper? Stress-test it before reviewers do.

Upload your manuscript for the same structured scrutiny — reasoning, statistics, evidence, figures, and reproducibility.

Scan your paper
On the Recall Scaling Laws in Mamba: A Theoretical and Mechanistic Study via Hashing | Evolve.Pub