The Dual Mechanisms of Spatial Variable Binding in Vision-Language Models

Kelly Cui, Nikhil Prakash, Shoval Messica, Ayush Raina, David Bau, Antonio Torralba, Tamar Rott Shaham

TL;DR

Vision-Language Models (VLMs) rely on two concurrent mechanisms to handle spatial variable binding (associating objects with their locations). While the language model backbone can generate local ordering information as a backup, the dominant spatial signal originates globally from the vision encoder and diffuses across background tokens. Amplifying this vision-derived signal corrects up to 55% of spatial reasoning failures on complex natural images without any fine-tuning.

What Problem Does This Paper Address?

Spatial variable binding—the ability to correctly link an object to its attributes and its relative position to other objects (e.g., identifying "the red square to the left of the green square")—is a cornerstone of multimodal reasoning. While modern VLMs excel at many tasks, they frequently stumble on spatial arrangements.

In pure language models, variable binding happens via content-independent ordering representations (e.g., tracking the first, second, or third entity mentioned in a sentence). This paper investigates how VLMs handle this in a multimodal context: Do they build these spatial ordering representations inside the language model backbone, inherit them from the vision encoder, or do they emerge from the interplay between both?

Methods

The authors employ a mix of mechanistic interpretability techniques to dissect the models:

  1. Representation Probing: Linear probes are trained on top of visual token embeddings (immediately after the vision projector) to decode the ordinal positions of objects.
  2. Causal Mediation Analysis (Activation Patching): The authors perform interchange interventions, swapping internal representations (either final-token residual streams or visual token embeddings) between a "clean" image run and a "counterfactual" image run to pinpoint which representations causally drive the model's spatial predictions.
  3. Ablation Studies: To isolate the language model's independent capabilities, they strip spatial information from the vision encoder by replacing background tokens with an empty image and replacing object tokens with isolated, centered versions of those objects.
  4. Global Subspace Intervention: Based on their findings, they introduce a simple intervention that globally amplifies the probe-discovered ordering directions across all visual tokens to fix model errors.

Datasets

The authors evaluate their findings across datasets of increasing visual complexity:

  • Synthetic Datasets (Squares, Shapes, Objects): Programmatically generated scenes with three items arranged horizontally or vertically to allow precise counterfactual control.
  • What'sUp (Control Subset): A naturalistic dataset containing pairs of objects, which the authors composed into three-object scenes to test horizontal spatial relations.
  • COCO-spatial: A complex, real-world benchmark curated by filtering the COCO validation set for explicit spatial relations (2,687 images total).
Experimental settings spanning synthetic to natural images

Key Insights and Ideas

  • The Dual-Mechanism Architecture: VLMs don't rely on just one component for spatial reasoning. They have a primary, dominant mechanism in the vision encoder and a secondary, local "backup" mechanism in the language model backbone.
  • Spatial Information is Diffused, Not Localized: Unlike text tokens in LLMs where entity information is highly localized, spatial layout information in the VLM's vision encoder is distributed globally. Probing reveals that background tokens carry a "strip-like" pattern encoding the position of nearby objects.
  • Background Tokens are Causally Essential: Patching only the visual tokens corresponding to the objects themselves fails to alter the VLM's spatial predictions. To successfully change the model's mind, interventions must swap the entire background "strip" associated with the object's position.
Position information forms strip-like patterns across background tokens
Object vs Strip Patching causal intervention design

Key Results

  • Causal Verification: Last-token patching shows that the VLM first computes an abstract ordering representation in intermediate layers (layers 20–22 in Qwen2-VL-7B) before retrieving concrete color/attribute information in later layers.
  • LM Backbone as a Backup: When all spatial information is completely ablated from the vision embeddings, the VLM's performance drops significantly but remains above chance. Interchange interventions show the LM backbone actively regenerates its own local ordering representations in intermediate layers (layers 11–20) to compensate.
  • Fixing Failures via Amplification: By globally shifting visual token embeddings along the probe-discovered ordering directions, the authors significantly boosted performance on COCO-spatial. This simple, zero-shot intervention corrected 54.5% of previous failures for Qwen2-VL-2B (improving overall accuracy from 60% to 82%) and 40.2% for Gemma3-4B (improving accuracy from 53% to 72%).

Limitations and Future Work

  • Simple Spatial Relations: The study is restricted to binary/cardinal directions (left/right, above/below). More complex spatial concepts like "between," diagonal layouts, or hierarchical relations remain unexplored.
  • Causal Analysis Constraints: The rigorous causal interchange interventions require perfectly matched counterfactual pairs, which cannot currently be generated using unmodified, organic natural images.
  • Model Scope: The evaluation focused exclusively on open-weight, transformer-based VLMs (Qwen and Gemma architectures). Whether these dual mechanisms hold true for closed-source models or fundamentally different vision-language architectures remains an open question.

Summary updated

BibTeX
@inproceedings{cui2026dual,
  author = {Kelly Cui and Nikhil Prakash and Shoval Messica and Ayush Raina and David Bau and Antonio Torralba and Tamar Rott Shaham},
  title = {{The Dual Mechanisms of Spatial Variable Binding in Vision-Language Models}},
  booktitle = {ES-Reasoning @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=Ueb38N1aF3},
}
Figure