Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Linear Attention with Global Context: A Multipole Attention Mechanism for Vision and Physics

About

Transformers have become the de facto standard for a wide range of tasks, from image classification to physics simulations. Despite their impressive performance, the quadratic complexity of standard Transformers in both memory and time with respect to the input length makes them impractical for processing high-resolution inputs. Therefore, several variants have been proposed, the most successful relying on patchification, downsampling, or coarsening techniques, often at the cost of losing the finest-scale details. In this work, we take a different approach. Inspired by state-of-the-art techniques in $n$-body numerical simulations, we cast attention as an interaction problem between grid points. We introduce the Multipole Attention Neural Operator (MANO), which computes attention in a distance-based multiscale fashion. MANO maintains, in each attention head, a global receptive field and achieves linear time and memory complexity with respect to the number of grid points. Empirical results on image classification and Darcy flows demonstrate that MANO rivals state-of-the-art models such as ViT and Swin Transformer, while reducing runtime and peak memory usage by orders of magnitude. We open source our code for reproducibility at https://github.com/AlexColagrande/MANO.

Alex Colagrande, Paul Caillon, Eva Feillet, Alexandre Allauzen• 2025

Related benchmarks

TaskDatasetResultRank
Image ClassificationCIFAR-100 (test)--
3518
Image ClassificationOxford Flowers-102 (test)
Top-1 Accuracy89
131
Image ClassificationFood-101 (test)
Top-1 Acc82.48
89
Image ClassificationCars (test)
Accuracy65.68
57
Image ClassificationPets (test)--
36
Image ClassificationTiny-ImageNet 202 (test)
Top-1 Accuracy87.52
13
Darcy Flow SimulationDarcy Flow 16x16
Relative MSE0.008
6
Darcy Flow SimulationDarcy Flow 32x32
Relative MSE0.002
6
Darcy Flow SimulationDarcy Flow 64x64
Relative MSE0.0013
6
Showing 9 of 9 rows

Other info

Code

Follow for update