arrow
返回

Softmax-Free Linear Transformers

delete2024-03-13
delete1
PRE
AI
鲁
鲁嘉晨 (Jiachen Lu)
J
Junge Zhang
Dr Xiatian Zhu 封面图
Dr Xiatian Zhu (Xiatian Zhu)
J
Jianfeng Feng
T
Tao Xiang
L
Li Zhang *
DOI:10.1007/s11263-024-02035-5delete
delete原文链接
delete分享
delete收藏
摘要

摘要

En 中文
Vision transformers (ViTs) have pushed the state-of-the-art for visual perception tasks. The self-attention mechanism underpinning the strength of ViTs has a quadratic complexity in both computation and memory usage. This motivates the development of approximating the self-attention at linear complexity. However, an in-depth analysis in this work reveals that existing methods are either theoretically flawed or empirically ineffective for visual recognition. We identify that their limitations are rooted in the inheritance of softmax based self-attention during approximations, that is, normalizing the scaled dot-product between token feature vectors using the softmax function. As preserving the softmax operation challenges any subsequent linearization efforts. By this insight, a family of SOftmax-Free Transformers (SOFT) are proposed. Specifically, a Gaussian kernel function is adopted to replace the dot-product similarity, enabling a full self-attention matrix to be approximated under low-rank matrix decomposition. For computational robustness, we estimate the Moore-Penrose inverse using an iterative Newton-Raphson method in the forward process only, while calculating its theoretical gradients only once in the backward process. To further expand applicability (e.g., dense prediction tasks), an efficient symmetric normalization technique is introduced. Extensive experiments on ImageNet, COCO and ADE20K show that our SOFT significantly improves the computational efficiency of existing ViT variants. With linear complexity, much longer token sequences are permitted by SOFT, resulting in superior trade-off between accuracy and complexity. Code and models are available at https://github.com/fudan-zvg/SOFT.
Keyword:
Transformer
Linear complexity
Softmax normalization
Softmax-free
Gaussian attention

期刊

International Journal of Computer Vision 封面图
International Journal of Computer Vision
IF:
9.3
论文数:
4.0K
被引数:
3.3W

机构

U
University of Surrey
学者数:
508
论文数: 282
被引数: 1.8K
F
fudan university
学者数:
7.2K
论文数: 1.9K
被引数: 9.9K
引用论文

引用论文

Mixed-Gas Separation Properties of Phosphazene Polymer Membranes
err1993-01-01
err0
PREAI
errE. S. Peterson; M. L. Stone; R. R. McCaffrey; D. G. Cummings
err分享
err收藏
Semantic Understanding of Scenes Through the ADE20K Dataset通过ADE20K数据集对场景进行语义理解
err2018-12-07
err934
PREAI
errZhou, Bolei; Zhao, Hang; Puig, Xavier; Xiao, Tete; Fidler, Sanja; Barriuso, Adela; Torralba, Antonio
err分享
err收藏
Synthesis of n-type semiconducting diamond film using diphosphorus pentaoxide as the doping source以五氧化二磷为掺杂源合成n型半导体金刚石膜
err1990-10-01
err0
PREAI
errKen Okano; Hideo Kiyota; Tatsuya Iwasaki; Yoshitaka Nakamura; Yukio Akiba; Tateki Kurosu; Masamori Iida; Terutaro Nakamura
err分享
err收藏
学者 查看更多内容