Abstract
Vision language models (VLMs) have demonstrated impressive performance across a wide range of downstream tasks. However, their proficiency in spatial reasoning remains limited, despite its crucial role in tasks involving navigation and interaction with physical environments. Specifically, most of these tasks rely on the core spatial reasoning capabilities in two-dimensional (2D) environments, and our evaluation reveals that state-of-the-art VLMs frequently generate implausible and incorrect responses to composite spatial reasoning problems, including simple pathfinding tasks that humans can solve effortlessly at a glance. To address this, we explore an effective approach to enhance 2D spatial reasoning within VLMs by training the model solely on basic spatial capabilities. We begin by disentangling the key components of 2D spatial reasoning: direction comprehension, distance estimation, and localization. Our central hypothesis is that mastering these basic spatial capabilities can significantly enhance a model's performance on composite spatial tasks requiring advanced spatial understanding and combinatorial problem-solving, with generalized improvements in real-world visual-spatial tasks. To investigate this hypothesis, we introduce Sparkle: a framework that uses synthetic data generation to provide targeted supervision for vision language models (VLMs) in three basic spatial capabilities, creating an instruction dataset for each capability. Our experiments demonstrate that VLMs fine-tuned with Sparkle achieve significant performance gains, not only in the basic tasks themselves but also in generalizing to composite and out-of-distribution real-world spatial reasoning tasks. These findings underscore the effectiveness of mastering basic spatial capabilities in enhancing composite spatial problem-solving through synthetic generalization, offering insights into systematic strategies for improving VLMs’ spatial reasoning capabilities.
The Spatial Gap in Modern VLMs
Despite their impressive performance in image captioning and general visual QA, state-of-the-art VLMs—including commercial models like GPT-4o—exhibit a significant "spatial gap." They frequently struggle to understand fundamental geometric relationships in a 2D plane. For example, when presented with a simple grid graph and asked to find the shortest path between two nodes, these models often generate implausible or non-existent routes, treating spatial tasks as pattern-matching exercises rather than geometric reasoning.
This limitation is a significant hurdle for the field because spatial reasoning is foundational for navigation, robotics, and any AI system intended to interact with the physical world. The authors argue that current models lack a systematic understanding of 2D space, necessitating a new approach to spatial instruction.
The Sparkle Framework: Bottom-Up Spatial Learning
To address this, we introduce Sparkle, a framework designed to build spatial intelligence from the bottom up. The approach relies on the disentanglement of spatial skills into three core "atomic" components:
- Direction Comprehension: Understanding orientation (e.g., "top-left," "down").
- Distance Estimation: Measuring or comparing the magnitude of displacement between objects.
- Localization: Identifying the precise or relative position of an object in space.
Sparkle uses a synthetic data generator to create 10,000 images featuring simple labeled nodes. It then programmatically generates 170,000 Q&A pairs targeting the three core components. Open-source VLMs (such as InternVL2 and LLaVA) are fine-tuned exclusively on these basic tasks to observe if complex reasoning emerges as a byproduct.
Key Insights and Results
The most striking finding is compositional generalizability: models do not need to be trained on pathfinding to become better at pathfinding. By mastering the "atoms" of space, models naturally improve at solving combinatorial optimization problems like the Traveling Salesman Problem (TSP) and the Shortest Path Problem (SPP).
- Emergent Pathfinding: For InternVL2-8B, accuracy on the Shortest Path Problem improved from 13.5% to 40.0% after Sparkle enhancement.
- Real-World Transfer: Even though Sparkle uses synthetic data, it boosted performance on real-world benchmarks. MiniCPM-V2.5 saw a 25.5% relative improvement on COCO-spatial tasks involving two objects.
- Grounding in Coordinates: The inclusion of numerical coordinates and distances in the training data was found to be crucial; models trained without this numerical grounding performed significantly worse on optimization tasks.
- No Catastrophic Forgetting: The models maintained or slightly improved their scores on general VLM benchmarks, proving that specialized spatial training does not degrade general knowledge.
Conclusion and Future Work
Sparkle demonstrates that mastering basic spatial capabilities is a highly effective strategy for enhancing composite spatial problem-solving through synthetic generalization. While the current framework is limited to 2D visual planes and static images, it offers a systematic strategy for improving VLMs' spatial reasoning. Future work will explore scaling these strategies to 3D environments and temporal spatial reasoning for video understanding and active navigation.
Summary updated