SceneGATE: Scene-Graph based co-Attention networks for TExt visual question answering

Feiqi Cao, Siwen Luo, Felipe Nunez, Zean Wen, Josiah Poon, Caren Han

TL;DR

SceneGATE introduces a novel approach to Text Visual Question Answering (TextVQA) by explicitly modeling the semantic and positional relationships between visual objects and scene text using a specialized scene graph. By integrating parallel semantic and positional relation-aware attention mechanisms, the model achieves state-of-the-art performance on major benchmarks, proving that understanding how text relates to its visual context is key to reading comprehension in the real world.

What Problem Does This Paper Address?

Conventional Visual Question Answering (VQA) models excel at identifying objects and their basic attributes (e.g., "What color is the car?"). However, human environments are saturated with text—brand names, street signs, price tags, and digital displays. TextVQA tasks push models to read and reason about this textual information to answer questions.

While current TextVQA models use Optical Character Recognition (OCR) to extract text tokens from images, they struggle to link these tokens to their corresponding physical objects in a meaningful way. Most architectures simply throw object features, OCR tokens, and question words into a standard transformer encoder, relying on implicit spatial proximity to figure out relationships. This proximity-based assumption is often ambiguous and unreliable; an irrelevant object can easily sit next to a text token. The authors address this lack of explicit semantic and positional interplay between visual objects and text tokens.

Methods

The authors propose SceneGATE (Scene Graph-Based Co-Attention Network), which introduces a structured, multi-modal pipeline to explicitly map out image semantics:

  1. TextVQA-Based Scene Graph Construction: Instead of treating OCR tokens as isolated inputs, SceneGATE treats them as attributes of visual objects based on bounding box containment and Intersection-over-Union (IoU) scores. It defines 11 spatial-semantic relation types (e.g., inside, surrounding, above, under, overlap).
  2. Guided Co-Attention Module: The model uses a Self-Attention (SA) unit to boost intra-modal understanding within the question, objects, and OCR tokens independently. This is followed by a Guided Attention (GA) unit, where the question features actively guide the visual and textual features to focus on question-relevant regions.
  3. Dual-Branch Relation-Aware Attention:
  4. Semantic Relation-Aware (SRA) Attention: Operating on the scene graph branch, this module restricts individual transformer attention heads to specific subsets of relationship types. This forces the model to learn distinct semantic connections without being overwhelmed by a fully connected graph.
  5. Positional Relation-Aware (PRA) Attention: Operating in parallel, this branch builds a directed complete spatial graph to capture relative physical positions and distances between objects and text.
  6. Multi-Modal Fusion & Decoding: The outputs of both branches are combined in a multi-modal transformer encoder and decoded using a dynamic pointer network to generate multi-word answers.
Figure 1. Architecture of our SceneGATE model.

Datasets

The model was trained and evaluated on two widely accepted benchmarks:

  • Text-VQA: Contains 45,336 question-image pairs using images from the Open Images v3 dataset. Questions specifically require reading and reasoning about the text within the images.
  • ST-VQA (Scene Text VQA): Comprises 23,038 images collected from multiple diverse source datasets (including COCO-Text, ImageNet, and ICDAR) to minimize single-source dataset bias.

Key Insights and Ideas

  • Text as an Attribute: Treating OCR tokens as attributes of objects rather than independent visual entities provides a cleaner, more human-like structured representation of a scene.
  • Constrained Attention Heads: In the SRA module, forcing specific attention heads to look only at specific relationship types (e.g., only looking at "inside" or "surrounding" links) prevents semantic smoothing and helps the model retain sharp, relational features.
  • Parallel Processing of Space and Semantics: Separating positional relations from semantic relations into two distinct attention branches, and fusing them later, yields better representations than trying to learn both simultaneously in a single standard transformer.

Key Results

SceneGATE achieved state-of-the-art performance across both evaluation datasets:

  • Text-VQA: SceneGATE achieved a 42.37% validation accuracy and 44.02% test accuracy, notably outperforming strong baselines like M4C (39.01% test) and the spatially aware SA-M4C (42.61% test).
  • ST-VQA: The model achieved 41.29% validation accuracy and an Average Normalized Levenshtein Similarity (ANLS) score of 0.516 on the test set, demonstrating a clear performance leap over previous architectures.
  • Ablation Studies: Experiments confirmed that using FastText embeddings for scene graph node initialization yielded the best results because of its ability to handle Out-Of-Vocabulary (OOV) rare OCR tokens compared to GloVe or pure GCN approaches.

Limitations and Future Work

The primary bottleneck for SceneGATE is its dependency on the upstream, pre-trained OCR system. If the OCR engine misreads a word (e.g., reading "andover" as "kidover"), SceneGATE will faithfully copy the incorrect token into its final answer.

The authors note that future work will focus on tighter, end-to-end integration of the text detection and recognition pipeline directly into the scene graph generation process to mitigate these inherited errors.

Summary updated

Abstract

Most TextVQA approaches focus on the integration of objects, scene texts and question words by a simple transformer encoder. But this fails to capture the semantic relations between different modalities. The paper proposes a Scene Graph based co-Attention Network (SceneGATE) for TextVQA, which reveals the semantic relations among the objects, Optical Character Recognition (OCR) tokens and the question words. It is achieved by a TextVQA-based scene graph that discovers the underlying semantics of an image. We created a guided-attention module to capture the intra-modal interplay between the language and the vision as a guidance for inter-modal interactions. To make explicit teaching of the relations between the two modalities, we proposed and integrated two attention modules, namely a scene graph-based semantic relation-aware attention and a positional relation-aware attention. We conducted extensive experiments on two benchmark datasets, Text-VQA and ST-VQA. It is shown that our SceneGATE method outperformed existing ones because of the scene graph and its attention modules.
BibTeX
@article{cao2023scenegate,
  author = {Feiqi Cao and Siwen Luo and Felipe Nunez and Zean Wen and Josiah Poon and Caren Han},
  title = {{SceneGATE: Scene-Graph based co-Attention networks for TExt visual question answering}},
  journal = {Robotics},
  year = {2023},
  doi = {10.3390/robotics12040114},
}
Figure