Visual Attention Emerges from Recurrent Sparse Reconstruction

Baifeng Shi, Yale Song, Neel Joshi, Trevor Darrell, Xin Wang
4/23/2022
cs.CVcs.LG
transformer-attention

Official code: bfshi/VARS (36 stars, Python, last commit 2022-07-05).

Abstract

Visual attention helps achieve robust perception under noise, corruption, and distribution shifts in human vision, which are areas where modern neural networks still fall short. We present VARS, Visual Attention from Recurrent Sparse reconstruction, a new attention formulation built on two prominent features of the human visual attention mechanism: recurrency and sparsity.

Show full abstract

Related features are grouped together via recurrent connections between neurons, with salient objects emerging via sparse regularization. VARS adopts an attractor network with recurrent connections that converges toward a stable pattern over time. Network layers are represented as ordinary differential equations (ODEs), formulating attention as a recurrent attractor network that equivalently optimizes the sparse reconstruction of input using a dictionary of "templates" encoding underlying patterns of data. We show that self-attention is a special case of VARS with a single-step optimization and no sparsity constraint. VARS can be readily used as a replacement for self-attention in popular vision transformers, consistently improving their robustness across various benchmarks. Code is released on GitHub (https://github.com/bfshi/VARS).

View on arXivView PDF

Code Implementations(1)

bfshi/VARSOfficial100%

Official code for `Visual Attention Emerges from Recurrent Sparse Reconstruction' (ICML 2022)

362PythonApr 6, 20224 years ago
attentionicmlrobustnesstransformer

Similar Papers

Cite this paper

@article{shi2022visual,
  title  = {Visual Attention Emerges from Recurrent Sparse Reconstruction},
  author = {Baifeng Shi and Yale Song and Neel Joshi and Trevor Darrell and Xin Wang},
  year   = {2022},
  eprint = {2204.10962},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2204.10962}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2204.10962.svg)](https://codeofpaper.com/paper/2204.10962)

Discussion