A team of 14 researchers has developed MentalThink, a framework that teaches multimodal large language models to create and manipulate scalable vector graphics (SVG) as a form of "mental" visualization for complex reasoning tasks.

The system addresses a key limitation in current AI models: their inability to externalize and inspect spatial hypotheses during multi-step reasoning. MentalThink introduces a think-with-SVG pipeline where models generate vector graphics code, render it visually, and use the output to refine their reasoning process.

How the Framework Works

The approach mimics human mental imagery by allowing models to sketch out problems in a structured geometric space. Models create vector-based visual representations, inspect them through deterministic rendering, and iteratively revise their hypotheses based on what they observe.

The training process combines two stages: supervised fine-tuning for SVG syntax alignment, followed by multi-turn reinforcement learning that encourages models to inspect, revise, and refine their visual hypotheses.

Benchmark results show MentalThink achieving 55.1% accuracy on VSIBench and 76.0% on MindCube, outperforming existing approaches on spatial understanding tasks.

The framework enables what researchers call "dynamic perspective taking" — the ability to mentally rotate, manipulate, and reason about spatial relationships through executable graphics code.

Research Implications

The work suggests that providing AI models with an intermediate visual workspace can significantly improve their spatial reasoning capabilities. Unlike traditional approaches that rely purely on text-based reasoning, MentalThink creates a verifiable visual environment for compositional scene construction.

The researchers note that SVG provides advantages over other visual representations because it's both human-readable and machine-executable, allowing for precise geometric operations and deterministic rendering.

The 17-page paper, submitted to arXiv on July 3, 2026, includes extensive evaluations across multiple spatial reasoning benchmarks and demonstrates the framework's effectiveness in tasks requiring visual reflection and multi-turn problem-solving.