Mathematical Psychology
About

Bayesian Changepoint Detection

Bayesian changepoint detection provides an online algorithm for identifying when the statistical properties of a data stream have changed, modeling how learners detect shifts in their environment.

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

Bayesian Changepoint Detection Run length rₜ = number of observations since the last changepoint

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).

Related Topics

References

  1. Adams, R. P., & MacKay, D. J. C. (2007). Bayesian online changepoint detection. arXiv preprint. https://doi.org/10.48550/arXiv.0710.3742
  2. Nassar, M. R., Wilson, R. C., Heasly, B., & Gold, J. I. (2010). An approximately Bayesian delta-rule model explains the dynamics of belief updating in a changing environment. Journal of Neuroscience, 30(37), 12366–12378. https://doi.org/10.1523/JNEUROSCI.0822-10.2010
  3. Wilson, R. C., Nassar, M. R., & Gold, J. I. (2010). Bayesian online learning of the hazard rate in change-point problems. Neural Computation, 22(9), 2452–2476. https://doi.org/10.1162/NECO_a_00007
  4. Gallistel, C. R., Mark, T. A., King, A. P., & Latham, P. E. (2001). The rat approximates an ideal detector of changes in rates of reward: Implications for the law of effect. Journal of Experimental Psychology: Animal Behavior Processes, 27(4), 354–372. https://doi.org/10.1037/0097-7403.27.4.354

External Links