Lune

CVPR Findings2026

CodePlot-CoT: Mathematical Visual Reasoning by Thinking with Code-Driven Images

Chengqi Duan, Kaiyue Sun, Rongyao Fang, Manyuan Zhang, Yan Feng, Ying Luo, Yufang Liu, Ke Wang, Peng Pei, Xunliang Cai, Hongsheng Li, Yi Ma, Xihui Liu

Abstract

Recent advances in Large Language Models (LLMs) and Vision Language Models (VLMs) have shown significant progress in mathematical reasoning, yet they still face a critical bottleneck with problems requiring visual assistance, such as drawing auxiliary lines or plotting functions to solve the problems. Most LLMs and VLMs are constrained to text-only reasoning chains, while multimodal unified models that can generate interleaved text and images lack the necessary precision and controllability for such tasks. To address this, we propose CodePlot-CoT, a code-driven Chain-of-Thought paradigm for “thinking with images” in mathematics. Our approach leverages the VLM to generate text reasoning as well as executable plotting code, which is then rendered into images as “visual thought”, to solve mathematical problems. To achieve this, we first construct Math-VR, the first large-scale, bilingual dataset and benchmark for Mathematics problems with Vi-sual Reasoning, comprising 178K samples. Second, to create high-quality training data, we develop a state-of-theart image-to-code converter specialized for parsing complex mathematical figures into codes. Finally, using these training data, we train the CodePlot-CoT model for solving mathematical problems. Experimental results show that our model achieves up to 21% increase over base model on our new benchmark, fully validating the efficacy of our proposed code-driven reasoning paradigm. Our work opens a new direction for multimodal mathematical reasoning and provides the community with the first large-scale dataset, comprehensive benchmark, and strong approach for such problems. “Algebra is but written geometry and geometry is but figured algebra.” – Sophie Germain

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • MathCoder: Seamless Code Integration in LLMs for Enhanced Mathematical Reasoning cites Solving Challenging Math Word Problems Using GPT-4 Code Interpreter with Code-based Self-Verification
  • Visual Sketchpad: Sketching as a Visual Chain of Thought for Multimodal Language Models cites ViperGPT: Visual Inference via Python Execution for Reasoning
  • OneThinker: All-in-one Reasoning Model for Image and Video cites MathVista: Evaluating Mathematical Reasoning of Foundation Models in Visual Contexts
  • GGBench: A Geometric Generative Reasoning Benchmark for Unified Multimodal Models cites MathVista: Evaluating Mathematical Reasoning of Foundation Models in Visual Contexts
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. OneThinker: All-in-one Reasoning Model for Image and VideoKaituo Feng, Manyuan Zhang, Hongyu Li, Kaixuan Fan et al.CVPR 2026 · 55 citations
  2. Thinking-while-Generating: Interleaving Textual Reasoning throughout Visual GenerationZiyu Guo, Renrui Zhang, Hongyu Li, Manyuan Zhang et al.CVPR 2026 · 18 citations
  3. GGBench: A Geometric Generative Reasoning Benchmark for Unified Multimodal ModelsJingxuan Wei, Caijun Jia, Xi Bai, Xinglong Xu et al.CVPR 2026 · 7 citations
  4. GeoBench: Rethinking Multimodal Geometric Problem-Solving via Hierarchical EvaluationYuan Feng, Yue Yang, Xiaohan He, Jiatong Zhao et al.ICLR 2026 · 4 citations

Builds on17

  1. MathVista: Evaluating Mathematical Reasoning of Foundation Models in Visual ContextsPan Lu, Hritik Bansal, Tony Xia, Jiacheng Liu et al.ICLR 2024 · 1,472 citations
  2. ViperGPT: Visual Inference via Python Execution for ReasoningDídac Surís, Sachit Menon, Carl VondrickICCV 2023 · 732 citations
  3. Visual Sketchpad: Sketching as a Visual Chain of Thought for Multimodal Language ModelsYushi Hu, Weijia Shi, Xingyu Fu, Dan Roth et al.NeurIPS 2024 · 373 citations
  4. Solving Challenging Math Word Problems Using GPT-4 Code Interpreter with Code-based Self-VerificationAojun Zhou, Ke Wang, Zimu Lu, Weikang Shi et al.ICLR 2024 · 206 citations
  5. MathCoder: Seamless Code Integration in LLMs for Enhanced Mathematical ReasoningKe Wang, Houxing Ren, Aojun Zhou, Zimu Lu et al.ICLR 2024 · 188 citations

Related papers

  1. Concise Geometric Description as a Bridge: Unleashing the Potential of LLM for Plane Geometric Problem SolvingJingyun Wang, Dian Li, Xiaohan Wang, Gang Liu, Jiahong Yan, Guoliang KangCVPR Findings 2026
  2. Imagine While Reasoning in Space: Multimodal Visualization-of-ThoughtChengzu Li, Wenshan Wu, Huanyu Zhang, Yan Xia et al.ICML 2025
  3. StatsChartMWP: A Dataset for Evaluating Multimodal Mathematical Reasoning Abilities on Math Word Problems with Statistical ChartsDan Zhu, Tianqiao Liu, Zitao LiuEMNLP Findings 2025 · 1 citation
  4. DeepSketcher: Internalizing Visual Manipulation for Multimodal ReasoningChi Zhang, Haibo Qiu, Qiming Zhang, Zhixiong Zeng, Lin Ma, Jing ZhangCVPR Findings 2026 · 13 citations
  5. VisionMath: Vision-Form Mathematical Problem-SolvingZongyang Ma, Yuxin Chen, Ziqi Zhang, Zhongang Oi et al.ICCV 2025 · 2 citations
Dusk over the sea between two cliffs drawn in fine vertical lines