arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2205.14318cs.LGcs.PL
收藏

从自抽样正确解和部分正确解学习数学推理

Learning Math Reasoning from Self-Sampled Correct and Partially-Correct Solutions

Yale University(耶鲁大学);Microsoft Research(微软研究院);Google(谷歌);University of Washington(华盛顿大学)

Ansong Ni, Jeevana Priya Inala, Chenglong Wang, Oleksandr Polozov, Christopher Meek, Dragomir Radev, Jianfeng Gao

摘要:

预训练的语言模型在许多自然语言处理任务中表现出了优异的性能,但它们在小学数学问题等多步形式推理任务中仍然存在困难。微调它们以解决此类数学推理问题的一个关键挑战是,许多现有的数据集只包含每个问题的一个参考解决方案,尽管事实上通常存在类似于最终答案的不同推理路径的替代解决方案。这样,微调模型偏向于有限的参考解决方案,这限制了它们对未知示例的泛化。为了缓解这个问题,我们建议让模型在训练过程中进行采样,并从自采样的完全正确的解决方案和部分正确的解决方案中学习,完全正确的解决方案在执行时产生正确的答案,部分正确的解决方案的中间状态与已知正确解决方案的中间状态相匹配。我们表明,我们使用自采样的正确和部分正确的解决方案可以有益于学习,并帮助指导采样过程,从而更有效地探索解决方案空间。此外,我们探索了各种培训目标,以支持每个示例从多个解决方案中学习,并发现它们极大地影响了性能。在两个数学推理数据集上的实验表明,与使用MLE从单个参考解决方案学习相比,我们的方法是有效的,其中GSM8K的PASS@100从35.5%提高到44.5%,MathQA的PASS@80从27.6%提高到36.2%。这种改进在不同的型号尺寸上也是一致的。我们的代码可在https://github.com/microsoft/TraceCodegen上获得。

英文摘要:

Pretrained language models have shown superior performance on many natural language processing tasks, yet they still struggle at multi-step formal reasoning tasks like grade school math problems. One key challenge of finetuning them to solve such math reasoning problems is that many existing datasets only contain one reference solution for each problem, despite the fact that there are often alternative solutions resembling different reasoning paths to the final answer. This way, the finetuned models are biased towards the limited reference solutions, which limits their generalization to unseen examples. To mitigate this issue, we propose to let the model perform sampling during training and learn from both self-sampled fully-correct solutions, which yield the correct answer upon execution, and partially-correct solutions, whose intermediate state matches an intermediate state of a known correct solution. We show that our use of self-sampled correct and partially-correct solutions can benefit learning and help guide the sampling process, leading to more efficient exploration of the solution space. Additionally, we explore various training objectives to support learning from multiple solutions per example and find they greatly affect the performance. Experiments on two math reasoning datasets show the effectiveness of our method compared to learning from a single reference solution with MLE, where we improve PASS@100 from 35.5% to 44.5% for GSM8K, and 27.6% to 36.2% PASS@80 for MathQA. Such improvements are also consistent across different model sizes. Our code is available at https://github.com/microsoft/TraceCodegen.

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

↑