Beyond Semantics: How Temporal Biases Shape Retrieval in Transformer and State-Space Models
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 18 of its 27 references that are in the map. First posted on arXiv 26 Oct 2025.
Builds on
18 of 27 references.
References · 18
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2022In-context Learning and Induction Headscited by 930
- 2024Repeat After Me: Transformers are Better than State Space Models at Copyingcited by 208
- 2024When Attention Sink Emerges in Language Models: An Empirical Viewcited by 200
- 2024The Hidden Attention of Mamba Modelscited by 88
- 2025On the Emergence of Position Bias in Transformerscited by 57
- 2024Induction Heads as an Essential Mechanism for Pattern Matching in In-context Learningcited by 46
- 2024Falcon Mamba: The First Competitive Attention-free 7B Language Modelcited by 43
6 more
- 2024Linking In-context Learning in Transformers to Human Episodic Memorycited by 15
- 2024Explaining Modern Gated-Linear RNNs via a Unified Implicit Attention Formulationcited by 11
- 2024Assessing Episodic Memory in LLMs with Sequence Order Recall Taskscited by 9
- 2025Emergence of Episodic Memory in Transformers: Characterizing Changes in Temporal Structure of Attention Scores During Trainingcited by 4
- 2025Emergence of the Primacy Effect in Structured State-Space Modelscited by 4
- 2025Emergence of Primacy and Recency Effect in Mamba: A Mechanistic Point of Viewcited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025Mechanistic evaluation of Transformers and state space models
- 2025Understanding the Skill Gap in Recurrent Language Models: The Role of the Gather-and-Aggregate Mechanism
- 2026Understanding Contextual Recall in Transformers: How Finetuning Enables In-Context Reasoning over Pretraining Knowledge
- 2024Human-inspired Episodic Memory for Infinite Context LLMs
- 2026Beyond the Parameters: A Technical Survey of Contextual Enrichment in Large Language Models: From In-Context Prompting to Causal Retrieval-Augmented Generation
- 2024Insights into LLM Long-Context Failures: When Transformers Know but Don't Tell
- 2026Identifying Temporal Features within Transcoders for Time Sensitive Factual Recall
- 2026Evaluating Multi-Dimensional Generalization of Large Language Models in Temporal Extraction Tasks