You are on page 1of 2

AI MATTERS, VOLUME 4, ISSUE 1 4(1) 2018

AI Education Matters: Teaching Hidden Markov Models


Todd W. Neller (Gettysburg College; tneller@gettysburg.edu)
DOI: 10.1145/3203247.3203252

Introduction Of the many options to give focused atten-


tion to HMMs, consider Speech and Language
In this column, we share resources for learn- Processing by Daniel Jurafsky and James H.
ing about and teaching Hidden Markov Mod- Martin (Jurafsky & Martin, 2009). The draft
els (HMMs). HMMs find many important appli- third edition chapter 9 on HMMs is currently
cations in temporal pattern recognition tasks freely available from Jurafsky’s website3 .
such as speech/handwriting/gesture recogni-
tion and robot localization. In such domains, Also often recommended is Lawrence Ra-
we may have a finite state machine model with biner’s tutorial (Rabiner, 1990)4 .
known state transition probabilities, state out- Christopher Bishop’s Pattern Recognition and
put probabilities, and state outputs, but lack Machine Learning (Bishop, 2006) §13.2 cov-
knowledge of the states generating such out- ers HMMs, maximum likelihood parameter es-
puts. HMMs are useful in framing problems timation, the forward-backward algorithm, the
where external sequential evidence is used sum-product algorithm, the Viterbi algorithm,
to derive underlying state information (e.g. in- and extensions to HMMs.
tended words and gestures).
More text and article resources have been rec-
ommended in the StackExchange thread “Re-
Video Introductions sources for learning Markov chain and hidden
Markov models”5 .
While there are many videos online dedicated
to the topic of HMMs, I’ll highlight two here.
Daphne Koller’s 12-minute video“Template Other Resources
Models: Hidden Markov Models - Stan-
ford University”1 provides a brief application- Numerous MOOCs touch on HMMs. Udac-
focused overview of HMMs and can set a ba- ity’s “Intro to Artificial Intelligence” course by
sic context and expectation for the value of fur- Peter Norvig and Sebastian Thrun has cover-
ther learning in this area. age of HMMs6 , as does “Artificial Intelligence
A full 52-minute UBC lecture by Nando de - Probabalistic Models”7 . In Coursera’s Peking
Freitas, “undergraduate machine learning 9: Univeristy Bioinformatics course, Ge Gao lec-
tures on HMMs8 . There is no shortage of on-
Hidden Markov models - HMM”2 , is a much-
line course materials for HMMs.
recommended classroom introduction to the
general topic of inference in probabilistic 3
https://web.stanford.edu/
graphical models, with focus on HMM repre- ˜ jurafsky/slp3/9.pdf
sentation, prediction, and filtering. 4
http://www.ece.ucsb.edu/Faculty/
Rabiner/ece259/Reprints/tutorial%
20on%20hmm%20and%20applications.pdf
Texts and Articles 5
https://stats.stackexchange
.com/questions/3294/resources-for
Russell and Norvig’s Artificial Intelligence: a -learning-markov-chain-and-hidden
modern approach (Russell & Norvig, 2009) -markov-models
gives a brief introduction to HMMs in §15.3, 6
https://www.udacity.com/course/
and learning HMMs as an application of the intro-to-artificial-intelligence-
expectation-maximization (EM) algorithm is -cs271
7
described in §20.3.3. https://www.udacity.com/course/
probabalistic-models--cx27
Copyright
c 2018 by the author(s). 8
https://www.coursera.org/learn/
1
https://youtu.be/mNSQ-prhgsw bioinformatics-pku/lecture/7pbUo/
2
https://youtu.be/jY2E6ExLxaw hidden-markov-model

21
AI MATTERS, VOLUME 4, ISSUE 1 4(1) 2018

Jason Eisner has written about his spread- Your Favorite Resources?
sheet9 for teaching the forward-backward al-
gorithm (Eisner, 2002). More diverse re- If there are other resources you would rec-
sources, including toolkits and open-source ommend, we invite you to register with
algorithm implementations, may be sampled our wiki and add them to our collec-
via the Quora question “What are some good tion at http://cs.gettysburg.edu/ai
resources for learning about Hidden Markov -matters/index.php/Resources.
Models?”10 .
References

Model AI Assignments Bishop, C. M. (2006). Pattern recognition


and machine learning (information sci-
Model AI Assignments are free, peer-reviewed ence and statistics). Secaucus, NJ, USA:
assignment materials made available in order Springer-Verlag New York, Inc.
to advance AI education. Two Model AI As- Eisner, J. (2002). An interactive spread-
signments to date experientially teach HMMs: sheet for teaching the forward-backward
algorithm. In Proceedings of the acl-
Sravana Reddy’s recent Model AI Assign- 02 workshop on effective tools and
ment “Implementing a Hidden Markov Model methodologies for teaching natural lan-
Toolkit”11 is targeted to advanced undergrad- guage processing and computational
uates and beginning graduate students seek- linguistics - volume 1 (pp. 10–18).
ing an introduction to Natural Language Pro- Stroudsburg, PA, USA: Association for
cessing (NLP). In the assignment, students Computational Linguistics. Retrieved
“implement a toolkit for Hidden Markov Mod- from https://cs.jhu.edu/˜jason/
els with discrete outputs, including (1) ran- papers/eisner.tnlp02.pdf
dom sequence generation, (2) computing the Jurafsky, D., & Martin, J. H. (2009). Speech
marginal probability of a sequence with the and language processing (2nd ed.). Up-
forward and backward algorithms, (3) comput- per Saddle River, NJ, USA: Prentice
ing the best state sequence for an observa- Hall.
tion with the Viterbi algorithm, and (4) super- Rabiner, L. R. (1990). A tutorial on hidden
vised and unsupervised maximum likelihood markov models and selected applica-
estimation of the model parameters from ob- tions in speech recognition. In A. Waibel
servations, using the Baum Welch algorithm & K.-F. Lee (Eds.), Readings in speech
for unsupervised learning.” recognition (pp. 267–296). San Fran-
cisco, CA, USA: Morgan Kaufmann.
John DeNero and Dan Klein’s popular Model
Russell, S., & Norvig, P. (2009). Artificial in-
AI Assignment “The Pac-Man Projects” has
telligence: A modern approach (3rd ed.).
a probabilistic tracking project, “Project #4:
Upper Saddle River, NJ, USA: Prentice
Ghostbusters”12 in which “probabilistic infer- Hall.
ence in a hidden Markov model tracks the
movement of hidden ghosts in the Pac-Man
world. Students implement exact inference
using the forward algorithm and approximate Todd W. Neller is a Pro-
inference via particle filters.” fessor of Computer Sci-
ence at Gettysburg Col-
9
http://cs.jhu.edu/˜jason/papers/ lege. A game enthu-
eisner.hmm.xls siast, Neller researches
10 game AI techniques and
https://www.quora.com/What-are
-some-good-resources-for-learning their uses in undergradu-
-about-Hidden-Markov-Models ate education.
11
http://modelai.gettysburg.edu/
2017/hmm
12
http://modelai.gettysburg.edu/
2010/pacman/projects/tracking/
busters.html

22

You might also like