paper-with-me

홈 › Papers

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

2023-05-31 · NeurIPS 2023 11 · 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 self-attention 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-the-art 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 modeling and optimization.

📄 PDF Abstract BibTeX arXiv:2305.19798

Code (1)

yingyichen-cyy/PrimalAttention 공식 구현 pytorch

Tasks

D4RLLanguage ModellingLong-range modelingOffline RLTime Series Classification

Similar Papers 제목 키워드 기반

Inference-time sparse attention with asymmetric indexing

2025-02-12 · Pierre-Emmanuel Mazaré, Gergely Szilvasy, Maria Lomeli, Francisco Massa 외

Self-attention in transformer models is an incremental associative memory that maps key vectors to value vectors. One way to speed up self-attention is to employ GPU-compliant vector search algorithms, yet the standard p…

GPU

A Primal-Dual Framework for Transformers and Neural Networks

2024-06-19 · Tan M. Nguyen, Tam Nguyen, Nhat Ho, Andrea L. Bertozzi 외

Self-attention is key to the remarkable success of transformers in sequence modeling tasks including many applications in natural language processing and computer vision. Like neural network layers, these attention mecha…

Time SeriesTime Series Classification

Asymmetric Dual Self-Distillation for 3D Self-Supervised Representation Learning

2025-06-26 · Remco F. Leijenaar, Hamidreza Kasaei

Learning semantically meaningful representations from unstructured 3D point clouds remains a central challenge in computer vision, especially in the absence of large-scale labeled datasets. While masked point modeling (M…

3D Point Cloud ClassificationRepresentation Learning

AMatFormer: Efficient Feature Matching via Anchor Matching Transformer

2023-05-30 · Bo Jiang, Shuxian Luo, Xiao Wang, Chuanfu Li 외

Learning based feature matching methods have been commonly studied in recent years. The core issue for learning feature matching is to how to learn (1) discriminative representations for feature points (or regions) withi…

AMSA-UNet: An Asymmetric Multiple Scales U-net Based on Self-attention for Deblurring

2024-06-13 · Yingying Wang

The traditional ingle-scale U-Net often leads to the loss of spatial information during deblurring, which affects the deblurring accracy. Additionally, due to the convolutional method's limitation in capturing long-range…

DeblurringDecoder