Trisha Shetty (Editor)

T distributed stochastic neighbor embedding

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
T-distributed stochastic neighbor embedding

t-distributed stochastic neighbor embedding (t-SNE) is a machine learning algorithm for dimensionality reduction developed by Geoffrey Hinton and Laurens van der Maaten. It is a nonlinear dimensionality reduction technique that is particularly well-suited for embedding high-dimensional data into a space of two or three dimensions, which can then be visualized in a scatter plot. Specifically, it models each high-dimensional object by a two- or three-dimensional point in such a way that similar objects are modeled by nearby points and dissimilar objects are modeled by distant points.

Contents

The t-SNE algorithm comprises two main stages. First, t-SNE constructs a probability distribution over pairs of high-dimensional objects in such a way that similar objects have a high probability of being picked, whilst dissimilar points have an extremely small probability of being picked. Second, t-SNE defines a similar probability distribution over the points in the low-dimensional map, and it minimizes the Kullback–Leibler divergence between the two distributions with respect to the locations of the points in the map. Note that whilst the original algorithm uses the Euclidean distance between objects as the base of its similarity metric, this should be changed as appropriate.

t-SNE has been used in a wide range of applications, including computer security research, music analysis, cancer research, bioinformatics, and biomedical signal processing.

Details

Given a set of N high-dimensional objects x 1 , , x N , t-SNE first computes probabilities p i j that are proportional to the similarity of objects x i and x j , as follows:

p j i = exp ( x i x j 2 / 2 σ i 2 ) k i exp ( x i x k 2 / 2 σ i 2 ) , p i j = p j i + p i j 2 N

The bandwidth of the Gaussian kernels σ i , is set in such a way that the perplexity of the conditional distribution equals a predefined perplexity using a binary search. As a result, the bandwidth is adapted to the density of the data: smaller values of σ i are used in denser parts of the data space.

t-SNE aims to learn a d -dimensional map y 1 , , y N (with y i R d ) that reflects the similarities p i j as well as possible. To this end, it measures similarities q i j between two points in the map y i and y j , using a very similar approach. Specifically, q i j is defined as:

q i j = ( 1 + y i y j 2 ) 1 k m ( 1 + y k y m 2 ) 1

Herein a heavy-tailed Student-t distribution (with one-degree of freedom, which is the same as a Cauchy distribution) is used to measure similarities between low-dimensional points in order to allow dissimilar objects to be modeled far apart in the map.

The locations of the points y i in the map are determined by minimizing the (non-symmetric) Kullback–Leibler divergence of the distribution Q from the distribution P , that is:

K L ( P | | Q ) = i j p i j log p i j q i j

The minimization of the Kullback–Leibler divergence with respect to the points y i is performed using gradient descent. The result of this optimization is a map that reflects the similarities between the high-dimensional inputs well.

Software

  • ELKI contains tSNE, also with Barnes-Hut approximation. https://github.com/elki-project/elki/blob/master/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/projection/TSNE.java
  • t-Distributed Stochastic Neighbor Embedding http://lvdmaaten.github.io/tsne/
  • References

    T-distributed stochastic neighbor embedding Wikipedia