Research map / Architectures and efficiency / Attention and transformers
A Transformer with Stack Attention
Jiaoda Li, Jennifer C. White, Mrinmaya Sachan, Ryan Cotterell
ETH Zurich · University of Cambridge
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.
This paper tried a common change: Add positional encoding
Add sinusoidal or rotary positional encodings to stack transformer · DCF RS and SM · accuracy (%): SM MLM 93.1 -> 74.7 (sincos) Hurt
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 stack attention sub-layer | Transformer MLM · DCF Reverse String | accuracy (%): 54.8 -> 100.0 | Improved |
| Add stack attention sub-layer | Transformer ALM · DCF Stack Manipulation | accuracy (%): 50.4 -> 92.8 | Improved |
| Add stack attention sub-layer | Transformer MLM · DCF Modular Arithmetic | accuracy (%): 30.1 -> 34.3 | No clear effect |
| Add stack attention sub-layer | Transformer ALM · DCF Solve Equation | accuracy (%): 20.2 -> 20.3 | No clear effect |
| Add stack attention to a transformer trained from scratch | Transformer MLM · PTB | perplexity: 95.53 -> 34.28 | Improved |
| Add stack attention to a transformer trained from scratch | Transformer ALM · PTB | perplexity: 73.14 -> 69.86 | Improved |
| Add stack attention to a transformer trained from scratch | Transformer ALM · WikiText-2 | perplexity: 191.01 -> 206.42 | Hurt |
| Add stack attention to fine-tuned pre-trained models | RoBERTa / GPT-2 · PTB, WikiText-2 | perplexity: ALM PTB 21.26 -> 32.36 | Hurt |
| Add sinusoidal or rotary positional encodings to stack transformer (ablation) | Stack transformer · DCF RS and SM | accuracy (%): SM MLM 93.1 -> 74.7 (sincos) | Hurt |
| Add relative positional encoding to stack transformer (ablation) | Stack transformer MLM · DCF Stack Manipulation | accuracy (%): 93.1 -> 98.5 | Improved |
| Add positional encodings to vanilla transformer (ablation) | Vanilla transformer · DCF star-free tasks (RS, SM) | accuracy (%): RS MLM 54.8 -> 79.4 (ALiBi) | Improved |
Open problems in long-context KV and memory attention
How can long-context attention be made fast and small in memory without losing quality against full attention?
- Validated only on models up to about 13B parameters. · 8 papers state it
- Speedups are limited because the code is not fused or kernel-optimized. · 5 papers state it
- Compressed or sparse attention still trails full attention. · 4 papers state it
Closest papers by meaning
- Stack Attention: Improving the Ability of Transformers to Model Hierarchical Patterns (ICLR 2024 · similarity 0.92)
- Improving Formal Reasoning of Transformer with State Stack (NeurIPS 2025 · similarity 0.89)
- Core Context Aware Transformers for Long Context Language Modeling (ICML 2025 · similarity 0.89)
- Selective Attention Improves Transformer (ICLR 2025 · similarity 0.88)
- Talking Heads: Understanding Inter-Layer Communication in Transformer Language Models (NeurIPS 2024 · similarity 0.87)
- KV Shifting Attention Enhances Language Modeling (ICML 2025 · similarity 0.87)
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.