Large language models (LLMs) are able to solve various tasks with only a few demonstrations utilizing their in-context learning (ICL) abilities. However, LLMs often rely on their pre-trained semantic priors of demonstrations rather than on the input-label relationships to proceed with ICL prediction. In this work, we term this phenomenon as the 'Demonstration Shortcut'. While previous works have primarily focused on improving ICL prediction results for predefined tasks, we aim to rectify the Demonstration Shortcut, thereby enabling the LLM to effectively learn new input-label relationships from demonstrations. To achieve this, we introduce In-Context Calibration, a demonstration-aware calibration method. We evaluate the effectiveness of the proposed method in two settings: (1) the Original ICL Task using the standard label space and (2) the Task Learning setting, where the label space is replaced with semantically unrelated tokens. In both settings, In-Context Calibration demonstrates substantial improvements, with results generalized across three LLM families (OPT, GPT, and Llama2) under various configurations.
翻译:大语言模型(LLMs)能够利用其上下文学习能力,仅通过少量示例即可解决多种任务。然而,LLMs在进行上下文学习预测时,往往依赖其预训练阶段获得的演示语义先验,而非输入-标签之间的真实关联。本文将这一现象定义为"演示捷径"。以往研究主要聚焦于提升预定义任务的上下文学习预测效果,而本文旨在修正演示捷径,使LLM能够有效从演示中学习新的输入-标签关联。为此,我们提出了一种演示感知校准方法——上下文校准。我们在两种设置下评估了所提方法的有效性:(1)使用标准标签空间的原始上下文学习任务,(2)用语义无关标记替换标签空间的任务学习设置。在两种设置中,上下文校准均展现出显著效果,且结果在三种LLM系列(OPT、GPT、Llama2)的不同配置下均具有泛化性。