arXiv:2510.22752cs.CLcs.AI2025-10Conference of the …

研究大模型如何受时间顺序影响信息检索,发现模型更倾向记忆开头或结尾内容。

Beyond Semantics: How Temporal Biases Shape Retrieval in Transformer and State-Space Models

  • 通过重复词定位测试,分离时间与语义因素影响
  • 模型对靠近开头或结尾的重复词预测概率最高
  • 适合关注大模型记忆机制与提示工程的研究者

上下文学习受时间和语义关系共同影响,决定大语言模型(LLMs)如何检索上下文信息。类似于人类的场景记忆,特定事件的检索依赖于不同时间发生的事件之间的分离。本文探究了多种预训练LLM(包括Transformer和状态空间模型)区分并检索时间上分隔事件的能力。具体地,我们使用包含多次出现相同词的序列,该词在序列末尾重现。通过固定重复词的位置并随机排列其余词,消除了语义干扰,仅保留时间效应。在多种序列中,模型对重复词后出现的词赋予最高概率,但对靠近输入开头或结尾的重复词表现出显著偏好。消融实验表明,这种现象在Transformer中与归纳头有关。进一步在部分重叠语义上下文中分析,显示嵌入提示中间的记忆更难可靠检索。尽管架构不同,状态空间模型与Transformer展现出相似的时间偏倚。研究加深了对上下文学习中时间偏倚的理解,并说明此类偏倚如何实现时间分离与情景检索。

原文摘要 · Abstract (English)

In-context learning is governed by both temporal and semantic relationships, shaping how Large Language Models (LLMs) retrieve contextual information. Analogous to human episodic memory, where the retrieval of specific events is enabled by separating events that happened at different times, this work probes the ability of various pretrained LLMs, including transformer and state-space models, to differentiate and retrieve temporally separated events. Specifically, we prompted models with sequences containing multiple presentations of the same token, which reappears at the sequence end. By fixing the positions of these repeated tokens and permuting all others, we removed semantic confounds and isolated temporal effects on next-token prediction. Across diverse sequences, models consistently placed the highest probabilities on tokens following a repeated token, but with a notable bias for those nearest the beginning or end of the input. An ablation experiment linked this phenomenon in transformers to induction heads. Extending the analysis to unique semantic contexts with partial overlap further demonstrated that memories embedded in the middle of a prompt are retrieved less reliably. Despite architectural differences, state-space and transformer models showed comparable temporal biases. Our findings deepen the understanding of temporal biases in in-context learning and offer an illustration of how these biases can enable temporal separation and episodic retrieval.

大模型记忆机制时序偏倚上下文学习

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