ChatPaper.aiChatPaper

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은 텍스트 기반의 추론 체인에 제한되어 있으며, 텍스트와 이미지를 교차하여 생성할 수 있는 멀티모달 통합 모델은 이러한 작업에 필요한 정밀도와 제어 가능성을 갖추지 못하고 있습니다. 이를 해결하기 위해, 우리는 수학에서 "이미지와 함께 사고"하기 위한 코드 기반의 Chain-of-Thought 패러다임인 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.
PDF132October 14, 2025