liveBook · Manning

Embedding

As explained in Sutskever's List

A vector is a one-dimensional ordered collection of numerical values.

An embedding is a learned vector: an ordered list of numbers used to represent an item inside a model. A vector is one-dimensional; put one vector per row and the result is a matrix. The numbers are learned coordinates, not labels a person assigns to features by hand. section 5.1 section 6.3

Why learn the coordinates? Hand-designed image features such as HOG could make an irrelevant pattern of rippled water look car-like. A classifier might then separate its inputs faithfully while still making the wrong prediction: the representation had already confused the signal. Learned features offer a way to revise what the model measures, though they depend on data and are harder to interpret. section 2.1

For text, an embedding layer is a learned lookup table. Tokenization first turns text into vocabulary IDs, which carry no meaning by themselves. Looking up each ID replaces it with a vector. The original Transformer used 512 numbers per token; a sequence of tokens therefore became a matrix with one row per token and 512 columns. Attention could then combine those representations to make each token’s representation sensitive to its context. section 5.1

A word-vector analogy

Word2vec, introduced by Tomas Mikolov, Ilya Sutskever, and colleagues in 2013, learned word vectors from large text collections. Words used in similar contexts could lie close together. The illustrative operation Paris − France + Italy can point toward Rome, or toward a vector closer to Rome than to unrelated words. It shows a useful regularity in learned coordinates, not proof that vector arithmetic amounts to human-like reasoning. section 5.3

Figure 5.4 Word-embedding vector operations: Paris – France + Italy = Rome
figure

The diagram makes the Paris − France + Italy = Rome analogy visible as operations on word-embedding vectors. section 5.3

Not every vector in a language model plays the same role. An RNN’s changing hidden state carries context forward through a sequence. An early encoder–decoder instead compressed an entire input sentence into one fixed-length context or “thought vector” for its decoder. That created a bottleneck as sentences grew: a useful vector can still lose details when asked to hold too much. Attention offered a way to draw selectively on representations rather than depend on that single compressed summary. section 4.1 section 5.3

How Sutskever's List covers it

How deep it goes
Defines vector lookup, dimensions, and the resulting token matrix; illustrates word-vector arithmetic without deriving embedding training.
Examples
Uses a token-ID lookup and the Paris − France + Italy ≈ Rome analogy to make learned coordinates concrete.
What it assumes
Builds from token IDs and explains a vector as a list of numbers and a matrix as a grid.
What you can do after
Evaluate/understand how learned vectors supply model inputs and why one fixed-length vector can become a sequence bottleneck.
How it connects
Connects embeddings to feature engineering, tokenization, self-attention, recurrent hidden states, and encoder–decoder context vectors.

Also explained in

Compare how 47 books explain embedding →

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.