atlas

Research map / Architectures and efficiency / Attention and transformers

Understanding and Improving Length Generalization in Recurrent Models

ICML 2025 · Architectures and efficiency › Attention and transformers · approach: State space and recurrent sequence models

Read the paperCheck your idea against 108,967 papers

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.

Proposes the unexplored states hypothesis for why recurrent models (Mamba, Mamba-2, GLA, RWKV-v6) fail to length generalize, and shows that cheap post-training interventions that expose models to attainable initial states (State Passing, fitted noise, TBTT) enable generalization from 2k to 128k with ~500 steps.

Problem

Recurrent models such as state space models and linear attention often degrade sharply on sequences longer than their training context, and it is unclear why and how to fix this cheaply across architectures.

Approach

Length generalization fails when training covers only a subset of the state distributions attainable on long sequences; training interventions that initialize the recurrent state from attainable states (e.g., the final state of another sequence, or Gaussian noise fitted to final states) expose the model to those states and enable generalization without changing the architecture.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Increase training context lengthMamba-2 and GLA · Pile validationposition-wise perplexityHelped
Train for more tokensMamba-2 · Pile validationposition-wise perplexityHurt
Extend the learning-rate warm-up period from 10% to 25%Mamba-2 45m · Pile validation, context 1024position-wise perplexityHurt
Initialize the training state with random Gaussian noiseMamba-2 370m · Pile validationposition-wise perplexityHelped
Initialize the training state with random Gaussian noiseMamba-2 780m and 1.3b · Pile validationposition-wise perplexityNo clear effect
Initialize the training state with Gaussian noise fitted to final-state means and variancesMamba-2 370m and 780m · Pile validationposition-wise perplexityHelped
Initialize the training state with Gaussian noise fitted to final-state means and variancesMamba-2 1.3b · Pile validationposition-wise perplexityNo clear effect
Initialize the state with the final state of a different sequence (State Passing)Mamba-2 · Pile validationposition-wise perplexityHelped
Initialize each chunk with the previous chunk’s final state (TBTT)Mamba-2 · Pile validationposition-wise perplexityHelped
Use State PassingMamba-1 and GLA · Pile validationposition-wise perplexityHelped
Use State PassingMamba-2 · BABILongtask performanceHelped
Fine-tune with fitted noise rather than standard fine-tuningMamba-2 370m and 780m · Passkey retrievalaccuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: The Pile BABILong BABI passkey retrieval task synthetic copying task

Benchmarks: The Pile validation BABILong passkey retrieval synthetic copying

Metrics: position-wise perplexity Effective Remembrance (total variation) accuracy character accuracy

Baselines: Mamba-1 official checkpoint Mamba-2 official checkpoints GLA pre-trained from scratch RWKV-v6 Random Noise initialization Fitted Noise initialization TBTT

Builds on: Mamba Mamba-2 Gated Linear Attention Truncated Backpropagation Through Time passkey retrieval

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