HLA: Hadamard Linear Attention
Hanno Ackermann, Hong Cai, Mohsen Ghafoorian, Amirhossein Habibian

TL;DR
This paper introduces Hadamard Linear Attention (HLA), a novel linear attention method that improves approximation of softmax in transformers, enabling efficient processing of large token sequences in applications like video generation.
Contribution
HLA proposes a new nonlinearity applied after pairwise similarities, resulting in a higher-degree rational approximation of softmax with an efficient computation scheme.
Findings
HLA effectively approximates softmax in large-scale transformer models.
The method reduces computational complexity without tensor reshaping.
Demonstrated success in large diffusion transformer for video generation.
Abstract
The attention mechanism is an important reason for the success of transformers. It relies on computing pairwise relations between tokens. To reduce the high computational cost of standard quadratic attention, linear attention has been proposed as an efficient approximation. It employs kernel functions that are applied independently to the inputs before the pairwise similarities are calculated. That allows for an efficient computational procedure which, however, amounts to a low-degree rational function approximating softmax. We propose Hadamard Linear Attention (HLA). Unlike previous works on linear attention, the nonlinearity in HLA is not applied separately to queries and keys, but, analogously to standard softmax attention, after the pairwise similarities have been computed. It will be shown that the proposed nonlinearity amounts to a higher-degree rational function to approximate…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTensor decomposition and applications · Stochastic Gradient Optimization Techniques · Video Analysis and Summarization
