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 · OpenReview

Abstract

While Large Language Models (LLMs) have excelled in textual reasoning, they struggle with mathematical domains like geometry that intrinsically rely on visual aids. Existing approaches to Visual Chain-of-Thought (VCoT) are often limited by rigid external tools or fail to generate the high-fidelity, strategically-timed diagrams necessary for complex problem-solving. To bridge this gap, we introduce MathCanvas, a comprehensive framework designed to endow unified Large Multimodal Models (LMMs) with intrinsic VCoT capabilities for mathematics. Our approach consists of two phases: a Visual Manipulation stage for diagram generation and editing, and a Strategic Visual-Aided Reasoning stage to teach the model when to leverage visual aids. Our model, BAGEL-Canvas, achieves an 86% relative improvement over strong LMM baselines on the new MathCanvas-Bench.

Introduction: The Visual Gap in Mathematical Reasoning

Large Language Models (LLMs) frequently struggle with geometry and other visually-dependent mathematical domains. For humans, solving such problems often involves sketching diagrams and drawing auxiliary lines—a "visual thought" process that simplifies complex logic. Current AI models face two primary hurdles:

  1. Fidelity: Generated diagrams are often geometrically incorrect or "hallucinated," rendering them useless for reasoning.
  2. Strategy: Models lack the procedural knowledge of when to use a visual aid, often treating diagrams as decorations rather than reasoning tools.

MathCanvas addresses these issues by making visual reasoning intrinsic, allowing the model to generate diagram pixels directly as part of its internal "thought" process.

The MathCanvas Framework

The researchers developed a two-stage training recipe to instill these capabilities into a unified LMM (specifically the BAGEL architecture):

1. Visual Manipulation (Pre-training)

The model first learns the "language" of diagrams. It is trained to generate images from captions and perform step-by-step editing. This allows the model to add a single line or mark an angle without redrawing the entire scene, utilizing a Rectified-Flow Loss to ensure high-quality image generation.

2. Strategic Visual-Aided Reasoning (Fine-tuning)

The model is trained on interleaved sequences of text and images. It learns to predict a special <|vision_start|> token when it determines a visual aid is necessary, mastering the "procedural knowledge" of strategic diagramming.

Data Foundations

To power this framework, a massive suite of datasets was introduced:

  • MathCanvas-Imagen: 10 million caption-to-diagram pairs.
  • MathCanvas-Edit: 5.2 million trajectories of step-by-step diagram modifications.
  • MathCanvas-Instruct: 219,000 examples of interleaved visual-textual reasoning paths.
  • MathCanvas-Bench: A rigorous benchmark of 3,000 problems across 8 categories (Plane Geometry, Solid Geometry, Trigonometry, etc.) designed to test coherent, interleaved solutions.

Key Results and Insights

The BAGEL-Canvas (7B) model demonstrates the power of intrinsic visual reasoning. By generating pixels directly, the model's "understanding" and "generation" capabilities work in tandem: the model "sees" the diagram it just drew, which informs its subsequent textual reasoning.

Comparison of BAGEL-Canvas (Ours) against other models on a geometry problem requiring auxiliary lines.
  • Massive Gains: BAGEL-Canvas achieved an 86% relative improvement over its base model on MathCanvas-Bench.
  • Competitive Edge: Despite its 7B parameter size, it outperformed much larger models like Qwen-2.5-VL-72B and challenged closed-source models like GPT-4.1 in geometry-heavy tasks.
  • Domain Strengths: The most significant improvements were in Trigonometry (+27.1 points) and Plane Geometry (+19.2 points), where visual reasoning is often the "missing link."
  • Generalization: The model showed double-digit improvements on public benchmarks like MathVista and MathVerse.

Conclusion

MathCanvas provides a complete toolkit—framework, datasets, and benchmark—to unlock human-like visual-aided reasoning in LMMs. While current work relies heavily on synthetic data, future developments may involve learning from human-drawn paths or reinforcement learning to discover novel visual strategies for even more complex mathematical challenges.

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