Context Is King: How In-Context Specification Shapes the Geometry of Concepts
作者: Elad David, Max Fomin
分类: cs.LG
发布日期: 2026-07-27
💡 一句话要点
提出上下文规范以重塑概念几何结构
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 几何结构 上下文规范 激活映射 知识图谱 自然语言处理 因果关系
📋 核心要点
- 现有大型语言模型在概念几何结构的构建上存在局限,尤其是在上下文影响下的表现不够理想。
- 本文提出通过上下文规范来重塑模型的几何结构,使其能够灵活地在不同的拓扑类型之间切换。
- 实验结果表明,模型在上下文设定下的几何结构与预训练先验相比,表现出更高的代表性相似度,且在大模型中效果更为显著。
📝 摘要(中文)
大型语言模型将结构化概念放置在几何上忠实的流形上,例如工作日位于一个圆上,月份位于另一个圆上。本文展示了上下文的重要性:模型实际使用的结构由上下文规范设定。声明性规则不仅固定几何编码的关系,还决定其拓扑类型;相同的标记可以根据指令形成循环或分支树。实验表明,在强预训练先验与上下文几何冲突时,后者在能力模型中占主导地位,且激活补丁显示该映射是因果使用的,而非探测相关。大模型(如Gemma-31B和Qwen-27B)中清晰的主导性和因果交叉现象显著,而在小模型中则减弱或消失。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在概念几何结构构建中的局限性,尤其是在上下文影响下的表现不佳。现有方法往往依赖于固定的世界模型,缺乏灵活性。
核心思路:论文的核心思路是通过上下文规范来重塑模型的几何结构,允许模型根据指令在不同的拓扑类型(如循环或分支树)之间切换。这种设计使得模型能够在没有先验知识的情况下,灵活地构建几何结构。
技术框架:整体架构包括上下文输入模块、几何结构生成模块和激活映射模块。上下文输入模块负责接收并解析输入的上下文规范,几何结构生成模块根据规范生成相应的几何结构,激活映射模块则用于验证生成的几何结构与模型激活之间的因果关系。
关键创新:最重要的技术创新在于提出了上下文规范的概念,使得模型能够在不同的几何结构之间灵活切换,这与传统方法依赖固定先验的方式有本质区别。
关键设计:在参数设置上,模型的激活函数和损失函数经过精心设计,以确保在不同的几何结构下都能有效学习。此外,模型的网络结构允许动态调整,以适应不同的拓扑类型。
🖼️ 关键图片
📊 实验亮点
实验结果显示,在上下文设定下,模型的代表性相似度达到了0.6至0.9,而对预训练先验的相似度接近于零。激活补丁实验表明,模型能够因果地使用生成的几何结构,且在大模型中表现出明显的主导性和因果交叉现象。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、知识图谱构建和智能问答系统。通过灵活的几何结构构建,模型能够更好地理解和生成复杂的语言结构,提升人机交互的自然性和准确性。未来,该方法可能对多模态学习和跨领域知识迁移产生深远影响。
📄 摘要(原文)
Large language models place structured concepts on geometrically faithful manifolds: weekdays lie on a circle, months on another, usually taken to be a fixed world-model the network stores and looks up. We show that context is king: the structure a model actually uses is set by the in-context specification. A declarative rule fixes not only which relations the geometry encodes but its topology type: the same tokens form a cycle or a branching tree on command, built even on arbitrary, meaning-free tokens with no prior to inherit, which a relabeled stored shape cannot do. When the specification conflicts with a strong pretrained prior, the context-set geometry dominates it in capable models, read from the same activations (representational similarity 0.6--0.9 to the imposed structure versus near-zero to the prior), across the priors we test and both families we study (Gemma, Qwen). Activation patching shows the map is causally used, not a probe correlate: swapping one entity's activation for another's makes the model answer with the other entity's successor under the imposed order. A rough map forms readily, present even in small and base models; what scale gates is using it cleanly: clean dominance and the causal crossover emerge only in the larger models (up to Gemma-31B and Qwen-27B) and weaken or reverse below, so a mechanism present in a large model can be absent in a smaller one of the same family. Whether the model builds this geometry anew or reconfigures a stored one we leave open; operationally, the geometry it uses is the one the context specifies.