arXiv:2501.00070cs.CLcs.AI2025-01ICLR被引 50

大模型能根据上下文改变预训练语义,灵活重构概念关系。

ICLR: In-Context Learning of Representations

  • 用图追踪任务测试上下文如何重塑模型语义结构
  • 上下文增多时,模型突然从预训练语义切换到新图结构
  • 当概念语义相关时,新结构难以完全覆盖旧结构

近期研究发现,大型语言模型(LLM)中不同概念的表征组织受预训练数据语义影响。然而,由于LLM具有开放性(如上下文学习能力),我们可探讨模型是否能基于上下文重新组织这些预训练语义。具体而言,若提供上下文示例,使某个概念扮演与预训练数据不同的角色,模型是否会调整其表征以适应新的语义?为此,我们借鉴概念角色语义理论,设计一个简化版“图追踪”任务:图中节点由训练中见过的概念(如apple、bird)表示,图的连接关系由预定义结构(如方形网格)决定。给定随机游走路径的示例后,分析模型中间表征发现,随着上下文规模增大,模型表征突然从预训练语义转向与图结构对齐的上下文语义。此外,当参考概念在语义上存在关联(如Monday、Tuesday)时,上下文指定的图结构仍存在于表征中,但无法完全主导预训练结构。为解释此现象,我们将任务类比为针对预定义图拓扑的能量最小化过程,提供了模型隐式优化以推断上下文语义的证据。总体而言,我们的结果表明,扩大上下文规模可灵活重构模型表征,可能解锁新能力。

原文摘要 · Abstract (English)

Recent work has demonstrated that semantics specified by pretraining data influence how representations of different concepts are organized in a large language model (LLM). However, given the open-ended nature of LLMs, e.g., their ability to in-context learn, we can ask whether models alter these pretraining semantics to adopt alternative, context-specified ones. Specifically, if we provide in-context exemplars wherein a concept plays a different role than what the pretraining data suggests, do models reorganize their representations in accordance with these novel semantics? To answer this question, we take inspiration from the theory of conceptual role semantics and define a toy "graph tracing" task wherein the nodes of the graph are referenced via concepts seen during training (e.g., apple, bird, etc.) and the connectivity of the graph is defined via some predefined structure (e.g., a square grid). Given exemplars that indicate traces of random walks on the graph, we analyze intermediate representations of the model and find that as the amount of context is scaled, there is a sudden re-organization from pretrained semantic representations to in-context representations aligned with the graph structure. Further, we find that when reference concepts have correlations in their semantics (e.g., Monday, Tuesday, etc.), the context-specified graph structure is still present in the representations, but is unable to dominate the pretrained structure. To explain these results, we analogize our task to energy minimization for a predefined graph topology, providing evidence towards an implicit optimization process to infer context-specified semantics. Overall, our findings indicate scaling context-size can flexibly re-organize model representations, possibly unlocking novel capabilities.

上下文学习表征重构语言模型

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