少样本示例如何激发LLM的上下文世界表征
Few-Shot Demonstrations Elicit the Use of In-Context World Representations in LLMs
将图追踪任务扩展到少样本设置——每个示例来自不同世界、图拓扑可同可异——可提升7个模型家族共9个模型的预测表现。线性探针发现隐藏状态中存在编码图信息的低维世界表征,少样本示例使该表征发生近正交方向偏移并提高其预测使用率,对这些表征的干预比干预其他子空间更显著地损害性能。来自不同世界的少样本示例同样提升了ARC-AGI-1&2、web agent任务和Othello上的表现。
arXiv:2609.24352v2 Announce Type: replace Abstract: Large language models (LLMs), when acting as agents, are expected to take observed data in context, infer the latent state space underlying the world, and leverage it for downstream prediction. However, prior work demonstrated that LLMs struggle to use representations learned in context on a graph tracking task, where the model needs to construct a representation of the graph governing data generation process and use it for subsequent predictions. In this paper, we show that extending this to few-shot settings, where each demonstration is generated from a different world with either the same or different graph topologies, enhances its prediction on 9 models from 7 model families. To understand this improvement, we linearly probe a low-dimensional world representation that encodes graph information in the hidden states. Notably, we find that few-shot demonstrations relocate the world representation and increase its predictive use. Specifically, for each model, these world representations shift in directions nearly orthogonal to their original subspace, and interventions on these representations selectively impair performance more than interventions on other subspaces. Consistent with this insight, we show that few-shot demonstrations with observations from different worlds improve performance on ARC-AGI-1&2, web agent tasks, and Othello. Our findings elucidate the role and internal mechanisms of few-shot demonstrations in in-context world modeling and provide implications for their further improvement.
来源:arXiv (AI + Vision + Imaging) · arxiv.org