scimeatlas

Research map / Architectures and efficiency / Attention and transformers

On the Importance of Gating: Memorization vs. In-Context Learning in State Space Models

William Tong, Aryo Lotfi, Emmanuel Abbe, Konstantinos Vaggelakos, Vishnu Banna, Etai Littwin, Joshua Susskind, Eran Malach

NeurIPS 2026Architectures and efficiency › Attention and transformersapproach: State space and recurrent sequence modelsopen problems in this approach1 citations (OpenAlex)

Harvard University · Apple · KTH Royal Institute of Technology

Read the paperPlace an idea next to itCheck your own paper ↗

8measured effects
6improved
1no clear effect
1hurt
In one sentence

Shows theoretically and empirically that gating in Mamba-style SSMs biases training toward in-weights memorization over in-context retrieval (strong gating = longer plateau), while strong gating aids length generalization, and tunes the gating init in tool-calling fine-tuning.

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Problem

Linear-time SSMs such as Mamba lag Transformers on in-context learning and retrieval; the common explanation is an expressivity gap, but the authors ask whether training dynamics and gating initialization cause memorization shortcuts instead.

Approach

Analyzes a simplified gated linear-attention (single-head S6-like) model with a global gating parameter lambda; shows that strong gating (small decay factor alpha) makes memorization dominate initially and delays escape from the plateau, while decay induces locality and enables length generalization. Validates the trade-off on synthetic retrieval, Horn-clause logic retrieval, and BFCL tool calling

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
strengthen gating at initialization (larger offset) in best-first multi-token retrieval (ablation)Mamba-like SSM · Multi-token retrieval (best-first)accuracy / escape time from memorizationHurt
strengthen gating at initialization (larger offset) in best-last multi-token retrieval (ablation)Mamba-like SSM · Multi-token retrieval (best-last, length generalization beyond 512 KV pairs)accuracy at longer contextsImproved
use weaker gating (smaller initial decay) in logical rules retrieval (ablation)Mamba · Logical rules retrieval (in-distribution)retrieval accuracy with random oracle nameImproved
use stronger gating in logical rules retrieval (ablation)Mamba · Logical rules retrieval (length generalization up to K=128 clauses)accuracy at longer pool sizesImproved
scale Mamba decay rate down (weaker gating) before SFT (ablation)Mamba 1.5B · BFCL python simple, variable tool poolaccuracyImproved
scale Mamba decay rate down (weaker gating) before SFT (ablation)Mamba 1.5B · BFCL python simple, variable tool poolhallucination rateImproved
vary gating strength on larger tool pools than training (k=24) (ablation)Mamba 1.5B · BFCL python simple, larger poolslength generalizationNo clear effect
use Mamba instead of Transformer on larger tool pools2B Transformer vs 1.5B Mamba · BFCL python simple, larger poolsaccuracyImproved

Surprising findings

  • Weakening the gating of a pretrained Mamba model before SFT can improve tool-calling accuracy over the pretrained gating.
  • Gating does not appear to influence length generalization in the BFCL tool-pool range probed, with all Mamba variants beating the Transformer.

Limitations

  • Theory uses a simplified single-head model with identity key/query/value matrices and orthonormal or idealized inputs.
  • Tool-calling experiments use only a 1.5B Mamba and 2B Transformer and a single BFCL split; gating scale only probed in a limited range.

Open problems this paper states

Open problems in state space and recurrent sequence models

Do state space and recurrent models keep their efficiency and recall at large scale and long context?

All 5 open problems and what was already tried →

Experimental setup

Datasets: Nemotron-CC-HQ Nemotron Agentic tool-calling split BFCL python simple

Benchmarks: BFCL python simple synthetic retrieval multi-token key-value retrieval Horn clause logical rules retrieval

Metrics: accuracy hallucination rate escape time error probability

Baselines: Transformer

Builds on: Mamba Mamba 2 Gated Linear Attention BM25

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy