Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Efficient Attention: Attention with Linear Complexities

About

Dot-product attention has wide applications in computer vision and natural language processing. However, its memory and computational costs grow quadratically with the input size. Such growth prohibits its application on high-resolution inputs. To remedy this drawback, this paper proposes a novel efficient attention mechanism equivalent to dot-product attention but with substantially less memory and computational costs. Its resource efficiency allows more widespread and flexible integration of attention modules into a network, which leads to better accuracies. Empirical evaluations demonstrated the effectiveness of its advantages. Efficient attention modules brought significant performance boosts to object detectors and instance segmenters on MS-COCO 2017. Further, the resource efficiency democratizes attention to complex models, where high costs prohibit the use of dot-product attention. As an exemplar, a model with efficient attention achieved state-of-the-art accuracies for stereo depth estimation on the Scene Flow dataset. Code is available at https://github.com/cmsflash/efficient-attention.

Zhuoran Shen, Mingyuan Zhang, Haiyu Zhao, Shuai Yi, Hongsheng Li• 2018

Related benchmarks

TaskDatasetResultRank
Instance SegmentationCOCO 2017 (val)--
1144
Image ClassificationCIFAR-10--
471
Long-range sequence modelingLong Range Arena (LRA)
Text Accuracy60.02
164
Stereo MatchingScene Flow
EPE (px)0.48
40
Action RecognitionUAV Human (test)
Top-1 Accuracy21.13
40
Object DetectionMS-COCO 2017 (val)
Box AP44.9
32
Inverse coefficient identificationInverse Problem 5.3 nf, nc = 141, 36
Relative Error0.0225
30
Inverse coefficient identificationInverse Problem 5.3 nf, nc = 211, 71
Relative Error (x10^-2)0.0206
30
Operator learningviscous Burgers' equation n=512
Relative Error0.0011
10
Operator learningviscous Burgers' equation n=2048
Relative Error0.0011
10
Showing 10 of 18 rows

Other info

Code

Follow for update