Lune

ICLR2025Top-tier venue

Scaling Stick-Breaking Attention: An Efficient Implementation and In-depth Study

Shawn Tan, Songlin Yang, Aaron C. Courville, Rameswar Panda, Yikang Shen

Abstract

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 (Shen et al., 2017). 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 2 11 context window to perform well at 2 14 with perplexity improvements.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

9 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient Streaming Language Models with Attention Sinks cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • Efficient Streaming Language Models with Attention Sinks cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Efficient Streaming Language Models with Attention Sinks cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Efficient Streaming Language Models with Attention Sinks cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • PaTH Attention: Position Encoding via Accumulating Householder Transformations cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • PaTH Attention: Position Encoding via Accumulating Householder Transformations cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • PaTH Attention: Position Encoding via Accumulating Householder Transformations cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • PaTH Attention: Position Encoding via Accumulating Householder Transformations cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • PIQA: Reasoning about Physical Commonsense in Natural Language cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
  • Decoupling The "What" and "Where" With Polar Coordinate Positional Embedding cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • Decoupling The "What" and "Where" With Polar Coordinate Positional Embedding cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory Access cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Improving Bilinear RNN with Closed-loop Control cites PaTH Attention: Position Encoding via Accumulating Householder Transformations
  • Improving Bilinear RNN with Closed-loop Control cites FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
  • Long-Context Generalization with Sparse Attention cites Efficient Streaming Language Models with Attention Sinks
  • Long-Context Generalization with Sparse Attention cites PIQA: Reasoning about Physical Commonsense in Natural Language
  • Long-Context Generalization with Sparse Attention cites FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
  • Long-Context Generalization with Sparse Attention cites WinoGrande: An Adversarial Winograd Schema Challenge at Scale
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers9

  1. PaTH Attention: Position Encoding via Accumulating Householder TransformationsSonglin Yang, Yikang Shen, Kaiyue Wen, Shawn Tan et al.NeurIPS 2025 · 36 citations
  2. Long-Context Generalization with Sparse AttentionPavlo Vasylenko, Hugo Pitorro, Andre F. T. Martins, Marcos V. TrevisoICLR 2026 · 19 citations
  3. Improving Bilinear RNN with Closed-loop ControlJiaxi Hu, Yongqi Pan, Jusen Du, Disen Lan et al.NeurIPS 2025 · 10 citations
  4. Decoupling The "What" and "Where" With Polar Coordinate Positional EmbeddingAnand Gopalakrishnan, Róbert Csordás, Jürgen Schmidhuber, Michael MozerICML 2026 · 7 citations
  5. Hardware-aligned Hierarchical Sparse Attention for Efficient Long-term Memory AccessXiang Hu, Jiaqi Leng, Jun Zhao, Kewei Tu et al.NeurIPS 2025 · 7 citations

Builds on15

  1. FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra et al.NeurIPS 2022 · 5,493 citations
  2. WinoGrande: An Adversarial Winograd Schema Challenge at ScaleKeisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, Yejin ChoiAAAI 2020 · 3,037 citations
  3. PIQA: Reasoning about Physical Commonsense in Natural LanguageYonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao et al.AAAI 2020 · 2,916 citations
  4. FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 citations
  5. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations

Related papers

  1. Softplus Attention with Re-weighting Boosts Length Extrapolation in Large Language ModelsBo Gao, Michael Spratling, Letizia GionfridaICML 2026 · 1 citation
  2. Wavelet-based Positional Representation for Long ContextYui Oka, Taku Hasegawa, Kyosuke Nishida, Kuniko SaitoICLR 2025
  3. Frayed RoPE and Long Inputs: A Geometric PerspectiveDavis Wertheimer, Aozhong Zhang, Derrick Liu, Penghang Yin et al.ICLR 2026 · 3 citations
  4. FiX: Introducing Fine-grained Forget Gate into Softmax AttentionRunzhong Li, Renjie Liu, Qing Li, Bo TangICML 2026
  5. Token Sparse Attention: Efficient Long-Context Inference with Interleaved Token SelectionDongwon Jo, Beomseok Kang, Jiwon Song, jae-joon kimICML 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines