Research map / Architectures and efficiency / Attention and transformers
Transformer-XL: Attentive Language Models beyond a Fixed-Length Context
Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan Salakhutdinov
Google · Carnegie Mellon University
Read the paperPlace an idea next to itCheck your own paper ↗
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.
On benchmark leaderboards
- WikiText-103 leaderboard perplexity 18.3 · rank 38 of 123 papers
- Penn Treebank leaderboard perplexity 54.52 · rank 10 of 44 papers
- text8 leaderboard bits per character 1.08 · rank 4 of 10 papers
- Enwik8 leaderboard bits per character 0.99 · rank 6 of 15 papers
This paper tried a common change: Add positional encoding
use the proposed relative positional encoding instead of the prior one · WikiText-103 · perplexity: 27.94 -> 26.77 Improved
What 733 accepted papers report for this change
- 590 improved
- 67 no clear effect
- 9 mixed
- 67 hurt
- Learning-Augmented Scalable Linear Assignment Problem Optimization via Neural Dual Warm-Starts ICML 2026 · add positional encodings to features (d=13 -> d=21) · Block-structured, N=4096 · speedupImproved
- Mesh Based Simulations with Spatial and Temporal awareness ICML 2026 · use learned positional embedding, learnable relative bias or weighted adjacency instead of RoPE · Aneurysm · RMSEHurt
- Sparse ActionGen: Accelerating Diffusion Policy with Real-time Pruning ICML 2026 · add sinusoidal positional encoding to the pruner · Robomimic Tool Hang · success rate (%): 28 -> 54Improved
See this change in detailMatched by the wording of each paper's own result, read by AI from the full text. Papers report gains more often than failures, so this shows what gets published, not the chance a change works.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| add segment-level recurrence (ablation) | Transformer-XL (128M) · WikiText-103 | perplexity: 29.02 -> 26.77 | Improved |
| use the proposed relative positional encoding instead of the prior one (ablation) | Transformer-XL (128M) · WikiText-103 | perplexity: 27.94 -> 26.77 | Improved |
| use full loss instead of half loss (ablation) | Transformer-XL (128M) · WikiText-103 | perplexity: 28.33 -> 26.77 | Improved |
| add segment-level recurrence (ablation) | Transformer-XL · One Billion Word | perplexity: 27.1 -> 25.2 | Improved |
| use the proposed relative positional encoding instead of the prior one (ablation) | Transformer-XL · One Billion Word | perplexity: 25.7 -> 25.2 | Improved |
| increase evaluation attention length (300 to 640) (ablation) | Transformer-XL (151M) · WikiText-103 | perplexity: 23.35 -> 23.09 | Improved |
| increase evaluation attention length with absolute encodings (ablation) | Transformer without proposed encoding · WikiText-103 | perplexity: 29.75 -> 29.75 (attn len stays 120) | No clear effect |
| add recurrence and proposed encoding (ablation) | Transformer-XL 128M vs Transformer · WikiText-103 | RECL (r=0.1): 128 -> 700 | Improved |
| use Transformer-XL instead of vanilla Transformer | 12L model · enwik8 | bpc: 1.11 -> 1.06 | Improved |
| scale Transformer-XL from 12 to 24 layers | Transformer-XL · enwik8 | bpc: 1.06 -> 0.99 | Improved |
| use Transformer-XL on short-sequence data | Transformer-XL Large · One Billion Word | perplexity: 23.7 -> 21.8 | Improved |
| use state reuse during evaluation | Transformer-XL vs vanilla Transformer · evaluation speed | per-token time: up to 1,874x speedup | Improved |
Later papers that compared with this method
36 later accepted papers report Transformer-XL as a baseline in their results tables; 30 of them report a better number on most of the results they share with it.
- Beyond Sequence Order: Syntax-Informed Positional Embeddings for Transformers (EMNLP 2026 · better on 1 of 1 shared result)
- Cached Transformers: Improving Transformers with Differentiable Memory Cachde (AAAI 2024 · better on 1 of 1 shared result)
- Memoria: Resolving Fateful Forgetting Problem through Human-Inspired Memory Architecture (ICML 2024 · better on 1 of 1 shared result)
- Building on Efficient Foundations: Effective Training of LLMs with Structured Feedforward Layers (NeurIPS 2024 · better on 0 of 1 shared result)
- TRAMS: Training-free Memory Selection for Long-range Language Modeling (EMNLP 2023 · better on 2 of 4 shared results)
- Focus Your Attention (with Adaptive IIR Filters) (EMNLP 2023 · better on 2 of 2 shared results)
- Focused Transformer: Contrastive Training for Context Scaling (NeurIPS 2023 · better on 1 of 1 shared result)
- Segmented Recurrent Transformer: An Efficient Sequence-to-Sequence Model (EMNLP 2023 · better on 1 of 1 shared result)
28 more not listed.
Matched by method name in results tables read by AI. Authors' own tables tend to favour the newer method, and a comparison can be missed when a method is renamed.
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
- Shortformer: Better Language Modeling using Shorter Inputs (ACL 2021 · similarity 0.90)
- Beyond Attention: Breaking the Limits of Transformer Context Length with Recurrent Memory (AAAI 2024 · similarity 0.90)
- Trainable Transformer in Transformer (ICML 2024 · similarity 0.88)
- Compress, Gather, and Recompute: REFORMing Long-Context Processing in Transformers (NeurIPS 2025 · similarity 0.88)
- LeaPformer: Enabling Linear Transformers for Autoregressive and Simultaneous Tasks via Learned Proportions (ICML 2024 · similarity 0.88)
- Learning and Transferring Sparse Contextual Bigrams with Linear Transformers (NeurIPS 2024 · similarity 0.88)
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.