- Rating
- 5
- Clarity
- 3
- Confidence
- 4
- Originality
- 3
- Quality
- 3
- Significance
- 3
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
Paper 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.
Final justification
The authors have addressed my concerns with clean experiments and numbers. I don't have any more concerns
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 N-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 1−σ2logV with σ2≈Nf/(ND), 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. hash(kτ−1)⊤hash(qt) or, equivalently, ξτ⊤Gkqξt 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 Gvv and Gkq, 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: E and E~ 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 (L=4Nf), holding N=75,D=150 fixed:
The same data, linearized (logV vs. Φ−1(acc)):
Across all four sequence lengths, Φ−1(acc) behaves almost exactly as the theory predicts: linear in logV, with fitted slopes a = 2.32, 2.19, 2.00, and 1.82 for L = 1000, 2000, 3000, 4000 respectively (R2>0.98 in every fit), all close to the theory's 2, indicating that recall degrades linearly in logV rather than dropping off in some other way. The intercept decreases with L, consistent with O(ND/L). The law holds all the way out to realistic vocabulary sizes, not only the smaller V 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.