Skip to main content

A Predictive View on Streaming Hidden Markov Models

AuthorsGerardo Duran-Martin
Year2026
FieldStatistics / ML
arXiv2604.09208
PDFDownload
Categoriesstat.ML, cs.LG

Abstract

We develop a predictive-first optimisation framework for streaming hidden Markov models. Unlike classical approaches that prioritise full posterior recovery under a fully specified generative model, we assume access to regime-specific predictive models whose parameters are learned online while maintaining a fixed transition prior over regimes. Our objective is to sequentially identify latent regimes while maintaining accurate step-ahead predictive distributions. Because the number of possible regime paths grows exponentially, exact filtering is infeasible. We therefore formulate streaming inference as a constrained projection problem in predictive-distribution space: under a fixed hypothesis budget, we approximate the full posterior predictive by the forward-KL optimal mixture supported on SS paths. The solution is the renormalised top-SS posterior-weighted mixture, providing a principled derivation of beam search for HMMs. The resulting algorithm is fully recursive and deterministic, performing beam-style truncation with closed-form predictive updates and requiring neither EM nor sampling. Empirical comparisons against Online EM and Sequential Monte Carlo under matched computational budgets demonstrate competitive prequential performance.


Engineering Breakdown

Plain English

This paper presents a new optimization framework for hidden Markov models that processes streaming data without requiring a fully specified generative model. Instead of trying to recover the complete posterior distribution (which becomes computationally intractable as regime paths grow exponentially), the authors propose learning regime-specific predictive models online while keeping the transition structure between regimes fixed. The key innovation is formulating inference as a constrained projection problem in predictive-distribution space, where under a limited computational budget (hypothesis budget), they approximate the full posterior predictive using forward-KL optimal mixtures. This approach prioritizes accurate step-ahead predictions over exact Bayesian posterior recovery, making it practical for real-time streaming scenarios.

Core Technical Contribution

The core novelty is inverting the classical HMM inference problem from posterior-first to predictive-first optimization. Traditional approaches assume you know the complete generative model and work backward to infer latent states; this paper assumes you have access to regime-specific predictive models and learns their parameters online. The technical breakthrough is reformulating the exponentially-growing-paths problem (which makes exact filtering infeasible) as a constrained optimization in predictive-distribution space rather than state space. This enables them to use forward-KL divergence to select the best mixture of hypotheses under a fixed computational budget, making streaming inference tractable without sacrificing prediction accuracy.

How It Works

The system operates on a streaming input where at each time step you receive new observations but don't have access to true latent regime labels. Rather than attempting to maintain a full posterior over all possible regime sequences (exponentially many), the framework maintains a fixed transition prior over regimes and learns regime-specific predictive models—these models predict the next observation given current and past observations. At each step, the algorithm computes predictive distributions for each possible regime and must choose which hypotheses to keep under a fixed budget constraint. The selection uses forward-KL divergence to find the optimal mixture of regime hypotheses that best approximates what the full posterior predictive would be. This mixture becomes the state estimate for the next time step, creating a sequential projection-based filter that trades off between model coverage and computational cost.

Production Impact

For systems processing continuous data streams (financial time series, sensor networks, event logs), this approach removes the requirement to hand-engineer or pre-specify a complete generative model—you only need regime-specific predictive models, which are often easier to learn from data. Production systems benefit from reduced computational overhead compared to exact Bayesian inference; you only track the top-K regime hypotheses rather than all exponential paths, enabling low-latency predictions even with many possible regimes. The fixed budget constraint is operationally useful: you can dial computational spend up or down by adjusting hypothesis count, making it compatible with variable-load cloud deployments. The main trade-off is that you get accurate step-ahead predictions but lose principled uncertainty quantification over regime identity itself; if your application critically needs posterior credible intervals over which regime you're in, this method may underdeliver compared to full Bayesian approaches.

Limitations and When Not to Use This

The paper assumes access to well-behaved regime-specific predictive models, which may not exist or may be difficult to learn in early deployment phases with limited data; if these models are poorly trained, the entire framework degrades. The approach prioritizes one-step-ahead prediction accuracy over long-horizon forecasting or global model understanding, so it may miss important regime dynamics that only emerge over longer timescales. Crucially, because posterior information about regimes is discarded in favor of maintaining predictive mixtures, the method cannot answer questions like 'what is the posterior probability we switched regimes at time t-100' without rerunning inference—this limits interpretability and debugging capabilities in production. The fixed transition prior is a strong assumption that works only when regime dynamics are stationary and known; if regime structure itself changes over time, the framework needs extension.

Research Context

This work extends the classical hidden Markov model literature (Rabiner et al.) by challenging the assumption that exact posterior inference is the right objective when computational resources are finite. It relates to particle filtering and sequential Monte Carlo methods, which also maintain finite-size approximations to the posterior, but differs by explicitly optimizing predictive accuracy rather than posterior coverage. The predictive-first view connects to recent work in predictive modeling and online learning, where practitioners often care more about forecasts than posterior samples. This paper opens a research direction toward resource-aware Bayesian inference where the optimization objective explicitly accounts for computational constraints, which could influence how probabilistic models are designed for production systems.


:::tip Subscribe Get weekly breakdowns of papers like this in AI Letters - the newsletter for engineers building production AI systems. :::


Back to Research Lab → · Subscribe to AI Letters →

© 2026 EngineersOfAI. All rights reserved.