让AI解几何题时边思考边写代码,结果更准更透明。
Bridging Formal Language with Chain-of-Thought Reasoning to Geometry Problem Solving
- 推理时交替使用自然语言和可执行代码,逐步推导。
- 在标准测试上准确率提升15%,超越同规模和更大模型。
- 适合想改进AI数学推理能力的研究者和开发者。
大型视觉语言模型在几何问题求解(GPS)中表现受限,主要因图示理解不可靠及纯自然语言推理的不稳定性。近期工作通过生成符号程序来缓解此问题,但直接生成缺乏中间推理过程,导致决策不透明且易出错。本文提出一种新方法:将链式思维(CoT)与形式化语言结合,模型在推理过程中交替生成自然语言解释与逐步可执行的代码,形成混合推理轨迹,关键推导以形式语言表达。为规模化训练该行为,我们采用两种策略:(1) 在一个包含11,000个合成样本的新数据集上进行监督微调,其中包含自然语言推理与自动形式化;(2) 基于求解器的强化学习,通过结果反馈联合优化链式思维叙述与生成程序。基于Qwen2.5-VL-7B构建的GF-Reasoner模型,在标准GPS基准上准确率最高提升15%,超越7B级同类模型及更大规模的Qwen2.5-VL-72B。通过利用高阶几何知识并将符号计算交由求解器完成,生成的推理轨迹显著更短、更清晰。此外,我们对方法设计选择(如推理范式、数据合成、训练轮次等)进行了全面分析,为未来研究提供可操作洞见。
原文摘要 · Abstract (English)
Large vision language models exhibit notable limitations on Geometry Problem Solving (GPS) because of their unreliable diagram interpretation and pure natural-language reasoning. A recent line of work mitigates this by using symbolic solvers: the model directly generates a formal program that a geometry solver can execute. However, this direct program generation lacks intermediate reasoning, making the decision process opaque and prone to errors. In this work, we explore a new approach that integrates Chain-of-Thought (CoT) with formal language. The model interleaves natural language reasoning with incremental emission of solver-executable code, producing a hybrid reasoning trace in which critical derivations are expressed in formal language. To teach this behavior at scale, we combine (1) supervised fine-tuning on an 11K newly developed synthetic dataset with interleaved natural language reasoning and automatic formalization, and (2) solver-in-the-loop reinforcement learning that jointly optimizes both the CoT narrative and the resulting program through outcome-based rewards. Built on Qwen2.5-VL-7B, our new model, named GF-Reasoner, achieves up to 15% accuracy improvements on standard GPS benchmarks, surpassing both 7B-scale peers and the much larger model Qwen2.5-VL-72B. By exploiting high-order geometric knowledge and offloading symbolic computation to the solver, the generated reasoning traces are noticeably shorter and cleaner. Furthermore, we present a comprehensive analysis of method design choices (e.g., reasoning paradigms, data synthesis, training epochs, etc.), providing actionable insights for future research.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。