Skip to main content
QUICK REVIEW

[Paper Review] Comparative Analysis of the Hidden Markov Model and LSTM: A Simulative Approach

Manie Tadayon, Greg Pottie|arXiv (Cornell University)|Aug 9, 2020
Time Series Analysis and Forecasting4 citations
TL;DR

This paper compares Hidden Markov Models (HMMs) and Long Short-Term Memory (LSTM) networks for time series forecasting using synthetic data across varying complexity levels. It demonstrates that unsupervised and supervised HMMs outperform LSTM when labeled data is limited, with HMMs requiring far fewer parameters and maintaining strong accuracy even when the first-order Markov assumption is violated.

ABSTRACT

Time series and sequential data have gained significant attention recently since many real-world processes in various domains such as finance, education, biology, and engineering can be modeled as time series. Although many algorithms and methods such as the Kalman filter, hidden Markov model, and long short term memory (LSTM) are proposed to make inferences and predictions for the data, their usage significantly depends on the application, type of the problem, available data, and sufficient accuracy or loss. In this paper, we compare the supervised and unsupervised hidden Markov model to LSTM in terms of the amount of data needed for training, complexity, and forecasting accuracy. Moreover, we propose various techniques to discretize the observations and convert the problem to a discrete hidden Markov model under stationary and non-stationary situations. Our results indicate that even an unsupervised hidden Markov model can outperform LSTM when a massive amount of labeled data is not available. Furthermore, we show that the hidden Markov model can still be an effective method to process the sequence data even when the first-order Markov assumption is not satisfied.

Motivation & Objective

  • To evaluate and compare the performance, data efficiency, and model complexity of HMMs and LSTMs in time series forecasting.
  • To investigate whether unsupervised HMMs can achieve competitive accuracy compared to supervised deep learning models like LSTM when labeled data is scarce.
  • To develop and test methods for discretizing continuous observations to convert continuous HMMs into discrete HMMs for improved training efficiency and interpretability.
  • To assess the robustness of HMMs under non-stationary and non-Markovian conditions, where state dependencies extend beyond one time step.
  • To provide empirical evidence on the trade-offs between data requirements, parameter count, and predictive accuracy between model-based (HMM) and data-driven (LSTM) approaches.

Proposed method

  • Generated synthetic time series data with varying dynamic Bayesian network (DBN) structures, including cases violating the first-order Markov assumption.
  • Implemented both discrete HMM (DHMM) and continuous HMM (CHMM) with unsupervised and supervised training using the Expectation-Maximization (EM) algorithm.
  • Proposed a discretization strategy for continuous observations based on histogram binning, applicable to both stationary and non-stationary scenarios.
  • Trained multiple LSTM architectures with varying depth, width, and hyperparameters (e.g., learning rate, batch size) to ensure fair comparison.
  • Evaluated models across different training data ratios (0.001 to 0.8) and sample sizes, measuring prediction accuracy and number of trainable parameters.
  • Used model selection criteria such as AIC/BIC and multiple random initializations to mitigate EM convergence issues in HMMs.

Experimental results

Research questions

  • RQ1Can an unsupervised HMM achieve comparable or better forecasting accuracy than LSTM when labeled training data is limited?
  • RQ2How does the number of trainable parameters in HMMs compare to LSTMs, and what impact does this have on model interpretability and data efficiency?
  • RQ3To what extent can HMMs maintain performance when the first-order Markov assumption is violated, such as in cases with second-order or higher state dependencies?
  • RQ4How effective is the proposed observation discretization method in converting continuous HMMs into discrete HMMs without significant accuracy loss?
  • RQ5Under what conditions does a supervised HMM outperform even deep learning models like LSTM in sequential data modeling?

Key findings

  • Unsupervised HMMs outperform LSTM when training data is limited, achieving 60.8% accuracy with 8,000 samples in Case IV, compared to LSTM’s 82.97% only at 32,000 samples.
  • Supervised DHMM achieved 83.89% accuracy with only 32,000 training samples in Case IV, outperforming all LSTM variants at the same data size.
  • Even with 40 training samples (0.001 ratio), supervised DHMM achieved 50.91% accuracy, while LSTM dropped to 35.07%, highlighting HMM’s data efficiency.
  • HMMs required significantly fewer parameters than LSTMs—35 for HMM vs. 4,484–12,804 for LSTMs—making them more interpretable and less prone to overfitting with small data.
  • Discretized HMMs (DHMM) achieved comparable performance to continuous HMMs (CHMM), with unsupervised DHMM reaching 64.17% accuracy (vs. 68.4% for CHMM) under the same conditions.
  • HMMs remained effective even when the Markov assumption was violated (Case IV), with supervised DHMM achieving 83.11% accuracy at 4,000 samples, outperforming LSTM’s 80.70% at the same data size.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.