Weakly Supervised Relative Spatial Reasoning for Visual Question Answering

Pratyay Banerjee, Tejas Gokhale, Yezhou Yang, Chitta Baral

Introduction

Current Vision-and-Language (V&L) models excel at recognizing objects but are often "blind" to the 3D geometry of a scene, relying instead on 2D shortcuts. When we look at a photo, we intuitively understand that a smaller-looking person might just be further away, not a miniature human standing on someone's palm. This is because we understand 3D scene geometry.

Forced perspective images demonstrating how 2D projections can mask 3D spatial relationships.

However, most state-of-the-art V&L models (like LXMERT or ViLBERT) process images as a collection of 2D bounding boxes. This paper introduces a weak supervision framework that uses off-the-shelf depth estimators to teach models 3D spatial relationships, leading to significant accuracy gains on the GQA benchmark and better generalization to out-of-distribution data.

The Geometry Gap in VQA

The authors argue that current models lack a fundamental "faithfulness" to spatial reasoning. When asked a question like "Is the giraffe behind the man?", a model might guess correctly based on linguistic patterns in the dataset rather than actually calculating the relative depth of the objects. Because the $z$-dimension (depth) is lost during image formation, models struggle to resolve spatial ambiguities, making them prone to learning spurious correlations.

Methodology: Injecting 3D Awareness

The researchers propose a multi-pronged approach to inject 3D awareness into transformer-based V&L models without requiring expensive, manually labeled 3D ground truth data.

Diagram illustrating the projection from a 3D scene to a 2D image plane and the associated coordinate systems.
  1. Weak Supervision via Depth Estimation: They use an off-the-shelf monocular depth estimator (AdaBins) to generate depth maps for the GQA dataset. This provides a "noisy" but useful $z$-coordinate for every pixel.
  2. New Spatial Proxy Tasks: They introduce two tasks for training: Object Centroid Estimation (OCE), where the model predicts the 3D coordinates $(x, y, z)$ of an object's center, and Relative Position Estimation (RPE), where it predicts the distance vector between pairs of objects.
  3. Bin Classification vs. Regression: Interestingly, they found that treating distance prediction as a classification task (sorting distances into 15 log-scale "bins") performed much better than direct numerical regression.
  4. Spatial Pyramid Patches: To capture context that bounding boxes might miss, they feed the model image patches at multiple scales (3x3, 5x5, and 7x7 grids).
  5. Fusion Transformer: A dedicated module merges standard LXMERT features with these new spatial and patch features.

Key Insights and Results

Standard models are surprisingly bad at 3D tasks. A baseline LXMERT model only achieved ~52% accuracy on 3D relative position tasks, whereas the proposed method boosted this to over 81%.

Reducing Spurious Correlations

The authors found that in 18% of cases where a baseline model got a GQA question right, it actually failed the internal spatial reasoning test. Their method reduced this inconsistency, forcing the model to be "right for the right reasons." Furthermore, the spatial supervision acts as a powerful regularizer; their model trained on only 10% of the labeled GQA data performed nearly as well as the baseline trained on 100%.

Performance Metrics

  • Accuracy Boost: The proposed method improved GQA accuracy by 1.77% overall and 2.21% on open-ended questions over the LXMERT baseline.
  • State-of-the-Art: The model achieved 62.11% accuracy on the GQA test-standard set, outperforming several competitive baselines like GRN and Dream.
  • OOD Generalization: On GQA-OOD, the model showed a 1.7% improvement on "head" distributions and a 0.5% improvement on "tail" distributions, suggesting it relies less on simple statistical memorization.

Conclusion

By bridging the "geometry gap" through weak supervision, this work demonstrates that 3D awareness is crucial for robust visual reasoning. Future work could explore spatial reasoning in settings where bounding boxes aren't available or incorporate other physics-based signals like lighting and shadows to further enhance a model's understanding of the 3D world.

Summary updated

BibTeX
@inproceedings{banerjee2021weakly,
  author = {Pratyay Banerjee and Tejas Gokhale and Yezhou Yang and Chitta Baral},
  title = {{Weakly Supervised Relative Spatial Reasoning for Visual Question Answering}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00192},
}
Figure