atlas

Research map / Architectures and efficiency / Attention and transformers

A Formal Framework for Understanding Length Generalization in Transformers

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 0 citations (OpenAlex)

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 a formal framework that characterizes length generalization of causal transformers with absolute or no positional encodings as identifiability in the limit under an idealized norm-regularized inference procedure, linking success to C-RASP and Limit Transformer expressiveness.

Problem

Lack of theoretical understanding of when transformers generalize to sequences longer than those seen in training, which varies across tasks empirically.

Approach

Model length generalization as identification in the limit: an idealized inference procedure fits transformers with growing context windows while minimizing a norm-based regularizer; the authors introduce Limit Transformers (bounded-width objects with translation-invariant, periodic, local positional functions) and C-RASP with positional relations to characterize which tasks are guaranteed to gene

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use APE transformers on tasks with a C-RASP[periodic, local] programTransformers · Algorithmic tasks and regular languageslength generalization accuracyHelped
Use NoPE transformers on tasks with a C-RASP[empty] programTransformers · Algorithmic tasks and regular languageslength generalization accuracyHelped
Test copying with repeated substrings rather than avoiding repetitionTransformers · COPYlength generalization accuracyHurt
Apply length generalization to PARITYTransformers · PARITYlength generalization accuracyHurt
Apply length generalization to Σ*be*Transformers · Σ*be*length generalization accuracyHurt
Use positional relations to recognize (aa)*Transformers · (aa)*length generalization accuracyHelped
Remove positional relations when recognizing (aa)*Transformers · (aa)*length generalization accuracyHurt

Surprising findings

Limitations

Experimental setup

Datasets: 8 algorithmic tasks (e.g., COPY, BINARY MAJORITY INTERLEAVE) 17 regular languages from Deletang et al. benchmark

Benchmarks: 8 algorithmic tasks 17 regular languages benchmark

Metrics: accuracy on test lengths 101-150

Baselines: NoPE transformers LSTM

Builds on: RASP-L Conjecture C-RASP Induction Head

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