TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Steve's Explanation of the Viterbi Algorithm (2003)

71 pointsby gballanover 1 year ago

8 comments

jll29over 1 year ago
The best introduction to HMMs and the Viterbi algorithm is the classical tutorial by Rabiner ( see e.g. <a href="https:&#x2F;&#x2F;www.cs.ubc.ca&#x2F;~murphyk&#x2F;Bayes&#x2F;rabiner.pdf" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.cs.ubc.ca&#x2F;~murphyk&#x2F;Bayes&#x2F;rabiner.pdf</a> ).<p>What is missing from Steve&#x27;s clear explanation is (1) a graphic depiction of the central data structure called the &quot;trellis&quot; (Fig. 6 in the above paper) and (2) a citation to the original Viterbi paper [1].<p>For many years, HMMs - together with a Viterbi triphone decoder - defined the state of the art in ASR (automatic speech recognition), until eventually, neural networks took over.<p>[1] A. J. Viterbi, “Error bounds for convolutional codes and an asymptotically optimum decoding algorithm,” IEEE Trans. Inform. Theory, vol. IT-13, pp. 260-269, Apr. 1967.
apitmanover 1 year ago
My favorite story about Viterbi encoding is that apparently they launched the Voyager probe with a Viterbi encoder even though at the time there wasn&#x27;t a computer on Earth capable of decoding it in real time (encoding is less computationally intensive than decoding). Years later they remotely switched over to Viterbi to enable higher bitrates.
abhayhegdeover 1 year ago
This is very much like the least action principle [0]. The optimal path between two points is the combination of optimal paths between the starting and an intermediate, and the intermediate and end points.<p>[0]: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Stationary-action_principle" rel="nofollow noreferrer">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Stationary-action_principle</a>
the-smug-oneover 1 year ago
<i>The</i> text for understanding and implementing HMMs is &quot;A Revealing Introduction to Hidden Markov Models&quot; by Mark Stamp, the content is a google away!
评论 #37889577 未加载
albertzeyerover 1 year ago
Viterbi algorithm, Baum Welch algorithm, forward-backward algorithm, beam search, etc, are all very closely related, all using basically the same kind of dynamic programming. Viterbi calculates the max and argmax, Baum Welch (forward-backward) calculates the sum (forward) and then also the posteriors (backward). The difference is just the max vs sum. And to get the argmax, you would just backtrack. Beam search is an approximation for the max and argmax.<p>Btw, using automatic differentiation, just calculating the forward scores (sum) is enough, automatic differentiation will then automatically lead to the backward pass.<p>This is not just for HMMs but it applies to many kinds of search. Naturally for CTC (can be seen as a simple special case of HMM), transducer, but also encoder-decoder or decoder-only (language) models, and more.
评论 #37897328 未加载
deanCommieover 1 year ago
The analogy doesn&#x27;t make sense for me. What if the shortest path from Waterloo to New York doesn&#x27;t go through Toronto?<p>And if the point is that you already know that it does, then....the rest is beyond obvious?<p>What am I missing?
评论 #37887736 未加载
swframe2over 1 year ago
This youtube channel intuitively explains algorithms on a whiteboard: <a href="https:&#x2F;&#x2F;youtu.be&#x2F;IqXdjdOgXPM" rel="nofollow noreferrer">https:&#x2F;&#x2F;youtu.be&#x2F;IqXdjdOgXPM</a>
gumbyover 1 year ago
The classic failure of this approach is a form of the hill climbing problem (fastest way from Cambridge to Palo Alto is to start driving <i>east</i> to the airport).
评论 #37888533 未加载