arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.02178cs.CLcs.AIcs.LG

Masked Thought:简单掩码部分推理步骤可提升语言模型的数学推理学习能力

Masked Thought: Simply Masking Partial Reasoning Steps Can Improve Mathematical Reasoning Learning of Language Models

Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Alibaba Group(阿里巴巴集团);Computational Bioscience Research Center, KAUST(阿卜杜拉国王科技大学计算生物科学研究中心)

Changyu Chen, Xiting Wang, Ting-En Lin, Ang Lv, Yuchuan Wu, Xin Gao, Ji-Rong Wen, Rui Yan, Yongbin Li

AI总结:

针对大语言模型推理任务误差级联、现有微调方法成本高的问题,提出无需外部资源的Masked Thought方法,通过随机掩码思维链token提升数学推理性能,且与现有方法互补可进一步增效。

摘要:

在推理任务中,哪怕是微小错误也会级联导致结果失准,造成大语言模型在这类领域表现不佳。此前的微调方法试图通过利用人工标注的更精准监督信号、更大规模模型或自采样来缓解这一问题,但成本高昂。与之不同,我们提出了一种无需外部资源的方法,仅通过对输入引入扰动来实现。我们的训练方法会随机掩码思维链中的特定token,我们发现这一技术对推理任务效果尤为显著。在Llama-2-7B上基于GSM8K进行微调时,仅修改少量代码,该方法相比标准监督微调在GSM8K准确率上提升了5%,在GSM-IC准确率上提升了10%。此外,该方法与现有方法具有互补性。当与相关的显式数据增强方法结合时,它能在采用不同增强方法的五个数据集以及两种不同基座模型上均带来性能提升。我们通过案例研究和定量分析进一步探究了这种提升背后的机制,表明我们的方法可能为模型捕捉长距离依赖(尤其是与问题相关的长距离依赖)提供更优支持。这种增强能够加深模型对问题前提和先前步骤的理解。我们的代码已在Github上开源。

英文摘要:

In reasoning tasks, even a minor error can cascade into inaccurate results, leading to suboptimal performance of large language models in such domains. Earlier fine-tuning approaches sought to mitigate this by leveraging more precise supervisory signals from human labeling, larger models, or self-sampling, although at a high cost. Conversely, we develop a method that avoids external resources, relying instead on introducing perturbations to the input. Our training approach randomly masks certain tokens within the chain of thought, a technique we found to be particularly effective for reasoning tasks. When applied to fine-tuning with GSM8K on Llama-2-7B, this method achieved a 5\% improvement in GSM8K accuracy and a 10\% improvement in GSM-IC accuracy over standard supervised fine-tuning with a few codes modified. Furthermore, it is complementary to existing methods. When integrated with related explicit data augmentation methods, it leads to improvements across five datasets of various augmentation methods, as well as two different base models. We further investigate the mechanisms behind this improvement through case studies and quantitative analysis, suggesting that our approach may provide superior support for the model in capturing long-distance dependencies, especially those related to questions. This enhancement could deepen understanding of the premises in questions and prior steps. Our code is available at Github.

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

↑