Abstract
While modern computer vision excels at identifying objects, it surprisingly struggles to understand the physical spatial relationships between them (e.g., "is the bottle inside the box?"). This paper introduces RelatiViT, a transformer-based architecture that outperforms "blind" baselines by effectively using visual context and long-range attention to ground spatial relations in actual pixels. By evaluating on refined benchmarks like SpatialSense+, the authors demonstrate that RelatiViT surpasses even massive vision-language models in physical spatial reasoning.
The Challenge of Spatial Reasoning
If you ask a state-of-the-art vision model to identify a "cat on a wall," it usually succeeds. However, researchers have found a frustrating "shortcut": most models aren't actually looking at the physical interaction between the cat and the wall. Instead, they rely on semantic bias (cats are often on walls) or bounding box shortcuts (the "cat" box is simply above the "wall" box).
The authors argue that current systems lack a "physically grounded" understanding of space. For a robot to pick up a cup, it needs to know if the saucer is truly under the cup, not just that they are near each other. Previous CNN-based models were so limited in this regard that they often performed worse than a "bbox-only" baseline—a simple model that doesn't even look at the image and only considers the coordinates of the object boxes. Spatial reasoning requires looking at fine-grained details (like contact points) and broad context (like the direction of gravity) simultaneously.
Methods: The RelatiViT Architecture
The authors systematically explored how to design a Transformer architecture specifically for Spatial Relation Prediction (SRP). They compared four main designs, ultimately finding that RelatiViT provided the best performance.
RelatiViT is an end-to-end approach. Instead of complex feature cropping or Region of Interest (RoI) Align, it takes three inputs: the original image, a masked image showing only the subject, and a masked image showing only the object. These are all turned into patches and fed as one long sequence into a single Vision Transformer (ViT). By feeding everything into one sequence, the model’s self-attention mechanism can simultaneously handle localization, context, and interaction without needing hand-engineered modules to fuse information.
Datasets and Benchmarks
The researchers evaluated their models on two primary benchmarks:
- Rel3D: A large-scale synthetic dataset containing 3D-rendered scenes with precise spatial labels.
- SpatialSense+: This is a major contribution of the paper. The authors found the original SpatialSense dataset was too ambiguous. They created SpatialSense+ by relabeling the data with strict, physically grounded definitions to remove linguistic bias and ambiguity.
Key Results and Insights
RelatiViT is the first model to convincingly outperform the "bbox-only" baseline in "in-the-wild" settings. On the SpatialSense+ dataset, RelatiViT achieved 80.02% accuracy, significantly higher than the bbox-only baseline (77.55%) and traditional CNN-based methods like DRNet (76.96%).
One of the most surprising findings was that massive Vision-Language Models (VLMs) like GPT-4V and Gemini performed significantly worse than the much smaller RelatiViT on these specific spatial tasks. While RelatiViT hit ~80%, GPT-4V only managed 68.26% on the same benchmark. This suggests that "scaling up" doesn't automatically grant a model precise physical common sense or the ability to overcome architectural mismatches that hinder long-range spatial dependencies.
Conclusion and Future Work
RelatiViT demonstrates that a flat transformer structure can effectively learn spatial relations by treating subject, object, and context as a unified sequence. However, the model still relies on a pre-defined set of spatial predicates (like "above" or "behind") and operates primarily on 2D images. Future work may involve integrating 3D geometry more explicitly and transitioning these spatial reasoning capabilities into generative models to improve the physical consistency of AI-generated imagery.
Summary updated