Pages and contents
Pages
- Non-Generative World Model Research
- Literature Review
- Literature Notes
- Attention
- Mamba3VL
- Fast Multipole Attention (FMA)
- Mamba SSM
- SEMA
- VMamba
- VideoSEMA
- Fast Decoding in Sequence Models
- Memory
- Planning
- Reviews
- Reinforcement Learning
- World Model Papers
- Biological
- World Models
- Representation
- Training
- Template
- Important Concepts
- Models
- Resources
Fast Multipole Attention (FMA)
0\. Metadata
Field | Value | |
|---|---|---|
| ⋮⋮ | Authors | Tran, Kang, Sterck |
| ⋮⋮ | Year | 2025 |
| ⋮⋮ | Link / arXiv | https://arxiv.org/pdf/2310.11960 |
| ⋮⋮ | Code | https://github.com/epoch98/FMA |
| ⋮⋮ | My relevance (1-5) | 5 |
| ⋮⋮ | Tags | #transformer #attention |
1\. Main Idea
Fast Multipole Attention provides an attention mechanism that beats Swin and is in compute time. Local objects receive full attention while more distant objects receive coarse learned attention.
2\. Problem
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 fromtoand while preserving full-context interactions.
3\. Method
In the neighborhood of the query, attention is calculated with keys and values in full resolution. Moving away from the query, keys and values are grouped and downsampled (or summarized) in increasingly larger groups using learned downsampling weights, and attention is calculated in lower resolution. The resulting attention matrix has a hierarchical structure.
Standard attention
Given input tokens , queries, keys, and values are produced by
learned projections:
Standard self-attention computes
Because every query interacts with every key, this requires attention scores.
Near-field attention
FMA divides the input into spatial cells of size . Each query attends exactly to tokens in its own cell and the eight adjacent cells. For a query at position , its near field is
where and identify the spatial cell containing token . Attention within this near field uses the original full-resolution keys and values:
with
This preserves detailed interactions between nearby image regions.
Hierarchical far-field summaries
Distant regions are represented by progressively coarser summaries arranged in a quadtree. At
hierarchy level , a cell covers an area proportional to
Each cell is represented by learned aggregated keys and values:
where and are learned aggregation weights. Instead of attending to every distant token, a query attends to these cell summaries:
where
The set contains distant cells represented at level . Regions farther from the query are represented at increasingly coarse resolutions.
Combined output
The final FMA output combines exact near-field attention with contributions from every coarse level:
Thus, each layer provides both:
• High-resolution modeling of nearby tokens.
• Coarse but global interaction with distant regions.
Computational complexity
For 2D inputs, each query attends exactly to at most nearby tokens and to a constant-size set of summaries at each hierarchy level. With hierarchy levels, the total attention complexity is
The paper also describes a query-downsampled variant that reduces the complexity to .
Coarse rank
A coarse cell can be represented using more than one learned summary. With coarse rank , each cell stores
Increasing gives the far-field representation more capacity, but increases its compute and memory cost approximately in proportion to . The simplest form of FMA uses .