Why Softmax Attention Outperforms Linear Attention

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Deng, Yichuan, Song, Zhao, Yuan, Kaijun, Zhou, Tianyi
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912963779100672
author Deng, Yichuan
Song, Zhao
Yuan, Kaijun
Zhou, Tianyi
author_facet Deng, Yichuan
Song, Zhao
Yuan, Kaijun
Zhou, Tianyi
contents Large transformer models have achieved state-of-the-art results in numerous natural language processing tasks. Among the pivotal components of the transformer architecture, the attention mechanism plays a crucial role in capturing token interactions within sequences through the utilization of softmax function. Conversely, linear attention presents a more computationally efficient alternative by approximating the softmax operation with linear complexity. However, it exhibits substantial performance degradation when compared to the traditional softmax attention mechanism. In this paper, we bridge the gap in our theoretical understanding of the reasons behind the practical performance gap between softmax and linear attention. By conducting a comprehensive comparative analysis of these two attention mechanisms, we shed light on the underlying reasons for why softmax attention outperforms linear attention in most scenarios.
format Preprint
id arxiv_https___arxiv_org_abs_2310_11685
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Why Softmax Attention Outperforms Linear Attention
Deng, Yichuan
Song, Zhao
Yuan, Kaijun
Zhou, Tianyi
Computation and Language
Machine Learning
Large transformer models have achieved state-of-the-art results in numerous natural language processing tasks. Among the pivotal components of the transformer architecture, the attention mechanism plays a crucial role in capturing token interactions within sequences through the utilization of softmax function. Conversely, linear attention presents a more computationally efficient alternative by approximating the softmax operation with linear complexity. However, it exhibits substantial performance degradation when compared to the traditional softmax attention mechanism. In this paper, we bridge the gap in our theoretical understanding of the reasons behind the practical performance gap between softmax and linear attention. By conducting a comprehensive comparative analysis of these two attention mechanisms, we shed light on the underlying reasons for why softmax attention outperforms linear attention in most scenarios.
title Why Softmax Attention Outperforms Linear Attention
topic Computation and Language
Machine Learning
url https://arxiv.org/abs/2310.11685