title: Implementing EM and Viterbi algorithms for Hidden Markov Model in linear memory.
abstract: BACKGROUND
  The Baum-Welch learning procedure for Hidden Markov Models (HMMs) provides a powerful tool for tailoring HMM topologies to data for use in knowledge discovery and clustering. A linear memory procedure recently proposed by Miklós, I. and Meyer, I.M. describes a memory sparse version of the Baum-Welch algorithm with modifications to the original probabilistic table topologies to make memory use independent of sequence length (and linearly dependent on state number). The original description of the technique has some errors that we amend. We then compare the corrected implementation on a variety of data sets with conventional and checkpointing implementations.
  
  
  RESULTS
  We provide a correct recurrence relation for the emission parameter estimate and extend it to parameter estimates of the Normal distribution. To accelerate estimation of the prior state probabilities, and decrease memory use, we reverse the originally proposed forward sweep. We describe different scaling strategies necessary in all real implementations of the algorithm to prevent underflow. In this paper we also describe our approach to a linear memory implementation of the Viterbi decoding algorithm (with linearity in the sequence length, while memory use is approximately independent of state number). We demonstrate the use of the linear memory implementation on an extended Duration Hidden Markov Model (DHMM) and on an HMM with a spike detection topology. Comparing the various implementations of the Baum-Welch procedure we find that the checkpointing algorithm produces the best overall tradeoff between memory use and speed. In cases where sequence length is very large (for Baum-Welch), or state number is very large (for Viterbi), the linear memory methods outlined may offer some utility.
  
  
  CONCLUSIONS
  Our performance-optimized Java implementations of Baum-Welch algorithm are available at http://logos.cs.uno.edu/~achurban. The described method and implementations will aid sequence alignment, gene structure prediction, HMM profile training, nanopore ionic flow blockades analysis and many other domains that require efficient HMM training with EM.
authors.affiliation: The Research Institute for Children, 200 Henry Clay Ave, New Orleans, LA 70118, USA. achurbanov@yahoo.com
authors.forename: Alexander
authors.initials: A
authors.lastname: Churbanov
authors.forename: Stephen
authors.initials: S
authors.lastname: Winters-Hilt
mesh_terms: D000465:Algorithms; D001185:Artificial Intelligence; D016000:Cluster Analysis; D003201:Computers / Q000706:statistics & numerical data; D004247:DNA / Q000032:analysis / Q000737:chemistry / Q000648:ultrastructure*; D003627:Data Interpretation, Statistical; D017097:Electric Impedance; D016247:Information Storage and Retrieval / Q000379:methods* / Q000706:statistics & numerical data; D015640:Ion Channel Gating; D016013:Likelihood Functions; D016014:Linear Models; D008390:Markov Chains; D008958:Models, Molecular; D016571:Neural Networks, Computer; D016011:Normal Distribution; D009690:Nucleic Acid Conformation; D010363:Pattern Recognition, Automated / Q000379:methods / Q000706:statistics & numerical data; D016415:Sequence Alignment; D017422:Sequence Analysis, DNA; D012985:Software Design; D014894:Weights and Measures
chemical_list: D004247:DNA