arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2312.02614cs.LGcs.CL
收藏

通过对抗式上下文学习实现提示优化

Prompt Optimization via Adversarial In-Context Learning

National University of Singapore(新加坡国立大学);Hong Kong University of Science and Technology(香港科技大学);Institute for Infocomm Research (IR), A*STAR(新加坡资讯通信研究院(A*STAR))

Xuan Long Do, Yiran Zhao, Hannah Brown, Yuxi Xie, James Xu Zhao, Nancy F. Chen, Kenji Kawaguchi, Michael Shieh, Junxian He

AI总结:

本研究提出对抗式上下文学习(adv-ICL)方法,通过生成器、判别器、提示修改器三类LLM的博弈优化提示,在11项任务上优于现有最先进提示优化技术,且计算高效、易扩展、适配低资源场景。

摘要:

我们提出了一种新方法——对抗式上下文学习(Adversarial In-Context Learning,adv-ICL),用于优化上下文学习(in-context learning,ICL)的提示,该方法采用一个大语言模型(LLM)作为生成器,另一个作为判别器,第三个作为提示修改器。与传统对抗学习类似,adv-ICL被实现为生成器与判别器之间的双人博弈:生成器试图生成足够逼真的输出以骗过判别器。在每一轮中,给定带有任务指令和若干示例前缀的输入,生成器产生输出;随后判别器负责将生成器的输入-输出对分类为模型生成或真实数据。基于判别器的损失,提示修改器会针对生成器和判别器的提示提出可能的编辑方案,并选出能最大程度改善对抗损失的编辑。我们证明,在11项生成与分类任务(包括摘要生成、算术推理、机器翻译、数据到文本生成,以及MMLU和big-bench hard基准)上,adv-ICL针对开源与闭源模型均取得了优于现有最先进提示优化技术的显著提升。此外,由于该方法使用预训练模型且仅更新提示而非模型参数,它计算效率高,易于扩展到任意LLM和任务,且在低资源场景下同样有效。

英文摘要:

We propose a new method, Adversarial In-Context Learning (adv-ICL), to optimize prompt for in-context learning (ICL) by employing one LLM as a generator, another as a discriminator, and a third as a prompt modifier. As in traditional adversarial learning, adv-ICL is implemented as a two-player game between the generator and discriminator, where the generator tries to generate realistic enough output to fool the discriminator. In each round, given an input prefixed by task instructions and several exemplars, the generator produces an output. The discriminator is then tasked with classifying the generator input-output pair as model-generated or real data. Based on the discriminator loss, the prompt modifier proposes possible edits to the generator and discriminator prompts, and the edits that most improve the adversarial loss are selected. We show that adv-ICL results in significant improvements over state-of-the-art prompt optimization techniques for both open and closed-source models on 11 generation and classification tasks including summarization, arithmetic reasoning, machine translation, data-to-text generation, and the MMLU and big-bench hard benchmarks. In addition, because our method uses pre-trained models and updates only prompts rather than model parameters, it is computationally efficient, easy to extend to any LLM and task, and effective in low-resource settings.

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

↑