Lune

ICML2023顶会

KDEformer: Accelerating Transformers via Kernel Density Estimation

Amir Zandieh, Insu Han, Majid Daliri, Amin Karbasi

摘要

Dot-product attention mechanism plays a crucial role in modern deep architectures (e.g., Transformer) for sequence modeling, however, naïve exact computation of this model incurs quadratic time and memory complexities in sequence length, hindering the training of long-sequence models. Critical bottlenecks are due to the computation of partition functions in the denominator of softmax function as well as the multiplication of the softmax matrix with the matrix of values. Our key observation is that the former can be reduced to a variant of the kernel density estimation (KDE) problem, and an efficient KDE solver can be further utilized to accelerate the latter via subsampling-based fast matrix products. Our proposed KDEformer can approximate the attention in sub-quadratic time with provable spectral norm bounds, while all prior results merely provide entry-wise error bounds. Empirically, we verify that KDEformer outperforms other attention approximations in terms of accuracy, memory, and runtime on various pre-trained models. On BigGAN image generation, we achieve better generative scores than the exact computation with over 4×4\times speedup. For ImageNet classification with T2T-ViT, KDEformer shows over 18×18\times speedup while the accuracy drop is less than 0.5%0.5\%.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 19 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Streaming Attention Approximation via Discrepancy Theory 引用了 HyperAttention: Long-context Attention in Near-Linear Time
  • Big Bird: Transformers for Longer Sequences 引用了 Reformer: The Efficient Transformer
  • How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker Computation 引用了 Language Models are Few-Shot Learners
  • Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting 引用了 Reformer: The Efficient Transformer
  • SeTformer Is What You Need for Vision and Language 引用了 Reformer: The Efficient Transformer
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
  • Subquadratic Algorithms and Hardness for Attention with Any Temperature 引用了 Big Bird: Transformers for Longer Sequences
  • Subquadratic Algorithms and Hardness for Attention with Any Temperature 引用了 Reformer: The Efficient Transformer
  • Subquadratic Algorithms and Hardness for Attention with Any Temperature 引用了 Language Models are Few-Shot Learners
  • Subquadratic Algorithms and Hardness for Attention with Any Temperature 引用了 HyperAttention: Long-context Attention in Near-Linear Time
  • HyperAttention: Long-context Attention in Near-Linear Time 引用了 Big Bird: Transformers for Longer Sequences
  • HyperAttention: Long-context Attention in Near-Linear Time 引用了 Informer: Beyond Efficient Transformer for Long Sequence Time-Series Forecasting
  • HyperAttention: Long-context Attention in Near-Linear Time 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • HyperAttention: Long-context Attention in Near-Linear Time 引用了 Reformer: The Efficient Transformer
  • HyperAttention: Long-context Attention in Near-Linear Time 引用了 Language Models are Few-Shot Learners
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper19

  1. HyperAttention: Long-context Attention in Near-Linear TimeInsu Han, Rajesh Jayaram, Amin Karbasi, Vahab Mirrokni 等ICLR 2024 · 104 次引用
  2. How to Capture Higher-order Correlations? Generalizing Matrix Softmax Attention to Kronecker ComputationJosh Alman, Zhao SongICLR 2024 · 53 次引用
  3. Streaming Attention Approximation via Discrepancy TheoryEkaterina Kochetkova, Kshiteej Sheth, Insu Han, Amir Zandieh 等NeurIPS 2025 · 10 次引用
  4. SeTformer Is What You Need for Vision and LanguagePourya Shamsolmoali, Masoumeh Zareapoor, Eric Granger, Michael FelsbergAAAI 2024 · 8 次引用
  5. Subquadratic Algorithms and Hardness for Attention with Any TemperatureShreya Gupta, Boyang Huang, Barna Saha, Yinzhan Xu 等ICLR 2026 · 5 次引用

它引用的 Paper16

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  3. Informer: Beyond Efficient Transformer for Long Sequence Time-Series ForecastingHaoyi Zhou, Shanghang Zhang, Jieqi Peng, Shuai Zhang 等AAAI 2021 · 7,289 次引用
  4. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
  5. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用

相关 Paper

  1. Combiner: Full Attention Transformer with Sparse Computation CostHongyu Ren, Hanjun Dai, Zihang Dai, Mengjiao Yang 等NeurIPS 2021 · 99 次引用
  2. SOFT: Softmax-free Transformer with Linear ComplexityJiachen Lu, Jinghan Yao, Junge Zhang, Xiatian Zhu 等NeurIPS 2021 · 232 次引用
  3. PolySketchFormer: Fast Transformers via Sketching Polynomial KernelsPraneeth Kacham, Vahab Mirrokni, Peilin ZhongICML 2024 · 27 次引用
  4. ELFATT: Efficient Linear Fast Attention for Vision TransformersChong Wu, Maolin Che, Renjie Xu, Zhuoheng Ran 等ACM MM 2025 · 3 次引用
  5. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
黄昏的海面,两侧是细线勾勒的悬崖