Bayesian online changepoint detection (BOCPD), developed by Adams and MacKay (2007), addresses the problem of detecting when the underlying process generating a stream of observations has changed. In psychology, this models how learners detect environmental volatility — shifts in reward contingencies, changes in category boundaries, or transitions between task contexts.
The Run-Length Framework
P(rₜ|x_{1:t}) ∝ Σ_{r_{t-1}} P(xₜ|rₜ, x_{1:t-1}) · P(rₜ|r_{t-1}) · P(r_{t-1}|x_{1:t-1})
Growth: P(rₜ = r_{t-1} + 1) = 1 − H (no changepoint)
Reset: P(rₜ = 0) = H (changepoint occurred)
The algorithm maintains a posterior distribution over the run length — how long since the last change. At each time step, it considers two possibilities: the current segment continues (run length increments) or a changepoint has occurred (run length resets to zero). The hazard rate H is the prior probability of a changepoint at any given time.
Psychological Applications
BOCPD has been used to model human performance in volatile reversal learning tasks, where reward contingencies periodically switch. Humans show behavior consistent with approximate changepoint detection: they increase their learning rate when they detect a change and decrease it as they become confident in the new contingency. Individual differences in changepoint detection have been linked to anxiety (overestimating volatility) and autism (underestimating volatility).