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

通过扩展代码形式规划释放大语言模型的推理潜力

Unlocking Reasoning Potential in Large Langauge Models by Scaling Code-form Planning

Tsinghua University(清华大学);Ant Group(蚂蚁集团)

Jiaxin Wen, Jian Guan, Hongning Wang, Wei Wu, Minlie Huang

AI总结:

本文提出 CodePlan 框架,让大语言模型生成并遵循代码形式的伪代码规划,通过从大规模语料自动提取规划并构建 200 万示例数据集进行训练,在 13 个多步推理基准上平均相对提升 25.1%,显著增强了复杂推理能力与数据效率。

摘要:

尽管大语言模型(LLMs)在传统自然语言处理任务上取得了显著成功,但其规划能力仍然是处理复杂多步推理任务的关键瓶颈。现有方法主要依赖提示或任务特定的微调,往往鲁棒性差且跨任务泛化能力不足。为了解决这一局限,我们提出了 CodePlan,一个可扩展的框架,使 LLMs 能够生成并遵循代码形式的规划——即概述高层次、结构化推理过程的伪代码。通过利用代码的结构化和通用特性,CodePlan 有效捕捉了复杂推理任务中固有的丰富语义和控制流。重要的是,CodePlan 允许从海量、广泛的文本语料中自动提取代码形式的规划,而无需精心构建的、任务特定的数据集。这使其能够高效扩展,并提升 LLMs 在多种场景下的推理能力。为了训练 CodePlan,我们构建了一个包含 200 万个示例的大规模数据集,将代码形式的规划与现有语料中的标准提示-响应对相结合。在训练和推理过程中仅需极小的计算开销,CodePlan 在 13 个具有挑战性的多步推理基准上平均实现了 25.1% 的相对改进,这些基准涵盖数学推理、符号推理、指令遵循、多跳问答和决策任务。进一步分析表明,CodePlan 在更复杂的推理任务上性能增益不断增加,并且由于其泛化能力而具有显著的数据效率。

英文摘要:

Despite the remarkable success of large language models (LLMs) on traditional natural language processing tasks, their planning ability remains a critical bottleneck in tackling complex multi-step reasoning tasks. Existing approaches mainly rely on prompting or task-specific fine-tuning, often suffering from poor robustness and cross-task generalization. To address the limitation, we introduce CodePlan, a scalable framework that empowers LLMs to generate and follow \textit{code-form plans} -- pseudocode that outlines high-level, structured reasoning processes. By leveraging the structured and versatile nature of code, CodePlan effectively captures the rich semantics and control flows inherent to sophisticated reasoning tasks. Importantly, CodePlan allows automatic extraction of code-form plans from massive, wide-ranging text corpora without the need for curated, task-specific datasets. This enables it to scale up efficiently and improve LLM's reasoning capabilities across diverse scenarios. To train CodePlan, we construct a large-scale dataset of 2M examples that integrate code-form plans with standard prompt-response pairs from existing corpora. With minimal computation overhead during both training and inference, CodePlan achieves a 25.1\% relative improvement compared with directly generating responses, averaged across 13 challenging multi-step reasoning benchmarks, spanning mathematical reasoning, symbolic reasoning, instruction-following, multi-hop QA, and decision-making tasks. Further analysis reveals CodePlan's increasing performance gains on more complex reasoning tasks, as well as significant data efficiency thanks to its generalization ability.

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

↑