All posts

Spatial Reasoning in VLMs and Multimodal LLMs

What is spatial reasoning?

Spatial reasoning is the ability to understand, manipulate, and infer relationships between objects, and between objects and oneself, within a space: where things are, how they relate (above/below, left/right, near/far), and how they would move or transform. For VLMs and multimodal LLMs, it means reasoning about geometry, position, and relations in visual scenes, beyond recognizing objects or matching text to images.

D. Liu et al. [1] make this precise with a three-level hierarchy inspired by human spatial cognition (Figure 1):

  • L1, Perception: intrinsic attributes of single objects, such as 3D extent, orientation, and depth.
  • L2, Understanding: relations among objects, such as relative position, metric distance, and spatial grounding ("the dog on the left").
  • L3, Extrapolation: states that are not directly visible, such as occlusion, mental rotation, manipulation outcomes, perspective-taking, and path planning.
Three levels of spatial intelligence: perception, understanding, and extrapolation, with example tasks
Figure 1. A three-level hierarchy of spatial intelligence, from perceiving single objects to inferring unseen states and planning. Reproduced from D. Liu et al. [1], Fig. 2.

Other surveys add complementary axes, notably the frame of reference (egocentric versus allocentric) and qualitative versus quantitative relations [2], [3].

Why VLMs struggle with space

The mechanisms that give VLMs strong semantics (pooling, feature aggregation, and global attention) also compress or blur spatial structure: they boost semantics but weaken fine-grained geometry (see my post on X). D. Liu et al. [1] trace this to four root causes:

  • Semantic vision encoders. CLIP-style encoders learn what objects are and favor global semantics over precise layout.
  • Weak positional signal. Positional embeddings are often suboptimal or drowned out during attention, so spatial order fades.
  • Coarse modality alignment. Contrastive, caption-level training aligns global features, producing "bag-of-concepts" behavior, and models fall back on language co-occurrence instead of visual structure.
  • Scarce spatial data. Captions describe what, rarely where; in spatial datasets the top 17% of relation types cover over 90% of examples, and most data are single-view 2D images without depth or multiple views.

W. Liu et al. [2] summarize the result as a representation-level grounding problem: the model must connect discrete token statistics to continuous geometry (Figure 2).

Real-world coordinates versus LLM tokens: the representation-level grounding problem
Figure 2. The representational mismatch between continuous geometry and discrete tokens. Reproduced from W. Liu et al. [2], Fig. 1(b).

The positional problem has a simple source. Without positional encodings, self-attention is permutation-equivariant: for any permutation matrix \(P\),

\[ \operatorname{Attn}(PX) = P\,\operatorname{Attn}(X), \qquad \operatorname{Attn}(X) = \operatorname{softmax}\!\left(\frac{XW_Q (XW_K)^{\top}}{\sqrt{d}}\right) XW_V, \]

so order is visible only through positional encodings. With rotary embeddings (RoPE) [4], the score between a query at position \(m\) and a key at position \(n\) depends on position only through a relative rotation,

\[ \big(R_{\Theta,m}\, q_m\big)^{\top}\big(R_{\Theta,n}\, k_n\big) = q_m^{\top} R_{\Theta,\,n-m}\, k_n , \]

a signal that is easily dominated when token magnitudes are large. Qi et al. [5] show exactly this in LLaVA-1.5: randomly permuting the vision tokens barely changes the model's description (Figure 3), a "bag-of-tokens" behavior. They trace it to vision embeddings whose norms are one to two orders of magnitude larger than text embeddings, which suppresses positional sensitivity.

LLaVA describes an image almost identically when its vision tokens are randomly permuted
Figure 3. Permutation test: shuffling vision tokens leaves the answer almost unchanged. Reproduced from Qi et al. [5], Fig. 1.

In short, today's VLMs see scenes as labels, not as space.

How to make them better

Approaches fall into five families, which closely match the intervention-based taxonomy of D. Liu et al. [1] (prompting, model-centric changes, explicit 2D cues, 3D enrichment, and data): better spatial data, architectures that keep geometry, better inference, targeted benchmarks, and embodied grounding. Figure 4 summarizes the training-based side.

Training-based methods: spatial modules and 3D encoders, synthetic simulators, and reward-based refinement
Figure 4. Training-based methods: geometric priors via spatial modules, synthetic environments for spatial QA, and RL-style refinement of reasoning. Reproduced from W. Liu et al. [2], Fig. 6.

1. Data-centric: explicit spatial supervision

Generate large-scale spatial VQA from images with 3D cues (depth, point clouds, multiple views). SpatialVLM [6] builds an automatic pipeline that scales to about 2 billion metric spatial VQA pairs on 10 million real images (Figure 5): filter scene-level images, extract objects with captioning, segmentation, and metric depth, lift them to 3D, and synthesize questions from the recovered geometry. Lifting uses the pinhole camera model, where a pixel \((u, v)\) with metric depth \(d(u, v)\) and intrinsics \(K\) maps to

\[ \mathbf{p} = d(u, v)\, K^{-1} \begin{bmatrix} u & v & 1 \end{bmatrix}^{\top}, \]

so an answer such as "how far is A from B?" can be read off as \(\lVert \mathbf{c}_A - \mathbf{c}_B \rVert_2\) between object centroids. Training on such data improves both qualitative and quantitative spatial VQA.

SpatialVLM data pipeline: semantic filtering, 2D context extraction, lifting to 3D, ambiguity resolution, QA synthesis
Figure 5. Spatial VQA synthesis from internet images. Reproduced from Chen et al. [6], Fig. 2.

Data remains the bottleneck: the largest spatial corpora hold millions of examples, orders of magnitude below the billion-scale data used to pretrain foundation models, and they skew toward perception and relations rather than extrapolation [1].

2. Architecture and features: make space first-class

Change what the language model receives so spatial cues survive: preserve positional signals, use feature-preserving connectors, add region, depth, or 3D scene-graph modules, or fuse multiple views. Following their diagnosis, Qi et al. [5] apply two minimal interventions to LLaVA-1.5. First, RMS-normalize the projected vision embeddings to the scale of text tokens,

\[ \tilde{\mathbf{v}} = \frac{\mathbf{v}}{\operatorname{RMS}(\mathbf{v})}, \qquad \operatorname{RMS}(\mathbf{v}) = \sqrt{\tfrac{1}{d}\textstyle\sum_{i=1}^{d} v_i^2}, \]

and second, add mid-layer vision-encoder features, which carry more spatial detail than the final layer. Normalization alone raises their position-sensitivity index on CV-Bench 2D from 0.57% to 11.31%.

3. Reasoning-time methods: better inference

Without retraining, decompose spatial questions into steps with chain-of-thought (CoT), build explicit intermediate representations such as scene graphs, or search at test time (Figure 6). Self-consistency [7], for example, samples \(K\) reasoning paths and takes a majority vote,

\[ \hat{a} = \arg\max_{a} \sum_{k=1}^{K} \mathbb{1}\left[a_k = a\right]. \]

Ji et al. [8] find that simple CoT can even hurt, while scene-graph CoT helps. They also fine-tune with GRPO (see my post on fine-tuning for its objective) and show that, unlike SFT, which overfits to surface phrasing (for example, "closer to" versus "farther from"), GRPO generalizes more reliably out of distribution.

Inference-based methods: chain, tree, and visualization of thought, and explicit scene-graph representations
Figure 6. Inference-based methods: structured prompting (left) and explicit spatial representations such as scene graphs (right). Reproduced from W. Liu et al. [2], Fig. 7.

4. Evaluation and diagnostics: targeted benchmarks

General VQA benchmarks mix spatial reasoning with detection and semantics. Purpose-built benchmarks isolate it: left/right, above/below, metric distance, and egocentric versus allocentric frames. Mind the Gap [9] separates four components (spatial relations, orientation and navigation, mental rotation, and spatial visualization) and evaluates 13 state-of-the-art VLMs on synthetic and real images. Their average accuracy is close to random chance (Figure 7 shows mental-rotation examples).

Generated images with questions about which direction an object will face after turning
Figure 7. Example image–question pairs from the mental-rotation evaluation. Reproduced from Stogiannidis et al. [9], Fig. 6.

At larger scale, D. Liu et al. [1] evaluate 37 models (commercial, open-source, and spatially specialized) on 9 benchmarks grouped by cognitive level. Four findings stand out:

  • Uneven abilities. Models do best on Understanding, worse on Perception, and worst on Extrapolation.
  • Benchmark bias. Relation-focused benchmarks (for example, CV-Bench and What's Up) underrepresent metric and object-centric questions, which inflates apparent performance.
  • No universal fix. Prompting helps perception and understanding but hurts extrapolation, where extra cues become distractors; data-centric training helps extrapolation slightly.
  • Weak generalization. Methods that inject explicit 2D or 3D information often underperform general-purpose VLMs outside the settings they were designed for.

5. Embodied and 3D grounding: close the loop

Tie VLMs to real 3D geometry and actions (robotics, interactive environments, multi-view scenes) so that spatial reasoning becomes physically grounded. SpatialRGPT [10] learns region-level representations from automatically built 3D scene graphs and adds a plugin that feeds relative depth through the same visual encoder, with separate RGB and depth connectors (Figure 8). Given region prompts, it answers relative direction and metric distance questions, and its distance estimates serve as dense rewards for robot manipulation.

SpatialRGPT architecture with region feature extractor and RGB and depth connectors
Figure 8. Region-aware architecture with a depth plugin. Reproduced from Cheng et al. [10], Fig. 3.

Takeaway

Spatial reasoning fails for structural reasons (semantic encoders, suppressed positional signal, coarse alignment, and scarce 3D-aware data) rather than for lack of scale alone. Two open problems stand out [1]: balancing holistic semantics against fine-grained geometry without losing zero-shot generality, and resolving referential ambiguity, since the same question can have different answers from egocentric and allocentric viewpoints. The most promising directions combine the five families: spatially rich data, representations that keep geometry, inference that builds explicit structure, broader evaluation across cognitive levels, and grounding in 3D and action.

References

  1. D. Liu, T. Liang, Z. Hu, J. Peng, et al. Deconstructing Spatial Intelligence in Vision-Language Models. TechRxiv, 2025.
  2. W. Liu, Q. Xue, H. Wang, X. Yin, et al. Spatial Reasoning in Multimodal Large Language Models: A Survey of Tasks, Benchmarks and Methods. arXiv:2511.15722, 2025.
  3. X. Zheng, Z. Dongfang, L. Jiang, B. Zheng, et al. Multimodal Spatial Reasoning in the Large Model Era: A Survey and Benchmarks. arXiv:2510.25760, 2025.
  4. J. Su, Y. Lu, S. Pan, et al. RoFormer: Enhanced Transformer with Rotary Position Embedding. Neurocomputing, 2024.
  5. J. Qi, J. Liu, H. Tang, Z. Zhu. Beyond Semantics: Rediscovering Spatial Awareness in Vision-Language Models. arXiv:2503.17349, 2025.
  6. B. Chen, Z. Xu, S. Kirmani, B. Ichter, et al. SpatialVLM: Endowing Vision-Language Models with Spatial Reasoning Capabilities. CVPR, 2024.
  7. X. Wang, J. Wei, D. Schuurmans, et al. Self-Consistency Improves Chain of Thought Reasoning in Language Models. ICLR, 2023.
  8. B. Ji, S. Agrawal, Q. Tang, Y. Wu, et al. Enhancing Spatial Reasoning in Vision-Language Models via Chain-of-Thought Prompting and Reinforcement Learning. arXiv:2507.13362, 2025.
  9. I. Stogiannidis, S. McDonagh, S. A. Tsaftaris. Mind the Gap: Benchmarking Spatial Reasoning in Vision-Language Models. arXiv:2503.19707, 2025.
  10. A.-C. Cheng, H. Yin, Y. Fu, Q. Guo, et al. SpatialRGPT: Grounded Spatial Reasoning in Vision-Language Models. NeurIPS, 2024.

Powered by Jekyll and Minimal Light theme.