Pith. sign in

REVIEW 7 cited by

Transformers Can Achieve Length Generalization But Not Robustly

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2402.09371 v1 pith:H2BIX2BR submitted 2024-02-14 cs.LG cs.AIcs.CL

classification cs.LGcs.AIcs.CL
keywords lengthgeneralizationdatatransformersabilityextrapolateformatposition
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Length generalization, defined as the ability to extrapolate from shorter training sequences to longer test ones, is a significant challenge for language models. This issue persists even with large-scale Transformers handling relatively straightforward tasks. In this paper, we test the Transformer's ability of length generalization using the task of addition of two integers. We show that the success of length generalization is intricately linked to the data format and the type of position encoding. Using the right combination of data format and position encodings, we show for the first time that standard Transformers can extrapolate to a sequence length that is 2.5x the input length. Nevertheless, unlike in-distribution generalization, length generalization remains fragile, significantly influenced by factors like random weight initialization and training data order, leading to large variances across different random seeds.

Discussion (0). Sign in to comment.

Forward citations

Cited by 7 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Universal priors: solving empirical Bayes via Bayesian inference and pretraining

    stat.ML 2026-02 conditional novelty 8.0 of 10

    A simple random prior-on-prior lets pretrained transformers achieve near-optimal empirical Bayes regret uniformly over all test priors, and length generalization matches α-posterior inference.

  2. Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks

    cs.LG 2026-07 conditional novelty 7.0 of 10

    Learned replacement non-linearities show transformers are rarely optimal for algorithmic tasks, with benefits that are task-specific, while language/code gains are smaller and more transferable.

  3. Frontier Language Models Struggle to Copy: Text Can Be Better Viewed in 2D

    cs.CL 2026-07 conditional novelty 6.0 of 10

    2D-RoPE, which arranges text by line breaks into rows and columns, lets Transformers copy strings hundreds of times longer than training lengths, while standard 1D positional encodings fail on the same task.

  4. Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon Layers

    cs.CL 2025-12 conditional novelty 6.0 of 10

    Canon layers—residual 1-d causal convolutions over adjacent tokens—boost synthetic reasoning depth 2-4x, lift NoPE to RoPE level, and bring GLA up to Mamba2/GDN, with qualitative real-world confirmation.

  5. RoboSSM: Scalable In-context Imitation Learning via State-Space Models

    cs.RO 2025-09 conditional novelty 6.0 of 10

    RoboSSM shows that a state-space model backbone can extend in-context imitation learning to prompts much longer than those seen in training, where a Transformer-based baseline degrades.

  6. Modular Arithmetic: Language Models Solve Math Digit by Digit

    cs.CL 2025-08 conditional novelty 6.0 of 10

    LLMs perform 3-digit addition and subtraction via digit-position-specific MLP circuits that can be intervened upon to change individual output digits.

  7. Extrapolation by Association: Length Generalization Transfer in Transformers

    cs.CL 2025-06 conditional novelty 5.0 of 10

    Length generalization on a short-trained main task can be inherited from a longer-trained related auxiliary task trained jointly with it.

Pith tools