mlsanityData to 7 Oct 2026

Degrees of Freedom for Linear Attention: Distilling Softmax Attention with Optimal Feature Efficiency

arXiv 2507.03340 ↗First posted 4 Jul 2025cs.LG stat.MLcited by 2

Not on the map. Why?

Abstract (arXiv)

Linear attention has attracted interest as a computationally efficient approximation to softmax attention, especially for long sequences. Recent studies have explored distilling softmax attention in pre-trained Transformers into linear attention. However, a critical challenge remains: how to choose the feature dimension that governs the approximation quality. Existing methods fix this dimension uniformly across all attention layers, overlooking the diverse roles and complexities of them. In this paper, we propose a principled method to automatically determine the feature dimension in linear attention using the concept of statistical degrees of freedom, which represent the effective dimensionality of the inputs. We provide a theoretical bound on the approximation error and show that the dimension chosen by our method achieves smaller error under a fixed computational budget. Furthermore, we introduce an efficient layerwise training strategy to learn nonlinear features tailored to each layer. Experiments on multiple pre-trained transformers demonstrate that our method improves the performance of distilled models compared to baselines without increasing the inference cost. Our findings also provide insight into how the complexity of the attention mechanism evolves across layers.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 26 of its 38 references that are in the map. First posted on arXiv 4 Jul 2025.

Builds on

26 of 38 references.

References · 26

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  3. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  4. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
  5. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
  6. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
  7. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  8. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
  9. 2020Rethinking Attention with Performerscited by 1,584
  10. 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
  11. 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,414
  12. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
14 more
  1. 2021Random Feature Attentioncited by 350
  2. 2018Stronger generalization bounds for deep nets via a compression approachcited by 306
  3. 2022cosFormer: Rethinking Softmax in Attentioncited by 212
  4. 2015On the Equivalence between Kernel Quadrature Rules and Random Feature Expansionscited by 136
  5. 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Modelscited by 120
  6. 2024Demystify Mamba in Vision: A Linear Attention Perspectivecited by 101
  7. 2021Finetuning Pretrained Transformers into RNNscited by 94
  8. 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Modelscited by 66
  9. 2021Stable, Fast and Accurate: Kernelized Attention with Relative Positional Encodingcited by 50
  10. 2024Understanding the differences in Foundation Models: Attention, State Space Models, and Recurrent Neural Networkscited by 26
  11. 2023Laughing Hyena Distillery: Extracting Compact Recurrences From Convolutionscited by 24
  12. 2024DiJiang: Efficient Large Language Models through Compact Kernelizationcited by 15
  13. 2024Scavenging Hyena: Distilling Transformers into Long Convolution Modelscited by 5
  14. 2024Data-driven h2 model reduction for linear discrete-time systemscited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.