Fast multipole attention: A scalable multilevel attention mechanism for text and images.
Yanming Kang, Giang Tran, Hans De Sterck
Department of Applied Mathematics, University of Waterloo, 200 University Avenue West, Waterloo, Ontario, N2L 3G1, Canada. Electronic address: yanming.kang@uwaterloo.ca. · Department of Applied Mathematics, University of Waterloo, 200 University Avenue West, Waterloo, Ontario, N2L 3G1, Canada. Electronic address: giang.tran@uwaterloo.ca.
Key points
From the paper's conclusion- We introduce Fast Multipole Attention (FMA), a divide-and-conquer mechanism for self-attention inspired by the Fast Multipole Method from n-body physics.
Abstract
While Transformer networks benefit from a global receptive field, their quadratic cost relative to sequence length restricts their application to long sequences and high-resolution inputs. We introduce Fast Multipole Attention (FMA), a divide-and-conquer mechanism for self-attention inspired by the Fast Multipole Method from n-body physics. FMA reduces the time and memory complexity of self-attention from O(n2) to O(nlogn) and O(n) while preserving full-context interactions. FMA contains a learned hierarchy with O(logn) levels of resolution. In this hierarchy, nearby tokens interact at full resolution, while distant tokens engage through progressively coarser, learned basis functions. We have developed both 1D and 2D implementations of FMA for language and vision tasks, respectively. On autoregressive and bidirectional language modeling benchmarks, the 1D variant either matches or outperforms leading efficient attention baselines with substantially lower memory use. With linear complexity, the 2D variant demonstrates superior performance over strong vision transformer baselines in classification and semantic segmentation tasks. Our results confirm that the multilevel attention implemented by FMA allows Transformer-based models to scale to much longer sequences and higher-resolution inputs without loss in accuracy. This provides a principled, physics-inspired approach for developing scalable neural networks suitable for language, vision, and multimodal tasks.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Not All Attention Is Equal: A Quantitative Survey of the EEI Trade-offarXiv · 2026
- ClusterAttention: A training-free speedup of bidirectional attentionarXiv · 2026
- Computational Complexity of Self-Attention Algorithms for Efficient Transformer ArchitecturesComputers · 2026
- Kernel-based Interpolatory Methods for Context Compression of Attention MechanismsarXiv · 2026
- Efficient attention mechanisms for large language models.Patterns (New York, N.Y.) · 2026
- Orthros: Phase-Aware Heterogeneous Attention for Efficient TransformersarXiv · 2026