HackerPapers

arXiv:2403.01643cs.LG

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

Peyman Hosseini, Mehran Hosseini, Ignacio Castro, Matthew Purver

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

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%.

arXiv comments
Journal reference
DOI
Subjects
cs.LGMachine Learning cs.AIArtificial Intelligence cs.CLComputation and Language cs.CVComputer Vision and Pattern Recognition

On Hacker News

Linked by 1 identifiable commenter in 2 comments across 2 threads, from May 2024 to Apr 2025. Found in 2 HN submissions from Apr 2024 to May 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • Multiplication algorithm: https://en.wikipedia.org/wiki/Multiplication_algorithm From https://news.ycombinator.com/item?id=40519828 re: LLMs and matrix multiplication with tensors: > "You Need to Pay Better Attention" (2024) https://arxiv.org/abs/2403.01643 : >> Our first…

      westurnerView on HNParent context

    • Because self-attention can be replaced with FFT for a loss in accuracy and a reduction in kWh [1], I suspect that the Quantum Fourier Transform can also be substituted for attention in LLMs. [1] https://syncedreview.com/2021/05/14/deepmind-podracer-tpu-ba... "You Need to Pay…

      westurnerView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.