Abstract
Previous existing visual question answering (VQA) systems commonly use graph neural networks (GNNs) to extract visual relationships such as semantic relations or spatial relations. However, studies that use GNNs typically ignore the importance of each relation and simply concatenate outputs from multiple relation encoders. In this paper, we propose a novel layer architecture that fuses multiple visual relations through an attention mechanism to address this issue. Specifically, we develop a model that uses question embedding and joint embedding of the encoders to obtain dynamic attention weights with regard to the type of questions. Using the learnable attention weights, the proposed model can efficiently use the necessary visual relation features for a given question. Experimental results on the VQA 2.0 dataset demonstrate that the proposed model outperforms existing graph attention network-based architectures. Additionally, we visualize the attention weight and show that the proposed model assigns a higher weight to relations that are more relevant to the question.
Introduction
Visual Question Answering (VQA) requires a model to understand both natural language questions and the complex visual relationships within an image. To answer a question like "Is the man wearing a tie?", a model must identify the 'wearing' relationship (semantic). Conversely, answering "How many riders are on the motorcycle?" requires understanding the spatial arrangement of objects. While Graph Neural Networks (GNNs) have become a standard for modeling these relationships, most existing systems treat all relation types—implicit, semantic, and spatial—as equally important. This often leads to suboptimal performance, as irrelevant or noisy data from one relation encoder can degrade the final prediction.
Methodology: The QRR Layer
We propose a novel architecture centered on the Question-Relevant Relation Selection (QRR) layer. Our model processes images and questions through four distinct stages:
- Feature Extraction: Objects are identified using Faster R-CNN, and questions are encoded via a bidirectional GRU.
- Graph Construction: Three separate graphs are built for each image: a Semantic graph (using 15 predicates like "riding" or "wearing"), a Spatial graph (based on geometric orientation), and an Implicit graph (capturing latent interactions).
- Multimodal Fusion: Each relation type is fused with the question embedding to create three independent joint representations.
- Dynamic Selection: The QRR layer applies an attention mechanism to these representations. By using the question embedding as context, it calculates dynamic weights that prioritize the most relevant relation type for the specific query.
Experimental Results
Our model was evaluated on the VQA 2.0 benchmark. Using BAN fusion, the proposed model achieved an accuracy of 65.37%, surpassing the previous state-of-the-art ReGAT model (65.02%). Notably, the model showed a significant 2.44 percentage point improvement in the "Number" category when using BUTD fusion, highlighting its superior ability to handle spatial reasoning tasks.
Qualitative Analysis and Interpretability
The primary advantage of the QRR layer is its interpretability. By visualizing the attention weights, we can see the model "choosing" the correct information source. Analysis showed that in roughly 70% of cases, using only one or two relation types is sufficient; forcing the model to use all three equally is actually a hindrance.
As shown in the examples, for questions regarding attire, the semantic encoder often receives weights as high as 0.99. In contrast, for counting tasks, the spatial encoder's influence increases significantly.
Conclusion
By moving away from static fusion and toward dynamic, question-aware relation selection, our model achieves both higher accuracy and greater transparency. The QRR layer effectively filters out noise from irrelevant relation types, allowing the VQA system to focus on the visual cues that truly matter for the question at hand.
Summary updated