paper-with-me

홈 › Papers

Improving Attention Mechanism with Query-Value Interaction

2020-10-08 · Chuhan Wu, Fangzhao Wu, Tao Qi, Yongfeng Huang

Attention mechanism has played critical roles in various state-of-the-art NLP models such as Transformer and BERT. It can be formulated as a ternary function that maps the input queries, keys and values into an output by using a summation of values weighted by the attention weights derived from the interactions between queries and keys. Similar with query-key interactions, there is also inherent relatedness between queries and values, and incorporating query-value interactions has the potential to enhance the output by learning customized values according to the characteristics of queries. However, the query-value interactions are ignored by existing attention methods, which may be not optimal. In this paper, we propose to improve the existing attention mechanism by incorporating query-value interactions. We propose a query-value interaction function which can learn query-aware attention values, and combine them with the original values and attention weights to form the final output. Extensive experiments on four datasets for different tasks show that our approach can consistently improve the performance of many attention-based models by incorporating query-value interactions.

📄 PDF Abstract BibTeX arXiv:2010.03766

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Position-Wise Feed-Forward Layer 설명 없음
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
WordPiece 설명 없음
Multi-Head Attention 설명 없음

Similar Papers 제목 키워드 기반

MetaMixer Is All You Need

2024-06-04 · Seokju Yun, Dongheon Lee, Youngmin Ro

Transformer, composed of self-attention and Feed-Forward Network, has revolutionized the landscape of network design across various vision tasks. FFN is a versatile operator seamlessly integrated into nearly all AI model…

All

Compositional Attention: Disentangling Search and Retrieval

2021-10-18 · ICLR 2022 4 · Sarthak Mittal, Sharath Chandra Raparthy, Irina Rish, Yoshua Bengio 외

Multi-head, key-value attention is the backbone of the widely successful Transformer model and its variants. This attention mechanism uses multiple parallel key-value attention blocks (called heads), each performing two …

Retrieval

Dissecting Query-Key Interaction in Vision Transformers

2024-04-04 · Xu Pan, Aaron Philip, Ziqian Xie, Odelia Schwartz

Self-attention in vision transformers is often thought to perform perceptual grouping where tokens attend to other tokens with similar embeddings, which could correspond to semantically similar features of an object. How…

Learning Correlation Structures for Vision Transformers

2024-04-05 · CVPR 2024 1 · Manjin Kim, Paul Hongsuck Seo, Cordelia Schmid, Minsu Cho

We introduce a new attention mechanism, dubbed structural self-attention (StructSA), that leverages rich correlation patterns naturally emerging in key-query interactions of attention. StructSA generates attention maps b…

Action ClassificationAction RecognitionObjectVideo Classification

PolaFormer: Polarity-aware Linear Attention for Vision Transformers

2025-01-25 · Weikang Meng, Yadan Luo, Xin Li, Dongmei Jiang 외

Linear attention has emerged as a promising alternative to softmax-based attention, leveraging kernelized feature maps to reduce complexity from quadratic to linear in sequence length. However, the non-negative constrain…