通过自注入错误提升模型纠错能力,显著改善数学与逻辑推理
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
- 用模型自动生成含细微错误的解题步骤,构造难样本对
- 仅用4.5K样本即让GSM8K准确率提升3.0%,MATH提升7.9%
- 无需人工标注,适用于数学、逻辑和代码生成任务
大型语言模型在数学推理方面表现强劲,但常因微小错误(如计算失误或代入错误)受限。现有方法虽利用多粒度解题对进行偏好学习,却忽略此类细微错误。本文提出新颖的偏好学习框架eRror-Injected Self-Editing(RISE),通过在关键步骤中注入预设细微错误,构建用于纠错的困难样本对。RISE利用模型自身编辑少量词元以生成错误解题过程,再将自编辑解与正确解、采样得到的正负样本对联合用于细致错误感知的直接偏好优化(DPO)训练。相比其他方法,RISE无需细粒度采样或偏好标注即可进一步优化目标。大量实验验证其有效性:在Qwen2-7B-Instruct上,仅用4.5K训练样本即在GSM8K上提升3.0%,在MATH上提升7.9%。且纠错效果延伸至逻辑推理与代码生成任务。
原文摘要 · Abstract (English)
Large Language Models (LLMs) have exhibited strong mathematical reasoning prowess, tackling tasks ranging from basic arithmetic to advanced competition-level problems. However, frequently occurring subtle yet critical errors, such as miscalculations or incorrect substitutions, limit the LLMs' full potential. Existing studies to improve mathematical ability typically involve applying preference learning to step-wise solution pairs. Although these methods leverage samples of varying granularity to mitigate reasoning errors, they overlook critical subtle errors. In this work, we propose a novel preference learning framework called eRror-Injected Self-Editing (RISE), which injects predefined subtle errors into pivotal tokens in reasoning or computation steps to construct hard pairs for error mitigation. In detail, RISE uses the LLM itself to edit a small number of tokens in the solution, injecting designed subtle errors. Then, pairs composed of self-edited solutions and their corresponding correct ones, along with pairs of correct and incorrect solutions obtained through sampling, are used together for subtle error-aware DPO training. Compared with other preference learning methods, RISE further refines the training objective without requiring fine-grained sampling or preference annotation. Extensive experiments validate the effectiveness of RISE, with preference learning on Qwen2-7B-Instruct yielding notable improvements of 3.0% on GSM8K and 7.9% on MATH with only 4.5K training samples. Moreover, the effect of error mitigation extends from mathematical reasoning to logical reasoning and code generation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。