arXiv:2509.10414cs.CLcs.AI2025-09中稿 · ICLR被引 1

研究发现,上下文学习其实并不真正‘学习’,而只是依赖提示中的模式推理。

Is In-Context Learning Learning?

  • 通过消融实验分析提示中记忆、预训练等影响因素
  • 大量示例下模型表现对提示分布不敏感,说明泛化能力有限
  • 链式思维提示更易受分布影响,暴露其学习机制不可靠

上下文学习(ICL)使自回归模型仅通过下一个词预测即可完成任务,无需额外训练。这引发了关于模型能否仅凭少量示例在提示中解决未见任务的讨论。然而,推理不等于学习,因为ICL并未显式编码观察结果,而是依赖先验知识和提示中的示例。我们从数学上认为ICL符合学习定义,但其完整特性需实证验证。通过大规模实验,我们消融了记忆、预训练、分布偏移和提示风格的影响。结果表明,经验上ICL的学习与泛化能力受限:当示例增多时,准确率对示例分布、模型、提示风格及语言特征均不敏感;模型实际是基于提示中的规律进行推断,导致对分布敏感,尤其在链式思维提示中更为明显。鉴于相似任务间表现差异大,我们得出结论:自回归的临时编码机制并非可靠学习方式,缺乏通用泛化能力。

原文摘要 · Abstract (English)

In-context learning (ICL) allows some autoregressive models to solve tasks via next-token prediction and without needing further training. This has led to claims about these model's ability to solve (learn) unseen tasks with only a few shots (exemplars) in the prompt. However, deduction does not always imply learning, as ICL does not explicitly encode a given observation. Instead, the models rely on their prior knowledge and the exemplars given, if any. We argue that, mathematically, ICL fits the definition of learning; however, its full characterisation requires empirical work. We then carry out a large-scale analysis of ICL ablating out or accounting for memorisation, pretraining, distributional shifts, and prompting style and phrasing. We find that, empirically, ICL is limited in its ability to learn and generalise to unseen tasks. Namely, in the limit where exemplars become more numerous, accuracy is insensitive to exemplar distribution, model, prompt style, and the input's linguistic features. Instead, it deduces patterns from regularities in the prompt, which leads to distributional sensitivity, especially in prompting styles such as chain-of-thought. Given the varied accuracies and on formally similar tasks, we conclude that autoregression's ad-hoc encoding is not a robust mechanism for learning, and suggests limited all-purpose generalisability.

上下文学习模型泛化提示工程

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。