跳到正文
arXiv cs.CL· Minglai Yang, Xinyu Guo, Renxiong Wang, Sunjie Hou, Daniel Yue Zhang, Yunzhong He·· 3 天前AI 评分31

从复制到组合:语言模型如何习得上下文学习能力

From Copying to Composition: How Language Models Develop In-Context Learning

AI 导读

研究用受控诊断任务区分"复制邻近示例"与"跨提示整合信息",在17个模型中约三分之一偏好复制答案,其余偏好规则一致答案且准确率更高。检查点分析显示,模型在准确率超过随机水平之前就已优先关注任务相关提示词。匹配训练实验中,先定义结尾再查询的合成文档使模型转向组合式回答,而基于改写真实文档的定义练习微调可在提示重新分配标签含义时提升准确率。

正文 · 原文

View PDF HTML (experimental)

Abstract:In-context learning (ICL) allows language models to adapt their behavior from instructions and demonstrations in a prompt, but accuracy alone does not reveal how contextual information controls their predictions. We study the acquisition and trainability of ICL with a controlled diagnostic that separates copying a nearby demonstration from integrating information across the prompt. Across 17 models, about a third prefer the copied answer, a few are undecided, and the rest prefer the rule-consistent answer, which goes with higher accuracy and with control by the requested value rather than the closest conflicting example. Checkpoint analyses show that models begin prioritizing task-relevant prompt tokens over conflicting examples long before their accuracy improves beyond chance level. In matched training experiments, synthetic documents that define endings and then query them shift models toward compositional responses on the controlled diagnostic, whereas fine-tuning on definition exercises built from rewritten real documents improves accuracy when prompts reassign label meanings. The results suggest that ICL is not acquired as a single, uniform capability. Instead, prompt control, answer preference, construction without candidates, and transfer can develop along distinct trajectories.
Comments: 29 pages, 17 figures, 8 tables
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG)
Cite as: arXiv:2610.19113 [cs.CL]
  (or arXiv:2610.19113v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2610.19113

arXiv-issued DOI via DataCite (pending registration)

Submission history

From: Minglai Yang [view email]
[v1] Tue, 13 Oct 2026 19:49:33 UTC (859 KB)

来源:arXiv cs.CL · arxiv.org