The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicry
Not on the map. Why?
Abstract (arXiv)
Linear attentions have shown potential for improving Transformer efficiency, reducing attention's quadratic complexity to linear in sequence length. This holds exciting promise for (1) training linear Transformers from scratch, (2) "finetuned-conversion" of task-specific Transformers into linear versions that recover task performance, and (3) "pretrained-conversion" of Transformers such as large language models into linear versions finetunable on downstream tasks. However, linear attentions often underperform standard softmax attention in quality. To close this performance gap, we find prior linear attentions lack key properties of softmax attention tied to good performance: low-entropy (or "spiky") weights and dot-product monotonicity. We further observe surprisingly simple feature maps that retain these properties and match softmax performance, but are inefficient to compute in linear attention. We thus propose Hedgehog, a learnable linear attention that retains the spiky and monotonic properties of softmax attention while maintaining linear complexity. Hedgehog uses simple trainable MLPs to produce attention weights mimicking softmax attention. Experiments show Hedgehog recovers over 99% of standard Transformer quality in train-from-scratch and finetuned-conversion settings, outperforming prior linear attentions up to 6 perplexity points on WikiText-103 with causal GPTs, and up to 8.7 GLUE score points on finetuned bidirectional BERTs. Hedgehog also enables pretrained-conversion. Converting a pretrained GPT-2 into a linear attention variant achieves state-of-the-art 16.7 perplexity on WikiText-103 for 125M subquadratic decoder models. We finally turn a pretrained Llama-2 7B into a viable linear attention Llama. With low-rank adaptation, Hedgehog-Llama2 7B achieves 28.1 higher ROUGE-1 points over the base standard attention model, where prior linear attentions lead to 16.5 point drops.
Key facts. Cited by 119 papers in the map (data through 7 Oct 2026). Builds on 38 of its 42 references that are in the map. First posted on arXiv 6 Feb 2024.
Builds on
38 of 42 references.
References · 38
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2021Emerging Properties in Self-Supervised Vision Transformerscited by 6,893
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,355
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
26 more
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2020Rethinking Attention with Performerscited by 1,584
- 2018Neural Network Acceptability Judgmentscited by 952
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 696
- 2019SAMSum Corpus: A Human-annotated Dialogue Dataset for Abstractive Summarizationcited by 530
- 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 495
- 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
- 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 388
- 2021Random Feature Attentioncited by 350
- 2022cosFormer: Rethinking Softmax in Attentioncited by 212
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 211
- 2016Using Fast Weights to Attend to the Recent Pastcited by 161
- 2022On The Computational Complexity of Self-Attentioncited by 137
- 2023Fast Attention Requires Bounded Entriescited by 102
- 2022The Devil in Linear Transformercited by 98
- 2021Finetuning Pretrained Transformers into RNNscited by 94
- 2021Going Beyond Linear Transformers with Recurrent Fast Weight Programmerscited by 84
- 2021Skyformer: Remodel Self-Attention with Gaussian Kernel and Nystr"om Methodcited by 61
- 2022Fine-Tuning Pre-trained Transformers into Decaying Fast Weightscited by 26
- 2021Hybrid Random Featurescited by 25
- 2023Efficient Attention via Control Variatescited by 23
- 2020Exploring Alternatives to Softmax Functioncited by 16
Built on by
Citing papers per year: 2024: 31; 2025: 44; 2026: 44.
119 papers.
Sort:
By area:
- 2024From Decoding to Meta-Generation: Inference-time Algorithms for Large Language Modelscited by 136
- 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Modelscited by 120
- 2024Keep the Cost Down: A Review on Methods to Optimize LLM' s KV-Cache Consumptioncited by 96
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Modelscited by 66
- 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 63
- 2024Linearizing Large Language Modelscited by 51
- 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformerscited by 51
- 2024Training of Physical Neural Networkscited by 47
- 2025Jet-Nemotron: Efficient Language Model with Post Neural Architecture Searchcited by 39
- 2024ThunderKittens: Simple, Fast, and Adorable AI Kernelscited by 34
- 2025Liger: Linearizing Large Language Models to Gated Recurrent Structurescited by 32
38 more
- 2024The Fine-Grained Complexity of Gradient Computation for Training Large Language Modelscited by 30
- 2025PolaFormer: Polarity-aware Linear Attention for Vision Transformerscited by 30
- 2024Training Tensor Attention Efficiently: From Cubic to Almost Linear Timecited by 29
- 2025Tensor Product Attention Is All You Needcited by 27
- 2024LoLCATs: On Low-Rank Linearizing of Large Language Modelscited by 25
- 2024Multi-Layer Transformers Gradient Can be Approximated in Almost Linear Timecited by 22
- 2025Thinking Slow, Fast: Scaling Inference Compute with Distilled Reasonerscited by 22
- 2025M1: Towards Scalable Test-Time Compute with Mamba Reasoning Modelscited by 21
- 2025Efficient Attention Mechanisms for Large Language Models: A Surveycited by 21
- 2024MetaLA: Unified Optimal Linear Approximation to Softmax Attention Mapcited by 20
- 2024A Tighter Complexity Analysis of SparseGPTcited by 19
- 2024HSR-Enhanced Sparse Attention Accelerationcited by 19
- 2024Understanding and Mitigating Bottlenecks of State Space Models through the Lens of Recency and Over-smoothingcited by 17
- 2026PISA: Piecewise Sparse Attention Is Wiser for Efficient Diffusion Transformerscited by 16
- 2024Mimetic Initialization Helps State Space Models Learn to Recallcited by 15
- 2026VGG-T3: Offline Feed-Forward 3D Reconstruction at Scalecited by 14
- 2025TabFlex: Scaling Tabular Learning to Millions with Linear Attentioncited by 13
- 2025Attention Surgery: An Efficient Recipe to Linearize Your Video Diffusion Transformercited by 13
- 2025Scaling Linear Attention with Sparse State Expansioncited by 12
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptationcited by 11
- 2025Multimodal Mamba: Decoder-only Multimodal State Space Model via Quadratic to Linear Distillationcited by 11
- 2025LoLA: Low-Rank Linear Attention With Sparse Cachingcited by 10
- 2024Distributed Speculative Inference (DSI): Speculation Parallelism for Provably Faster Lossless Language Model Inferencecited by 9
- 2025ZETA: Leveraging Z-order Curves for Efficient Top-k Attentioncited by 9
- 2025Fast RoPE Attention: Combining the Polynomial Method and Fast Fourier Transformcited by 9
- 2025LinVideo: A Post-Training Framework towards O(n) Attention in Efficient Video Generationcited by 9
- 2025Selective Rotary Position Embeddingcited by 8
- 2025Only Large Weights (And Not Skip Connections) Can Prevent the Perils of Rank Collapsecited by 7
- 2024Exact Conversion of In-Context Learning to Model Weights in Linearized-Attention Transformerscited by 6
- 2025Lizard: An Efficient Linearization Framework for Large Language Modelscited by 6
- 2026ReHyAt: Recurrent Hybrid Attention for Video Diffusion Transformerscited by 6
- 2024CARE Transformer: Mobile-Friendly Linear Visual Transformer via Decoupled Dual Interactioncited by 5
- 2025ViT-Linearizer: Distilling Quadratic Knowledge into Linear-Time Vision Modelscited by 5
- 2025MonarchAttention: Zero-Shot Conversion to Fast, Hardware-Aware Structured Attentioncited by 5
- 2025ReGLA: Refining Gated Linear Attentioncited by 4
- 2025Linear Attention for Efficient Bidirectional Sequence Modelingcited by 4
- 2025X-EcoMLA: Upcycling Pre-Trained Attention into MLA for Efficient and Extreme KV Compressioncited by 4
- 2025LOTFormer: Doubly-Stochastic Linear Attention via Low-Rank Optimal Transportcited by 4
50 most cited of 119 All 119 (JSON)
- 2026Bridging KV-Cache Quantization and Linear Attention: From Theory to Pretrained Weight Migration8 Oct 2026
- 2026Switching Linear Attention30 Sep 2026
- 2026Copy the Same, Distill the Difference: Initializing Linear Vision Transformers28 Sep 2026
- 2026On-Policy Attention Linearization25 Sep 2026
- 2026Sliding-window beats linear attention28 Aug 2026
- 2026DiD It in 87 Minutes: A Label-Free Softmax-to-Linear Adaptation of Vision Transformers for Object Detection23 Aug 2026
- 2026FLARE++: Low-rank attention with dynamic attention routing12 Aug 2026
- 2026Retrofitting Linear Attention into Diffusion Language Models6 Aug 2026
- 2026The Key to Going Linear: Analysis-Driven Transformer Linearization8 Jul 2026
- 2026Diffusion-Guided Uncertainty-Aware Delayed Policy Optimization6 Jul 2026
- 2026ELiTeFormer: An Efficient Transformer for FPGAs4 Jul 2026
- 2026Morphing into Hybrid Attention Models29 Jun 2026
38 more
- 2026GLIDE: Guided Layerwise Hybrid Attention for Efficient LLM Inference26 Jun 2026
- 2026Flexformer: Flexible Linear Transformer with Learnable Attention Kernel26 Jun 2026
- 2026Taylor-Calibrate: Principled Initialization for Hybrid Linear Attention Distillation15 Jun 2026
- 2026Long-Context Modeling via GSS-Transformer Hybrid Architecture with Learnable Mixing15 Jun 2026
- 2026Attention Amnesia in Hybrid LLMs: When CoT Fine-Tuning Breaks Long-Range Recall, and How to Fix It9 Jun 2026
- 2026Blurry Window Attention31 May 2026
- 2026Don't Read Everything: A Curvature-Conditioned Query for Linear Attention31 May 2026
- 2026HierEdit: Region-Aware Hierarchical Diffusion for Efficient High-Resolution Editing17 May 2026
- 2026WriteSAE: Sparse Autoencoders for Recurrent State12 May 2026
- 2026Do Vision Transformers Need All-to-All Attention? Global Communication Through Elastic Learned Cores12 May 2026
- 2026Linearizing Vision Transformer with Test-Time Training4 May 2026
- 2026SpikingBrain2.0: Brain-Inspired Foundation Models for Efficient Long-Context and Cross-Platform Inference24 Apr 2026
- 2026LayerBoost: Layer-Aware Attention Reduction for Efficient LLMs23 Apr 2026
- 2026LaplacianFormer:Rethinking Linear Attention with Laplacian Kernel22 Apr 2026
- 2026Residual-Mass Accounting for Partial-KV Decoding7 Apr 2026
- 2026Attention to Mamba: A Recipe for Cross-Architecture Distillation1 Apr 2026
- 2026When Perplexity Lies: Generation-Focused Distillation of Hybrid Sequence Models27 Mar 2026
- 2026ViT-AdaLA: Adapting Vision Transformers with Linear Attention17 Mar 2026
- 2026Effective Distillation to Hybrid xLSTM Architectures16 Mar 2026
- 2026Why Attend to Everything? Focus is the Key12 Mar 2026
- 2026UCAN: Unified Convolutional Attention Network for Expansive Receptive Fields in Lightweight Super-Resolution12 Mar 2026
- 2026Gradient Flow Polarizes Softmax Outputs towards Low-Entropy Solutions6 Mar 2026
- 2026VGG-T3: Offline Feed-Forward 3D Reconstruction at Scale26 Feb 2026
- 20262Mamba2Furious: Linear in Complexity, Competitive in Accuracy19 Feb 2026
- 2026Improved state mixing in higher-order and block diagonal linear recurrent networks12 Feb 2026
- 2026SLAY: Geometry-Aware Spherical Linearized Attention with Yat-Kernel4 Feb 2026
- 2026Manifold Random Features3 Feb 2026
- 2026STILL: Selecting Tokens for Intra-Layer Hybrid Attention to Linearize LLMs2 Feb 2026
- 2026Dissecting Outlier Dynamics in LLM NVFP4 Pretraining2 Feb 2026
- 2026PISA: Piecewise Sparse Attention Is Wiser for Efficient Diffusion Transformers1 Feb 2026
- 2026EUGens: Efficient, Unified, and General Dense Layers30 Jan 2026
- 2026ReHyAt: Recurrent Hybrid Attention for Video Diffusion Transformers7 Jan 2026
- 2025LUNA: Linear Universal Neural Attention with Generalization Guarantees8 Dec 2025
- 2025Network of Theseus (like the ship)3 Dec 2025
- 2025Selective Rotary Position Embedding21 Nov 2025
- 2025Sample-Efficient Language Modeling with Linear Attention and Lightweight Enhancements4 Nov 2025
- 2025FlashEVA: Accelerating LLM inference via Efficient Attention1 Nov 2025
- 2025Transformer Based Linear Attention with Optimized GPU Kernel Implementation24 Oct 2025
50 newest of 119 All 119 (JSON)
- 2026PISA: Piecewise Sparse Attention Is Wiser for Efficient Diffusion Transformerscited by 16
- 2025Attention Surgery: An Efficient Recipe to Linearize Your Video Diffusion Transformercited by 13
- 2025LinVideo: A Post-Training Framework towards O(n) Attention in Efficient Video Generationcited by 9
- 2026ReHyAt: Recurrent Hybrid Attention for Video Diffusion Transformerscited by 6
- 2025Diffusion Transformer-to-Mamba Distillation for High-Resolution Image Generationcited by 3
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiencycited by 2
- 2025UltraImageGen: Efficient Ultra-High-Resolution Image Generation with Hierarchical Local Attentioncited by 1
- 2026Retrofitting Linear Attention into Diffusion Language Modelscited by 0
- 2026Retrofitting Linear Attention into Diffusion Language Models6 Aug 2026
- 2026PISA: Piecewise Sparse Attention Is Wiser for Efficient Diffusion Transformers1 Feb 2026
- 2026ReHyAt: Recurrent Hybrid Attention for Video Diffusion Transformers7 Jan 2026
- 2025UltraImageGen: Efficient Ultra-High-Resolution Image Generation with Hierarchical Local Attention18 Oct 2025
- 2025LinVideo: A Post-Training Framework towards O(n) Attention in Efficient Video Generation9 Oct 2025
- 2025Attention Surgery: An Efficient Recipe to Linearize Your Video Diffusion Transformer29 Sep 2025
- 2025Diffusion Transformer-to-Mamba Distillation for High-Resolution Image Generation23 Jun 2025
- 2025Theoretical Foundation of Flow-Based Time Series Generation: Provable Approximation, Generalization, and Efficiency18 Mar 2025
- 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Modelscited by 120
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Modelscited by 66
- 2024Understanding and Mitigating Bottlenecks of State Space Models through the Lens of Recency and Over-smoothingcited by 17
- 2024Mimetic Initialization Helps State Space Models Learn to Recallcited by 15
- 2026Attention to Mamba: A Recipe for Cross-Architecture Distillationcited by 3
- 2024Joint Fine-tuning and Conversion of Pretrained Speech and Language Models towards Linear Complexitycited by 1
- 20262Mamba2Furious: Linear in Complexity, Competitive in Accuracycited by 1
- 2026WriteSAE: Sparse Autoencoders for Recurrent Statecited by 1
- 2026WriteSAE: Sparse Autoencoders for Recurrent State12 May 2026
- 2026Attention to Mamba: A Recipe for Cross-Architecture Distillation1 Apr 2026
- 20262Mamba2Furious: Linear in Complexity, Competitive in Accuracy19 Feb 2026
- 2024Understanding and Mitigating Bottlenecks of State Space Models through the Lens of Recency and Over-smoothing31 Dec 2024
- 2024Mimetic Initialization Helps State Space Models Learn to Recall14 Oct 2024
- 2024Joint Fine-tuning and Conversion of Pretrained Speech and Language Models towards Linear Complexity9 Oct 2024
- 2024The Mamba in the Llama: Distilling and Accelerating Hybrid Models27 Aug 2024
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Models19 Aug 2024
- 2024Keep the Cost Down: A Review on Methods to Optimize LLM' s KV-Cache Consumptioncited by 96
- 2024Distributed Speculative Inference (DSI): Speculation Parallelism for Provably Faster Lossless Language Model Inferencecited by 9
- 2025X-EcoMLA: Upcycling Pre-Trained Attention into MLA for Efficient and Extreme KV Compressioncited by 4
- 2026Sliding-window beats linear attentioncited by 2
- 2026Blurry Window Attentioncited by 1
- 2026Taylor-Calibrate: Principled Initialization for Hybrid Linear Attention Distillationcited by 1
- 2026GLIDE: Guided Layerwise Hybrid Attention for Efficient LLM Inferencecited by 0
- 2026Sliding-window beats linear attention28 Aug 2026
- 2026GLIDE: Guided Layerwise Hybrid Attention for Efficient LLM Inference26 Jun 2026
- 2026Taylor-Calibrate: Principled Initialization for Hybrid Linear Attention Distillation15 Jun 2026
- 2026Blurry Window Attention31 May 2026
- 2025X-EcoMLA: Upcycling Pre-Trained Attention into MLA for Efficient and Extreme KV Compression14 Mar 2025
- 2024Keep the Cost Down: A Review on Methods to Optimize LLM' s KV-Cache Consumption25 Jul 2024
- 2024Distributed Speculative Inference (DSI): Speculation Parallelism for Provably Faster Lossless Language Model Inference23 May 2024
- 2025Thinking Slow, Fast: Scaling Inference Compute with Distilled Reasonerscited by 22
- 2025M1: Towards Scalable Test-Time Compute with Mamba Reasoning Modelscited by 21
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptationcited by 11
- 2026Attention Amnesia in Hybrid LLMs: When CoT Fine-Tuning Breaks Long-Range Recall, and How to Fix Itcited by 0
- 2026On-Policy Attention Linearizationcited by 0
- 2026On-Policy Attention Linearization25 Sep 2026
- 2026Attention Amnesia in Hybrid LLMs: When CoT Fine-Tuning Breaks Long-Range Recall, and How to Fix It9 Jun 2026
- 2025M1: Towards Scalable Test-Time Compute with Mamba Reasoning Models14 Apr 2025
- 2025Thinking Slow, Fast: Scaling Inference Compute with Distilled Reasoners27 Feb 2025
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptation17 Oct 2024
- 2024From Decoding to Meta-Generation: Inference-time Algorithms for Large Language Modelscited by 136
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
- 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 63
- 2024Linearizing Large Language Modelscited by 51
- 2024Sparser is Faster and Less is More: Efficient Sparse Attention for Long-Range Transformerscited by 51
- 2024Training of Physical Neural Networkscited by 47
- 2025Jet-Nemotron: Efficient Language Model with Post Neural Architecture Searchcited by 39
- 2024ThunderKittens: Simple, Fast, and Adorable AI Kernelscited by 34
- 2025Liger: Linearizing Large Language Models to Gated Recurrent Structurescited by 32
- 2024The Fine-Grained Complexity of Gradient Computation for Training Large Language Modelscited by 30
- 2025PolaFormer: Polarity-aware Linear Attention for Vision Transformerscited by 30
- 2024Training Tensor Attention Efficiently: From Cubic to Almost Linear Timecited by 29
12 most cited of 90 All 90 (JSON)
- 2026Bridging KV-Cache Quantization and Linear Attention: From Theory to Pretrained Weight Migration8 Oct 2026
- 2026Switching Linear Attention30 Sep 2026
- 2026Copy the Same, Distill the Difference: Initializing Linear Vision Transformers28 Sep 2026
- 2026DiD It in 87 Minutes: A Label-Free Softmax-to-Linear Adaptation of Vision Transformers for Object Detection23 Aug 2026
- 2026FLARE++: Low-rank attention with dynamic attention routing12 Aug 2026
- 2026The Key to Going Linear: Analysis-Driven Transformer Linearization8 Jul 2026
- 2026Diffusion-Guided Uncertainty-Aware Delayed Policy Optimization6 Jul 2026
- 2026ELiTeFormer: An Efficient Transformer for FPGAs4 Jul 2026
- 2026Morphing into Hybrid Attention Models29 Jun 2026
- 2026Flexformer: Flexible Linear Transformer with Learnable Attention Kernel26 Jun 2026
- 2026Long-Context Modeling via GSS-Transformer Hybrid Architecture with Learnable Mixing15 Jun 2026
- 2026Don't Read Everything: A Curvature-Conditioned Query for Linear Attention31 May 2026
12 newest of 90 All 90 (JSON)