Lune

NeurIPS2023顶会

Primal-Attention: Self-attention through Asymmetric Kernel SVD in Primal Representation

Yingyi Chen, Qinghua Tao, Francesco Tonin, Johan A. K. Suykens

摘要

Recently, a new line of works has emerged to understand and improve self-attention in Transformers by treating it as a kernel machine. However, existing works apply the methods for symmetric kernels to the asymmetric self-attention, resulting in a nontrivial gap between the analytical understanding and numerical implementation. In this paper, we provide a new perspective to represent and optimize self-attention through asymmetric Kernel Singular Value Decomposition (KSVD), which is also motivated by the low-rank property of self-attention normally observed in deep layers. Through asymmetric KSVD, i) a primal-dual representation of selfattention is formulated, where the optimization objective is cast to maximize the projection variances in the attention outputs; ii) a novel attention mechanism, i.e., Primal-Attention, is proposed via the primal representation of KSVD, avoiding explicit computation of the kernel matrix in the dual; iii) with KKT conditions, we prove that the stationary solution to the KSVD optimization in Primal-Attention yields a zero-value objective. In this manner, KSVD optimization can be implemented by simply minimizing a regularization loss, so that low-rank property is promoted without extra decomposition. Numerical experiments show state-of-theart performance of our Primal-Attention with improved efficiency. Moreover, we demonstrate that the deployed KSVD optimization regularizes Primal-Attention with a sharper singular value decay than that of the canonical self-attention, further verifying the great potential of our method. To the best of our knowledge, this is the first work that provides a primal-dual representation for the asymmetric kernel in self-attention and successfully applies it to modelling and optimization 2 .

问 Lune

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

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

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

可以从这些问题问起

Lune 可以查阅

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

获取答案

免费开始,无需绑卡

脉络

  • Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention 引用了 Reformer: The Efficient Transformer
  • Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In Context 引用了 Language Models are Few-Shot Learners
  • Elliptical Attention 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Elliptical Attention 引用了 Reformer: The Efficient Transformer
  • Elliptical Attention 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Elliptical Attention 引用了 Training data-efficient image transformers & distillation through attention
  • Elliptical Attention 引用了 Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis 引用了 Elliptical Attention
  • Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Training data-efficient image transformers & distillation through attention
  • In-Context Learning with Transformers: Softmax Attention Adapts to Function Lipschitzness 引用了 Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In Context
  • In-Context Learning with Transformers: Softmax Attention Adapts to Function Lipschitzness 引用了 Language Models are Few-Shot Learners
  • Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inference 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis 引用了 Language Models are Few-Shot Learners
  • Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component Analysis 引用了 Training data-efficient image transformers & distillation through attention
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper16

  1. Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM InferenceHarry Dong, Xinyu Yang, Zhenyu Zhang, Zhangyang Wang 等ICML 2024 · 84 次引用
  2. Transformers Implement Functional Gradient Descent to Learn Non-Linear Functions In ContextXiang Cheng, Yuxin Chen, Suvrit SraICML 2024 · 64 次引用
  3. In-Context Learning with Transformers: Softmax Attention Adapts to Function LipschitznessLiam Collins, Advait Parulekar, Aryan Mokhtari, Sujay Sanghavi 等NeurIPS 2024 · 33 次引用
  4. Elliptical AttentionStefan K. Nielsen, Laziz U. Abdullaev, Rachel S. Y. Teo, Tan NguyenNeurIPS 2024 · 12 次引用
  5. Unveiling the Hidden Structure of Self-Attention via Kernel Principal Component AnalysisRachel S. Y. Teo, Tan M. NguyenNeurIPS 2024 · 11 次引用

它引用的 Paper22

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
  2. Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
  3. Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
  4. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 次引用
  5. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用

相关 Paper

  1. Self-Attention through Kernel-Eigen Pair Sparse Variational Gaussian ProcessesYingyi Chen, Qinghua Tao, Francesco Tonin, Johan A. K. SuykensICML 2024 · 4 次引用
  2. Learning in Feature Spaces via Coupled Covariances: Asymmetric Kernel SVD and Nyström methodQinghua Tao, Francesco Tonin, Alex Lambert, Yingyi Chen 等ICML 2024 · 4 次引用
  3. A Primal-Dual Framework for Transformers and Neural NetworksTan Minh Nguyen, Tam Minh Nguyen, Nhat Ho, Andrea L. Bertozzi 等ICLR 2023 · 2 次引用
  4. Max-Margin Token Selection in Attention MechanismDavoud Ataee Tarzanagh, Yingcong Li, Xuechen Zhang, Samet OymakNeurIPS 2023 · 67 次引用
  5. SAS: Sparse Attention Synthesizer for Efficient Language Model InferenceYuan Zhou, Shaojie Xiang, Lingfan Yu, Zhenyu Song 等EuroSys 2026
黄昏的海面,两侧是细线勾勒的悬崖