ChatPaper.aiChatPaper

소프트맥스 어텐션의 표현력에 관하여: 순환 신경망 관점에서의 고찰

On the Expressiveness of Softmax Attention: A Recurrent Neural Network Perspective

July 31, 2025
저자: Gabriel Mongaras, Eric C. Larson
cs.AI

초록

소프트맥스 어텐션이 도입된 이후, 다양한 작업에서의 표현력과 확장성 덕분에 현대 트랜스포머 아키텍처의 핵심 요소로 자리 잡았습니다. 그러나 소프트맥스 어텐션의 주요 단점은 시퀀스 길이에 대한 2차 메모리 요구량과 계산 복잡도입니다. 소프트맥스 비선형성을 대체함으로써, 선형 어텐션 및 유사한 방법들이 소프트맥스 어텐션의 2차 병목 현상을 피하기 위해 도입되었습니다. 이러한 선형 형태의 어텐션들이 원래의 소프트맥스 공식에서 유도되었음에도 불구하고, 일반적으로 하류 작업에서의 정확도 측면에서 뒤처지는 경향이 있습니다. 쿼리와 키의 내적에 대한 소프트맥스 비선형성의 강력한 직관은 다른 비선형성에 비해 바람직한 특성을 가지고 있음을 시사하지만, 이러한 차이가 왜 존재하는지에 대한 질문은 여전히 답변되지 않은 상태입니다. 본 연구는 소프트맥스 어텐션의 순환 형태를 유도함으로써 선형 어텐션이 소프트맥스 어텐션의 근사치임을 보여줍니다. 이 형태를 사용하여 소프트맥스 어텐션의 각 부분을 순환 신경망(RNN)의 언어로 설명할 수 있습니다. 소프트맥스 어텐션을 RNN으로 설명함으로써, 소프트맥스 어텐션의 구성 요소를 제거하여 각 부분의 중요성과 상호 작용 방식을 이해할 수 있습니다. 이러한 방식으로, 본 연구는 소프트맥스 어텐션이 다른 방법들보다 더 표현력이 뛰어난 이유를 설명하는 데 도움을 줍니다.
English
Since its introduction, softmax attention has become the backbone of modern transformer architectures due to its expressiveness and scalability across a wide range of tasks. However, the main drawback of softmax attention is the quadratic memory requirement and computational complexity with respect to the sequence length. By replacing the softmax nonlinearity, linear attention and similar methods have been introduced to avoid the quadratic bottleneck of softmax attention. Despite these linear forms of attention being derived from the original softmax formulation, they typically lag in terms of downstream accuracy. While strong intuition of the softmax nonlinearity on the query and key inner product suggests that it has desirable properties compared to other nonlinearities, the question of why this discrepancy exists still remains unanswered. This work demonstrates that linear attention is an approximation of softmax attention by deriving the recurrent form of softmax attention. Using this form, each part of softmax attention can be described in the language of recurrent neural networks (RNNs). Describing softmax attention as an RNN allows for the ablation of the components of softmax attention to understand the importance of each part and how they interact. In this way, our work helps explain why softmax attention is more expressive than its counterparts.
PDF22August 1, 2025