Computational Learning and Memory Group

Contextual inference in learning and memory
Trends in Cognitive Sciences (2022)
Heald JB, M Lengyel<sup>*</sup>, and D Wolpert<sup>*</sup>


Context is widely regarded as a major determinant of learning and memory across numerous domains, including classical and instrumental conditioning, episodic memory, economic decision-making, and motor learning. However, studies across these domains remain disconnected due to the lack of a unifying framework formalizing the concept of context and its role in learning. Here, we develop a unified vernacular allowing direct comparisons between different domains of contextual learning. This leads to a Bayesian model positing that context is unobserved and needs to be inferred. Contextual inference then controls the creation, expression, and updating of memories. This theoretical approach reveals two distinct components that underlie adaptation, proper and apparent learning, respectively referring to the creation and updating of memories versus time-varying adjustments in their expression. We review a number of extensions of the basic Bayesian model that allow it to account for increasingly complex forms of contextual learning.


  • Context has widespread effects on memory and learning across multiple domains.
  • Context is rarely directly observed by the learner and needs to be inferred.
  • Contextual inference is determined by three main factors: performance-related feedback signals, performance-unrelated sensory cues, and spontaneous factors, such as the passage of time.
  • Contextual inference controls memory creation, updating, and expression across a variety of domains. In general, this requires multiple memories to be recalled and modified at any time.
  • Adaptation is not a monolithic process but arises from a combination of two distinct processes: proper learning, involving the creation and updating of memories, and apparent learning, involving changes in how existing memories are expressed.
  • Many classical learning phenomena, typically attributed to proper learning, have been shown to arise primarily from apparent learning.