Lune

NeurIPS2021Top-tier venue

FMMformer: Efficient and Flexible Transformer via Decomposed Near-field and Far-field Attention

Tan M. Nguyen, Vai Suliafu, Stanley J. Osher, Long Chen, Bao Wang

Abstract

We propose FMMformers, a class of efficient and flexible transformers inspired by the celebrated fast multipole method (FMM) for accelerating interacting particle simulation. FMM decomposes particle-particle interaction into near-field and far-field components and then performs direct and coarse-grained computation, respectively. Similarly, FMMformers decompose the attention into near-field and far-field attention, modeling the near-field attention by a banded matrix and the far-field attention by a low-rank matrix. Computing the attention matrix for FMMformers requires linear complexity in computational time and memory footprint with respect to the sequence length. In contrast, standard transformers suffer from quadratic complexity. We analyze and validate the advantage of FMMformers over the standard transformer on the Long Range Arena and language modeling benchmarks. FMMformers can even outperform the standard transformer in terms of accuracy by a significant margin. For instance, FMMformers achieve an average classification accuracy of 60.74%60.74\% over the five Long Range Arena tasks, which is significantly better than the standard transformer's average accuracy of 58.70%58.70\%.

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.

15 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

  • Linear Complexity Randomized Self-attention Mechanism cites Big Bird: Transformers for Longer Sequences
  • Linear Complexity Randomized Self-attention Mechanism cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Linear Complexity Randomized Self-attention Mechanism cites Training data-efficient image transformers & distillation through attention
  • FourierFormer: Transformer Meets Generalized Fourier Integral Theorem cites Choose a Transformer: Fourier or Galerkin
  • FourierFormer: Transformer Meets Generalized Fourier Integral Theorem cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • FourierFormer: Transformer Meets Generalized Fourier Integral Theorem cites Language Models are Few-Shot Learners
  • FourierFormer: Transformer Meets Generalized Fourier Integral Theorem cites Training data-efficient image transformers & distillation through attention
  • Parallelizing Linear Transformers with the Delta Rule over Sequence Length cites Big Bird: Transformers for Longer Sequences
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
  • Log-Linear Attention cites Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
  • Log-Linear Attention cites Parallelizing Linear Transformers with the Delta Rule over Sequence Length
  • Training data-efficient image transformers & distillation through attention cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers15

  1. Choose a Transformer: Fourier or GalerkinShuhao CaoNeurIPS 2021 · 516 citations
  2. Parallelizing Linear Transformers with the Delta Rule over Sequence LengthSonglin Yang, Bailin Wang, Yu Zhang, Yikang Shen et al.NeurIPS 2024 · 412 citations
  3. FourierFormer: Transformer Meets Generalized Fourier Integral TheoremTan Nguyen, Minh Pham, Tam Nguyen, Khai Nguyen et al.NeurIPS 2022 · 59 citations
  4. Log-Linear AttentionHan Guo, Songlin Yang, Tarushii Goel, Eric P. Xing et al.ICLR 2026 · 41 citations
  5. Linear Complexity Randomized Self-attention MechanismLin Zheng, Chong Wang, Lingpeng KongICML 2022 · 39 citations

Builds on16

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  3. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa et al.ICML 2021 · 8,974 citations
  4. Informer: Beyond Efficient Transformer for Long Sequence Time-Series ForecastingHaoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang et al.AAAI 2021 · 7,289 citations
  5. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations

Related papers

  1. Long Range Arena : A Benchmark for Efficient TransformersYi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen et al.ICLR 2021 · 881 citations
  2. Long-range Sequence Modeling with Predictable Sparse AttentionYimeng Zhuang, Jing Zhang, Mei TuACL 2022 · 11 citations
  3. Composite Slice Transformer: An Efficient Transformer with Composition of Multi-Scale Multi-Range AttentionsMingu Lee, Saurabh Pitre, Tianyu Jiang, Pierre-David Letourneau et al.ICLR 2023
  4. MPCFORMER: Fast, Performant and Provate Transformer Inference with MPCDacheng Li, Hongyi Wang, Rulin Shao, Han Guo et al.ICLR 2023
  5. H-Transformer-1D: Fast One-Dimensional Hierarchical Attention for SequencesZhenhai Zhu, Radu SoricutACL 2021
Dusk over the sea between two cliffs drawn in fine vertical lines