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
大型推理模型(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.
What Makes In-context Learning Effective for Mathematical Reasoning: A Theoretical Analysis
University of Science and Technology of China(中国科学技术大学);State Key Laboratory of Cognitive Intelligence(认知智能国家重点实验室);Hong Kong University of Science and Technology(香港科技大学);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)
AlignedCoT: Prompting Large Language Models via Native-Speaking Demonstrations
The Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));City University of Hong Kong(香港城市大学);Shenzhen Campus of Sun Yat-sen University(中山大学深圳校区);The Hong Kong University of Science and Technology(香港科技大学);University of California, Merced(加州大学默塞德分校);Chongqing University(重庆大学);MBZUAI(穆罕默德·本·扎耶德人工智能大学)
Mixture of Demonstrations for Textual Graph Understanding and Question Answering
Independent Researcher, Wayne State University(韦恩州立大学独立研究者);Institute for Clarity in Documentation(文档清晰研究所);Inria Paris-Rocquencourt(巴黎-罗克琴court研究所);Rajiv Gandhi University(拉吉夫·甘地大学);Tsinghua University(清华大学);Palmer Research Laboratories(帕勒尔研究实验室)
SALA: Semantic-Aware Logical Alignment for Complex Reasoning in In-Context Learning
School of Software Engineering, Sun Yat-sen University(中山大学软件工程学院);School of Artificial Intelligence, Sun Yat-sen University(中山大学人工智能学院);Merchants Union Consumer Finance Company Limited(招商局联融消费金融股份有限公司)
Recall, Retrieve and Reason: Towards Better In-Context Relation Extraction
School of Computer Science and Engineering, Southeast University(东南大学计算机科学与工程学院);Beijing Institute of Computer Technology and Application(北京计算机技术及应用研究所);Interdisciplinary Applications (Southeast University), Ministry of Education(教育部东南大学交叉应用中心)
LEMMo-Plan: LLM-Enhanced Learning from Multi-Modal Demonstration for Planning Sequential Contact-Rich Manipulation Tasks
School of Computation, Information and Technology, Technical University of Munich(慕尼黑工业大学计算、信息与技术学院);Aalto University(阿尔托大学);Nanjing University (Suzhou Campus)(南京大学苏州校区);Mohamed Bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学)
Atom-anchored LLMs speak Chemistry: A Retrosynthesis Demonstration
Machine Learning Research(机器学习研究);Pfizer Research and Development(辉瑞研发);Leiden Institute of Advanced Computer Science(莱顿高级计算机科学研究所);Leiden University(莱顿大学);Leiden Academic Centre for Drug Research(莱顿药物研究中心);Leiden Institute of Chemistry(莱顿化学研究所)