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

MathCanvas: Intrinsic Visual Chain-of-Thought for Multimodal Mathematical Reasoning

Weikang Shi, Aldrich Yu, Rongyao Fang, Houxing Ren, Ke Wang, Aojun Zhou, Changyao Tian, Xinyu Fu, Yuxuan Hu, Zimu Lu, Linjiang Huang, Si Liu, Rui Liu, Hongsheng Li

TL;DR

MathCanvas introduces a framework that endows Large Multimodal Models (LMMs) with the ability to natively generate and edit mathematical diagrams as intermediate "visual thoughts" during problem-solving. By training on a massive new dataset of interleaved visual-textual reasoning paths, their 7B model (BAGEL-Canvas) achieves an 86% relative improvement in complex math problem-solving, outperforming much larger open-source models and several proprietary systems.

What Problem Does This Paper Address?

When humans tackle complex geometry or calculus problems, we rarely rely on text alone; we sketch diagrams, plot functions, and draw auxiliary lines to help us think. While text-based Chain-of-Thought (CoT) prompting has dramatically boosted the reasoning power of Large Language Models, standard models still struggle in mathematical domains that intrinsically rely on visual intuition.

Existing attempts at Visual Chain-of-Thought (VCoT) fall short in two major ways. First, they often rely on rigid external tools (like code interpreters) that lack flexibility. Second, when models try to generate visuals natively, they either produce geometrically incorrect diagrams or treat the images as mere decorations rather than strategic reasoning steps. MathCanvas addresses this gap by teaching LMMs when, what, and how to autonomously draw high-fidelity, strategically timed diagrams to unlock simpler, more elegant solution paths.

MathCanvas vs. prior attempts on a geometry problem.

Methods

The authors implement a two-stage training recipe built on top of the BAGEL LMM architecture, which features separate transformer "experts" for understanding and generation:

  1. Stage I: Visual Manipulation (Pretraining): This stage equips the model with foundational diagram synthesis and editing skills. The model's Generation Expert is pretrained on millions of diagram trajectories using a Rectified-Flow Loss, while the Understanding Expert is frozen to preserve the model's core reasoning capabilities and prevent catastrophic forgetting.
  2. Stage II: Strategic Visual-Aided Reasoning (Fine-tuning): Here, all model components are unfrozen and trained jointly. The model learns to intelligently interleave text and images by treating drawing as a token prediction task. After each text segment, the model predicts whether to emit a special <|vision_start|> token to initiate a diagram or an <|endoftext|> token to conclude the answer.
The two-stage training recipe for MathCanvas.

Datasets

The framework is powered by a newly curated, million-scale toolkit of datasets:

  • MathCanvas-Edit (5.2M trajectories): Step-by-step diagram editing sequences derived from competition-level geometry problems and programmatically synthesized geometric primitives.
  • MathCanvas-Imagen (10M pairs): A large-scale caption-to-diagram dataset used to master text-to-image generation for mathematical contexts.
  • MathCanvas-Instruct (219K examples): A dataset consisting of interleaved visual-textual mathematical reasoning paths, teaching the model the procedural knowledge of when to leverage visual aids.
  • MathCanvas-Bench (3K problems): A dedicated, rigorous evaluation benchmark of multi-step problems requiring generative, interleaved visual-textual solutions (excluding all multiple-choice questions to prevent random guessing).

Key Insights and Ideas

  • Visuals as Active Reasoning Agents: Instead of treating images purely as static inputs to be processed, MathCanvas demonstrates that image generation can serve as an active, intermediate step in the reasoning chain.
  • Interleaved Training Enhances Pure Textual Logic: One of the most surprising findings came from the ablation studies: training on interleaved visual-textual data improved the model's performance even when image generation was completely skipped during inference. This suggests that learning to visualize fundamentally alters and enhances the model's underlying abstract reasoning capabilities.
  • Strategic Timing Over Decoration: Generating a diagram is only useful if it happens at the right moment. By framing the decision to draw as a token prediction task, the model mimics human intuition—drawing an auxiliary line precisely when textual deduction hits a bottleneck.

Key Results

  • State-of-the-Art Open-Source Performance: The framework's model, BAGEL-Canvas (7B), achieved a 34.4% weighted score on MathCanvas-Bench, marking a substantial +15.9 point absolute improvement over its base model.
  • Outperforming Larger and Proprietary Models: BAGEL-Canvas outperformed significantly larger open-source models, such as Qwen-2.5-VL-72B (32.8%), as well as prominent proprietary systems like Gemini-2.0-Flash (32.6%) and GPT-4.1 (30.0%).
  • Massive Gains in Geometry: The model showed its most dramatic improvements in geometry-heavy subjects, including Trigonometry (+27.1 absolute gain), Plane Geometry (+19.2), and Solid Geometry (+12.3).
  • Excellent Generalization: When evaluated on traditional public math benchmarks that require text-only solutions, BAGEL-Canvas demonstrated strong generalization, yielding an absolute improvement of +10.5 on MathVista and +17.9 on MathVerse.

Limitations and Future Work

While MathCanvas excels at geometry and algebra, it demonstrated a very modest gain of only +0.8 in Calculus & Vector problems. The authors note that this domain represents a bottleneck, suggesting that visualizing continuous functions and vector spaces may require more specialized visual augmentation strategies or distinct reasoning capabilities. Future work will likely focus on expanding the framework to handle these abstract domains and exploring reinforcement learning to further optimize the strategic timing of visual generation.

Summary updated

BibTeX
@inproceedings{shi2026mathcanvas,
  author = {Weikang Shi and Aldrich Yu and Rongyao Fang and Houxing Ren and Ke Wang and Aojun Zhou and Changyao Tian and Xinyu Fu and Yuxuan Hu and Zimu Lu and Linjiang Huang and Si Liu and Rui Liu and Hongsheng Li},
  title = {{MathCanvas: Intrinsic Visual Chain-of-Thought for Multimodal Mathematical Reasoning}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.1287},
}
Figure