Deep learning

Embedding

An embedding maps a discrete item to a learned dense vector.

catdogpuppycartruckSimilar meanings sit close together in vector space.
An embedding maps a discrete item to a learned dense vector. Values shown in the worked visual are illustrative unless the labels state otherwise.

How it works

Training arranges vectors so useful relationships become accessible through geometry. Tokens, products, users, and graph nodes can all receive embeddings.

A concrete example

Illustrative: token 418 maps to a 768-value vector; two related vectors have cosine similarity 0.82.

Do not confuse it with One-hot encoding

one-hot vectors are fixed and sparse; embeddings are learned and dense.

Study the full lesson