TL;DR
SpatialMem is a novel framework that transforms Vision-Language Models (VLMs) into expert spatial reasoning agents by allowing them to accumulate and refine "tool-use" experience. By organizing successful tool pipelines into a hierarchical memory structure, the system adaptively selects the best vision specialists for specific scenes and tasks, outperforming standard VLM baselines by up to 32% on quantitative spatial benchmarks.
What Problem Does This Paper Address?
While modern VLMs are surprisingly good at qualitative spatial reasoning (e.g., "Is the cup to the left of the plate?"), they are notoriously bad at quantitative tasks (e.g., "Exactly how many meters away is that car?").
To fix this, researchers often turn VLMs into "agents" that can call external tools like depth estimators or 3D detectors. However, existing methods typically use static pipelines: they bind a specific task to a single tool (e.g., always using GroundingDINO for detection). In reality, a tool that works perfectly in a well-lit indoor kitchen might fail miserably in a cluttered outdoor street scene. As shown in Figure 1, the "optimal" sequence of tools changes based on the environment, creating a massive combinatorial space that is difficult for a standard VLM to navigate without help.
Methods
The authors introduce SpatialMem, a framework that enables an agent to learn from its own successes and failures. Its architecture consists of three main pillars:
- Hierarchical Memory Tree: Instead of a flat database, experiences are stored in a two-level tree. The first level partitions memory by scene (Indoor vs. Outdoor), and the second by task (Object-Object Distance, Object-Camera Distance, or Object Size). This prevents "cross-contamination"—ensuring that successful outdoor driving strategies don't accidentally get retrieved for indoor furniture tasks.
- Dual-State Trajectory Optimization:
- Construction State: When the agent successfully solves a problem, the specific sequence of tool calls (the "trajectory") is indexed in memory.
- Evolution State: If the agent fails, a "Summarizer" VLM analyzes the failure and proactively suggests a better tool combination (e.g., swapping one depth estimator for another). This optimized candidate is then tested on future queries before being promoted to the main memory pool.
- Memory Retrieval: When a new query arrives, a "Perceiver" model classifies the scene and task. The agent then retrieves the top-performing tool pipelines from the corresponding memory bucket to guide its reasoning.
Datasets
The authors evaluated SpatialMem on several challenging benchmarks:
- MetricBench (New): A curated benchmark of 658 questions covering indoor/outdoor scenes and three quantitative tasks. It emphasizes high-quality annotations and diverse physical scales (20cm to 50m).
- SpatialRGPT-Quantitative: Focuses on horizontal/vertical distance and size estimation.
- QSpatial-ScanNet & QSpatial++: Benchmarks for 3D spatial reasoning in indoor environments.
- CV-Bench: Used for qualitative spatial reasoning evaluation.
Key Insights and Ideas
- The "Tool Bias" Problem: Different vision specialists have inherent biases. For example, some depth estimators are tuned for close-range indoor shots, while others excel at long-range outdoor vistas. SpatialMem treats these tools as a "candidate pool" rather than a fixed menu.
- Failure is a Teacher: Most agent frameworks simply discard failed attempts. SpatialMem’s "Evolution State" treats a failure as a diagnostic opportunity, using a VLM to "debug" the tool pipeline and propose a fix.
- Context is King: The 9.1% performance gain from the memory design alone proves that simply having access to tools isn't enough; an agent needs to know which tool to use in which context.
Key Results
SpatialMem achieves state-of-the-art performance across the board:
- MetricBench Superiority: It outperformed the best VLM baselines by 32% and surpassed other agentic methods (like ReasoningBank) by nearly 10%.
- Robustness Across Scales: As shown in Figure 3, while competing models like RoboRefer-8B see their success rates plummet as objects get further away (the "Far" category), SpatialMem maintains a high success rate (over 75%) regardless of distance.
- Ablation Success: Removing the hierarchical structure or the trajectory optimization led to significant performance drops, confirming that both "where you store" and "how you refine" memories are critical.
An example of the system in action is shown in Figure 4, where the agent successfully orchestrates detection, segmentation, and point cloud extraction to measure the distance between a car and a motorcycle.
Limitations and Future Work
- Fixed Taxonomy: The current memory hierarchy relies on predefined scene and task categories. Future iterations could benefit from an automated, open-ended taxonomy that discovers new categories on the fly.
- Feedback Quality: The "Evolution State" depends on the quality of the VLM judge. If the judge cannot accurately diagnose why a tool failed, the suggested "optimized" trajectory might not actually be better.
- Generalization: While it excels at spatial tasks, the authors suggest extending this hierarchical memory approach to other complex agentic domains, such as code generation or multi-step robotic planning.
Summary updated