liveBook · Manning

Kullback–Leibler divergence

As explained in Data Without Labels

Kullback-Leibler divergence is a directed measure of the difference between two probability distributions based on their relative information content.

Kullback–Leibler divergence compares probability distributions by measuring how closely an approximation matches measured or original probabilities. In t-SNE, it compares similarity probabilities from high-dimensional and low-dimensional spaces. section 6.4 section 6.4.1

A KL divergence of zero means the two distributions are identical. The measure therefore supplies the cost that t-SNE seeks to reduce while mapping data into fewer dimensions. section 6.4.1

The t-SNE workflow applies KL divergence after constructing two probability distributions:

  • Represent nearby high-dimensional points with high conditional similarity probabilities and distant points with very small probabilities. section 6.4
  • Construct low-dimensional probabilities using the Cauchy distribution. section 6.4
  • Compare the two distributions and minimize the resulting KL cost function with gradient descent. section 6.4.1

Preserving neighborhood similarity

If two points are nearby in the original space, their conditional similarity probability should remain high in the embedding. KL divergence penalizes differences between those high-dimensional and low-dimensional probabilities. section 6.4 section 6.4.1

Figure 6.13 Comparison of Gaussian distribution vs. Cauchy distribution. (Image source: Quora)
figure

Compare the Gaussian and Cauchy distributions used when forming the high- and low-dimensional probability representations. section 6.4.1

How Data Without Labels covers it

How deep it goes
Defines zero divergence and applies the measure as a gradient-descent cost, without deriving its mathematical formula.
Examples
Uses conditional similarities for nearby and distant points, plus Gaussian-versus-Cauchy distribution comparisons.
What it assumes
Assumes probability distributions and connects optimization through gradient descent with earlier multidimensional scaling treatment.
What you can do after
Evaluate how closely low-dimensional similarity probabilities match high-dimensional probabilities in t-SNE.
How it connects
Connects probability distributions, t-SNE, SNE, Gaussian distribution, Cauchy distribution, MDS, and gradient descent.

Also explained in

Compare how 12 books explain Kullback–Leibler divergence →

Related concepts

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