arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.04110cs.AI
收藏

利用背景算子增强大语言模型的数学推理能力

Enhancing Mathematical Reasoning in LLMs with Background Operators

Shanghai Frontiers Science Center of Artificial Intelligence and Deep Learning(上海人工智能与深度学习前沿科学中心);New York University Shanghai(上海纽约大学)

Jiajun Chen, Yik-Cheung Tam

AI总结:

该研究提出在LLMs中利用背景算子增强数学推理,构建MATH-Prolog语料库并采用K折交叉验证自训练,微调Meta-Llama-3.1-8B-Instruct模型后交叉验证集准确率84.6%、测试集84.8%,提升了未见问题的解决方案覆盖率与推理能力。

摘要:

我们提出在大型语言模型(LLMs)中利用背景算子进行数学推理。为此,我们将一组基础数学谓词定义为基本构建块。针对每个数学问题,我们开发Prolog解决方案,其中包含问题特定谓词以及从这些背景算子派生的中间谓词,确保每个解决方案都遵循已定义的算子集。我们引入MATH-Prolog语料库,该语料库源自MATH语料库的计数和概率类别。为实现高效的数据增强,我们应用K折交叉验证自训练方法。该方法为每个折增量生成新的Prolog解决方案,并在模型训练过程中将经验证正确的解决方案纳入训练集。实验结果表明,5折交叉验证自训练能有效识别新的准确Prolog解决方案,在交叉验证集上准确率达84.6%,在微调Meta-Llama-3.1-8B-Instruct模型时测试集准确率达84.8%。该方法成功为未见问题揭示了具有完全可计算推理步骤的新解决方案。此外,将背景数学谓词纳入提示可提高解决方案覆盖率。

英文摘要:

We propose utilizing background operators for mathematical reasoning in large language models (LLMs). To achieve this, we define a set of fundamental mathematical predicates as the basic building blocks. For each mathematical problem, we develop a Prolog solution that includes problem-specific predicates and intermediate predicates derived from these background operators, ensuring that each solution adheres to the defined operator set. We introduce the MATH-Prolog corpus, which is derived from the counting and probability categories of the MATH corpus. For efficient data augmentation, we apply K-fold cross-validated self-training. This method incrementally generates new Prolog solutions for each fold, incorporating those verified as correct into the training set throughout the model training process. Our experimental results demonstrate that 5-fold crossvalidated self-training effectively identifies new, accurate Prolog solutions, achieving an accuracy of 84.6% on the cross-validated set, and 84.8% on the test set during fine-tuning the Meta-Llama-3.1-8B-Instruct model. This approach successfully uncovers new solutions with fully computable inference steps for previously unseen problems. Additionally, incorporating the background mathematical predicates into the prompt enhances solution coverage.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑