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

基于复杂度的多步推理算法

Complexity-Based Prompting for Multi-Step Reasoning

University of Edinburgh(爱丁堡大学);Allen Institute for AI(艾伦人工智能研究所)

Yao Fu, Hao Peng, Ashish Sabharwal, Peter Clark, Tushar Khot

摘要:

我们研究了促使大规模语言模型执行多步推理的任务。现有的工作表明,当提示与思维链(CoT),描述中间推理步骤走向最终答案的短句序列,大语言模型可以生成新的推理链和预测新的输入的答案。一个核心问题是,哪些推理示例是最有效的提示。在这项工作中,我们提出了基于复杂性的提示,一个简单而有效的多步推理的例子选择方案。我们表明,提示具有较高的推理复杂性,即,具有更多推理步骤的链,在强基线上的多步推理任务上实现了更好的性能。我们进一步扩展了我们的基于复杂性的标准,从提示(选择输入)到解码(选择输出),我们从模型中抽取多个推理链,然后从复杂推理链(而不是简单链)中选择大多数生成的答案。当用于提示GPT-3和Codex时,我们的方法大大提高了多步推理的准确性,并在三个数学基准(GSM 8 K,MultiArith和MathQA)和两个BigBenchHard任务(Date Understanding和Penguins)上实现了新的最先进(SOTA)性能,平均精度提高了+5.3和+18。与现有的例子选择方案,如手动调整或检索为基础的选择,选择基于推理的复杂性是直观的,易于实现,和注释效率。进一步的结果证明了格式扰动和分布偏移下复杂提示的性能增益的鲁棒性。

英文摘要:

We study the task of prompting large-scale language models to perform multi-step reasoning. Existing work shows that when prompted with a chain of thoughts (CoT), sequences of short sentences describing intermediate reasoning steps towards a final answer, large language models can generate new reasoning chains and predict answers for new inputs. A central question is which reasoning examples make the most effective prompts. In this work, we propose complexity-based prompting, a simple and effective example selection scheme for multi-step reasoning. We show that prompts with higher reasoning complexity, i.e., chains with more reasoning steps, achieve substantially better performance on multi-step reasoning tasks over strong baselines. We further extend our complexity-based criteria from prompting (selecting inputs) to decoding (selecting outputs), where we sample multiple reasoning chains from the model, then choose the majority of generated answers from complex reasoning chains (over simple chains). When used to prompt GPT-3 and Codex, our approach substantially improves multi-step reasoning accuracy and achieves new state-of-the-art (SOTA) performance on three math benchmarks (GSM8K, MultiArith, and MathQA) and two BigBenchHard tasks (Date Understanding and Penguins), with an average +5.3 and up to +18 accuracy improvements. Compared with existing example selection schemes like manual tuning or retrieval-based selection, selection based on reasoning complexity is intuitive, easy to implement, and annotation-efficient. Further results demonstrate the robustness of performance gains from complex prompts under format perturbation and distribution shift.

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

↑