Structured Inference for Recurrent Hidden Semi-markov Model

Hao Liu, Lirong He, Haoli Bai, Bo Dai, Kun Bai, Zenglin Xu

Introduction

Analyzing high-dimensional time series data, such as speech or smartphone sensor streams, presents a dual challenge: capturing complex, long-term temporal dependencies while maintaining interpretable segmentation (e.g., distinguishing between "walking" and "standing"). While Recurrent Neural Networks (RNNs) excel at modeling long-range patterns, they often function as "black boxes" lacking structural interpretability. Conversely, Hidden Semi-Markov Models (HSMMs) provide a robust framework for segmentation and uncertainty handling but struggle with the non-linear dynamics of complex data.

This paper introduces the Stochastic Sequential Neural Network (SSNN), a hybrid architecture designed to bridge this gap. By integrating the long-range dependency tracking of RNNs with the structured segmentation of HSMMs, the SSNN enables accurate, end-to-end learning of discrete latent variables in high-dimensional sequences.

The SSNN Framework

The core innovation of the SSNN lies in its ability to optimize discrete latent variables—specifically segment labels ($z_t$) and durations ($d_t$)—within a differentiable neural framework. Traditionally, passing gradients through discrete choices is intractable. The authors overcome this using the Gumbel-Softmax reparameterization trick, which approximates categorical samples with a continuous "soft" version, allowing for training via Stochastic Gradient Variational Bayes (SGVB).

Generative and Inference Networks

The model architecture consists of two primary components:

  1. Generative Model (Recurrent HSMM): This component models data production by using an RNN to maintain a continuous hidden state while incorporating discrete sequences for segment labels and variable durations. This allows the model to represent states that persist naturally over time.
  2. Structured Inference Network: To estimate hidden states during training, the authors employ a bi-directional RNN. By processing both past and future observations, the inference network significantly improves the accuracy of segment boundary placement.
The SSNN architecture consists of a generative network (a) that models the joint distribution of observations and latent variables, and an inference network (b) that approximates the posterior distribution.

Experimental Evaluation

The SSNN was evaluated across several diverse domains to test its versatility:

  • Synthetic Dynamics: A simulated torque-controlled pendulum used to assess the model's ability to capture non-Markovian dynamics.
  • Speech Modeling: Large-scale datasets including Blizzard (300 hours) and TIMIT (6300 sentences).
  • Behavioral & Medical Segmentation: This included fruit fly movement (Drosophila), smartphone-based activity recognition (HumanAc), and heart sound labeling (PhysioNet).

Key Results

The SSNN consistently outperformed state-of-the-art baselines across all tasks. In speech modeling on the TIMIT dataset, the SSNN achieved an average log-likelihood of ≥ 64017, a substantial improvement over the previous state-of-the-art SRNN (60550).

In segmentation tasks, the model demonstrated superior accuracy and interpretability. For instance, in the Human Activity (HumanAc) task, the SSNN achieved an error rate of 14.70%, significantly lower than specialized models like the rHSMM-dp (16.38%) and standard HSMMs (41.59%). Similar gains were observed in medical heart sound labeling, where the SSNN reached the lowest error rate of 29.29%.

Quantitative comparison of error rates across three segmentation datasets. The SSNN (bold) consistently achieves the lowest error rates compared to HSMM variants and CRF-AE.

Discussion and Limitations

The SSNN's success is attributed to its bi-directional inference and the use of discrete latent variables, which ensure the latent space remains human-interpretable. However, some limitations remain. The model requires a predefined maximum duration ($M$) for segments, which may constrain its ability to represent very long-duration activities. Additionally, the Gumbel-Softmax approach requires careful tuning of the "temperature" parameter ($ au$) through annealing schedules, which can be computationally demanding. Future research may explore hierarchical structures to further refine segment-level representations.

Summary updated

BibTeX
@inproceedings{liu2018structured,
  author = {Hao Liu and Lirong He and Haoli Bai and Bo Dai and Kun Bai and Zenglin Xu},
  title = {{Structured Inference for Recurrent Hidden Semi-markov Model}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.24963/ijcai.2018/339},
}
Figure