Norm$\times$Direction: Restoring the Missing Query Norm in Vision Linear Attention
Abstract
Lay Summary
Recent artificial intelligence models widely rely on attention mechanisms to help determine which parts of the input are more important. While traditional attention mechanisms perform well, their quadratic computational complexity makes them significantly slow when processing high-resolution images or long texts. To accelerate computation, researchers proposed "linear attention", however, this approach often suffers from a loss of critical expressiveness, leading to an inability to focus on key information. This paper identifies that the root cause lies in linear attention neglecting the norm of each query vector, which acts as an essential importance signal, while also destructively losing valuable interaction details to enforce non-negativity. To resolve these issues, this paper propose NaLaFormer, a novel method that reintroduces query norm information to help the model "refocus" on critical content, while utilizing a clever trigonometric function-based technique to preserve fine-grained details under non-negativity constraints. Empirical results show that NaLaFormer improves accuracy by up to 7.5% on image classification and reduces peak memory usage by 92.3% in image super-resolution tasks. It also outperforms current linear models in language understanding and long-sequence benchmarks, offering a new paradigm for designing linear attentions that balance both efficiency and performance.