NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Context-dependent learning and causal structure

Samuel J. GershmanPsychonomic 2016

Abstract

This paper proposes a Bayesian framework to resolve a long-standing puzzle in learning theory: why does "context" sometimes act as a background distraction, sometimes as a switch that gates learning, and sometimes as a primary cue itself? By modeling the brain as an engine that infers the latent causal structure of the environment, the author demonstrates that these diverse functions of context are rational responses to different types of training histories.

Introduction

In the study of animal and human learning, "context"—such as the physical environment where an experiment takes place—is notoriously fickle. Sometimes, subjects ignore context entirely, generalizing what they learned in one room to another. In other instances, context acts as an "occasion setter," gating the relationship between a cue and an outcome without causing the outcome itself. Occasionally, context acts just like a standard cue, competing for the subject's attention.

Traditional associative models, such as Rescorla-Wagner, struggle to explain why context shifts between these roles. This research addresses the lack of a unified theory that predicts when and why context takes on a specific function.

The Bayesian Structure Learning Model

The author introduces a Bayesian structure learning model that treats context as an inference problem. Instead of assuming a fixed role for context, the model entertains three possible causal hypotheses (structures):

  • $M_1$ (Irrelevant): Cues cause outcomes; context is a bystander.
  • $M_2$ (Modulatory): Context "gates" the relationship between cues and outcomes. Each context has its own set of cue-outcome weights.
  • $M_3$ (Additive): Context is just another cue that adds its own weight to the outcome prediction.
The three causal structures considered by the model: $M_1$ (Irrelevant), $M_2$ (Modulatory), and $M_3$ (Additive).

The model uses Bayesian inference to calculate the posterior probability of each structure based on the subject's experience. Within each structure, weights are updated using Kalman filtering to track hidden states over time.

Key Insights

Context as an Inference Problem

The most profound insight is that context is not a physical property of a stimulus but a functional role assigned by the brain. The brain asks: "Which causal map best explains the data I've seen so far?"

Ambiguity Triggers Context-Dependency

The model shows that context is largely ignored ($M_1$) when cue-outcome relationships are consistent. It only becomes informative ($M_2$ or $M_3$) when the environment becomes ambiguous—for example, during extinction, when a cue that used to predict a reward suddenly stops doing so.

Bayesian Occam’s Razor

The model naturally favors simpler explanations. Early in training, it prefers $M_1$ due to its fewer parameters. It only shifts to more complex structures ($M_2$ or $M_3$) when the simpler model fails to explain the observations.

Experimental Validation and Results

The theory was validated through computational simulations of classic animal learning phenomena and a human behavioral experiment ($N=90$). In the human task, participants predicted if certain foods (cues) in specific restaurants (contexts) would cause sickness.

Human behavioral data showing structure-specific conditioned responses (CR) across different test contexts.

Key results include:

  • High Predictive Accuracy: The model’s predictions showed an excellent quantitative fit with the human experimental data ($r = 0.92, p < 0.0001$).
  • Structure-Specific Behavior: Participants in the "Modulatory" group correctly restricted their predictions to specific restaurant-food combinations, while the "Irrelevant" group generalized across restaurants, matching the Bayesian model's predictions.
  • Explaining Renewal: The model successfully simulated why extinction is often context-specific while initial acquisition is not. After extinction, the "Modulatory" structure ($M_2$) becomes the most probable, effectively siloing the extinction memory to the specific context where it occurred.

Discussion and Future Work

While the model is highly predictive, it currently struggles with "ABC renewal," where behavior extinguished in one context returns in a brand-new context. Future work may involve more complex models of "latent causes" that span multiple contexts. Additionally, the model assumes the subject already knows what constitutes a "context" versus a "cue"; future research could integrate how the brain infers this partition based on stimulus properties.

Summary updated

BibTeX
@inproceedings{gershman2016context,
  author = {Samuel J. Gershman},
  title = {{Context-dependent learning and causal structure}},
  booktitle = {Psychonomic},
  year = {2016},
  doi = {10.3758/s13423-016-1110-x},
}

Loading related content...

Figure