The engineering behind inference.Contact ↗
Batch & Release/Inference

Apple Study Links SSM Gating to Memorization Over In-Context Learning

A NeurIPS paper from Apple and Harvard researchers shows that gating in state space models biases training toward in-weights memorization, delaying or preventing in-context learning even when the architecture has capacity for it.

Apple Study Links SSM Gating to Memorization Over In-Context Learning
Illustration generated with AI for this article.

A paper accepted at NeurIPS from Apple and Harvard researchers argues that the gating mechanism in state space models (SSMs) is the main factor behind their slower convergence on in-context learning tasks, and that the same mechanism helps generalization to longer sequences. The work, published in November 2026, combines theory and experiments to separate what the architecture can represent from what it actually learns during training.

SSMs process sequences with constant memory and linear compute, which makes them attractive for long-context workloads. The authors note that despite reasonable performance, SSMs trail Transformers on tasks requiring in-context learning and precise retrieval, a gap that has slowed their adoption for large-scale language modeling. The paper's central claim is that gating, a common component in modern recurrent networks, causes SSMs to first settle on an in-weights memorization solution while delaying or even preventing convergence to a correct in-context learning solution.

Gating as the deciding factor

The key finding is that this behavior appears even when the architecture has no fundamental limitation in memory capacity or representational power. In other words, the failure is not about what the model could store or compute, but about the training dynamics shaped by the gating mechanism. The researchers show through theory and experiments that gating biases the optimization path toward memorization, and that this bias can be strong enough to block the in-context solution entirely.

For inference engineers serving open-weight models, this has a practical implication: an SSM that underperforms on retrieval-heavy tasks may not need a larger state or more parameters. The bottleneck can be in how the gating mechanism steers learning, which points to architectural changes rather than scale as the lever to pull.

A tradeoff with length generalization

The paper also reports that gating is often beneficial for improving generalization to long sequence lengths. That creates a tradeoff: the same mechanism that helps the model extend beyond its training context can interfere with its ability to perform in-context tasks that require precise recall. The authors frame the results as a basis for understanding and improving linear-time models, suggesting that future work could target gating designs that preserve length generalization without sacrificing in-context learning.

The study was led by William L. Tong, Aryo Lotfi, Emmanuel Abbe, Kostas Vaggelakos, Vishnu Banna, Etai Littwin, Josh Susskind, Cengiz Pehlevan, and Eran Malach, with Tong and Pehlevan affiliated with Harvard University and Tong's work done while at Apple. The paper is listed under the research areas of methods and algorithms, and speech and natural language processing.

Sources & references

Apple: On the Importance of Gating: Memorization vs. In-Context Learning in State Space Models ↗Source consulted: 2026-11-11

Privacy choices

We remember your answer in this browser for 180 days. Come back here whenever you want to change it.

EssentialSaves your answer in this browser. No cookies, no third parties.Always active