arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2111.13587cs.CVcs.LG
收藏

自适应傅立叶神经算子:用于Transformers的高效令牌混合器

Adaptive Fourier Neural Operators: Efficient Token Mixers for Transformers

NVIDIA(英伟达);California Institute of Technology(加州理工学院);Stanford University(斯坦福大学)

John Guibas, Morteza Mardani, Zongyi Li, Andrew Tao, Anima Anandkumar, Bryan Catanzaro

摘要:

视觉Transformer在表示学习方面取得了巨大的成功。这主要是由于通过自我注意进行有效的令牌混合。然而,这与像素的数量成二次方,这对于高分辨率输入变得不可行。为了应对这一挑战,我们提出了自适应傅立叶神经运算器(AFNO)作为一个有效的令牌混合器,学习在傅立叶域混合。AFNO基于算子学习的原则基础,允许我们将令牌混合作为连续的全局卷积,而不依赖于输入分辨率。这一原理以前被用于设计FNO,它在傅立叶域中有效地解决了全局卷积,并在学习具有挑战性的偏微分方程方面表现出了希望。为了应对视觉表示学习中的挑战,例如图像和高分辨率输入的不连续性,我们提出了对FNO的原则性架构修改,从而提高内存和计算效率。这包括在通道混合权重上施加块对角结构,在令牌之间自适应地共享权重,以及通过软阈值和收缩来稀疏化频率模式。所得到的模型是高度并行的,具有准线性复杂度,并且在序列大小上具有线性记忆。AFNO在效率和准确性方面优于用于Few-Shot分割的自注意力机制。对于具有Segformer-B3主干的Cityscapes分割,AFNO可以处理65 k的序列大小,并且优于其他有效的自我注意力机制。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑