多语言编程思维增强数学推理能力
MultiLingPoT: Enhancing Mathematical Reasoning with Multilingual Program Fine-tuning
- 用多语言编程数据微调模型,支持跨语言推理
- 相比单语言方法,数学推理提升6%
- 适合需要多语言编程能力的数学问题求解
程序思维(PoT)通过使用编程语言而非自然语言作为推理中间步骤,成为大模型解决数学问题的重要方式。由于不同编程语言在不同领域表现各异,采用最适合问题的编程语言更高效。然而现有研究仅聚焦单一语言的PoT,忽视了语言间的差异。为此,本文提出多语言程序思维方法(MultiLingPoT),通过多语言数据微调,使模型可灵活使用多种编程语言解答问题。同时结合前后混合策略辅助模型选择最优语言。实验表明,训练后各编程语言的数学推理能力平均提升约2.5%;通过合理混合,性能进一步提升,相较单语言PoT实现6%的增益。相关资源详见https://github.com/Nianqi-Li/MultiLingPoT。
原文摘要 · Abstract (English)
Program-of-Thought (PoT), which aims to use programming language instead of natural language as an intermediate step in reasoning, is an important way for LLMs to solve mathematical problems. Since different programming languages excel in different areas, it is natural to use the most suitable language for solving specific problems. However, current PoT research only focuses on single language PoT, ignoring the differences between different programming languages. Therefore, this paper proposes an multilingual program reasoning method, MultiLingPoT. This method allows the model to answer questions using multiple programming languages by fine-tuning on multilingual data. Additionally, prior and posterior hybrid methods are used to help the model select the most suitable language for each problem. Our experimental results show that the training of MultiLingPoT improves each program's mathematical reasoning by about 2.5\%. Moreover, with proper mixing, the performance of MultiLingPoT can be further improved, achieving a 6\% increase compared to the single-language PoT with the data augmentation.Resources of this paper can be found at https://github.com/Nianqi-Li/MultiLingPoT.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。