On the Importance of Gating: Memorization
The researchers find this holds even in cases where the architecture and its memory capacity are, in principle, sufficient to support in-context learning.
By Dillip Chowdary • Dec 04, 2026 • Source: Apple Machine Learning Research

At a glance
- Venue
- NeurIPS, November 2026
- Institution
- Apple / Harvard
- Subject
- State Space Models gating mechanism
- Finding
- Gating → memorization before in-context learning
- Benefit
- Gating improves long-sequence generalization
In this post
Researchers from Apple and Harvard University published a paper at NeurIPS in November 2026 that identifies why State Space Models consistently fall short of Transformers on tasks requiring in-context learning and precise retrieval — and traces the problem directly to the gating mechanism that most modern SSMs rely on. The paper, cited in Apple Machine Learning Research's report, offers a theoretical and empirical account of why this happens even when the architecture has no fundamental capacity limitations.
The research matters to anyone working on building or deploying efficient sequence models at scale. SSMs have attracted significant interest as a lower-cost alternative to Transformers — they run with constant memory and linear compute instead of Transformers' quadratic scaling — but their weaker in-context learning has held back broader adoption for large-scale language modeling. This paper explains the mechanism behind that gap and points toward what would need to change to close it.
01Gating pushes SSMs toward memorization first
The core finding is that the gating mechanism in SSMs causes the model to converge first on a memorization solution: facts and patterns get encoded directly into the model's weights during training rather than learned as a dynamic, context-sensitive skill. This in-weights memorization acts as a local optimum that the training process reaches before the more useful in-context learning solution. The gating mechanism is what creates the preference for the memorization path.
William L. Tong and colleagues show this through both theoretical analysis and experiments. The result is not just an empirical observation but a mechanistic explanation: the gating dynamics themselves bias the optimization trajectory toward the wrong solution.
02Delay or prevention of in-context learning convergence
The memorization-first behavior does more than slow things down — in some settings it prevents the model from ever reaching the correct in-context learning solution. The researchers find this holds even in cases where the architecture and its memory capacity are, in principle, sufficient to support in-context learning. The bottleneck is not the model's capacity but the dynamics introduced by the gate.
This distinguishes the finding from prior explanations that attributed SSMs' in-context learning weakness to architectural limits or insufficient context windows. The gating mechanism creates a training dynamics problem that persists regardless of capacity.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Long-sequence generalization: where gating helps
The paper does not conclude that gating is simply harmful. The same mechanism that causes SSMs to prefer memorization over in-context learning also improves generalization to longer sequence lengths than those seen during training. This is a meaningful practical benefit: SSMs trained on shorter sequences can still handle longer ones more reliably when gating is present.
The dual role makes the gating mechanism a genuine design tradeoff rather than a pure bug. Removing gating to fix in-context learning would sacrifice the long-sequence generalization advantage, which is one of the main practical reasons to use SSMs in the first place.
04Theory and experiments in alignment
Tong and co-authors from Harvard — including Cengiz Pehlevan and Eran Malach — alongside Apple researchers such as Emmanuel Abbe, Etai Littwin, and Josh Susskind, produced both theoretical proofs and experimental validation of their claims. The experiments confirm that the theoretical account of gating dynamics matches what actually happens during training. The paper was accepted to NeurIPS, one of the top venues in machine learning research.
A related ICLR 2026 paper from the same research community, "To Infinity and Beyond: Tool-Use Unlocks Length Generalization in State Space Models," had already shown that SSMs cannot accurately solve "truly long-form" generation problems in a formally defined sense. The NeurIPS paper goes further by identifying why the in-context learning problem persists and what structural feature of SSMs is responsible.
05Implications for linear-time model design
The researchers describe their results as providing a basis for understanding and improving linear-time models. The practical implication is that future SSM designs that want to match Transformer-level in-context learning will need to address the gating mechanism specifically — either by redesigning how gating interacts with the training objective, or by finding alternative mechanisms that preserve the long-sequence generalization benefit without the memorization bias.
No specific architectural fix is proposed in this paper; the contribution is diagnostic. The findings give SSM researchers a concrete target: the gating mechanism is where the in-context learning problem lives, and fixing it without losing long-sequence benefits is the open design challenge the paper frames.
Frequently asked questions
What are State Space Models?
SSMs are neural network architectures that model sequences with constant memory and linear computational cost, making them more efficient than Transformers on long sequences.
Why do SSMs struggle with in-context learning?
According to the paper, the gating mechanism in SSMs leads the model to first converge on a memorization solution (stored in weights), which delays or prevents it from learning to use context dynamically.
Is gating always harmful in SSMs?
No. The Apple and Harvard researchers found that gating also helps SSMs generalize to longer sequences, so it has an important dual role.
Where was this research published?
The paper was published at NeurIPS in November 2026 by researchers from Apple and Harvard University.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement