Visual Spatial Reasoning

Fangyu Liu, Guy Emerson, Nigel Collier

Here is a blog-style summary of the research paper.

TL;DR

The paper introduces Visual Spatial Reasoning (VSR), a new dataset of over 10,000 natural image-text pairs designed to rigorously evaluate how well vision-language models (VLMs) understand spatial relations. The authors reveal a massive performance gap: while humans achieve over 95% accuracy, state-of-the-art VLMs top out around 70%, severely struggling with object orientation and compositional generalization.

What Problem Does This Paper Address?

While modern vision-language models (VLMs) excel at identifying individual objects, they notoriously struggle with understanding how those objects relate to one another in space. Existing benchmarks like VQA or NLVR2 tend to conflate spatial reasoning with other linguistic and visual challenges, making it difficult to isolate why a model fails. On the other hand, synthetic datasets (like CLEVR) simplify the real world too much—using basic geometric shapes and only a handful of spatial relations (e.g., left, right, behind, in front of), completely omitting real-world complexities like object orientation and environmental context.

To bridge this gap, the authors created VSR, a controlled dataset based on natural images that explicitly isolates and tests 66 distinct spatial relations in English.

Methods

The authors developed a two-phase data collection pipeline using real images from MS COCO:

  1. Contrastive Template-based Caption Generation: Instead of free-form text, annotators were given pairs of images containing the same two concepts (e.g., "cat" and "laptop"). They had to select a spatial relation from a predefined list to complete a strict template: "The [ENT1] (is) ___ the [ENT2]." Crucially, the chosen relation had to be true for one image but false for the other, forcing the model to focus purely on the spatial distinction.
  2. Second-round Human Validation: At least three additional validators reviewed each image-caption pair to determine if it was True or False. Data points with low agreement were discarded.
An annotation example of concepts "cat" & "laptop" in contrastive caption generation.

The Reference Frame Challenge

A key linguistic hurdle in spatial reasoning is the frame of reference. For instance, "the potted plant is to the right of the bench" could be true from the viewer's perspective (relative frame) but false from the bench's perspective (intrinsic frame). To handle this ambiguity, the authors instructed validators to mark a statement as True if it was correct under either the intrinsic or relative frame.

Datasets

The paper introduces the Visual Spatial Reasoning (VSR) dataset:

  • Size: 10,972 validated data points using 6,940 natural images.
  • Coverage: 66 types of spatial relations categorized into groups like Adjacency, Directional, Orientation, Projective, Proximity, and Topological.
  • Splits: The dataset is released with two split strategies:
  • Random Split: Standard 70/10/20 random distribution.
  • Concept Zero-Shot Split: Ensures that the object concepts in the test set have zero overlap with the training set, forcing models to evaluate spatial relations compositionally rather than memorizing object co-occurrence statistics.

Key Insights and Ideas

  • Explicit Positional Information is Crucial: Models like LXMERT and ViLT, which explicitly encode spatial coordinates or patch positions, outperformed VisualBERT (which lacks explicit positional encoding) by more than 10%.
  • Orientation is a Major Blind Spot: Relations that depend heavily on an object's orientation (such as "facing", "facing away from", "parallel to", and "at the back of") caused the most model failures, with performance hovering near chance level (50%).
  • More Data Doesn't Equal Better Reasoning: Interestingly, a model's performance on a specific relation did not correlate with how many times that relation appeared in the training data. This suggests that spatial reasoning is an architectural and representation hurdle, not just a data scarcity issue.
  • The "Human" Effect on Perspective: In a case study on reference frames, the authors discovered that when a human is present in the image, annotators are significantly more likely to adopt an intrinsic frame of reference (looking at the world from that person's point of view) compared to when only inanimate objects are present.
An example where the cow's orientation and movement direction must be inferred, causing models to fail.

Key Results

The authors evaluated four popular VLMs: VisualBERT, LXMERT, ViLT, and an off-the-shelf CLIP model.

  • Human Ceiling: 95.4% accuracy.
  • Random Split: The best-performing models, LXMERT (70.1%) and ViLT (69.3%), lagged more than 25% behind humans. CLIP (with prompt engineering) achieved only 56.0%, barely better than a random guess.
  • Concept Zero-Shot Split: Performance dropped significantly across the board (ViLT fell to 63.0%, LXMERT to 61.2%), demonstrating that current VLMs struggle to generalize spatial concepts to unseen objects.

Limitations and Future Work

The current iteration of VSR is bounded by the concepts available in MS COCO and is restricted entirely to the English language.

For future work, the authors suggest evaluating ultra-large-scale VLMs (like Flamingo or PaLI) on this benchmark to see if scale resolves spatial deficits. They also propose extending VSR to other languages and leveraging their collected annotator metadata to study how different cultures and geographic populations linguistically describe and perceive visual space.

Summary updated

BibTeX
@article{liu2023visual,
  author = {Fangyu Liu and Guy Emerson and Nigel Collier},
  title = {{Visual Spatial Reasoning}},
  journal = {Trans. Assoc. Comput. Linguistics},
  year = {2023},
  doi = {10.1162/tacl\_a\_00566},
}
Figure