On The Computational Complexity of Self-Attention

被引:0
作者
Keles, Feyza Duman
Wijewardena, Pruthuvi Mahesakya
Hegde, Chinmay
机构
来源
INTERNATIONAL CONFERENCE ON ALGORITHMIC LEARNING THEORY, VOL 201 | 2023年 / 201卷
关键词
ALGORITHM;
D O I
暂无
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Transformer architectures have led to remarkable progress in many state-of-art applications. However, despite their successes, modern transformers rely on the self-attention mechanism, whose time- and space-complexity is quadratic in the length of the input. Several approaches have been proposed to speed up self-attention mechanisms to achieve sub-quadratic running time; however, the large majority of these works are not accompanied by rigorous error guarantees. In this work, we establish lower bounds on the computational complexity of self-attention in a number of scenarios. We prove that the time complexity of self-attention is necessarily quadratic in the input length, unless the Strong Exponential Time Hypothesis (SETH) is false. This argument holds even if the attention computation is performed only approximately, and for a variety of attention mechanisms. As a complement to our lower bounds, we show that it is indeed possible to approximate dot-product self-attention using finite Taylor series in linear-time, at the cost of having an exponential dependence on the polynomial order.
引用
收藏
页码:597 / 619
页数:23
相关论文
共 50 条
  • [21] A health indicator construction method based on self-attention convolutional autoencoder for rotating machine performance assessment
    Ma, Weipeng
    Guo, Liang
    Gao, Hongli
    Yu, Yaoxiang
    Qian, Mengui
    [J]. MEASUREMENT, 2022, 204
  • [22] A self-attention capsule feature pyramid network for water body extraction from remote sensing imagery
    Yu, Yongtao
    Yao, Yuting
    Guan, Haiyan
    Li, Dilong
    Liu, Zuojun
    Wang, Lanfang
    Yu, Changhui
    Xiao, Shaozhang
    Wang, Wenhao
    Chang, Lv
    [J]. INTERNATIONAL JOURNAL OF REMOTE SENSING, 2021, 42 (05) : 1801 - 1822
  • [23] SACNN: Self-Attention Convolutional Neural Network for Low-Dose CT Denoising With Self-Supervised Perceptual Loss Network
    Li, Meng
    Hsu, William
    Xie, Xiaodong
    Cong, Jason
    Gao, Wen
    [J]. IEEE TRANSACTIONS ON MEDICAL IMAGING, 2020, 39 (07) : 2289 - 2301
  • [24] A froth image segmentation method via generative adversarial networks with multi-scale self-attention mechanism
    Zhong, Yuze
    Tang, Zhaohui
    Zhang, Hu
    Xie, Yongfang
    Gao, Xiaoliang
    [J]. MULTIMEDIA TOOLS AND APPLICATIONS, 2024, 83 (07) : 19663 - 19682
  • [25] Multiscale Temporal Self-Attention and Dynamical Graph Convolution Hybrid Network for EEG-Based Stereogram Recognition
    Shen, Lili
    Sun, Mingyang
    Li, Qunxia
    Li, Beichen
    Pan, Zhaoqing
    Lei, Jianjun
    [J]. IEEE TRANSACTIONS ON NEURAL SYSTEMS AND REHABILITATION ENGINEERING, 2022, 30 : 1191 - 1202
  • [26] Multivariable System Prediction Based on TCN-LSTM Networks with Self-Attention Mechanism and LASSO Variable Selection
    Shao, Yiqin
    Tang, Jiale
    Liu, Jun
    Han, Lixin
    Dong, Shijian
    [J]. ACS OMEGA, 2023, 8 (50): : 47798 - 47811
  • [27] Candidate point selection using a self-attention mechanism for generating a smooth volatility surface under the SABR model
    Kim, Hyeonuk
    Park, Kyunghyun
    Jeon, Junkee
    Song, Changhoon
    Bae, Jungwoo
    Kim, Yongsik
    Kang, Myungjoo
    [J]. EXPERT SYSTEMS WITH APPLICATIONS, 2021, 173
  • [28] Machinery Prognostics and High-Dimensional Data Feature Extraction Based on a Transformer Self-Attention Transfer Network
    Sun, Shilong
    Peng, Tengyi
    Huang, Haodong
    [J]. SENSORS, 2023, 23 (22)
  • [29] Integrated Multi-Head Self-Attention Transformer model for electricity demand prediction incorporating local climate variables
    Ghimire, Sujan
    Nguyen-Huy, Thong
    AL-Musaylh, Mohanad S.
    Deo, Ravinesh C.
    Casillas-Perez, David
    Salcedo-Sanz, Sancho
    [J]. ENERGY AND AI, 2023, 14
  • [30] Intelligent Task Allocation and Planning for Unmanned Surface Vehicle (USV) Using Self-Attention Mechanism and Locking Sweeping Method
    Luo, Jing
    Zhang, Yuhang
    Zhuang, Jiayuan
    Su, Yumin
    [J]. JOURNAL OF MARINE SCIENCE AND ENGINEERING, 2024, 12 (01)