Learning Conditioned Graph Structures for Interpretable Visual Question Answering

Will Norcliffe-Brown, Stathis Vafeias, Sarah Parisot

Introduction

Visual Question Answering (VQA) is a complex challenge that sits at the intersection of Computer Vision and Natural Language Processing. To successfully answer a question about an image, a model must deeply understand both the visual scene and the natural language query. This paper introduces a novel graph-based approach to VQA that dynamically builds a question-specific graph of an image. By utilizing a "graph learner" module and spatial graph convolutions, the model explicitly captures relationships between objects and provides a transparent, interpretable look into its reasoning process.

The Limitations of Traditional VQA

Most traditional VQA approaches treat the task as a "two-stream" problem: they extract features from the image (typically using Convolutional Neural Networks) and the question (using Recurrent Neural Networks), and then merge them using techniques like bilinear pooling or simple attention mechanisms.

However, these methods often fail to capture the semantic and spatial relationships between objects in a scene (e.g., distinguishing between "the cat on the mat" versus "the cat next to the mat"). While some researchers have attempted to use graph structures to model these interactions, earlier graphs were typically "handcrafted" or static. This meant the connections between objects didn't adapt based on what the question was actually asking. Furthermore, many deep learning models act as opaque "black boxes," making it difficult for researchers to understand why a specific answer was chosen.

A Conditioned Graph Framework

To address these limitations, the authors propose a novel framework consisting of four main stages:

Architecture of the proposed graph-based VQA model
  1. Input Embedding: The model first uses a pre-trained object detector to identify 36 objects (nodes) per image, extracting both visual features and bounding box coordinates. Simultaneously, the question is encoded into a single vector using a Gated Recurrent Unit (GRU).
  2. The Graph Learner: Instead of relying on a fixed graph, this core module learns a conditioned adjacency matrix. It concatenates the question embedding with each object's features to compute a joint embedding. It then calculates the similarity between these embeddings to determine which objects should be connected. To keep the graph efficient, it uses a "top-m" ranking strategy to retain only the strongest, most relevant connections.
  3. Spatial Graph Convolutions: To process the graph, the model employs a spatial Graph Convolutional Network (GCN). Crucially, it incorporates pseudo-coordinates (relative distance and orientation in polar form) between objects. This allows the model to understand spatial context—like "above," "to the left of," or "inside"—which is vital for many VQA tasks.
  4. Prediction: The resulting graph features are max-pooled into a global vector, combined with the question embedding via an element-wise product, and passed through a multi-layer perceptron to predict the final answer.

Key Insights and Interpretability

The most significant conceptual leap in this paper is the idea that the graph structure itself should be a function of the question. For the exact same image, a question about a person's hat should generate a completely different set of active edges than a question about the color of their shoes.

Additionally, the authors found that using polar coordinates ($\rho, \theta$) for spatial relationships worked significantly better than standard Cartesian coordinates. Polar coordinates naturally disentangle distance from orientation, making it easier for the network's filters to learn specific spatial directions.

Visualization of the conditioned graph focusing on the child's hair based on the question

Because the model explicitly learns which edges are important, it achieves Interpretability by Design. Researchers can visualize the graph to verify the model's focus. For example, if the model is asked, "What color is the kid's hair?" the generated graph dynamically lights up the nodes corresponding to the "kid" and "hair," proving the model is grounding its answer in the correct visual regions.

Results and Future Directions

The model was trained and evaluated on the VQA v2 dataset, achieving a competitive 66.18% accuracy on the test set. It showed a notable strength in "Number" (counting) questions, reaching 47.13% and outperforming several complex attention-based baselines of its time. Qualitative visualizations confirmed that the graph learner successfully identifies the most relevant objects and interactions, providing a level of transparency often missing in VQA systems.

Despite these successes, the model has limitations. Its performance is heavily dependent on the quality of the initial object detector; if the detector misses an object, the graph learner cannot recover it. Additionally, the current implementation uses a fixed number of objects (36) per image, whereas real-world scenes vary wildly in complexity. Future work could explore more flexible node-selection strategies and the use of vector-valued edges to capture even more nuanced, multi-dimensional relationships between objects.

Summary updated

BibTeX
@inproceedings{norcliffebrown2018learning,
  author = {Will Norcliffe-Brown and Stathis Vafeias and Sarah Parisot},
  title = {{Learning Conditioned Graph Structures for Interpretable Visual Question Answering}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=Hy-uK_Wd-B},
}
Figure