Exploring Sparse Spatial Relation in Graph Inference for Text-Based VQA

Sheng Zhou, Dan Guo, Jia Li, Xun Yang, Meng Wang · DOI

TL;DR

This paper introduces the Sparse Spatial Graph Network (SSGN) for Text-Based Visual Question Answering (TextVQA). SSGN tackles the challenge of redundant visual relationships by employing a novel spatial-aware pruning technique to create sparse graphs, leading to improved accuracy and interpretability.

What Problem Does This Paper Address?

Text-based Visual Question Answering (TextVQA) requires models to understand both visual content and textual information within an image to answer questions. A major hurdle is the sheer volume of detected objects and Optical Character Recognition (OCR) tokens, which create a dense web of potential relationships. Existing methods often consider all these relationships, leading to "redundant relational inference." This can be problematic because:

  1. Repetitive Objects: A single real-world object might be detected as multiple, slightly different bounding boxes, creating superfluous connections.
  2. Distant OCR Tokens: OCR tokens that are spatially far apart in an image often have weak or no semantic connection, yet they might be considered in relation calculations.
  3. Noise from Dense Relations: The sheer number of connections can overwhelm the model, making it difficult to identify the truly important cues for answering the question.

The authors aim to filter out these noisy and redundant relationships to build more efficient and accurate models.

Methods

The core innovation is the Sparse Spatial Graph Network (SSGN), which introduces a spatially aware relation pruning technique. Instead of using all detected objects and OCR tokens to build a fully connected graph, SSGN selectively prunes edges based on spatial factors.

Here's a breakdown of the SSGN approach:

  • Feature Preparation: Standard object features (from Faster R-CNN) and OCR token features are extracted, along with question features (from BERT).
  • Spatial-Aware Graph Construction: A graph is built where nodes represent objects and OCR tokens. Edges represent relationships between these nodes.
  • Hierarchical Sparse Graph Learning: This is the key contribution. SSGN uses three progressively refined sparse sub-graphs:
  • Object-Token Sparse Graph (OTSG): This graph focuses on object-OCR token relationships. It prunes edges based on spatial distance, DIoU (Distance-IoU), and overlap area, aiming to keep only informative co-occurring pairs.
  • Object-Based Sparse Graph (OSG): This sub-graph refines object-object relationships. It prunes edges between objects that are too similar or too distant, using DIoU and spatial distance.
  • Token-Based Sparse Graph (TSG): This sub-graph refines OCR token-OCR token relationships. It prunes edges based on spatial distance, geometric size, and overlap area, recognizing that nearby tokens are more likely to be semantically related.
  • Question-Guided Inference: The graph learning process is guided by the question, ensuring that the model focuses on relevant entities and relationships.
  • Answer Generation: The updated node features are fed into a transformer-based decoder for answer prediction.

The spatial factors used for pruning include:

  • Spatial Distance: The distance between the centers of bounding boxes.
  • DIoU (Distance-IoU): A metric that considers both overlap and distance between bounding boxes.
  • Geometric Dimension: The size of the bounding boxes.
  • Overlap Area: The degree to which bounding boxes intersect.

Datasets

The paper evaluates SSGN on two benchmark datasets for text-based visual question answering:

  • TextVQA: This dataset, derived from Open Images v3, contains images with questions that can be answered by visual objects or scene text. A significant portion of answers do not contain OCR tokens.
  • ST-VQA: This dataset is collected from six different sources and specifically emphasizes scene text. All questions in ST-VQA require understanding scene text, making OCR tokens critically important.

Key Insights and Ideas

  • Redundancy is a Major Bottleneck: The paper strongly argues that considering all visual relationships is detrimental to TextVQA performance. The sheer density of potential connections introduces noise that can mislead models.
  • Spatial Cues are Crucial for Pruning: The authors demonstrate that simple spatial metrics (distance, overlap, DIoU, size) are highly effective in identifying and pruning irrelevant or redundant relationships between objects and OCR tokens.
  • Hierarchical Pruning is Effective: Applying sparsity pruning in stages (object-token, then object-object and token-token) allows for a more refined and effective filtering of relationships.
  • Interpretability through Sparsity: Visualizations show that sparse graphs highlight more relevant regions and connections, making the model's reasoning process more interpretable compared to dense graphs.

Key Results

  • State-of-the-Art Performance: SSGN achieves promising results on both TextVQA and ST-VQA datasets, outperforming several existing methods.
  • TextVQA Improvements: SSGN shows significant improvements over graph-based models like MM-GNN and CRN, and competitive results against transformer-based and attention-based models. For example, it improves upon CRN by 1.61% on the validation set and 0.64% on the test set.
  • ST-VQA Superiority: On ST-VQA, SSGN demonstrates absolute superiority across all three tasks, achieving a 48.7% Test ANLS on Task 1, surpassing MM-GNN by 28.7%.
  • Ablation Studies Validate Sparsity: Ablation studies confirm that sparsity is crucial. Removing sparsity significantly degrades performance, with the object-token sparse graph (OTSG) showing the most impact.

Limitations and Future Work

  • Hyperparameter Sensitivity: While the paper explores various spatial factors and thresholds, the optimal settings might still be dataset-dependent.
  • OCR System Dependence: The performance can be influenced by the quality and characteristics of the chosen OCR system, as highlighted in Table VII and the discussion on sparsity ratios.
  • Future Work: The authors suggest exploring more sophisticated spatial factors and potentially adaptive sparsity strategies that dynamically adjust based on image content or question type. Further investigation into the interplay between different graph structures and pruning techniques could also be beneficial.

Summary updated

BibTeX
@article{zhou2023exploring,
  author = {Sheng Zhou and Dan Guo and Jia Li and Xun Yang and Meng Wang},
  title = {{Exploring Sparse Spatial Relation in Graph Inference for Text-Based VQA}},
  journal = {IEEE Trans. Image Process.},
  year = {2023},
  doi = {10.1109/tip.2023.3310332},
}
Figure