Ask, Attend and Answer: Exploring Question-Guided Spatial Attention for Visual Question Answering

Huijuan Xu, Kate Saenko

Introduction

Visual Question Answering (VQA) represents a significant challenge at the intersection of computer vision and natural language processing. To succeed, a model must not only recognize objects but also understand their spatial relationships and context based on a natural language query. This paper introduces the Spatial Memory Network (SMem-VQA), a framework designed to perform iterative spatial reasoning by aligning linguistic cues with local image regions.

The Challenge: Beyond Global Features

Early VQA models often treated the task as a simple classification problem. By combining global image features from a Convolutional Neural Network (CNN) with a question embedding from a Long Short-Term Memory (LSTM) network, these models could answer basic questions. However, they suffered from two critical limitations:

  1. Lack of Spatial Inference: Global features often wash out the fine-grained spatial details necessary to answer questions about specific object locations or relationships (e.g., "What is under the table?").
  2. Language Bias: Many models learned to exploit statistical regularities in the text (e.g., always answering "white" to "What color is the...?") rather than actually grounding their answers in the visual evidence.

The Spatial Memory Network (SMem-VQA)

The SMem-VQA architecture addresses these issues by treating the image as a "spatial memory" that can be queried multiple times.

1. Visual Memory Representation

Instead of collapsing an image into a single vector, SMem-VQA preserves spatial information by using a grid of CNN activations (extracted from GoogLeNet). Each cell in this grid represents a specific local region of the image.

2. Multi-Hop Attention Mechanism

The core of the model is its "multi-hop" attention process, which allows for iterative refinement of visual evidence:

  • First Hop (Word-Guided): The model calculates the correlation between individual word embeddings and each spatial region. This fine-grained alignment helps the model identify relevant landmarks or objects mentioned in the question.
  • Second Hop (Reasoning): Using the information gathered in the first hop combined with the full question context, the model "re-scans" the image. This enables complex reasoning, such as locating a primary object and then searching for a second object relative to it.
Multi-hop attention refinement: the model identifies the child in the first hop and narrows its focus to the skateboard in the second hop to answer 'What is the child standing on?'

Experimental Results

The authors evaluated SMem-VQA across several benchmarks, demonstrating its superior reasoning capabilities:

  • DAQUAR: The model achieved 40.07% accuracy, a significant improvement over the previous state-of-the-art deep baseline (34.17%).
  • VQA Dataset: On the large-scale VQA v1.0 benchmark, the model reached 58.24% accuracy, performing particularly well on questions requiring spatial awareness.
  • Synthetic Spatial Tasks: To prove the model was truly "looking" at the image, the authors tested it on synthetic datasets involving absolute and relative positions. SMem-VQA achieved near-perfect accuracy (up to 100%), while non-attentional baselines failed to surpass the statistical prior.

Key Insights

The success of SMem-VQA highlights several important principles for multimodal AI:

  • Words as Pointers: Attending to individual words prevents the specific signal of an object name from being lost in a full-sentence embedding.
  • Iterative Logic: The multi-hop approach mimics human cognitive processes—identifying a landmark first and then searching for the target relative to that point.
  • Visualizing Reasoning: By plotting attention weights, the authors confirmed that the model learns logical spatial rules rather than just memorizing patterns.
Example of iterative attention refinement in a street scene, moving from general object detection to specific region identification across hops.

Conclusion

The Spatial Memory Network demonstrates that explicit spatial attention is crucial for robust Visual Question Answering. By allowing the question to guide a multi-step search through the image, SMem-VQA moves beyond simple pattern matching toward genuine visual reasoning. Future work may involve scaling these "hops" further or integrating more complex external knowledge bases to handle even more sophisticated queries.

Summary updated

BibTeX
@inproceedings{xu2016ask,
  author = {Huijuan Xu and Kate Saenko},
  title = {{Ask, Attend and Answer: Exploring Question-Guided Spatial Attention for Visual Question Answering}},
  booktitle = {European Conference on Computer Vision},
  year = {2016},
  doi = {10.1007/978-3-319-46478-7\_28},
}
Figure