Mechanisms
Memory Systems
Immediate
Declarative
Representational Structures
Schemas
Person Models
Memory Processes
Acquisition and Transformation
Retrieval and Surfacing
Degradation
Metacognition
Attribution
Confidence
Control
Nothing matches that.
Memory Processes · Retrieval and Surfacing
Context-Dependent Retrieval
Example
You remember a personal conversation with Joy while on a nature walk. Later she says "remember what I told you on our walk?", and the setting, which you never deliberately stored, brings back the conversation.
On this page
Context-Dependent Retrieval in Humans
Definition
The surroundings and internal state present when something is encoded become part of the memory trace by default, and reinstating them at retrieval aids access to what was stored alongside them (Smith & Vela, 2001). The governing principle is broader than any one kind of surround: a cue works to the extent that it matches what was actually encoded, not to the extent that it is associated with the target in general, which is why a strong preexperimental associate of a studied word can fail to retrieve it while a weak word that happened to be present at study retrieves it easily (Tulving & Thomson, 1973). The effect is conditional rather than uniform: it shrinks when conceptual or associative processing at encoding draws attention away from the surroundings, and grows over longer retention intervals (Smith & Vela, 2001). Across types it is also conditional on the retrieval test: state-dependent effects are found almost exclusively when recall is attempted without explicit reminders, and rarely when a study-list cue or a literal copy of the target is presented at test (Eich, 1980).
Neural Substrate
The neural evidence below characterises environmental, spatial, and situational context. No source in hand addresses the neural substrate of state-dependent or mood-dependent context, so nothing in this section extends to those two types.
Context representation is attributed to a posterior medial system whose core cortical components are the parahippocampal and retrosplenial cortices, connected via the cingulum bundle to the anterior thalamic nuclei, mammillary bodies, pre- and parasubiculum, and the default network, and dissociable from an anterior temporal system centred on perirhinal cortex that handles item and entity representation (Ranganath & Ritchey, 2012). Human evidence carries most of the weight here. Source memory studies find parahippocampal activity increasing selectively at encoding and retrieval of items whose context is successfully remembered, while retrosplenial activity accompanies successful recollection of contextual detail at retrieval and is often negatively associated with successful encoding. Damage to right parahippocampal cortex impairs object-location memory and can leave patients unable to recognise familiar buildings or rooms, and retrosplenial damage produces retrograde amnesia for autobiographical events and topographical amnesia, a condition in which scene recognition is intact but cannot be used to orient (Ranganath & Ritchey, 2012).
Non-human work fills in the division of labour between the two regions. Rats with lesions of the postrhinal cortex, the rodent homologue of parahippocampal cortex, fail to discriminate novel from familiar object-context configurations while exploring novel objects normally, whereas retrosplenial lesions impair recognition of novel locations and object-location associations with object recognition spared; both lesions disrupt contextual fear conditioning. Monkeys with parahippocampal lesions are impaired on delayed non-matching to place. At the cellular level the two regions differ in kind: postrhinal cortex contains place cells with larger fields and greater sensitivity to changes in environmental cues than hippocampal place cells, while retrosplenial cortex has no place cells but does have head direction cells. The authors summarise the division as parahippocampal cortex representing the visuospatial context and retrosplenial cortex integrating the information needed to orient within it (Ranganath & Ritchey, 2012).
The further claim that the hippocampus binds content to context is a hypothesis in this source rather than a finding, and the authors say so directly. They propose that hippocampal processing sharpens representations within each system and integrates across them through the dentate gyrus and CA3, but state that they can only speculate, because few studies have investigated when and how neocortical areas interact with the hippocampal formation, and because the interactions that have been studied appear to occur under restricted conditions owing to strong long-range inhibition of perirhinal, parahippocampal, and retrosplenial inputs to the hippocampus (Ranganath & Ritchey, 2012).
AI at a Glance
In humans the surroundings and internal state present at encoding are stored alongside the target by default and can later cue it back, an effect that is modest on average, larger across long retention intervals, suppressed when encoding invites associative processing, and, for the state-dependent type at least, detectable almost only when retrieval proceeds without explicit reminders (Smith & Vela, 2001; Eich, 1980; Tulving & Thomson, 1973). In the AI systems assessed, context functions as a retrieval cue only when it is supplied deliberately inside the query, and accuracy on such cues collapses as the cue comes to match more events, with no published work testing whether an incidentally present surround is captured at all (Huet et al., 2025); the closest named mechanisms are the context window, retrieval-augmented generation over an external memory layer, and the key projections of attention layers (Dinh et al., 2026).
- Context window: the span of text a model can hold in a single forward pass, within which everything is simultaneously available and beyond which nothing persists (Huet et al., 2025).
- Key projection: the transformation an attention layer applies to each stored token to produce the index against which an incoming query is matched (Dinh et al., 2026).
Context-Dependent Retrieval in AI
How Far It Has Been Measured
Measurement in AI: Indirectly Measured
AI Memory Performance: Not Yet Compared
Where It Lives in the System
What Has Been Measured
- For what a model learned in training, cue dependence has been studied under another name, the reversal curse: a preprint found GPT-4 answered celebrity-parent questions correctly 79% of the time when cued in the direction the fact is usually written, but 33% when cued in reverse, whereas the same facts presented in the conversation could be reversed (Berglund et al., 2023).
- Within the context window (what a model can see in the current conversation), retrieval suffers when the question shares few words with the stored fact: at 32,000 tokens, 11 of 13 long-context models fell below half their short-text score, and even the strongest, GPT-4o, dropped from 99.3% to 69.7%; this mirrors cue-trace overlap but has no human baseline (Modarressi et al., 2025).
- A 2024 preprint gave one model (Mistral-7B) Tulving and Watkins's cue-valence experiment, built on encoding specificity, with the word list still visible in the chat: associative cues recalled targets about as often as in the original human data (0.49 and 0.38 vs 0.52 and 0.43), while rhyme cues did far worse (0.11 and 0.14 vs 0.45 and 0.43) (Chauvet, 2024b).
- Not yet compared: an AI has no physical surroundings, but the context of a conversation can be matched or changed between learning and test, and Tulving's paradigms have been run on a model; these same-paradigm results still cannot be scored under the rules: the preprints (this one also ran Tulving's recognition-versus-recall test, with copy-cue recall 0.46 vs 0.69) give only human proportions from the 1970s-80s, with no sample size or statistical test, test one small model, and the rhyme gap partly reflects the model's weak rhyme knowledge rather than context matching (Chauvet, 2024a).
- Induction heads (attention components that find an earlier occurrence of the current word and retrieve what followed it) behave like the temporal-context model of human free recall across five model families from GPT-2 to Llama-3-8B, with fitted context-drift parameters in the range of human data (N = 171); this compares the shape of a recall bias on still-visible text, not retrieval success (Li et al., 2024).
- A 2026 preprint gave Llama 3.1 8B and 70B a whole novel in context and 97 readers the same 296 which-came-first judgments from memory; both showed the human distance effect, 8B did not differ from people and 70B beat them at one distance range, and one 'time-reinstatement' attention head drove performance (ablation cost 10-15%), but it tests memory for the order of events rather than retrieval helped by a matching context, so it is not used for this rating (Pink et al., 2026).
- For saved memory, a 2026 preprint that stored each fact in an AI agent's long-term memory together with a narrative of the situation in which it was learned raised cross-session recall on the LongMemEval benchmark from 53.5% to 73.7%, an engineering use of encoding specificity with no human comparison (Stern & Nadel, 2026).
Where a Mechanism Can Live
04 Product
The whole configuration, and the only thing a benchmark observes directly.
01
Weights
Across deployments
02
Context Window
Within a session
03
Memory Layer
Across sessions
Which of the three a result belongs to is inferred from it, not seen in it.
Read more
Anterior temporal lobe
Lobe in the temporal lobe
The forward portion of the temporal lobe, converging on the temporal pole and heavily connected to orbitofrontal and limbic cortex.
The anterior temporal lobe covers the front of the superior, middle and inferior temporal gyri together with the temporal pole and the anterior fusiform gyrus. It sits at the end of the ventral visual and auditory streams and connects strongly to orbitofrontal cortex, amygdala and entorhinal cortex through the uncinate fasciculus. Its degeneration in semantic dementia produces progressive loss of word and object meaning across modalities, which motivated the "semantic hub" account. Whether the region is genuinely modality-general or an assembly of separable category-specific areas remains contested, partly because MRI signal here is badly distorted.
Anterior thalamic nuclei
Nucleus in the thalamus
A group of nuclei at the front of the thalamus forming the thalamic link in the Papez circuit.
The anterior nuclei sit in the rostral third of the thalamus, separated from the rest of the dorsal thalamus by the internal medullary lamina. They take their main input from the mammillary bodies via the mammillothalamic tract and from the hippocampal formation via the fornix, and project to cingulate and retrosplenial cortex, the segment of the Papez circuit that carries hippocampal output back to cortex. Head-direction cells are recorded here in rodents, and anterior thalamic damage in humans is associated with dense anterograde amnesia, which is the main evidence that this route matters for memory rather than merely existing.
CA3
Cortex in the hippocampus proper
The heavily recurrent subfield receiving dentate mossy fibers, the usual anatomical basis for models of pattern completion.
Large pyramidal neurons taking three inputs: mossy fibers from the dentate gyrus, direct fibers from entorhinal cortex, and (unusually) a dense projection from each other. That recurrent collateral system makes CA3 the closest thing in mammalian cortex to a textbook attractor network, and it is why computational accounts assign it pattern completion: retrieving a whole stored pattern from a partial cue. The architecture is well established; the functional assignment is supported by the wiring together with direct evidence from CA3-restricted genetic manipulation and simultaneous dentate and CA3 recordings, though how far it generalises is still argued.
Cerebral cortex
Division in the cerebral hemisphere
The folded sheet of grey matter covering each hemisphere, two to four millimetres thick and layered rather than uniform.
The cortex is a continuous sheet of neurons and local circuitry spread over the hemisphere's surface, thrown into gyri and sulci so that roughly two-thirds of it lies buried in the folds. Most of it (the neocortex) has six layers distinguished by cell type and by which connections arrive and leave; older allocortex has three or four. Areas differ in layer thickness, cell packing and connectivity, which is what cytoarchitectonic maps such as Brodmann's record. Where any given area's boundary actually falls, and how closely those maps correspond to functional divisions, is still argued over; modern multimodal parcellations disagree with Brodmann in places.
Cingulum bundle
Tract
The long association bundle running inside the cingulate gyrus, arcing from frontal cortex around the callosum into the temporal lobe.
A bundle of short and long fibers lying just above the corpus callosum within the cingulate gyrus, curving around the splenium and continuing forward through the parahippocampal gyrus. Fibers enter and leave along its whole length rather than running end to end, so it is better described as a corridor than a point-to-point cable. It links cingulate, medial prefrontal, retrosplenial and medial temporal cortex, and diffusion measures of it are reported as altered in depression, schizophrenia and early Alzheimer's disease, with inconsistent directions across samples.
Dentate gyrus
Cortex in the hippocampal formation
The input stage of the hippocampus, where entorhinal signals are recoded into sparse, strongly separated patterns of granule cell activity.
A V-shaped band of densely packed granule cells capping CA3, receiving the perforant path from entorhinal cortex and sending unusually large mossy fiber synapses onward. Granule cells fire rarely and in small numbers, which is the anatomical basis for treating the dentate as a pattern separator: making similar inputs into dissimilar codes so they do not overwrite one another. It is also one of two sites where adult neurogenesis is claimed in humans: a live dispute, with methodologically careful studies published on both sides within the same year.
Hippocampal formation
Cortex in the medial temporal lobe
The hippocampus proper, dentate gyrus and subicular cortices taken as one connected circuit, usually with entorhinal cortex included.
A three-layered (allocortical) sheet rolled into the floor of the lateral ventricle's temporal horn. Most authors count the dentate gyrus, hippocampus proper, subiculum, presubiculum and parasubiculum, and argue about whether entorhinal cortex belongs inside the formation or is its doorway. Signal flow is famously near-unidirectional: entorhinal cortex to dentate gyrus to CA3 to CA1 to subiculum and back out to entorhinal cortex. That tidy "trisynaptic circuit" is a real anatomical backbone but an incomplete one: direct entorhinal projections to CA1 and CA3, and heavy recurrent connections, bypass it.
Hippocampus
Cortex in the hippocampal formation
A curved allocortical structure in the medial temporal lobe whose bilateral damage reliably produces dense anterograde amnesia in humans.
A paired, seahorse-shaped fold of three-layered cortex running front to back inside the temporal lobe, connected to the rest of the brain mainly through entorhinal cortex and the fornix. What it does is genuinely contested and has been for fifty years: the human lesion literature reads it as necessary for forming new declarative memories, the rodent recording literature as a map of space, and a third position treats both as instances of binding arbitrary elements into relations. The accounts differ on which species and which task they explain best, and the question of which is right remains open.
Mammillary bodies
Nucleus in the hypothalamus
Two small round nuclei on the underside of the hypothalamus, receiving the fornix and projecting to anterior thalamus.
The mammillary bodies are visible as a pair of pea-sized bumps behind the pituitary stalk on the base of the brain. They receive the postcommissural fornix from the subiculum and hippocampus, and send the mammillothalamic tract to the anterior thalamic nuclei plus the mammillotegmental tract to the midbrain: the hypothalamic leg of the Papez circuit. They are reliably shrunken in Korsakoff's syndrome, and that finding is the origin of the diencephalic account of amnesia; whether the memory deficit follows from the mammillary damage, the mediodorsal damage, or the disconnection of both remains unresolved.
Neocortex
Division in the cerebral cortex
The six-layered cortex covering almost all of the human hemisphere, as distinct from older three-layered allocortex.
Neocortex is defined by its lamination: six layers, with thalamic input arriving mainly in layer four, projections to other cortical areas leaving from layers two and three, and subcortical output from layers five and six. It makes up roughly ninety percent of the human cortical sheet and is proportionally expanded in primates. The repeating columnar organization seen across areas has sustained a long argument that neocortex runs one canonical circuit on different inputs; the evidence for a single canonical microcircuit is disputed, and areas measurably differ in layer proportions, cell density and long-range connectivity.
Parahippocampal cortex
Cortex in the parahippocampal gyrus
The posterior part of the parahippocampal gyrus, responding strongly to scenes and spatial layouts and feeding medial entorhinal cortex.
Cortex behind the entorhinal region on the medial temporal surface, connected to retrosplenial and posterior parietal areas and projecting into medial entorhinal cortex. Human imaging finds a patch here that responds far more to images of places than of objects or faces: the parahippocampal place area. What that response encodes is unsettled: candidate accounts include scene geometry, spatial context for navigation, and the presence of large landmark-like objects, and each explains some of the contrast that named the region.
Parasubiculum
Cortex in the hippocampal formation
A narrow transitional cortex bordering presubiculum and entorhinal cortex, projecting into the entorhinal superficial layers.
The outermost band of the subicular complex, lying between presubiculum and medial entorhinal cortex. It receives from the anterior thalamus and hippocampus and projects mainly to entorhinal layer II, placing it on the input side of the grid-cell circuit. Recordings find spatially modulated cells here, including grid and border cells, and an unusually high proportion tuned to head direction. It is small enough that most human imaging cannot resolve it separately from the presubiculum, so claims about it in human work are usually about a combined region.
Perirhinal cortex
Cortex in the medial temporal lobe
Cortex along the rhinal sulcus that relays object information to the hippocampus and is itself implicated in item familiarity.
Areas 35 and 36, flanking the rhinal sulcus and receiving heavy input from ventral visual stream regions carrying object identity. It projects onward to lateral entorhinal cortex and so into the hippocampus. The contested question is whether it is only a relay: one account holds that perirhinal cortex supports familiarity judgments independently of hippocampal recollection, which would split recognition memory into two processes with two substrates; another treats the dissociation as an artifact of memory strength. Both camps have patient data.
Retrosplenial cortex
Cortex in the cingulate cortex
A small strip of cortex tucked behind and below the splenium of the corpus callosum, Brodmann areas 29 and 30.
The retrosplenial cortex lies immediately behind the splenium (the thickened rear end of the corpus callosum), buried in the callosal sulcus, and is substantially smaller in humans than its prominence in rodent work suggests. It connects the hippocampal formation and anterior thalamus with parietal and visual cortex, making it a waypoint between memory and spatial systems. Damage produces topographical disorientation in which landmarks are recognized but cannot be used for heading. Rodent and human literatures use the term for somewhat different tissue, since the human region is displaced by the expansion of surrounding cortex.
Berglund et al. (2023)
The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"
In
arXiv
Abstract
We expose a surprising failure of generalization in auto-regressive large language models (LLMs). If a model is trained on a sentence of the form "A is B", it will not automatically generalize to the reverse direction "B is A". This is the Reversal Curse. For instance, if a model is trained on "Valentina Tereshkova was the first woman to travel to space", it will not automatically be able to answer the question, "Who was the first woman to travel to space?". Moreover, the likelihood of the correct answer ("Valentina Tershkova") will not be higher than for a random name. Thus, models do not generalize a prevalent pattern in their training set: if "A is B" occurs, "B is A" is more likely to...
Find it
Chauvet (2024)
Memory Traces: Are Transformers Tulving Machines?
In
arXiv
Abstract
Memory traces--changes in the memory system that result from the perception and encoding of an event--were measured in pioneering studies by Endel Tulving and Michael J. Watkins in 1975. These and further experiments informed the maturation of Tulving's memory model, from the GAPS (General Abstract Processing System} to the SPI (Serial-Parallel Independent) model. Having current top of the line LLMs revisit the original Tulving-Watkins tests may help in assessing whether foundation models completely instantiate or not this class of psychological models.
Find it
Chauvet (2024)
Memory GAPS: Would LLMs pass the Tulving Test?
In
arXiv
Abstract
The Tulving Test was designed to investigate memory performance in recognition and recall tasks. Its results help assess the relevance of the "Synergistic Ecphory Model" of memory and similar RK paradigms in human performance. This paper starts investigating whether the more than forty-year-old framework sheds some light on LLMs' acts of remembering.
Find it
Dinh et al. (2026)
Memory Retrieval in Transformers: Insights from The Encoding Specificity Principle
In
arXiv
Abstract
While explainable artificial intelligence (XAI) for large language models (LLMs) remains an evolving field with many unresolved questions, increasing regulatory pressures have spurred interest in its role in ensuring transparency, accountability, and privacy-preserving machine unlearning. Despite recent advances in XAI have provided some insights, the specific role of attention layers in transformer based LLMs remains underexplored. This study investigates the memory mechanisms instantiated by attention layers, drawing on prior research in psychology and computational psycholinguistics that links Transformer attention to cue based retrieval in human memory. In this view, queries encode...
Find it
Eich (1980)
The cue-dependent nature of state-dependent retrieval
In
Memory & Cognition, 8(2), 157-173
Abstract
An enduring problem in the study of human state-dependent retrieval concerns the apparent unpredictability of the phenomenon. Although many investigators have observed that utilization of information in episodic memory critically depends for its success on restoration, at the time of attempted retrieval, of the pharmacological state in which the information was originally acquired, many others have been unable to find evidence of such state-dependent effects. Indeed, negative results are so common that human state dependence has come to be popularly regarded as an untrustworthy phenomenon of little practical or theoretical significance. The message of this article is that the...
Find it
Huet et al. (2025)
Episodic Memories Generation and Evaluation Benchmark for Large Language Models
In
arXiv
Abstract
Episodic memory -- the ability to recall specific events grounded in time and space -- is a cornerstone of human cognition, enabling not only coherent storytelling, but also planning and decision-making. Despite their remarkable capabilities, Large Language Models (LLMs) lack a robust mechanism for episodic memory: we argue that integrating episodic memory capabilities into LLM is essential for advancing AI towards human-like cognition, increasing their potential to reason consistently and ground their output in real-world episodic events, hence avoiding confabulations. To address this challenge, we introduce a comprehensive framework to model and evaluate LLM episodic memory...
Find it
Ji-An et al. (2024)
Linking In-context Learning in Transformers to Human Episodic Memory
In
arXiv
Abstract
Understanding connections between artificial and biological intelligent systems can reveal fundamental principles of general intelligence. While many artificial intelligence models have a neuroscience counterpart, such connections are largely missing in Transformer models and the self-attention mechanism. Here, we examine the relationship between interacting attention heads and human episodic memory. We focus on induction heads, which contribute to in-context learning in Transformer-based large language models (LLMs). We demonstrate that induction heads are behaviorally, functionally, and mechanistically similar to the contextual maintenance and retrieval (CMR) model of human episodic...
Find it
Modarressi et al. (2025)
NoLiMa: Long-Context Evaluation Beyond Literal Matching
In
arXiv
Abstract
Recent large language models (LLMs) support long contexts ranging from 128K to 1M tokens. A popular method for evaluating these capabilities is the needle-in-a-haystack (NIAH) test, which involves retrieving a "needle" (relevant information) from a "haystack" (long irrelevant context). Extensions of this approach include increasing distractors, fact chaining, and in-context reasoning. However, in these benchmarks, models can exploit existing literal matches between the needle and haystack to simplify the task. To address this, we introduce NoLiMa, a benchmark extending NIAH with a carefully designed needle set, where questions and needles have minimal lexical overlap, requiring models to...
Find it
Pink et al. (2026)
Temporal Context Reinstatement Drives Episodic-Like Order Memory in Long-Context Language Models
In
arXiv
Abstract
Human episodic memory supports the retrieval of experiences that unfold over extended timescales, yet the computational mechanisms underlying this ability remain debated due to the limited mechanistic accessibility in long-term memory experiments in humans. Long-context LLMs may offer promising ways to reveal plausible computational mechanisms that drive this type of retrieval. Here, we investigate whether and how LLMs capture the core behavioral signatures of episodic memory via a temporal order memory task. Using a new dataset of human behavior based on memory of a full-length novel, we show that models exhibit the same characteristic distance effect observed in humans on this task. We...
Find it
Ranganath & Ritchey (2012)
Two cortical systems for memory-guided behaviour
In
Nature Reviews Neuroscience, 13(10), 713-726
Abstract
Although the perirhinal cortex (PRC), parahippocampal cortex (PHC) and retrosplenial cortex (RSC) have an essential role in memory, the precise functions of these areas are poorly understood. Here, we review the anatomical and functional characteristics of these areas based on studies in humans, monkeys and rats. Our Review suggests that the PRC and PHC–RSC are core components of two separate large-scale cortical networks that are dissociable by neuroanatomy, susceptibility to disease and function. These networks not only support different types of memory but also appear to support different aspects of cognition.
Find it
Smith & Vela (2001)
Environmental context-dependent memory: A review and meta-analysis
In
Psychonomic Bulletin & Review, 8(2), 203-220
Abstract
To address questions about human memory’s dependence on the coincidental environmental contexts in which events occur, we review studies of incidental environmental context-dependent memory in humans and report a meta-analysis. Our theoretical approach to the issue stems from Glenberg’s (1997) contention that introspective thought (e.g., remembering, conceptualizing) requires cognitive resources normally used to represent the immediate environment. We propose that if tasks encourage processing of noncontextual information (i.e., introspective thought) at input and/or at test, then both learning and memory will be less dependent on the ambient environmental contexts in which those...
Find it
Stern & Nadel (2026)
Drawing on Memory: Dual-Trace Encoding Improves Cross-Session Recall in LLM Agents
In
arXiv
Abstract
LLM agents with persistent memory store information as flat factual records, providing little context for temporal reasoning, change tracking, or cross-session aggregation. Inspired by the drawing effect [3], we introduce dual-trace memory encoding. In this method, each stored fact is paired with a concrete scene trace, a narrative reconstruction of the moment and context in which the information was learned. The agent is forced to commit to specific contextual details during encoding, creating richer, more distinctive memory traces. Using the LongMemEval-S benchmark (4,575 sessions, 100 recall questions), we compare dual-trace encoding against a fact-only control with matched coverage...
Find it
Tulving & Thomson (1973)
Encoding specificity and retrieval processes in episodic memory.
In
Psychological Review, 80(5), 352-373
Abstract
Recent changes in pretheoretical orientation toward problems of human memory have brought with them a concern with retrieval processes, and a number of early versions of theories of retrieval have been constructed. This paper describes and evaluates explanations offered by these theories to account for the effect of extralist cuing, facilitation of recall of list items by non-list items. Experiments designed to test the currently most popular theory of retrieval, the generation-recognition theory, yielded results incompatible not only with generation-recognition models, but most other theories as well: under certain conditions subjects consistently failed to recognize many recallable list...
Find it