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

Self-Error-Instruct:从大语言模型数学推理的错误中进行泛化

Self-Error-Instruct: Generalizing from Errors for LLMs Mathematical Reasoning

The Hong Kong Polytechnic University(香港理工大学);Research Centre for Data Science & Artificial Intelligence(数据科学与人工智能研究中心);The Chinese University of Hong Kong(香港中文大学)

Erxin Yu, Jing Li, Ming Liao, Qi Zhu, Boyang Xue, Minghui Xu, Baojun Wang, Lanqing Hong, Fei Mi, Lifeng Shang

AI总结:

本文提出 Self-Error-Instruct (SEI) 框架,通过聚类分析目标模型在 GSM8K 和 MATH 上的错误关键短语,利用 instructor 模型合成并精炼针对性训练数据,迭代微调模型,有效提升了 LLMs 在域内外的数学推理能力。

摘要:

尽管大型语言模型在各个领域展现出强大的性能,但在数学推理方面仍面临许多糟糕的案例。以往从错误中学习的方法仅通过从孤立的糟糕案例中进行外推来合成训练数据,从而未能泛化这些案例中固有的广泛模式。本文提出了 Self-Error-Instruct (SEI),这是一个解决这些模型弱点并合成更具泛化性的针对性训练数据的框架。具体而言,我们在两个数学数据集 GSM8K 和 MATH 上探索目标模型,以精准定位糟糕案例。然后,我们基于 instructor 模型 (GPT-4o) 的分析为这些案例生成错误关键短语,并通过聚类这些关键短语来识别错误类型。接下来,在每次生成时,我们为每种识别出的错误类型采样少量糟糕案例,并将其输入到 instructor 模型中,该模型使用自指令方法合成额外的训练数据。这些新数据通过一次学习过程进行优化,以确保仅保留最有效的示例。最后,我们使用这些精选数据微调目标模型,并迭代重复此过程以提升性能。我们将该框架应用于各种模型,观察到它们在域内和域外数学数据集上的推理能力均有提升。这些结果证明了自我错误指令通过错误泛化在提升 LLMs 数学推理方面的有效性。

英文摘要:

Although large language models demonstrate strong performance across various domains, they still struggle with numerous bad cases in mathematical reasoning. Previous approaches to learning from errors synthesize training data by solely extrapolating from isolated bad cases, thereby failing to generalize the extensive patterns inherent within these cases. This paper presents Self-Error-Instruct (SEI), a framework that addresses these model weaknesses and synthesizes more generalized targeted training data. Specifically, we explore a target model on two mathematical datasets, GSM8K and MATH, to pinpoint bad cases. Then, we generate error keyphrases for these cases based on the instructor model's (GPT-4o) analysis and identify error types by clustering these keyphrases. Next, we sample a few bad cases during each generation for each identified error type and input them into the instructor model, which synthesizes additional training data using a self-instruct approach. This new data is refined through a one-shot learning process to ensure that only the most effective examples are kept. Finally, we use these curated data to fine-tune the target model, iteratively repeating the process to enhance performance. We apply our framework to various models and observe improvements in their reasoning abilities across both in-domain and out-of-domain mathematics datasets. These results demonstrate the effectiveness of self-error instruction in improving LLMs' mathematical reasoning through error generalization.

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

↑