about
You Need to Pay Better Attention (arxiv.org)
5 points by tosh on Apr 14, 2024 | hide | past | pdf | discuss on HN

In plain words: They make the attention step behind modern AI cheaper by cutting out some matrix multiplications, or adding a new one. The lighter versions use 25-50% fewer parameters with barely any accuracy loss, and one beats the standard by up to 10%.

Abstract · Cost-Effective Attention Mechanisms for Low Resource Settings: Necessity & Sufficiency of Linear Transformations

From natural language processing to vision, Scaled Dot Product Attention (SDPA) is the backbone of most modern deep learning applications. Unfortunately, its memory and computational requirements can be prohibitive in low-resource settings. In this paper, we improve its efficiency without sacrificing its versatility. We propose three attention variants where we remove consecutive linear transformations or add a novel one, and evaluate them on a range of standard NLP and vision tasks. Our proposed models are substantially lighter than standard SDPA (and have 25-50% fewer parameters). We show that the performance cost of these changes is negligible relative to size reduction and that in one case (Super Attention) we succeed in outperforming SDPA by up to 10% while improving its speed and reducing its parameters by 25%.

Peyman Hosseini, Mehran Hosseini, Ignacio Castro, Matthew Purver
arXiv:2403.01643 · cs.LG, cs.AI, cs.CL, cs.CV · submitted Mar 3, 2024 · updated Feb 16, 2025
abstract · pdf · html

add comment on HN
Also discussed: May 2024 (233 points, 49 comments)