Top-Down Visual Attention from Analysis by Synthesis

Baifeng Shi, Trevor Darrell, Xin Eric Wang
2/14/2026

No official code found. Best implementation: bfshi/AbSViT (165 stars, PyTorch, last commit 2023-08-20).

Abstract

Current attention algorithms (e.g., self-attention) are stimulus-driven and highlight all the salient objects in an image. However, intelligent agents like humans often guide their attention based on the high-level task at hand, focusing only on task-related objects. This ability of task-guided top-down attention provides task-adaptive representation and helps the model generalize to various tasks. In this paper, we consider top-down attention from a classic Analysis-by-Synthesis (AbS) perspective of vision. Prior work indicates a functional equivalence between visual attention and sparse reconstruction; we show that an AbS visual system that optimizes a similar sparse reconstruction objective modulated by a goal-directed top-down signal naturally simulates top-down attention. We further propose Analysis-by-Synthesis Vision Transformer (AbSViT), which is a top-down modulated ViT model that variationally approximates AbS, and achieves controllable top-down attention. For real-world applications, AbSViT consistently improves over baselines on Vision-Language tasks such as VQA and zero-shot retrieval where language guides the top-down attention. AbSViT can also serve as a general backbone, improving performance on classification, semantic segmentation, and model robustness. Project page: https://sites.google.com/view/absvit.

View on arXivView PDF

Code Implementations(1)

bfshi/AbSViTCommunity100%
PyTorch

Official code for "Top-Down Visual Attention from Analysis by Synthesis" (CVPR 2023 highlight)

16514Python, Jupyter NotebookFeb 24, 20233 years ago
attentionclassificationcvprpytorchsegmentation+1 more

Similar Papers

Cite this paper

@article{shi2026topdown,
  title  = {Top-Down Visual Attention from Analysis by Synthesis},
  author = {Baifeng Shi and Trevor Darrell and Xin Eric Wang},
  year   = {2026},
  eprint = {2303.13043},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2303.13043},
  journal = {CVPR 2023 2023}
}

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/2303.13043.svg)](https://codeofpaper.com/paper/2303.13043)

Discussion