Pith. sign in

REVIEW 4 cited by

Length Generalization in Arithmetic Transformers

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 2306.15400 v1 pith:OKT3MXPA submitted 2023-06-27 cs.LG

classification cs.LG
keywords digitprimingarithmeticgeneralizationmodelstraininglengthsequences
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
abstract

We examine how transformers cope with two challenges: learning basic integer arithmetic, and generalizing to longer sequences than seen during training. We find that relative position embeddings enable length generalization for simple tasks, such as addition: models trained on $5$-digit numbers can perform $15$-digit sums. However, this method fails for multiplication, and we propose train set priming: adding a few ($10$ to $50$) long sequences to the training set. We show that priming allows models trained on $5$-digit $\times$ $3$-digit multiplications to generalize to $35\times 3$ examples. We also show that models can be primed for different generalization lengths, and that the priming sample size scales as the logarithm of the training set size. Finally, we discuss potential applications of priming beyond arithmetic.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 4 Pith papers

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

  1. 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.

  2. Learning to Execute Graph Algorithms Exactly with Graph Neural Networks

    cs.LG 2026-01 conditional novelty 6.0 of 10

    A GNN with an ensemble of MLPs can exactly execute any LOCAL-model graph algorithm after learning a polynomial-size set of local template instructions.

  3. Long-Short Alignment for Effective Long-Context Modeling in LLMs

    cs.CL 2025-06 conditional novelty 6.0 of 10

    A long-short misalignment metric quantifies output distribution drift across context lengths, correlates with long-context performance, and a regularizer based on it improves fine-tuned LLMs.

  4. Uncovering a Universal Abstract Algorithm for Modular Addition in Neural Networks

    cs.LG 2025-05 conditional novelty 6.0 of 10

    Trained MLPs and transformers solving modular addition can be unified under an approximate Chinese Remainder Theorem, and deep or embedding-based networks learn only O(log n) frequency features.

Pith tools