Density Ratio Hidden Markov Models

John A. Quinn, Masashi SugiyamaarXiv 2013

Abstract

Hidden Markov Models (HMMs) typically rely on estimating the likelihood of observations for each state, a task that can be computationally intensive and prone to error when data distributions are complex. We present the Density Ratio Hidden Markov Model (DR-HMM), which reformulates the HMM framework to utilize direct density ratio estimation. By focusing on the relative differences between states rather than absolute densities, the DR-HMM achieves superior classification accuracy and numerical stability, particularly in data-scarce environments.

Introduction

Hidden Markov Models are fundamental tools for sequential data analysis. However, their generative nature requires modeling the exact probability distribution of observations for every state. In real-world applications, these distributions are often non-parametric and difficult to estimate. Inaccuracies in likelihood modeling directly degrade classification performance. While discriminative HMM variants exist, they often sacrifice the probabilistic elegance of the original model. The DR-HMM bridges this gap by applying Vapnik’s principle: solving the specific problem of state discrimination without solving the more general (and harder) problem of full density estimation.

Methodology

The core innovation of the DR-HMM is a mathematical "pivot" in the forward-backward algorithm. Instead of absolute probabilities, the model propagates messages as ratios between states.

Ratio Reformulation and Direct Estimation

The standard forward-backward messages are rewritten as ratios (e.g., the ratio of being in state $i$ versus state $j$). This reformulation allows for the use of Least-Squares Density Ratio Estimation (LS-DRE), a fast, kernel-based method that learns the ratio function directly from data. By using squared exponential kernels, the model adaptively captures complex data shapes without requiring prior assumptions about the distribution family.

Dynamics of the posterior ratio in a two-state HMM for different transition probabilities $\alpha$.

Numerical Stability

Traditional HMMs frequently encounter numerical underflow, where probabilities become so small they are rounded to zero, necessitating complex log-space computations. Because the DR-HMM operates with ratios centered around 1.0, it is inherently more stable and avoids these common computational pitfalls.

Experiments and Results

The DR-HMM was evaluated on synthetic toy data and a high-stakes clinical dataset.

Synthetic Switching Sine Waves

The model was tasked with identifying three distinct frequencies in a sine wave sequence corrupted by Gaussian noise. The DR-HMM consistently outperformed Gaussian Mixture Model (GMM) HMMs and Kernel Density Estimation (KDE) HMMs. The performance advantage was most pronounced with small training sets (e.g., 100 samples), where the DR-HMM achieved approximately 85% accuracy compared to 70-75% for competitors.

Classification of a switching sine wave sequence using IID (no dynamics), filtering, and smoothing approaches.

Neonatal ICU Monitoring

In a real-world application involving 360 hours of physiological data from 15 premature infants, the DR-HMM was used to detect clinical events such as sensor disconnections. It outperformed sophisticated domain-specific models like Factorial Switching Linear Dynamical Systems (SLDS), showing a 17% increase in AUC for detecting temperature probe disconnections and a 13% decrease in error rate.

Conclusion

The Density Ratio Hidden Markov Model offers a robust alternative to traditional generative HMMs by "cutting out the middleman" of density estimation. By focusing on density ratios, the model provides better accuracy with less data and improved numerical stability. Future work will explore scaling these kernel-based methods to higher-dimensional data and larger state spaces typical of natural language processing tasks.

Summary updated

BibTeX
@misc{quinn2013density,
  author = {John A. Quinn and Masashi Sugiyama},
  title = {{Density Ratio Hidden Markov Models}},
  year = {2013},
  eprint = {1302.3700},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1302.3700},
}
Figure