Efficient Token Mixing for Transformers via Adaptive Fourier Neural Operators
John Guibas, Morteza Mardani, Zongyi Li, Andrew Tao, Anima Anandkumar, Bryan Catanzaro
Abstract
Vision transformers have delivered tremendous success in representation learning. This is primarily due to effective token mixing through self attention. However, this scales quadratically with the number of pixels, which becomes infeasible for high-resolution inputs. To cope with this challenge, we propose Adaptive Fourier Neural Operator (AFNO) as an efficient token mixer that learns to mix in the Fourier domain. AFNO is based on a principled foundation of operator learning which allows us to frame token mixing as a continuous global convolution without any dependence on the input resolution. This principle was previously used to design FNO, which solves global convolution efficiently in the Fourier domain and has shown promise in learning challenging PDEs. To handle challenges in visual representation learning such as discontinuities in images and high resolution inputs, we propose principled architectural modifications to FNO which results in memory and computational efficiency. This includes imposing a block-diagonal structure on the channel mixing weights, adaptively sharing weights across tokens, and sparsifying the frequency modes via soft-thresholding and shrinkage. The resulting model is highly parallel with a quasi-linear complexity and has linear memory in the sequence size. AFNO outperforms self-attention mechanisms for few-shot segmentation in terms of both efficiency and accuracy. For Cityscapes segmentation with the Segformer-B3 backbone, AFNO can handle a sequence size of 65k and outperforms other efficient self-attention mechanisms.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get 367293c7-b5e7-427b-9c80-0f7bb2a11b1eCited by top-tier papers18
- Spike-driven Transformer V2: Meta Spiking Neural Network Architecture Inspiring the Design of Next-generation Neuromorphic ChipsMan Yao, Jiakui Hu, Tianxiang Hu, Yifan Xu et al.ICLR 2024 · 154 citations
- Expediting Large-Scale Vision Transformer for Dense Prediction without Fine-tuningWeicong Liang, Yuhui Yuan, Henghui Ding, Xiao Luo et al.NeurIPS 2022 · 52 citations
- PastNet: Introducing Physical Inductive Biases for Spatio-temporal Video PredictionHao Wu, Fan Xu, Chong Chen, Xian-Sheng Hua et al.ACM MM 2024 · 36 citations
- Multiscale Attention Wavelet Neural Operator for Capturing Steep Trajectories in Biochemical SystemsJiayang Su, Junbo Ma, Songyang Tong, Enze Xu et al.AAAI 2024 · 13 citations
- CRASH: Crash Recognition and Anticipation System Harnessing with Context-Aware and Temporal Focus AttentionsHaicheng Liao, Haoyu Sun, Huanming Shen, Chengyue Wang et al.ACM MM 2024 · 10 citations
Related papers
- Adaptive Frequency Filters As Efficient Global Token MixersZhipeng Huang, Zhizheng Zhang, Cuiling Lan, Zheng-Jun Zha et al.ICCV 2023 · 96 citations
- Head-Free Lightweight Semantic Segmentation with Linear TransformerBo Dong, Pichao Wang, Fan WangAAAI 2023 · 129 citations
- FFT-Based Dynamic Token Mixer for VisionYuki Tatsunami, Masato TakiAAAI 2024 · 73 citations
- Unraveling Attention via Convex Duality: Analysis and Interpretations of Vision TransformersArda Sahiner, Tolga Ergen, Batu Ozturkler, John M. Pauly et al.ICML 2022 · 36 citations
- Diffused Fourier Network for Video Action SegmentationBorui Jiang, Yadong MuACM MM 2023 · 5 citations
