Research map / Architectures and efficiency / Attention and transformers
Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation
Ofir Press, Noah Smith, Mike Lewis
Meta · Allen Institute for Artificial Intelligence
Read the paperPlace an idea next to itCheck your own paper ↗
9measured effects
6improved
3hurt
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Replace sinusoidal positional embeddings with ALiBi | Baevski & Auli transformer LM · WikiText-103 validation, L=3072 | perplexity: 18.67 -> 17.60 | Improved |
| Use ALiBi with train length 512 and evaluate at length 3072 | Baevski & Auli transformer LM · WikiText-103 validation | perplexity: 19.73 -> 18.40 | Improved |
| Replace sinusoidal positional embeddings with ALiBi | Baevski & Auli transformer LM · WikiText-103 test, L=3072 | perplexity: 19.38 -> 18.30 | Improved |
| Replace sinusoidal positional embeddings with ALiBi | Baevski & Auli transformer LM · Toronto BookCorpus validation, train 512 / eval 3072 | perplexity: 14.46 -> 13.55 | Improved |
| Train on 1024 tokens with ALiBi instead of 2048 tokens with sinusoidal positions | 1.3B transformer LM · CC100+RoBERTa validation, eval 2048 | perplexity: 9.01 -> 8.92 | Improved |
| Train on 1024 tokens with ALiBi instead of 2048 tokens with sinusoidal positions | 1.3B transformer LM · CC100+RoBERTa validation, eval 2048 | memory: 29.3 GB -> 26.2 GB | Improved |
| Replace sinusoidal positional embeddings with ALiBi at equal training length | 1.3B transformer LM · CC100+RoBERTa validation, L=2048 | perplexity: 8.83 -> 8.84 | Hurt |
| Use trainable rather than fixed ALiBi slopes (ablation) | ALiBi · Extrapolation experiments | extrapolation performance | Hurt |
| Multiply attention scores by a distance bias instead of adding the ALiBi bias (ablation) | ALiBi attention · Language modeling experiments | performance | Hurt |
Open problems in sparse efficient transformers for long context
Do sparse and efficient long-context attention methods keep their quality and speed at larger model scale?
- Not tested on models larger than a few billion parameters. · 12 papers state it
- Training costs more or is less stable than a standard transformer. · 7 papers state it
- Quality still falls behind softmax attention or the teacher model. · 6 papers state it
Closest papers by meaning
- Location Attention for Extrapolation to Longer Sequences (ACL 2020 · similarity 0.90)
- Mesa-Extrapolation: A Weave Position Encoding Method for Enhanced Extrapolation in LLMs (NeurIPS 2024 · similarity 0.88)
- Eliminating Position Bias of Language Models: A Mechanistic Approach (ICLR 2025 · similarity 0.87)
- Positional LSH: Binary Block Matrix Approximation for Attention with Linear Biases (NeurIPS 2026 · similarity 0.87)
- Wavelet-based Positional Representation for Long Context (ICLR 2025 · similarity 0.87)
- The Role of Sparsity for Length Generalization in LLMs (ICML 2025 · similarity 0.86)
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.