paper-with-me

홈 › Papers

On the Relationship between Self-Attention and Convolutional Layers

2019-11-08 · ICLR 2020 1 · Jean-Baptiste Cordonnier, Andreas Loukas, Martin Jaggi

Recent trends of incorporating attention mechanisms in vision have led researchers to reconsider the supremacy of convolutional layers as a primary building block. Beyond helping CNNs to handle long-range dependencies, Ramachandran et al. (2019) showed that attention can completely replace convolution and achieve state-of-the-art performance on vision tasks. This raises the question: do learned attention layers operate similarly to convolutional layers? This work provides evidence that attention layers can perform convolution and, indeed, they often learn to do so in practice. Specifically, we prove that a multi-head self-attention layer with sufficient number of heads is at least as expressive as any convolutional layer. Our numerical experiments then show that self-attention layers attend to pixel-grid patterns similarly to CNN layers, corroborating our analysis. Our code is publicly available.

📄 PDF Abstract BibTeX arXiv:1911.03584

Code (1)

epfml/attention-cnn 공식 구현 pytorch

Tasks

Image Classification

Methods 이 논문이 사용한 방법론

Convolution A convolution is a type of matrix operation, consisting of a kernel, a small matrix of weights, that slides over input data performing element-wise multiplication with the…

Similar Papers 제목 키워드 기반

Convolutions and Self-Attention: Re-interpreting Relative Positions in Pre-trained Language Models

2021-06-10 · ACL 2021 5 · Tyler A. Chang, Yifan Xu, Weijian Xu, Zhuowen Tu

In this paper, we detail the relationship between convolutions and self-attention in natural language tasks. We show that relative position embeddings in self-attention layers are equivalent to recently-proposed dynamic …

Language ModelingLanguage ModellingPosition

When Can Self-Attention Be Replaced by Feed Forward Layers?

2020-05-28 · Shucong Zhang, Erfan Loweimi, Peter Bell, Steve Renals

Recently, self-attention models such as Transformers have given competitive results compared to recurrent neural network systems in speech recognition. The key factor for the outstanding performance of self-attention mod…

speech-recognitionSpeech Recognition

On the Usefulness of Self-Attention for Automatic Speech Recognition with Transformers

2020-11-08 · Shucong Zhang, Erfan Loweimi, Peter Bell, Steve Renals

Self-attention models such as Transformers, which can capture temporal relationships without being limited by the distance between events, have given competitive speech recognition results. However, we note the range of …

Automatic Speech RecognitionAutomatic Speech Recognition (ASR)speech-recognitionSpeech Recognition

Transformed CNNs: recasting pre-trained convolutional layers with self-attention

2021-06-10 · Stéphane d'Ascoli, Levent Sagun, Giulio Biroli, Ari Morcos

Vision Transformers (ViT) have recently emerged as a powerful alternative to convolutional networks (CNNs). Although hybrid models attempt to bridge the gap between these two architectures, the self-attention layers they…

SATS: Self-Attention Transfer for Continual Semantic Segmentation

2022-03-15 · Yiqiao Qiu, Yixing Shen, Zhuohao Sun, Yanchong Zheng 외

Continually learning to segment more and more types of image regions is a desired capability for many intelligent systems. However, such continual semantic segmentation suffers from the same catastrophic forgetting issue…

Continual Semantic SegmentationKnowledge DistillationOverlapped 100-10Overlapped 10-1+7