From n-grams to neural language models

Count tables go dark as the context grows, and they can never tell that "dog" is like "cat". Bengio and colleagues fixed both in 2003 by giving every word a learned vector, which is where every modern language model's embedding table comes from.

45 min

After this lesson you can

  • Explain the sparsity problem of n-gram models and measure it on real text
  • Apply add-one (Laplace) smoothing and say why it is not enough
  • Describe Bengio et al.'s neural probabilistic language model, its equation and its parameter count
  • Explain how learned word vectors let a model give probability to word sequences it has never seen

In this lesson

  1. The table goes dark
  2. Patch one: smoothing
  3. The real problem: every word is a stranger
  4. The idea: give every word a vector
  5. The model, written out
  6. The road from here
  7. The code
  8. In the papers

This lesson is part of Descent Pro

Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.

Descent Pro

Start your free trial to keep reading

This lesson, and every other lesson on the route, is part of Descent Pro. Every plan starts with a free trial, and students with a .edu email get longer. Cancel before the trial ends and you pay nothing.