中文
相关论文

相关论文: More Expressive Attention with Negative Weights

200 篇论文

Attention mechanism has become the dominant module in natural language processing models. It is computationally intensive and depends on massive power-hungry multiplications. In this paper, we rethink variants of attention mechanism from…

计算与语言 · 计算机科学 2022-10-20 Yu Wan , Baosong Yang , Dayiheng Liu , Rong Xiao , Derek F. Wong , Haibo Zhang , Boxing Chen , Lidia S. Chao

The quadratic cost of attention in transformers motivated the development of efficient approaches: namely sparse and sliding window attention, convolutions and linear attention. Although these approaches result in impressive reductions in…

机器学习 · 计算机科学 2025-11-10 Jatin Prakash , Aahlad Puli , Rajesh Ranganath

Language models for code such as CodeBERT offer the capability to learn advanced source code representation, but their opacity poses barriers to understanding of captured properties. Recent attention analysis studies provide initial…

软件工程 · 计算机科学 2023-11-23 Mootez Saad , Tushar Sharma

The Transformer model architecture has become one of the most widely used in deep learning and the attention mechanism is at its core. The standard attention formulation uses a softmax operation applied to a scaled dot product between query…

机器学习 · 计算机科学 2026-04-02 Hariprasath Govindarajan , Per Sidén , Jacob Roll , Fredrik Lindsten

Visual Question Answering (VQA) models employ attention mechanisms to discover image locations that are most relevant for answering a specific question. For this purpose, several multimodal fusion strategies have been proposed, ranging from…

计算机视觉与模式识别 · 计算机科学 2021-08-26 Moshiur R Farazi , Salman H Khan , Nick Barnes

Attention based models such as Transformers involve pairwise interactions between data points, modeled with a learnable attention matrix. Importantly, this attention matrix is normalized with the SoftMax operator, which makes it row-wise…

机器学习 · 计算机科学 2022-01-25 Michael E. Sander , Pierre Ablin , Mathieu Blondel , Gabriel Peyré

We study how multi-head softmax attention models are trained to perform in-context learning on linear data. Through extensive empirical experiments and rigorous theoretical analysis, we demystify the emergence of elegant attention patterns:…

机器学习 · 计算机科学 2025-05-29 Jianliang He , Xintian Pan , Siyu Chen , Zhuoran Yang

Gating mechanisms have been widely utilized, from early models like LSTMs and Highway Networks to recent state space models, linear attention, and also softmax attention. Yet, existing literature rarely examines the specific effects of…

Since its introduction, softmax attention has become the backbone of modern transformer architectures due to its expressiveness and scalability across a wide range of tasks. However, the main drawback of softmax attention is the quadratic…

机器学习 · 计算机科学 2026-02-20 Gabriel Mongaras , Eric C. Larson

Transformer is a ubiquitous model for natural language processing and has attracted wide attentions in computer vision. The attention maps are indispensable for a transformer model to encode the dependencies among input tokens. However,…

机器学习 · 计算机科学 2021-02-26 Yujing Wang , Yaming Yang , Jiangang Bai , Mingliang Zhang , Jing Bai , Jing Yu , Ce Zhang , Gao Huang , Yunhai Tong

Linear attentions have shown potential for improving Transformer efficiency, reducing attention's quadratic complexity to linear in sequence length. This holds exciting promise for (1) training linear Transformers from scratch, (2)…

机器学习 · 计算机科学 2024-02-08 Michael Zhang , Kush Bhatia , Hermann Kumbong , Christopher Ré

Transformer-based models, such as BERT and GPT, have been widely adopted in natural language processing (NLP) due to their exceptional performance. However, recent studies show their vulnerability to textual adversarial attacks where the…

计算与语言 · 计算机科学 2023-12-01 Lujia Shen , Yuwen Pu , Shouling Ji , Changjiang Li , Xuhong Zhang , Chunpeng Ge , Ting Wang

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 constraint on feature maps…

计算机视觉与模式识别 · 计算机科学 2025-03-05 Weikang Meng , Yadan Luo , Xin Li , Dongmei Jiang , Zheng Zhang

Transformers are built upon multi-head scaled dot-product attention and positional encoding, which aim to learn the feature representations and token dependencies. In this work, we focus on enhancing the distinctive representation by…

计算机视觉与模式识别 · 计算机科学 2022-07-12 Litao Yu , Jian Zhang

We consider the problem of Visual Question Answering (VQA). Given an image and a free-form, open-ended, question, expressed in natural language, the goal of VQA system is to provide accurate answer to this question with respect to the…

计算机视觉与模式识别 · 计算机科学 2021-06-07 Tanzila Rahman , Shih-Han Chou , Leonid Sigal , Giuseppe Carenini

The success of Transformer language models is widely credited to their dot-product attention mechanism, which interweaves a set of key design principles: mixing information across positions (enabling multi-token interactions),…

计算与语言 · 计算机科学 2025-10-14 Huiyin Xue , Nafise Sadat Moosavi , Nikolaos Aletras

This work proposes an extensive analysis of the Transformer architecture in the Neural Machine Translation (NMT) setting. Focusing on the encoder-decoder attention mechanism, we prove that attention weights systematically make alignment…

计算与语言 · 计算机科学 2021-09-14 Javier Ferrando , Marta R. Costa-jussà

Attention mechanisms, particularly softmax attention, have been instrumental in the success of transformer-based models such as GPT. However, the quadratic memory complexity of softmax attention with respect to sequence length poses…

机器学习 · 计算机科学 2026-02-20 Gabriel Mongaras , Trevor Dohm , Eric C. Larson

Scaled dot-product attention applies a softmax function on the scaled dot-product of queries and keys to calculate weights and then multiplies the weights and values. In this work, we study how to improve the learning of scaled dot-product…

计算机视觉与模式识别 · 计算机科学 2023-03-17 Kaikai Zhao , Norimichi Ukita

Attention is a key component of Transformers, which have recently achieved considerable success in natural language processing. Hence, attention is being extensively studied to investigate various linguistic capabilities of Transformers,…

计算与语言 · 计算机科学 2020-10-07 Goro Kobayashi , Tatsuki Kuribayashi , Sho Yokoi , Kentaro Inui