Active Exploring like a Pigeon: Reinforcing Spatial Reasoning via Agentic Vision-Language Models
Abstract
Enabling Vision-Language Models (VLMs) to perform spatial reasoning remains challenging. Existing approaches treat VLMs as passive observers, which is difficult for real-world applications. Moreover, reinforcement learning methods rely on sparse rewards, limiting their effectiveness for complex reasoning tasks. Inspired by pigeons' building and exploiting cognitive maps for navigation, we propose a novel agentic pipeline for spatial reasoning. First, we introduce a new \emph{dynamic cognitive map} parameterizing scene layout as object positions and orientations, serving as persistent memory for new observations. Second, we propose a novel \emph{Spatial Assertion Codes (SAC)}, Python expressions programmatically describing spatial relationships. By collaborating with the dynamic cognitive map, SAC enables verification of intermediate reasoning steps, providing dense reward signals. We optimize the model via supervised and reinforcement finetuning. Experiments on the MindCube benchmark demonstrate state-of-the-art performance with \emph{80.5\%} overall accuracy, outperforming the best current method by \emph{29.5} accuracy points (a relative improvement of \emph{53.2\%}) on the challenging \textsc{Rotation} subset. Our code and data are open-sourced at \url{https://github.com/dw-dengwei/active-spatial-reasoning.git}.
Lay Summary
Imagine walking into a room, looking around, then closing your eyes — you can probably still recall that the desk is on your left, the window is on your right, and the sofa is behind you. This effortless sense of space is surprisingly difficult for today's most advanced AI systems. Current approaches treat AI like a passive "look-at-all-pictures-and-answer" machine: you feed it every available image at once and ask it to reason about the entire scene in one go. That is like blindfolding someone, dropping them into an unfamiliar room, and asking them to draw its floor plan — unrealistic. Our idea is simple: upgrade AI from a passive observer to an active explorer. Instead of trying to absorb everything at once, our system selectively explores its environment, building and updating a structured "mental map" of where objects are and how they relate to one another — much like how you navigate a new shopping mall. You do not try to see every store at once; you walk around, look around, and gradually build an understanding of the layout. To train this system effectively, we translate the AI's reasoning steps into executable Python code, enabling automatic verification of intermediate logic — like a math teacher who checks your derivation step-by-step, not just the final answer. On the MindCube spatial reasoning benchmark, our method achieves 80.5% accuracy, significantly outperforming existing approaches. This work brings AI closer to understanding and navigating the physical world in a way that resembles how humans and animals naturally do.