Scratching Visual Transformer's Back with Uniform Attention

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Hyeon-Woo, Nam, Yu-Ji, Kim, Heo, Byeongho, Han, Dongyoon, Oh, Seong Joon, Oh, Tae-Hyun
Format: Preprint
Publié: 2022
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866929647115042816
author Hyeon-Woo, Nam
Yu-Ji, Kim
Heo, Byeongho
Han, Dongyoon
Oh, Seong Joon
Oh, Tae-Hyun
author_facet Hyeon-Woo, Nam
Yu-Ji, Kim
Heo, Byeongho
Han, Dongyoon
Oh, Seong Joon
Oh, Tae-Hyun
contents The favorable performance of Vision Transformers (ViTs) is often attributed to the multi-head self-attention (MSA). The MSA enables global interactions at each layer of a ViT model, which is a contrasting feature against Convolutional Neural Networks (CNNs) that gradually increase the range of interaction across multiple layers. We study the role of the density of the attention. Our preliminary analyses suggest that the spatial interactions of attention maps are close to dense interactions rather than sparse ones. This is a curious phenomenon, as dense attention maps are harder for the model to learn due to steeper softmax gradients around them. We interpret this as a strong preference for ViT models to include dense interaction. We thus manually insert the uniform attention to each layer of ViT models to supply the much needed dense interactions. We call this method Context Broadcasting, CB. We observe that the inclusion of CB reduces the degree of density in the original attention maps and increases both the capacity and generalizability of the ViT models. CB incurs negligible costs: 1 line in your model code, no additional parameters, and minimal extra operations.
format Preprint
id arxiv_https___arxiv_org_abs_2210_08457
institution arXiv
publishDate 2022
record_format arxiv
spellingShingle Scratching Visual Transformer's Back with Uniform Attention
Hyeon-Woo, Nam
Yu-Ji, Kim
Heo, Byeongho
Han, Dongyoon
Oh, Seong Joon
Oh, Tae-Hyun
Computer Vision and Pattern Recognition
Artificial Intelligence
Machine Learning
The favorable performance of Vision Transformers (ViTs) is often attributed to the multi-head self-attention (MSA). The MSA enables global interactions at each layer of a ViT model, which is a contrasting feature against Convolutional Neural Networks (CNNs) that gradually increase the range of interaction across multiple layers. We study the role of the density of the attention. Our preliminary analyses suggest that the spatial interactions of attention maps are close to dense interactions rather than sparse ones. This is a curious phenomenon, as dense attention maps are harder for the model to learn due to steeper softmax gradients around them. We interpret this as a strong preference for ViT models to include dense interaction. We thus manually insert the uniform attention to each layer of ViT models to supply the much needed dense interactions. We call this method Context Broadcasting, CB. We observe that the inclusion of CB reduces the degree of density in the original attention maps and increases both the capacity and generalizability of the ViT models. CB incurs negligible costs: 1 line in your model code, no additional parameters, and minimal extra operations.
title Scratching Visual Transformer's Back with Uniform Attention
topic Computer Vision and Pattern Recognition
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2210.08457