跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 机器学习

arXiv:2302.02451 (cs)
[提交于 2023年6月29日 (v1),最后修订于 2023年6月29日 (此版本, v2)]

标题:KDEformer: Accelerating Transformers via Kernel Density Estimation

作者:Amir Zandieh, Insu Han, Majid Daliri, Amin Karbasi
查看论文《KDEformer: Accelerating Transformers via Kernel Density Estimation》的 PDF
查看中文 PDF 查看原文 PDF EasyResearch 阅读
摘要:Dot-product attention mechanism plays a crucial role in modern deep architectures (e.g., Transformer) for sequence modeling, however, na\"ive 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\times$ speedup. For ImageNet classification with T2T-ViT, KDEformer shows over $18\times$ speedup while the accuracy drop is less than $0.5\%$.
评论: 26 pages, 7 figures
主题: 机器学习 (cs.LG); 计算机视觉与模式识别 (cs.CV); 数据结构与算法 (cs.DS)
引用方式: arXiv:2302.02451 [cs.LG]
  (或者 arXiv:2302.02451v2 [cs.LG] 对于此版本)
  https://doi.org/10.48550/arXiv.2302.02451

提交历史

来自:Insu Han
[v2] 2023年6月29日 星期四 17:51:10 UTC
全文链接:

访问论文:

  • 查看中文 PDF
  • 查看原文 PDF
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.DS
< 上一篇   |   下一篇 >
最新 | 近期 | 2023-06
切换浏览方式为:
cs
cs.LG
cs.CV

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站