Papers
Topics
Authors
Recent
Search
2000 character limit reached

Doubly Outlier-Robust Online Infinite Hidden Markov Model

Published 15 Apr 2026 in stat.ML and cs.LG | (2604.14322v1)

Abstract: We derive a robust update rule for the online infinite hidden Markov model (iHMM) for when the streaming data contains outliers and the model is misspecified. Leveraging recent advances in generalised Bayesian inference, we define robustness via the posterior influence function (PIF), and provide conditions under which the online iHMM has bounded PIF. Imposing robustness inevitably induces an adaptation lag for regime switching. Our method, which is called Batched Robust iHMM (BR-iHMM), balances adaptivity and robustness with two additional tunable parameters. Across limit order book data, hourly electricity demand, and a synthetic high-dimensional linear system, BR-iHMM reduces one-step-ahead forecasting error by up to 67% relative to competing online Bayesian methods. Together with theoretical guarantees of bounded PIF, our results highlight the practicality of our approach for both forecasting and interpretable online learning.

Summary

  • The paper presents a BR-iHMM that bounds outlier effects on both emission parameters and latent state posteriors.
  • It employs a weighted observation likelihood filter and batched inference to achieve stability and improve regime detection.
  • Empirical evaluations show up to a 67% reduction in RMSE and enhanced interpretability in synthetic and real-world forecasting tasks.

Doubly Outlier-Robust Online Infinite Hidden Markov Model: A Technical Overview

Introduction and Motivation

Hidden Markov models (HMMs), parametrized in their nonparametric extension as infinite HMMs (iHMMs) via hierarchical Dirichlet process priors, provide substantial flexibility for capturing non-stationary and multi-regime time series. Online inference in iHMMs, which is critical for large-scale or streaming applications, remains acutely sensitive to model misspecification and particularly to outliers. A single anomalous observation can corrupt both parameter estimates and the inferred latent regime structure, leading to degradations in predictive performance, over-creation of redundant states, or inappropriate state-switching.

This paper presents a provably robust online iHMM algorithm—Batched Robust iHMM (BR-iHMM or snsred)—which explicitly bounds the influence function of both the emission parameter posterior and the latent-state posterior for arbitrary contamination. The method integrates generalised Bayesian (weighted likelihood) inference for robustified observations with a batched latent-state inference mechanism that admits a precise robustness–adaptivity trade-off. The empirical evidence demonstrates substantial gains in predictive accuracy and interpretability across synthetic and real-world forecasting and segmentation tasks, with up to 67% reduction in one-step-ahead RMSE relative to prior online Bayesian methods.

Theoretical Framework

The classical online iHMM update comprises two components: recursive Bayesian inference for the regime-specific emission parameters (commonly using a linear-Gaussian model and Kalman-type updates), and Bayesian inference over latent state-sequence trajectories, approximated via Particle Learning (PL). The HDP prior allows for state re-use and the creation of new states. However, the conjugate structure coupled with likelihood-based updates means that emission and latent state posteriors exhibit unbounded sensitivity—quantified by the posterior influence function (PIF)—to individual outlier observations.

Quantifying Robustness

The PIF is formalized as the Kullback–Leibler divergence between posteriors updated with and without an outlier. The joint PIF of the iHMM model decomposes additively into the PIF of the latent-state path and that of the emission parameters—robustness (bounded PIF) for the joint posterior necessitates boundedness of both.

The essential insight is that restricting outlier influence on the emission parameters (e.g., with robust likelihoods or heavy-tailed models) does not preclude the formation of spurious latent states, since even a downweighted extreme observation can dominate state inference under the HDP prior. Conversely, enforcing robustness in the latent-state space while using classical likelihood updates still allows outlier-induced emission parameter drift.

Robust Observation-Space Inference (WoLF)

The emission model updates employ a generalised Bayesian method—WoLF (Weighted Observation Likelihood Filter)—which raises the likelihood to a bounded, residual-dependent weight and rescales the update. Concretely, for a Gaussian emission, the posterior is updated with

P(θtD1:t)P(θt1)P(ytθt)W(yt,y^t)2P(\theta_t \mid D_{1:t}) \propto P(\theta_{t-1}) P(y_t \mid \theta_t)^{W(y_t, \hat{y}_t)^2}

where W(,)W(\cdot, \cdot) is an inverse-multiquadratic (IMQ) weight, guaranteed to yield bounded influence under sufficient conditions. This mechanism ensures outliers cannot arbitrarily bias the active regime's parameters.

Robust State-Space Inference via Batching

To bound outlier-driven influence in latent-state inference, state allocation is only permitted at predefined batch boundaries rather than at every time step. Regime switching within a batch of size B>1B>1 is disallowed through a degenerate, infinitely sticky HDP prior, ensuring state persistence for at least BB observations. The posterior over state trajectories is then computed by pooling weighted log-likelihoods over the batch and only permitting state changes at batch edges:

logν(s1:t+B;D1:t+B)=b=1Bwst+b,t+bt2logP(yt+bst+b)+(transition terms)\log \nu(s_{1:t+B}; D_{1:t+B}) = \sum_{b=1}^B w_{s_{t+b}, t+b|t}^2 \log P(y_{t+b} \mid s_{t+b}) + \text{(transition terms)}

This batched mechanism directly controls the state-space PIF: a single outlier, or any batch-limited contamination, cannot trigger spurious state creation or switching. The robustness–adaptivity trade-off becomes explicit: larger BB increases robustness at the cost of detection delay for true regime changes. Figure 1

Figure 2: The left plot shows regime ambiguity at high variance; right plot illustrates that batchwise inference prevents a coincidentally well-explained outlier from forcing a regime switch.

Algorithm and Implementation

The BR-iHMM integrates the above components in an algorithmic framework based on Particle Learning, with resampling based on effective sample size criteria. Model scaling and computational tractability are achieved by pruning infrequently used states and enforcing a maximum number of active regimes.

Remarkably, batchwise state inference yields non-trivial computational speedup: state sampling and structural parameter updates are performed only once per batch, rather than per observation, with significant runtime reductions in large-scale experiments. Figure 2

Figure 3: The model architecture couples batched state inference with robust observation updates, where parameters in red are hyperparameters, and state persistence across the batch window is enforced by a degenerate sticky HDP prior.

Empirical Evaluation

Synthetic High-Dimensional Regression

A synthetic nonlinear regression task demonstrates the critical importance of joint robustness. Outliers are frequent and severe in a 100-dimensional input space. Only the doubly robust BR-iHMM (snsred) maintains stable latent state allocations and achieves sub-50 RMSE, whereas the standard iHMM and observation-robust variant (snsgreen) both degrade—creating numerous spurious regimes and suffering large error spikes. Figure 4

Figure 4: Outliers (red dashes) trigger rapid fragmentation and RMSE spikes in non-batched models, while snsred provides regime consistency and stability.

Real-World Applications

On the hourly electricity demand forecasting task (real data; high-dimensional exogenous features), batching regularizes against volatility bursts and improves detection of structural shifts, as reflected by RMSE and more plausible regime assignments. For limit order book (LOB) data, the algorithm adapts: batch size B=1B=1 is selected, reducing to the snsgreen benchmark when rapid regime switching is necessary. Figure 5

Figure 5: Cumulative RMSE for order flow imbalance prediction reveals that, when batching is not appropriate, performance is not degraded.

Robustness to Outlier Structure

Empirical experiments demonstrate that batchwise state inference not only mitigates the rapid state-switching pathology, but also curbs the tendency to create redundant states due to transient anomalies or heavy-tailed noise. The robust BOCD and heavy-tailed predictive baselines (e.g., Student-t emission models) remain vulnerable to unbounded PIF and regime fragmentation, corroborating the necessity of double robustness.

Analysis of Robustness–Adaptivity

The batch size BB provides a direct control for the robustness–adaptivity trade-off. Increasing BB uniformly increases the regime change detection delay (DD) but also reduces sensitivity to bursts of anomalous data. The RMSE and regime detection F1-score admit a non-monotonic relationship with BB, with model selection for W(,)W(\cdot, \cdot)0 data/problem-dependent. Figure 6

Figure 7: The detection delay and lookahead MAE as a function of batch size, highlighting robustness–adaptivity trade-off.

Limitations and Future Directions

The batch size is fixed and set as a hyperparameter, which may require further adaptation or hierarchical Bayesian approaches for dynamic estimation. The analytic results strongly leverage the closed-form properties of the linear-Gaussian emission model; extending formal PIF bounds to non-Gaussian, intractable, or nonconjugate emission models is open. Finally, the quantitative relationship between bounded PIF and downstream predictive gains motivates further theoretical work on stability–accuracy trade-offs in online learning.

Conclusion

This paper formalizes and demonstrates the necessity for double robustness in online nonparametric regime-switching models: the proposed BR-iHMM guarantees, for the first time, robustness to arbitrary outliers in both emission and latent-space inference via generalised Bayesian and batched state update mechanisms. The paradigm produces accuracy and credible latent regime allocations that are unattainable by observation-only robustification or classical heavy-tailed likelihood approaches. The approach also provides nontrivial improvements in computational efficiency and is deployable for large-scale, real-time forecasting/segmentation applications. Figure 8

Figure 1: Comparison of iHMM predictions and MAP state inference with varying robustness settings on well-log data; robust batching curbs artefact state proliferation and enhances interpretability.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.