Scaling Stick-Breaking Attention: An Efficient Implementation and In-depth Study
Not on the map. Why?
Abstract (arXiv)
The self-attention mechanism traditionally relies on the softmax operator, necessitating positional embeddings like RoPE, or position biases to account for token order. But current methods using still face length generalisation challenges. We investigate an alternative attention mechanism based on the stick-breaking process in larger scale settings. The method works as follows: For each token before the current, we determine a break point, which represents the proportion of the stick, the weight of the attention, to allocate to the current token. We repeat this on the remaining stick, until all tokens are allocated a weight, resulting in a sequence of attention weights. This process naturally incorporates recency bias, which has linguistic motivations for grammar parsing. We study the implications of replacing the conventional softmax-based attention mechanism with stick-breaking attention. We then discuss implementation of numerically stable stick-breaking attention and adapt Flash Attention to accommodate this mechanism. When used as a drop-in replacement for current softmax+RoPE attention systems, we find that stick-breaking attention performs competitively with current methods on length generalisation and downstream tasks. Stick-breaking also performs well at length generalisation, allowing a model trained with 211 context window to perform well at 214 with perplexity improvements.
Key facts. Cited by 13 papers in the map (data through 14 Oct 2026). Builds on 32 of its 51 references that are in the map. First posted on arXiv 23 Oct 2024.
Builds on
32 of 51 references.
References · 32
- 2017Attention Is All You Needcited by 60,361
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,100
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,883
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
20 more
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,164
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2018Self-Attention with Relative Position Representationscited by 1,120
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 861
- 2024MiniCPM: Unveiling the Potential of Small Language Models with Scalable Training Strategiescited by 723
- 2024TinyLlama: An Open-Source Small Language Modelcited by 618
- 2016Adaptive Computation Time for Recurrent Neural Networkscited by 506
- 2023The Impact of Positional Encoding on Length Generalization in Transformerscited by 327
- 2023Zoology: Measuring and Improving Recall in Efficient Language Modelscited by 204
- 2024The Illusion of State in State-Space Modelscited by 187
- 2021PonderNet: Learning to Pondercited by 168
- 2023Quantizable Transformers: Removing Outliers by Helping Attention Heads Do Nothingcited by 151
- 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 150
- 2019Language Modeling with Deep Transformerscited by 96
- 2024Transformers Can Achieve Length Generalization But Not Robustlycited by 86
- 2021The Neural Data Router: Adaptive Control Flow in Transformers Improves Systematic Generalizationcited by 62
- 2017Neural Language Modeling by Jointly Learning Syntax and Lexiconcited by 57
- 2023Sparse Universal Transformercited by 32
- 2024Power Scheduler: A Batch Size and Token Number Agnostic Learning Rate Schedulercited by 28
Built on by
Citing papers per year: 2025: 9; 2026: 4.
13 papers.
Sort:
By area:
- 2026Attention Residualscited by 65
- 2025Forgetting Transformer: Softmax Attention with a Forget Gatecited by 53
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 34
- 2025Long-Context Generalization with Sparse Attentioncited by 21
- 2025Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddingscited by 10
- 2025Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory Accesscited by 9
- 2025On Vanishing Variance in Transformer Length Generalizationcited by 6
- 2025Understanding and Improving Length Generalization in Hierarchical Sparse Attention Modelscited by 6
- 2026Agentic Discovery of Neural Architectures: AIRA-Compose and AIRA-Designcited by 5
- 2025From Next Token Prediction to (STRIPS) World Modelscited by 2
- 2025An empirical study on the limitation of Transformers in program trace generationcited by 0
- 2026Beyond Static and Linear: What Attention Constraints Best Fit Human Reading Times?cited by 0
1 more
- 2026How Local Mixing Encodes Relative Position in Global NoPE Attention29 Sep 2026
- 2026Beyond Static and Linear: What Attention Constraints Best Fit Human Reading Times?24 Aug 2026
- 2026Agentic Discovery of Neural Architectures: AIRA-Compose and AIRA-Design15 May 2026
- 2026Attention Residuals16 Mar 2026
- 2025Understanding and Improving Length Generalization in Hierarchical Sparse Attention Models20 Oct 2025
- 2025An empirical study on the limitation of Transformers in program trace generation29 Sep 2025
- 2025From Next Token Prediction to (STRIPS) World Models16 Sep 2025
- 2025Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddings5 Sep 2025
- 2025Long-Context Generalization with Sparse Attention19 Jun 2025
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformations22 May 2025
- 2025Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory Access23 Apr 2025
- 2025On Vanishing Variance in Transformer Length Generalization3 Apr 2025
1 more
- 2025From Next Token Prediction to (STRIPS) World Modelscited by 2
- 2025From Next Token Prediction to (STRIPS) World Models16 Sep 2025
- 2026Attention Residualscited by 65
- 2025Forgetting Transformer: Softmax Attention with a Forget Gatecited by 53
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformationscited by 34
- 2025Long-Context Generalization with Sparse Attentioncited by 21
- 2025Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddingscited by 10
- 2025Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory Accesscited by 9
- 2025On Vanishing Variance in Transformer Length Generalizationcited by 6
- 2025Understanding and Improving Length Generalization in Hierarchical Sparse Attention Modelscited by 6
- 2025An empirical study on the limitation of Transformers in program trace generationcited by 0
- 2026Beyond Static and Linear: What Attention Constraints Best Fit Human Reading Times?cited by 0
- 2026How Local Mixing Encodes Relative Position in Global NoPE Attentioncited by 0
- 2026How Local Mixing Encodes Relative Position in Global NoPE Attention29 Sep 2026
- 2026Beyond Static and Linear: What Attention Constraints Best Fit Human Reading Times?24 Aug 2026
- 2026Attention Residuals16 Mar 2026
- 2025Understanding and Improving Length Generalization in Hierarchical Sparse Attention Models20 Oct 2025
- 2025An empirical study on the limitation of Transformers in program trace generation29 Sep 2025
- 2025Decoupling the "What" and "Where" With Polar Coordinate Positional Embeddings5 Sep 2025
- 2025Long-Context Generalization with Sparse Attention19 Jun 2025
- 2025PaTH Attention: Position Encoding via Accumulating Householder Transformations22 May 2025
- 2025Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory Access23 Apr 2025
- 2025On Vanishing Variance in Transformer Length Generalization3 Apr 2025
- 2025Forgetting Transformer: Softmax Attention with a Forget Gate3 Mar 2025