Table of Contents
Fetching ...

Bayesian Online Changepoint Detection

Ryan Prescott Adams, David J. C. MacKay

TL;DR

The paper addresses online changepoint detection by developing an exact Bayesian method to infer the current run length $r_t$ as data arrive, assuming independent parameters before and after changepoints. It derives a recursive, modular algorithm that uses a hazard-based change-point prior and conjugate-exponential models to maintain tractable sufficient statistics and exact predictive distributions. The approach yields a run-length posterior and a causal predictive filter, enabling real-time detection across diverse data types. Demonstrations on well-log, stock-return, and coal-mine data show accurate changepoint localization and intuitive run-length dynamics, highlighting the method's applicability to real-time decision making with modular model integration.

Abstract

Changepoints are abrupt variations in the generative parameters of a data sequence. Online detection of changepoints is useful in modelling and prediction of time series in application areas such as finance, biometrics, and robotics. While frequentist methods have yielded online filtering and prediction techniques, most Bayesian papers have focused on the retrospective segmentation problem. Here we examine the case where the model parameters before and after the changepoint are independent and we derive an online algorithm for exact inference of the most recent changepoint. We compute the probability distribution of the length of the current ``run,'' or time since the last changepoint, using a simple message-passing algorithm. Our implementation is highly modular so that the algorithm may be applied to a variety of types of data. We illustrate this modularity by demonstrating the algorithm on three different real-world data sets.

Bayesian Online Changepoint Detection

TL;DR

The paper addresses online changepoint detection by developing an exact Bayesian method to infer the current run length as data arrive, assuming independent parameters before and after changepoints. It derives a recursive, modular algorithm that uses a hazard-based change-point prior and conjugate-exponential models to maintain tractable sufficient statistics and exact predictive distributions. The approach yields a run-length posterior and a causal predictive filter, enabling real-time detection across diverse data types. Demonstrations on well-log, stock-return, and coal-mine data show accurate changepoint localization and intuitive run-length dynamics, highlighting the method's applicability to real-time decision making with modular model integration.

Abstract

Changepoints are abrupt variations in the generative parameters of a data sequence. Online detection of changepoints is useful in modelling and prediction of time series in application areas such as finance, biometrics, and robotics. While frequentist methods have yielded online filtering and prediction techniques, most Bayesian papers have focused on the retrospective segmentation problem. Here we examine the case where the model parameters before and after the changepoint are independent and we derive an online algorithm for exact inference of the most recent changepoint. We compute the probability distribution of the length of the current ``run,'' or time since the last changepoint, using a simple message-passing algorithm. Our implementation is highly modular so that the algorithm may be applied to a variety of types of data. We illustrate this modularity by demonstrating the algorithm on three different real-world data sets.

Paper Structure

This paper contains 11 sections, 13 equations, 4 figures, 1 algorithm.

Figures (4)

  • Figure 1: This figure illustrates how we describe a changepoint model expressed in terms of run lengths. Figure \ref{['fig:example-model-a']} shows hypothetical univariate data divided by changepoints on the mean into three segments of lengths $g_{1}=4$, $g_{2}=6$, and an undetermined length $g_{3}$. Figure \ref{['fig:example-model-b']} shows the run length $r_{t}$ as a function of time. $r_{t}$ drops to zero when a changepoint occurs. Figure \ref{['fig:example-model-c']} shows the trellis on which the message-passing algorithm lives. Solid lines indicate that probability mass is being passed "upwards," causing the run length to grow at the next time step. Dotted lines indicate the possibility that the current run is truncated and the run length drops to zero.
  • Figure 2: The top plot is a 1100-datum subset of nuclear magnetic response during the drilling of a well. The data are plotted in light gray, with the predictive mean (solid dark line) and predictive 1-$\sigma$ error bars (dotted lines) overlaid. The bottom plot shows the posterior probability of the current run $P(r_{t}\,|\, \boldsymbol{x}_{1:t})$ at each time step, using a logarithmic color scale. Darker pixels indicate higher probability.
  • Figure 3: The top plot shows daily returns on the Dow Jones Industrial Average, with an overlaid plot of the predictive volatility. The bottom plot shows the posterior probability of the current run length $P(r_{t}\,|\, \boldsymbol{x}_{1:t})$ at each time step, using a logarithmic color scale. Darker pixels indicate higher probability. The time axis is in business days, as this is market data. Three events are marked: the conviction of G. Gordon Liddy and James W. McCord, Jr. on January 30, 1973; the beginning of the OPEC embargo against the United States on October 19, 1973; and the resignation of President Nixon on August 9, 1974.
  • Figure 4: These data are the weekly occurrence of coal mine disasters that killed ten or more people between 1851 and 1962. The top plot is the cumulative number of accidents. The accident rate determines the local average slope of the plot. The introduction of the Coal Mines Regulations Act in 1887 is marked. The year 1887 corresponds to weeks 1868 to 1920 on this plot. The bottom plot shows the posterior probability of the current run length at each time step, $P(r_{t}\,|\, \boldsymbol{x}_{1:t})$.