Skip to main content
QUICK REVIEW

[论文解读] Large Language Model Programs

Imanol Schlag, Sainbayar Sukhbaatar|arXiv (Cornell University)|May 9, 2023
Natural Language Processing Techniques被引用 5
一句话总结

本文提出了大型语言模型程序(LLM Programs),一种将预训练大型语言模型嵌入显式算法以增强其推理与算法能力的方法。通过将任务分解为孤立的子问题,并仅在每一步调用LLM处理相关上下文,该方法在无需任何微调的情况下,相较于思维链提示(chain-of-thought prompting),在证据支持的问答任务上实现了6.4%的性能提升。

ABSTRACT

In recent years, large pre-trained language models (LLMs) have demonstrated the ability to follow instructions and perform novel tasks from a few examples. The possibility to parameterise an LLM through such in-context examples widens their capability at a much lower cost than finetuning. We extend this line of reasoning and present a method which further expands the capabilities of an LLM by embedding it within an algorithm or program. To demonstrate the benefits of this approach, we present an illustrative example of evidence-supported question-answering. We obtain a 6.4\% improvement over the chain of thought baseline through a more algorithmic approach without any finetuning. Furthermore, we highlight recent work from this perspective and discuss the advantages and disadvantages in comparison to the standard approaches.

研究动机与目标

  • 解决LLM在执行排序或搜索等算法任务时的局限性,即使经过微调后仍存在此类问题。
  • 克服仅解码器架构的Transformer模型的架构限制,包括有限的上下文长度和分布外泛化能力差的问题。
  • 通过将LLM嵌入显式程序中,提供一种可扩展、可解释且模块化的微调替代方案。
  • 证明结构化的程序控制能够提升复杂推理任务的性能,而无需对模型进行再训练。
  • 突出模块化分解在提升LLM系统可靠性、可解释性和泛化能力方面的优势。

提出的方法

  • 将复杂任务分解为更小、孤立的子问题,每个子问题通过一次LLM调用并仅使用最小且相关的上下文来解决。
  • 使用程序化控制流来管理状态并协调LLM调用,确保每一步仅接收必要输入。
  • 在推理过程中对段落选择进行树搜索,以动态选择每一步推理最相关的证据。
  • 保持高层级的算法结构,引导LLM完成一系列明确定义的操作,而非依赖单一的、整体性的提示。
  • 将LLM作为更大程序中的子程序集成,从而实现组件的模块化、可测试性和可组合性。
  • 在结构化框架内利用LLM的生成能力,以确保各步骤之间的一致性与正确性。
Figure 1: An illustration of our two-part LLM program example. The first part (left) of our program filters out irrelevant paragraphs from a large set. This is achieved using an LLM and the current question. The second part (right) depicts the generation of the individual reasoning steps until they
Figure 1: An illustration of our two-part LLM program example. The first part (left) of our program filters out irrelevant paragraphs from a large set. This is achieved using an LLM and the current question. The second part (right) depicts the generation of the individual reasoning steps until they

实验结果

研究问题

  • RQ1与标准的上下文学习相比,将LLM嵌入显式程序是否能提升其在算法和推理任务上的表现?
  • RQ2采用隔离子问题求解的程序化方法是否相比单提示思维链方法具有更好的泛化能力并减少干扰?
  • RQ3LLM程序在无需任何微调的情况下,能在多大程度上实现性能提升,特别是在证据支持的问答任务中?
  • RQ4LLM程序的模块化、算法化结构相比端到端神经网络模型,在可解释性和可靠性方面有何增强?
  • RQ5在何种场景下,使用LLM进行编程相比在专家演示数据上进行微调更具优势?

主要发现

  • LLM程序方法在无需任何微调的情况下,相较于思维链基线,在证据支持的问答准确率上实现了6.4%的绝对提升。
  • 通过隔离子问题并在每次LLM调用中提供聚焦的上下文,该方法减少了推理步骤之间的干扰,从而提升了整体推理质量。
  • 程序化方法可提供简单的泛化保证——例如,过滤和搜索组件可自然扩展至更大的文档集合。
  • 将LLM嵌入算法可缓解架构限制(如有限的上下文长度),通过动态加载和摘要相关资讯实现。
  • 该方法通过在LLM调用之间引入外部控制机制(如过滤或验证),支持更安全、更可靠的行为。
  • 该方法与现有LLM能力兼容,可应用于多种任务(包括推理、摘要和文本生成),且无需重新训练。
Figure 2: Average likelihood of each question (row) given a paragraph (column) normalised over paragraphs.
Figure 2: Average likelihood of each question (row) given a paragraph (column) normalised over paragraphs.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。