# AttentionRNN: A Structured Spatial Attention Mechanism

arXiv: https://arxiv.org/abs/1905.09400 · HTML: https://mlsanity.com/paper/1905.09400/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 22 May 2019.

## Built on by (most cited first, 3 of 3)

- [CAT: Learning to Collaborate Channel and Spatial Attention from Multi-Information Fusion](https://mlsanity.com/paper/2212.06335/) (2022)
- [Topology Enhanced MARL for Multi-Agent Cooperative Decision-Making of CAVs](https://mlsanity.com/paper/2507.12110/) (2025)
- [Spatial Attention Noise Masking for Causally Sufficient Interpretability](https://mlsanity.com/paper/2608.14725/) (2026)

## Abstract (arXiv)

Visual attention mechanisms have proven to be integrally important constituent components of many modern deep neural architectures. They provide an efficient and effective way to utilize visual information selectively, which has shown to be especially valuable in multi-modal learning tasks. However, all prior attention frameworks lack the ability to explicitly model structural dependencies among attention variables, making it difficult to predict consistent attention masks. In this paper we develop a novel structured spatial attention mechanism which is end-to-end trainable and can be integrated with any feed-forward convolutional neural network. This proposed AttentionRNN layer explicitly enforces structure over the spatial attention variables by sequentially predicting attention values in the spatial mask in a bi-directional raster-scan and inverse raster-scan order. As a result, each attention value depends not only on local image or contextual information, but also on the previously predicted attention values. Our experiments show consistent quantitative and qualitative improvements on a variety of recognition tasks and datasets; including image categorization, question answering and image generation.
