arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2510.22752cs.CLcs.AI
收藏

超越语义:时间偏差如何塑造Transformer和状态空间模型中的检索

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

Anooshka Bajaj, Deven Mahesh Mistry, Sahaj Singh Maini, Yash Aggarwal, Zoran Tiganj

AI总结:

本研究探究了Transformer和状态空间模型在上下文学习中受时间偏差影响的检索行为,通过消除语义混淆的序列实验发现模型偏向于检索输入开头或结尾附近的重复标记后的信息,且该现象与归纳头相关,揭示了时间分离对情景记忆检索的作用。

摘要:

上下文学习受时间关系和语义关系的共同支配,这塑造了大语言模型(LLMs)检索上下文信息的方式。类似于人类的情景记忆——通过分离发生在不同时间的事件来实现对特定事件的检索——本研究探究了多种预训练LLM(包括Transformer和状态空间模型)区分并检索时间上分离事件的能力。具体而言,我们向模型输入包含同一标记多次出现的序列,该标记在序列末尾再次出现。通过固定这些重复标记的位置并置换所有其他标记,我们消除了语义混淆因素,并隔离了时间对下一标记预测的影响。在多种序列中,模型始终将最高概率赋予重复标记之后的标记,但明显偏向于输入开头或结尾附近的标记。一项消融实验将该现象在Transformer中与归纳头联系起来。将分析扩展到具有部分重叠的独特语义上下文进一步表明,嵌入在提示中间的记忆被检索的可靠性较低。尽管存在架构差异,状态空间模型和Transformer模型表现出相似的时间偏差。我们的发现加深了对上下文学习中时间偏差的理解,并展示了这些偏差如何实现时间分离和情景检索。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑