Reinforcing Spatial Reasoning in Vision-Language Models with Interwoven Thinking and Visual Drawing

Junfei Wu, Jian Guan, Kaituo Feng, Qiang Liu, Shu Wu, Liang Wang, Wei Wu, Tieniu Tan

TL;DR

Current vision-language models struggle with spatial reasoning because they attempt to solve visual problems using only text, often losing critical geometric details in the translation. This paper introduces ViLASR, a model trained to "draw" on images—using bounding boxes and auxiliary lines—to visually think through spatial problems. By employing a novel three-stage training pipeline that includes reinforcement learning, ViLASR achieves massive performance boosts across diverse spatial reasoning benchmarks, rivaling or beating much larger proprietary models.

What Problem Does This Paper Address?

Large Language Models (LLMs) have recently achieved incredible reasoning capabilities by using "slow thinking" or chain-of-thought processes. Naturally, researchers want to bring this capability to Large Vision-Language Models (LVLMs) to help them better understand images and videos.

However, current LVLMs approach visual reasoning in a highly text-centric way. They try to translate visual information into a textual semantic space and reason from there. While this works for basic tasks, it fails spectacularly on spatial reasoning—tasks that require precise geometric understanding, tracking objects over time, or navigating a maze. When a model is forced to describe complex spatial dynamics purely in text, crucial details are lost. Humans solve these problems by mentally visualizing and manipulating objects, but LVLMs are stuck trying to describe them. Existing workarounds rely on black-box external tools (like object detectors), which fragment the reasoning process and prevent the model from holistically planning or correcting its own mistakes.

Methods

To fix this, the authors propose a paradigm called "drawing to reason in space." Instead of just outputting text, the model is equipped with a visual scratchpad. It can output coordinates to execute basic drawing operations: an Object Mapper (drawing bounding boxes to anchor locations) and a Path Tracer (drawing auxiliary lines to visualize trajectories and relationships). The annotated image is then fed back into the model for the next reasoning step.

Drawing to Reason in Space

To teach a model how to do this effectively, the authors developed a three-stage training framework built on top of Qwen2.5-VL-7B:

Three-Stage Training Pipeline
  1. Cold-Start Training: Supervised fine-tuning on synthetic data to teach the model the basic syntax and utility of drawing bounding boxes and lines.
  2. Reflective Rejection Sampling: A novel intermediate stage. The researchers generated many reasoning paths and fine-tuned the model only on the paths that demonstrated self-correction (e.g., the model draws a box, realizes it mapped the wrong object, redraws it) and arrived at the correct answer.
  3. Reinforcement Learning (RL): The model is optimized using Group Relative Policy Optimization (GRPO). The reward function incentivizes both answer correctness (using a sliding scale for numerical accuracy) and format adherence (ensuring the drawing coordinates are actually executable).

Datasets

Training Data: The authors curated three custom datasets for the different training stages: VILASR-ColdStart-33k, VILASR-RRS-8k, and VILASR-RL-40k. These were built by synthesizing and filtering data from existing sources (GQA, VSR, OpenImages, GPT4Scene, SR-91k) and procedurally generating 2D mazes for navigation tasks.

Evaluation Benchmarks: * Image Spatial Reasoning: MAZE (navigation) and SpatialEval-Real (static spatial relations). * Video Spatial Reasoning: VSI-Bench (tracking temporal relationships). * Multi-view Spatial Reasoning: SPAR-Bench and MMSI-Bench (integrating information from multiple camera angles).

Key Insights and Ideas

  • Visual Thinking Beats Text Translation: Grounding abstract spatial relationships in concrete visual representations (lines and boxes) is vastly superior to text-only reasoning. For example, in maze navigation, drawing the path step-by-step prevents the model from "losing its place," a common failure mode for text-only models.
  • Reflection is Learned, Not Innate: The "Reflective Rejection Sampling" stage was the secret sauce. Without it, the model tended to guess spatial relationships by drawing lines without verifying object locations first. Training specifically on self-correcting trajectories taught the model to double-check its own work, dropping its error rate significantly.
  • RL Consolidates Capability: While supervised fine-tuning taught the model how to draw, RL taught it how to draw efficiently. RL optimization significantly narrowed the gap between the model's single-attempt performance and its multi-attempt potential, proving that dense reward signals are crucial for precise spatial measurements.

Key Results

  • Massive Overall Gains: ViLASR achieved an average absolute improvement of 18.4% over strong baselines across the five spatial reasoning benchmarks.
  • Dominating Mazes: On the MAZE benchmark, ViLASR scored an incredible 98.2%, completely crushing GPT-4o (63.1%) and the base Qwen2.5-VL-7B model (36.5%).
  • State-of-the-Art Video Reasoning: On VSI-Bench (video spatial reasoning), ViLASR (a 7B parameter model) scored 45.4%, outperforming GPT-4o (34.0%) and massive open-source models like LLaVA-OneVision-72B (40.2%), while matching Google's Gemini-1.5-Pro.
  • Specific Skill Jumps: Compared to its base model, ViLASR saw massive jumps in specific subtasks like "Object Count" (+29.0%) and "Relative Direction" (+20.7%), proving the utility of its visual scratchpad.

Limitations and Future Work

  • Evaluation Constraints: The framework currently focuses on multiple-choice and numerical questions because they are easy to automatically evaluate via RL reward functions. It struggles with open-ended, free-form spatial descriptions.
  • 2D Primitives in a 3D World: The drawing operations (2D boxes and lines) are inherently limited when dealing with complex 3D spatial relationships or dynamic camera movements.
  • Future Directions: The authors suggest expanding the drawing toolkit to include tools for 3D layout reconstruction and space completion, as well as exploring more computationally efficient training strategies to offset the high cost of RL.

Summary updated

BibTeX
@inproceedings{wu2025reinforcing,
  author = {Junfei Wu and Jian Guan and Kaituo Feng and Qiang Liu and Shu Wu and Liang Wang and Wei Wu and Tieniu Tan},
  title = {{Reinforcing Spatial Reasoning in Vision-Language Models with Interwoven Thinking and Visual Drawing}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=yyWeSAsOhs},
}
Figure