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

多示例上下文学习

Many-Shot In-Context Learning

Rishabh Agarwal, Avi Singh, Lei M. Zhang, Bernd Bohnet, Luis Rosias, Stephanie Chan, Biao Zhang, Ankesh Anand, Zaheer Abbas, Azade Nova, John D. Co-Reyes, Eric … 展开作者

Rishabh Agarwal, Avi Singh, Lei M. Zhang, Bernd Bohnet, Luis Rosias, Stephanie Chan, Biao Zhang, Ankesh Anand, Zaheer Abbas, Azade Nova, John D. Co-Reyes, Eric Chu, Feryal Behbahani, Aleksandra Faust, Hugo Larochelle

AI总结:

本文研究多示例上下文学习,提出强化式和无监督ICL以缓解人工示例不足,证明其能提升复杂推理性能、覆盖预训练偏差并媲美微调。

摘要:

大型语言模型(LLMs)在少示例上下文学习(ICL)中表现出色——在推理时仅通过上下文中提供的少量示例进行学习,而无需更新权重。新扩展的上下文窗口使我们能够研究包含数百或数千个示例的ICL——即多示例机制。从少示例到多示例,我们观察到在广泛的生成式和判别式任务上性能显著提升。尽管前景广阔,多示例ICL可能受限于可用的人工生成示例的数量。为了缓解这一限制,我们探索了两种新设置:强化式和无监督ICL。强化式ICL使用模型生成的思维链推理过程代替人工示例。无监督ICL则完全从提示中移除推理过程,仅用领域特定的问题提示模型。我们发现,强化式和无监督ICL在多示例机制下都相当有效,尤其是在复杂推理任务上。最后,我们证明,与少示例学习不同,多示例学习能有效覆盖预训练偏差,能够学习具有数值输入的高维函数,并且性能可与微调相媲美。我们还发现,在多示例机制下推理成本呈线性增长,前沿LLMs从多示例ICL中受益的程度各不相同。我们的分析还揭示了将下一词元预测损失作为下游ICL性能指标存在局限性。

英文摘要:

Large language models (LLMs) excel at few-shot in-context learning (ICL) -- learning from a few examples provided in context at inference, without any weight updates. Newly expanded context windows allow us to investigate ICL with hundreds or thousands of examples -- the many-shot regime. Going from few-shot to many-shot, we observe significant performance gains across a wide variety of generative and discriminative tasks. While promising, many-shot ICL can be bottlenecked by the available amount of human-generated examples. To mitigate this limitation, we explore two new settings: Reinforced and Unsupervised ICL. Reinforced ICL uses model-generated chain-of-thought rationales in place of human examples. Unsupervised ICL removes rationales from the prompt altogether, and prompts the model only with domain-specific questions. We find that both Reinforced and Unsupervised ICL can be quite effective in the many-shot regime, particularly on complex reasoning tasks. Finally, we demonstrate that, unlike few-shot learning, many-shot learning is effective at overriding pretraining biases, can learn high-dimensional functions with numerical inputs, and performs comparably to fine-tuning. We also find that inference cost increases linearly in the many-shot regime, and frontier LLMs benefit from many-shot ICL to varying degrees. Our analysis also reveals the limitations of next-token prediction loss as an indicator of downstream ICL performance.

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

↑