NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Multimodal Thinking with Renderable Programs

Sunli Chen, Ding Zhong, Ziqiao Ma, Jiaxin Liu, Zeyuan Yang, Hao Zhang, Lie Lu, Joyce Chai, Chuang GanarXiv 2026

TL;DR

Current vision-language models struggle to "think with images" because they treat visual outputs as pixel grids or latent vectors rather than structured, editable workspaces. This paper introduces SVGLM, a framework that uses Scalable Vector Graphics (SVG) as an intermediate, text-based reasoning medium for complex visual tasks like geometry problem-solving. By generating and reflecting on renderable SVG code, models achieve significantly higher reasoning accuracy and interpretability without relying on brittle external software stacks.

What Problem Does This Paper Address?

While modern vision-language models (VLMs) excel at understanding images and reasoning via text, they struggle with tasks that require active visual manipulation—such as drawing an auxiliary line to solve a geometry problem.

Existing approaches to give models an "active visual workspace" typically fall into two camps: generating pixel-based (raster) images, which is token-inefficient and lacks precision, or generating imperative Python code (e.g., using matplotlib), which tightly couples the model to specific software environments and can be brittle under version drift. The authors address this gap by asking: How can we give VLMs a compact, resolution-independent, and fully interpretable visual workspace to execute step-by-step visual reasoning?

Methods

The authors propose SVGLM (Scalable-Vector-Graphics-enhanced Language Model), a paradigm that treats SVG code as an executable, text-based visual rationale.

Instead of standard multi-modal chain-of-thought (which is text-only), SVGLM uses a multi-turn tool-calling scheme:

  1. When faced with a spatial or geometric problem, the model generates text reasoning followed by an SVG tool call (wrapped in <tool_call> tokens).
  2. This SVG code specifies precise geometric primitives (lines, paths, shapes) on a standardized $1000 \times 1000$ canvas.
  3. An external renderer deterministically overlays this SVG on top of the original image.
  4. The updated image is fed back into the model's context for the next turn of reasoning, allowing the model to "see" its own modifications before delivering a final answer.
Figure 1: Comparison between standard multi-modal chain-of-thought and SVG-enhanced thinking. Vanilla SFT and SVGLM yield different conversation patterns and results. SVGLM offers a more robust thinking with images pipeline with better performance on reasoning tasks.

Datasets

  • MathCanvas-Instruct / MathCanvas-Bench: The primary source and benchmark for geometric reasoning. The authors curated an 8K dataset of high-quality SVG tool-calling samples specifically for drawing auxiliary lines in plane and solid geometry.
  • Visual Genome / POPE: To test generalization to grounded reasoning (like object bounding box localization) and evaluate hallucination reduction, they converted 30,000 Visual Genome samples into SVG format and evaluated them using the POPE benchmark.

The data curation pipeline utilized Gemini-3.0-Thinking to generate precise SVG coordinates, followed by a GPT-based visual verifier and human inspection to filter out errors.

Figure 2: Our data curation pipeline. We use Gemini-3-Pro to identify the difference between source and target images and generate SVGs. Both GPT filtering and human verification are conducted to ensure the quality of collected samples.

Key Insights and Ideas

  • SVG as a Dual Representation: SVG code perfectly bridges the gap between text and pixels. Because it is structured XML text, language models can naturally learn its syntax and manipulate coordinates, yet it renders deterministically into a clean visual format that the VLM's vision tower can re-evaluate.
  • The Power of Visual Reflection: Ablation studies revealed that simply writing the SVG code helps performance, but rendering it and feeding it back to the model provides a massive secondary boost. Seeing its own "drawings" allows the VLM to ground its final mathematical calculations in verified visual evidence.
  • Failure of Diffusion-Based Editing for Reasoning: The authors found that using open-source image editing models (like Qwen-Image-Edit) as a reasoning medium fails because diffusion models suffer from hallucination and domain misalignment in precise geometric contexts. SVG avoids this entirely by being exact and programmatic.

Key Results

  • MathCanvas-Bench Performance: SVGLM achieved substantial improvements across multiple open-source model families (LLaVA-Next-Mistral-7B, Qwen2.5-VL-7B, InternVL3-8B). For instance, Qwen2.5-VL-7B (SVGLM) achieved a weighted accuracy of 30.9%, significantly outperforming its vanilla zero-shot baseline (19.5%) and standard SFT (21.8%). It also beat commercial models like GPT-4o (19.2%).
  • Grounded Reasoning (POPE): SVGLM generalized well to object grounding tasks, boosting LLaVA-Next-Mistral-7B's POPE score from 47.4% (zero-shot) to 69.4%, demonstrating that learning SVG structures helps reduce visual hallucination.
  • High-Quality Generation: Human evaluation showed that 79.5% of the generated SVGs achieved perfect reconstruction of the required visual modifications, with only 1% suffering from structural errors.

Limitations and Future Work

  • Compute and API Constraints: Due to limited compute resources and API costs, the authors could not verify results on larger frontier models or scale up to massive SVG datasets.
  • Inference-Time Scaling: The current framework relies on a fixed tool-calling loop. The authors note that applying inference-time scaling methods (such as search or multi-candidate verification) is a promising direction for future work to further improve complex reasoning.

Summary updated

BibTeX
@misc{chen2026multimodal,
  author = {Sunli Chen and Ding Zhong and Ziqiao Ma and Jiaxin Liu and Zeyuan Yang and Hao Zhang and Lie Lu and Joyce Chai and Chuang Gan},
  title = {{Multimodal Thinking with Renderable Programs}},
  year = {2026},
  eprint = {2609.30130},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.30130},
}
Figure