Skip to main content
QUICK REVIEW

[论文解读] GrIPS: Gradient-free, Edit-based Instruction Search for Prompting Large Language Models

Archiki Prasad, Peter Hase|arXiv (Cornell University)|Mar 14, 2022
Topic Modeling被引用 5
一句话总结

GrIPS 是一种无梯度、基于编辑的搜索方法,可自动改进大型语言模型中的指令提示,而无需模型梯度。它通过人类可读的编辑迭代修改提示,在分类任务中实现最高 9.36% 的准确率提升,优于人工重写和基于示例的提示方法,即使在数据极少且仅能通过 API 访问模型的情况下也表现优异。

ABSTRACT

Providing natural language instructions in prompts is a useful new paradigm for improving task performance of large language models in a zero-shot setting. Recent work has aimed to improve such prompts via manual rewriting or gradient-based tuning. However, manual rewriting is time-consuming and requires subjective interpretation, while gradient-based tuning can be extremely computationally demanding for large models and may not be feasible for API-based models. In this work, we introduce Gradient-free Instructional Prompt Search (GrIPS), a gradient-free, edit-based search approach for improving task instructions for large language models. GrIPS takes in instructions designed for humans and automatically returns an improved, edited prompt, while allowing for API-based tuning. With InstructGPT models, GrIPS improves the average task performance by up to 4.30 percentage points on eight classification tasks from the Natural Instructions dataset (with similar improvements for OPT, BLOOM, and FLAN-T5). We see improvements for both instruction-only prompts and instruction + k-shot examples prompts. Notably, GrIPS outperforms manual rewriting and purely example-based prompts while controlling for the available compute and data budget. Further, performance of GrIPS is comparable to select gradient-based tuning approaches. Qualitatively, we show our edits can simplify instructions and at times make them incoherent but nonetheless improve accuracy. Our code is available at: https://github.com/archiki/GrIPS

研究动机与目标

  • 解决基于梯度的提示调优的局限性,后者计算成本高,且在基于 API 的模型上不可行。
  • 克服人工指令重写在零样本提示中成本高且主观性强的问题。
  • 开发一种通过自动化、人类可读编辑改进指令质量的方法,无需访问模型梯度或权重。
  • 为包括 GPT-3、OPT、BLOOM 和 FLAN-T5 在内的多种大模型,实现对仅指令和指令加少样本示例提示的有效提示优化。
  • 评估语义上不连贯或简化的指令是否仍能提升模型性能,挑战‘连贯性是有效提示的必要条件’这一假设。

提出的方法

  • GrIPS 使用搜索算法对自然语言指令进行迭代、局部的编辑,探索句法短语级别的修改。
  • 它基于模型输出设计评分函数,评估候选指令,仅使用模型的预测准确率作为反馈。
  • 该方法无需梯度,完全依赖模型输出引导搜索,因此与基于 API 的模型兼容。
  • 编辑被限制在短语级别操作(例如,重新排序、替换、删除短语),以保持人类可读性和语言连贯性。
  • 搜索过程使用束搜索或类似策略探索有希望的编辑,当无法进一步改进或耐心耗尽时终止。
  • 支持仅指令和指令加 k 个少样本示例的提示,实现灵活的提示工程。

实验结果

研究问题

  • RQ1无梯度、基于编辑的搜索方法是否能在不访问模型梯度的情况下提升大语言模型的指令质量?
  • RQ2通过非梯度、人类可读编辑实现的自动化提示改进,是否优于人工指令重写和基于示例的提示调优?
  • RQ3即使对人类而言令人困惑,语义上不连贯或简化的指令是否仍能提升模型性能?
  • RQ4当使用任务无关与任务特定的指令初始化时,GrIPS 的有效性如何?
  • RQ5在仅使用少量数据(例如 20 个样本)和有限计算预算的情况下,GrIPS 是否仍能实现有竞争力的性能?

主要发现

  • 在使用 InstructGPT 的八个来自 Natural-Instructions 数据集的分类任务中,GrIPS 将平均任务准确率最高提升 9.36 个百分点。
  • 对于 InstructGPT curie 模型,GrIPS 在相同计算和数据预算下,平均比人工重写高出 1.5 个百分点。
  • 在使用相同数据和计算资源的情况下,GrIPS 的性能比在上下文示例中搜索高出约 1.6 分。
  • 68.5% 的搜索指令比原始指令更短,87.5% 的指令包含与任务相关的标签信息,表明实现了有效的压缩和聚焦。
  • 当梯度可用时,GrIPS 的性能可与部分基于梯度的调优方法相媲美,证明了其鲁棒性和高效性。
  • 在 68.5% 的任务中,GrIPS 返回的指令比原始指令更短,表明在不损失性能的前提下实现了有效简化。

更好的研究,从现在开始

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

无需绑定信用卡

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