LGDSMay 17, 2025

Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transform

arXiv:2505.11892v127 citationsh-index: 4
Originality Incremental advance
AI Analysis

This work addresses a key efficiency problem for practitioners using RoPE-based transformers, though it is incremental as it builds on prior fast attention methods.

The paper tackles the computational bottleneck of attention in transformers with Rotary Position Embedding (RoPE) by developing a new algorithm that computes RoPE attention in almost linear time under bounded entry assumptions, achieving this through a novel combination of the polynomial method and Fast Fourier Transform.

The transformer architecture has been widely applied to many machine learning tasks. A main bottleneck in the time to perform transformer computations is a task called attention computation. [Alman and Song, NeurIPS 2023] have shown that in the bounded entry regime, there is an almost linear time algorithm to approximate the attention computation. They also proved that the bounded entry assumption is necessary for a fast algorithm assuming the popular Strong Exponential Time Hypothesis. A new version of transformer which uses position embeddings has recently been very successful. At a high level, position embedding enables the model to capture the correlations between tokens while taking into account their position in the sequence. Perhaps the most popular and effective version is Rotary Position Embedding (RoPE), which was proposed by [Su, Lu, Pan, Murtadha, Wen, and Liu, Neurocomputing 2024]. A main downside of RoPE is that it complicates the attention computation problem, so that previous techniques for designing almost linear time algorithms no longer seem to work. In this paper, we show how to overcome this issue, and give a new algorithm to compute the RoPE attention in almost linear time in the bounded entry regime. (Again, known lower bounds imply that bounded entries are necessary.) Our new algorithm combines two techniques in a novel way: the polynomial method, which was used in prior fast attention algorithms, and the Fast Fourier Transform.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes