Not All Dimensions Are Equal: Outlier-Aware Attention Linearization with Grouped Quadratic Kernels
Not on the map. Why?
Abstract (arXiv)
Linearizing softmax attention offers a route to efficient Transformer inference, but preserving pretrained attention remains challenging. We identify an important source of approximation error overlooked by standard linearization methods: a small number of outlier dimensions contribute disproportionately to query-key dot products and account for a large fraction of the approximation error. Motivated by this heterogeneity, we propose Outlier-Aware Attention Linearization (OAL), a dimension-aware method for constructing quadratic attention approximations. Starting from a second-order Taylor approximation, we introduce a Hadamard-product formulation that makes individual query-key contributions explicit. This formulation relaxes globally shared coefficients to support dimension-specific linear terms and cross-dimensional quadratic interactions while preserving separable evaluation. To retain this flexibility with fewer parameters, OAL groups dimensions with similar contribution scales to share coefficients, while allowing distinct treatment of the few outliers. The resulting positive quadratic kernel is calibrated against pretrained attention outputs and admits linear-time evaluation with respect to sequence length for fixed head dimensions. On Qwen2.5-0.5B, OAL reduces frozen-attention output relative MSE by approximately 8.9% compared with DiJiang. Replacing middle-layer attention modules and jointly fine-tuning the kernel coefficients with LoRA further lowers WikiText-103 perplexity from 31.71 to 27.50 compared with a learned global quadratic, while improving accuracy on PIQA, HellaSwag, and ARC-E. These results demonstrate the value of outlier-aware dimension grouping for both attention approximation and pretrained-model conversion. The code is available at https://github.com/wuqianyue09/OAL
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 27 of its 29 references that are in the map. First posted on arXiv 9 Oct 2026.
Builds on
27 of 29 references.
References · 27
- 2017Attention Is All You Needcited by 60,361
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2020Rethinking Attention with Performerscited by 1,601
- 2022LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scalecited by 906
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
- 2021Random Feature Attentioncited by 354
- 2024Massive Activations in Large Language Modelscited by 294
15 more
- 2024Simple linear attention language models balance the recall-throughput tradeoffcited by 208
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 120
- 2021BERT Busters: Outlier Dimensions that Disrupt Transformerscited by 112
- 2021Finetuning Pretrained Transformers into RNNscited by 96
- 2023PolySketchFormer: Fast Transformers via Sketching Polynomial Kernelscited by 36
- 2025Systematic Outliers in Large Language Modelscited by 33
- 2025Liger: Linearizing Large Language Models to Gated Recurrent Structurescited by 33
- 2024DiJiang: Efficient Large Language Models through Compact Kernelizationcited by 16
- 2021On Learning the Transformer Kernelcited by 15
- 2024Linear Transformers with Learnable Kernel Functions are Better In-Context Modelscited by 11
- 2024TaylorShift: Shifting the Complexity of Self-Attention from Squared to Linear (and Back) using Taylor-Softmaxcited by 7
- 2024Exact Conversion of In-Context Learning to Model Weights in Linearized-Attention Transformerscited by 7
- 2026Transformers Are Born Biased: Structural Inductive Biases at Random Initialization and Their Practical Consequencescited by 6
- 2024Spectraformer: A Unified Random Feature Framework for Transformercited by 5
- 2026The Structural Origin of Attention Sink: Variance Discrepancy, Super Neurons, and Dimension Disparitycited by 1
Built on by
Not cited yet.