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)凭借其上下文学习(ICL)能力,仅通过少量演示即可解决多种任务。然而,LLMs在ICL预测中往往更依赖预训练阶段获得的演示语义先验知识,而非输入-标签之间的对应关系。我们将这种现象定义为"演示捷径"。既有研究主要聚焦于提升预定义任务的ICL预测效果,而本研究旨在纠正演示捷径,使LLM能够从演示中有效学习新的输入-标签关系。为此,我们提出了一种演示感知的校准方法——上下文校准。我们在两种设置下评估该方法的有效性:(1)采用标准标签空间的原始ICL任务;(2)任务学习设置,其中标签空间被替换为语义无关的标记。实验表明,上下文校准方法在两种设置下均展现出显著提升,且在三种LLM系列(OPT、GPT、Llama2)的不同配置中具有泛化性。