Abstract
Detecting sudden shifts in data streams, known as changepoints, is vital for real-time monitoring in domains ranging from cybersecurity to finance. While Bayesian Online Changepoint Detection (BOCPD) offers a robust framework, its traditional reliance on conjugate priors limits its application to simple exponential family models. We present Stein Variational Online Changepoint Detection (SVOCD), which leverages Stein Variational Newton (SVN) to enable efficient Bayesian inference in complex, non-linear models such as Hawkes processes and Bayesian LSTMs. Our results demonstrate that SVOCD achieves significantly higher accuracy and fewer false alarms than Sequential Monte Carlo (SMC) baselines while maintaining computational efficiency for online applications.
Introduction
In many real-world applications, data behavior is non-stationary, characterized by abrupt transitions or "changepoints." Identifying these shifts in real-time is critical for adaptive modeling. Bayesian Online Changepoint Detection (BOCPD) provides a recursive method for estimating the probability of a changepoint at each time step. However, BOCPD typically requires the use of conjugate priors to remain computationally tractable, restricting its use to simple distributions. For more complex models, such as neural networks or self-exciting point processes, researchers often turn to Sequential Monte Carlo (SMC) approximations. Unfortunately, SMC can be computationally expensive and often requires a large number of particles to achieve acceptable accuracy, making it less suitable for high-speed data streams.
Methodology: Stein Variational Online Changepoint Detection (SVOCD)
The core innovation of this work is SVOCD, which integrates BOCPD with Stein Variational Newton (SVN), a second-order variational inference method. SVN uses the Hessian of the log-posterior to "transport" a set of particles toward the target distribution.
The Advantage of Particle Transport
Unlike SMC, which relies on re-weighting and re-sampling particles, SVN actively moves particles to represent the posterior. In an online setting, the posterior at time $t$ is often a slight perturbation of the posterior at $t-1$. SVN exploits this "warm start" by efficiently adjusting the existing particle set to incorporate new data. This approach is particularly effective for high-dimensional parameter spaces, such as those found in Bayesian Long Short-Term Memory (BLSTM) networks, where first-order methods often struggle to scale.
Experimental Evaluation
The performance of SVOCD was evaluated across several challenging scenarios:
- Hawkes Processes: Modeling self-exciting events where the occurrence of one event increases the likelihood of future events.
- WannaCry Cyber Attack: Detecting malware propagation in network packet logs from a test environment.
- Bitcoin Price Evolution: Identifying trend reversals in volatile financial data from 2016 to 2018.
- Synthetic Benchmarks: Using ground-truth changepoints to quantify Mean Squared Error (MSE) and validate the Bayesian LSTM component.
Results and Discussion
SVOCD demonstrates a clear advantage in both accuracy and reliability. On synthetic Hawkes data, SVOCD achieved an MSE approximately three orders of magnitude lower than the SMC baseline for a given number of particles, highlighting its efficiency.
Qualitatively, SVOCD provides more stable predictions and fewer spurious changepoint detections. In the WannaCry attack scenario, SVOCD accurately identified infection events with significantly fewer false positives than the BOCPD+SMC approach. This precision is critical for real-world monitoring where false alarms can lead to alert fatigue.
Conclusion
SVOCD effectively breaks the "conjugacy barrier" of traditional BOCPD, allowing for sophisticated Bayesian changepoint detection in non-linear and high-dimensional models. By utilizing second-order information for particle transport, the method achieves superior accuracy and efficiency compared to standard sampling-based approximations. Future work will focus on automating hyper-parameter tuning and developing more advanced pruning strategies to further enhance long-term computational performance in massive-scale neural networks.
Summary updated