CodePlot-CoT: コード駆動画像を用いた思考による数学的視覚的推論
CodePlot-CoT: Mathematical Visual Reasoning by Thinking with Code-Driven Images
October 13, 2025
著者: 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
cs.AI
要旨
大規模言語モデル(LLMs)および視覚言語モデル(VLMs)の最近の進展は、数学的推論において著しい進歩を示しているが、補助線の描画や関数のプロットなど、視覚的支援を必要とする問題において依然として重大なボトルネックに直面している。ほとんどのLLMsとVLMsはテキストのみの推論チェーンに制限されており、テキストと画像を交互に生成できるマルチモーダル統一モデルは、そのようなタスクに必要な精度と制御性を欠いている。この問題に対処するため、我々は数学における「画像を用いた思考」のためのコード駆動型連鎖思考(CodePlot-CoT)パラダイムを提案する。本アプローチでは、VLMを活用してテキスト推論と実行可能なプロットコードを生成し、それを「視覚的思考」として画像にレンダリングすることで数学問題を解決する。これを実現するために、まず、視覚的推論を伴う数学問題のための初の大規模な二言語データセットおよびベンチマークであるMath-VRを構築し、178Kのサンプルを収録した。次に、高品質なトレーニングデータを作成するため、複雑な数学的図形をコードに解析するための最先端の画像からコードへの変換器を開発した。最後に、これらのトレーニングデータを使用して、数学問題を解決するためのCodePlot-CoTモデルを訓練した。実験結果は、我々のモデルが新たなベンチマークにおいてベースモデルに対して最大21%の向上を達成し、提案したコード駆動型推論パラダイムの有効性を完全に検証した。我々の研究は、マルチモーダル数学推論の新たな方向性を開拓し、コミュニティに対して初の大規模データセット、包括的なベンチマーク、およびそのような問題に対する強力なアプローチを提供する。今後の研究を促進するため、我々はデータセット、コード、および事前訓練済みモデルをhttps://github.com/HKU-MMLab/Math-VR-CodePlot-CoTで公開している。
English
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 Visual Reasoning, comprising 178K samples.
Second, to create high-quality training data, we develop a state-of-the-art
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. To facilitate future research, we make our
datasets, code, and pretrained models publicly available at
https://github.com/HKU-MMLab/Math-VR-CodePlot-CoT.