1 / 26

Accelerating Viterbi Algorithm

Accelerating Viterbi Algorithm. 20120814 Pei- Ching Li. Outline. Introduction of Viterbi Algorithm Example Architecture Parallel on CUDA MIDI hmmtrain Future Works. Introduction of Viterbi Algorithm.

kaiya
Download Presentation

Accelerating Viterbi Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Accelerating Viterbi Algorithm 20120814 Pei-Ching Li

  2. Outline • Introduction of ViterbiAlgorithm • Example • Architecture • Parallel on CUDA • MIDI • hmmtrain • Future Works

  3. Introduction of Viterbi Algorithm • a dynamic programming algorithm for finding the most likely sequence of hidden states called the Viterbi path. • Hidden Markov Model

  4. Example O = Walk->Walk->Shop->Clean

  5. Example O = Walk->Walk->Shop->Clean

  6. Example O = Walk->Walk->Shop->Clean

  7. Example O = Walk->Walk->Shop->Clean

  8. Example O = Walk->Walk->Shop->Clean S = Sunny->Sunny->Rainy->Rainy

  9. Parallel Part • CSE551 Final Project: Parallel Viterbi on a GPU • Authors:Seong Jae Lee, MiroEnev • Provenance:Autumm 2009, University of Washington

  10. Architecture • Input • transition probability • emission probability • Algorithm • hmmgenerate • hmmviterbi • accuracy of hmmviterbi

  11. Matlab 2011 • [SEQ, STATES] = HMMGENERATE(LEN,TRANSITIONS,EMISSIONS) • STATES = HMMVITERBI(SEQ,TRANSITIONS,EMISSIONS) • Use MATLAB Coder to generate C/C++ code

  12. Parallel on CUDA • Focus on hmmviterbi() to accelerate • Calculate the values • Choose the maximum • reduction

  13. Parallel on CUDA (2nd version)

  14. Parallel on CUDA

  15. MIDI • Score: • Length : 1 second • Hmmtrain :   • unknown states • initial guesses for TRANS and EMIS hmmtrain (seq, TRANS_GUESS, EMIS_GUESS)

  16. hmmtrain(seq, TRANS_GUESS, EMIS_GUESS) • TRANS_GUESS : 12x12 • C → D, D → E, E → F, F → G 0.8 • Others random • EMIS_GUESS : played or not • 0.9 vs. 0.1 • Not accepted

  17. hmmtrain(seq, TRANS_GUESS, EMIS_GUESS) • seq • Source • Output of band-pass filter • Hmmtrain will use algo. • BaumWelch : hmmdecode •  Calculates the posterior state probabilities of a sequence of emissions • Viterbi : hmmviterbi

  18. hmmtrain • The results of models have big difference than the guess! • Can’t use the results to get the great states when running Viterbi algorithm.

  19. Future Works • Finish the 3rd version. • Modify the guess models to get the better result!

  20. Thank you

  21. Appendix 1 : O(nm2) • n stands for the number of observations • m is the number of possible states of an observation

  22. Appendix 2 : Reference • CSE551 Final Project: Parallel Viterbi on a GPU • Authors:Seong Jae Lee, MiroEnev • Provenance:Autumm 2009, University of Washington

  23. Appendix 2 : CSE551 Final Project : Parallel Viterbi on a GPU

  24. Appendix 2 : CSE551 Final Project : Parallel Viterbi on a GPU

  25. Appendix 3 : Auto-generated Probability Models • Random + constraint • tmp = (float)rand() / (float)RAND_MAX; • prob = (tmp <= constraint) ? 0 : tmp; • Guarantee probability of each row equals 1. • Verify the sequence conformed to the models. • hmmestimate(seq, states)

  26. Appendix 3 : Auto-generated Probability Models • Viterbi algorithm • when back tracing the likely states, avoid to save the 0 state • (rand() % N) + 1

More Related