liveBook · Manning

Beam search

As explained in Sutskever's List

Beam search is a sequence-decoding algorithm that retains a fixed-size set of high-scoring partial candidates at each expansion step.

When a speech recognizer chooses only the most likely next word, an early mistake can rule out a better transcript. Beam search keeps a shortlist of promising partial transcripts, extending and rescoring them as new audio arrives. In Deep Speech 2, scores combined an acoustic model with a language model that favored plausible words and phrases. section 4.4.3

The decoding trade-off is practical:

  • Greedy decoding is fast but commits to one option at each step; beam search preserves alternatives and selects the highest-scoring complete sentence. section 4.4.3
  • Heuristic pruning discards candidates far behind the leaders. Deep Speech 2 retained up to 500 English or 200 Mandarin partial transcripts per expansion, limiting costly searches through unlikely candidates. section 4.4.3

Why prune?

For Mandarin, many characters share a sound, enlarging the search space. Pruning keeps the leading transcript candidates in play without exploring every possibility. section 4.4.3

How Sutskever's List covers it

How deep it goes
Explains candidate expansion, acoustic and language-model scoring, and pruning, without giving formal scoring equations.
Examples
Uses Deep Speech 2’s English and Mandarin beam sizes and Mandarin’s shared-sound search challenge.
What you can do after
Understand how retaining and pruning alternatives trades decoding cost against transcript quality.
How it connects
Connects greedy decoding, acoustic models, language models, and automatic speech recognition.

Also explained in

Compare how 5 books explain beam search →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Sutskever's List. The section links point to the parts of the book it draws on.