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

LLMs Can Easily Learn to Reason from Demonstrations:结构而非内容才是关键!

LLMs Can Easily Learn to Reason from Demonstrations Structure, not content, is what matters!

University of California, Berkeley(加州大学伯克利分校)

Dacheng Li, Shiyi Cao, Tyler Griggs, Shu Liu, Xiangxi Mo, Eric Tang, Sumanth Hegde, Kourosh Hakhamaneshi, Shishir G. Patil, Matei Zaharia, Joseph E. Gonzalez, Ion Stoica

AI总结:

研究发现,仅用1.7万条长思维链样本并通过SFT与LoRA训练Qwen2.5-32B-Instruct,即可显著提升数学和编程推理性能,且学习效果主要取决于思维链结构而非步骤内容。

摘要:

大型推理模型(LRM)通过遵循包含反思、回溯和自我验证的长思维链(Long CoT)来解决复杂推理问题。然而,用于激发 Long CoT 的训练技术和数据需求仍鲜为人知。在本研究中,我们发现大型语言模型(LLM)能够通过数据高效的监督微调(SFT)和参数高效的低秩适配(LoRA)有效学习 Long CoT 推理。仅使用 1.7 万个 Long CoT 训练样本,Qwen2.5-32B-Instruct 模型就在广泛的数学和编程基准测试上取得显著提升,包括在 AIME 2024 上达到 56.7%(提升 40.0%),在 LiveCodeBench 上达到 57.0%(提升 8.1%),可与专有 o1-preview 模型 44.6% 和 59.1% 的得分相竞争。更重要的是,我们发现 Long CoT 的结构对学习过程至关重要,而各个推理步骤的内容影响极小。影响内容的扰动,例如使用错误样本训练或移除推理关键词,对性能几乎没有影响。相比之下,破坏 Long CoT 逻辑一致性的结构性修改,例如打乱或删除推理步骤,会显著降低准确率。例如,使用答案错误的 Long CoT 样本训练的模型,与使用完全正确样本训练相比,准确率仍仅低 3.2%。这些见解加深了我们对如何激发 LLM 推理能力的理解,并强调了高效训练下一代推理模型的关键考虑因素。本文是我们此前发布的 Sky-T1-32B-Preview 模型的学术论文。代码可在 https://github.com/NovaSky-AI/SkyThought 获取。

英文摘要:

Large reasoning models (LRMs) tackle complex reasoning problems by following long chain-of-thoughts (Long CoT) that incorporate reflection, backtracking, and self-validation. However, the training techniques and data requirements to elicit Long CoT remain poorly understood. In this work, we find that a Large Language model (LLM) can effectively learn Long CoT reasoning through data-efficient supervised fine-tuning (SFT) and parameter-efficient low-rank adaptation (LoRA). With just 17k long CoT training samples, the Qwen2.5-32B-Instruct model achieves significant improvements on a wide range of math and coding benchmarks, including 56.7% (+40.0%) on AIME 2024 and 57.0% (+8.1%) on LiveCodeBench, competitive to the proprietary o1-preview model's score of 44.6% and 59.1%. More importantly, we find that the structure of Long CoT is critical to the learning process, whereas the content of individual reasoning steps has minimal impact. Perturbations affecting content, such as training on incorrect samples or removing reasoning keywords, have little impact on performance. In contrast, structural modifications that disrupt logical consistency in the Long CoT, such as shuffling or deleting reasoning steps, significantly degrade accuracy. For example, a model trained on Long CoT samples with incorrect answers still achieves only 3.2% lower accuracy compared to training with fully correct samples. These insights deepen our understanding of how to elicit reasoning capabilities in LLMs and highlight key considerations for efficiently training the next generation of reasoning models. This is the academic paper of our previous released Sky-T1-32B-Preview model. Codes are available at https://github.com/NovaSky-AI/SkyThought.

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

↑