Table of Contents

  • 1 Introduction
  • 2 The basic SNE algorithm
  • 3 Application of SNE to image and document collections
  • 4 A full mixture version of SNE
  • 5 Practical optimization strategies
  • 6 Discussion and Conclusions
  • References

Knowls

  1. Knowl 1 — Probabilistic Objective for Stochastic Neighbor Embedding

    model/method

    Given a set of nn high-dimensional data vectors x1,,xnRD\mathbf{x}_1, \dots, \mathbf{x}_n \in \mathbb{R}^D (or asymmetric pairwise dissimilarities dij2d_{ij}^2), Stochastic Neighbor Embedding (SNE) models the neighborhood identity around each point probabilistically. The asymmetric probability pjip_{j|i} that data point xi\mathbf{x}_i picks data point xj\mathbf{x}_j (jij \neq i) as its neighbor is defined as:

    pji=exp(dij2)kiexp(dik2),pii=0p_{j|i} = \frac{\exp(-d_{ij}^2)}{\sum_{k \neq i} \exp(-d_{ik}^2)}, \quad p_{i|i} = 0

    where the squared dissimilarity is typically computed as the scaled squared Euclidean distance dij2=xixj22σi2d_{ij}^2 = \frac{\|\mathbf{x}_i - \mathbf{x}_j\|^2}{2\sigma_i^2}, with σi2\sigma_i^2 being the variance of a Gaussian centered at xi\mathbf{x}_i.

    In the low-dimensional embedding space Rd\mathbb{R}^d (dDd \ll D), the induced probability qjiq_{j|i} that low-dimensional coordinate yi\mathbf{y}_i picks yj\mathbf{y}_j as its neighbor is defined using a Gaussian with fixed variance σ2=12\sigma^2 = \frac{1}{2}:

    qji=exp(yiyj2)kiexp(yiyk2),qii=0q_{j|i} = \frac{\exp(-\|\mathbf{y}_i - \mathbf{y}_j\|^2)}{\sum_{k \neq i} \exp(-\|\mathbf{y}_i - \mathbf{y}_k\|^2)}, \quad q_{i|i} = 0

    The optimal low-dimensional coordinates {yi}i=1n\{\mathbf{y}_i\}_{i=1}^n are obtained by minimizing the sum of Kullback-Leibler divergences across all data points:

    C=i=1nKL(PiQi)=i=1njipjilogpjiqjiC = \sum_{i=1}^n \text{KL}(P_i \parallel Q_i) = \sum_{i=1}^n \sum_{j \neq i} p_{j|i} \log \frac{p_{j|i}}{q_{j|i}}

    This objective penalizes modeling small high-dimensional distances with large low-dimensional distances (pjip_{j|i} large, qjiq_{j|i} small), while placing a relatively smaller penalty on modeling large high-dimensional distances with small low-dimensional distances (pjip_{j|i} small, qjiq_{j|i} large).

  2. Knowl 2 — Gradient of the SNE Objective Function

    equation

    For the Stochastic Neighbor Embedding cost function C=i=1njipjilogpjiqjiC = \sum_{i=1}^n \sum_{j \neq i} p_{j|i} \log \frac{p_{j|i}}{q_{j|i}}, the analytic gradient with respect to the low-dimensional coordinate vector yiRd\mathbf{y}_i \in \mathbb{R}^d is:

    Cyi=2ji(yiyj)(pjiqji+pijqij)\frac{\partial C}{\partial \mathbf{y}_i} = 2 \sum_{j \neq i} (\mathbf{y}_i - \mathbf{y}_j)(p_{j|i} - q_{j|i} + p_{i|j} - q_{i|j})

    where pjip_{j|i} and qjiq_{j|i} are the high-dimensional and low-dimensional conditional neighborhood probabilities, respectively:

    qji=exp(yiyj2)kiexp(yiyk2)q_{j|i} = \frac{\exp(-\|\mathbf{y}_i - \mathbf{y}_j\|^2)}{\sum_{k \neq i} \exp(-\|\mathbf{y}_i - \mathbf{y}_k\|^2)}

    The gradient represents a sum of forces pulling yi\mathbf{y}_i toward yj\mathbf{y}_j when jj is under-represented in the low-dimensional neighborhood (pji+pij>qji+qijp_{j|i} + p_{i|j} > q_{j|i} + q_{i|j}) and pushing yi\mathbf{y}_i away from yj\mathbf{y}_j when jj is over-represented (pji+pij<qji+qijp_{j|i} + p_{i|j} < q_{j|i} + q_{i|j}).

  3. Knowl 3 — Gaussian Bandwidth Calibration via Perplexity

    model/method

    To handle variations in local density across the high-dimensional dataset, the variance σi2\sigma_i^2 of the Gaussian centered at each data point xi\mathbf{x}_i is calibrated individually. The variance is set such that the Shannon entropy of the resulting distribution over neighbors PiP_i matches a target perplexity kk:

    H(Pi)=jipjilog2pji=log2kH(P_i) = -\sum_{j \neq i} p_{j|i} \log_2 p_{j|i} = \log_2 k

    where the conditional probabilities are given by:

    pji=exp(xixj22σi2)liexp(xixl22σi2)p_{j|i} = \frac{\exp\left(-\frac{\|\mathbf{x}_i - \mathbf{x}_j\|^2}{2\sigma_i^2}\right)}{\sum_{l \neq i} \exp\left(-\frac{\|\mathbf{x}_i - \mathbf{x}_l\|^2}{2\sigma_i^2}\right)}

    The hyperparameter kk is chosen by the user and represents the effective number of local neighbors. Because the entropy H(Pi)H(P_i) is a strictly monotonic function of σi\sigma_i, the required value of σi\sigma_i for each point is found efficiently via binary search.

  4. Knowl 4 — Mixture Stochastic Neighbor Embedding for Multi-Valued Representations

    model/method

    To represent ambiguous objects (such as homonyms or manifold intersections) that map naturally to multiple distinct low-dimensional locations, SNE extends each high-dimensional object ii to possess BB low-dimensional image locations {yib}b=1B\{\mathbf{y}_{i_b}\}_{b=1}^B with mixing proportions {πib}b=1B\{\pi_{i_b}\}_{b=1}^B satisfying b=1Bπib=1\sum_{b=1}^B \pi_{i_b} = 1 and πib0\pi_{i_b} \ge 0.

    The low-dimensional neighborhood conditional probability qjiq_{j|i} is defined as a mixture across all image versions of object ii and all image versions of object jj:

    qji=b=1Bπibc=1Bπjcexp(yibyjc2)kid=1Bπkdexp(yibykd2)q_{j|i} = \sum_{b=1}^B \pi_{i_b} \sum_{c=1}^B \frac{\pi_{j_c} \exp(-\|\mathbf{y}_{i_b} - \mathbf{y}_{j_c}\|^2)}{\sum_{k \neq i} \sum_{d=1}^B \pi_{k_d} \exp(-\|\mathbf{y}_{i_b} - \mathbf{y}_{k_d}\|^2)}

    Defining ribjcr_{i_b j_c} as the probability that version bb of object ii picks version cc of object jj as its neighbor:

    ribjc=πjcexp(yibyjc2)kid=1Bπkdexp(yibykd2)r_{i_b j_c} = \frac{\pi_{j_c} \exp(-\|\mathbf{y}_{i_b} - \mathbf{y}_{j_c}\|^2)}{\sum_{k \neq i} \sum_{d=1}^B \pi_{k_d} \exp(-\|\mathbf{y}_{i_b} - \mathbf{y}_{k_d}\|^2)}

    the mixture probability can be written concisely as qji=b=1Bπibc=1Bribjcq_{j|i} = \sum_{b=1}^B \pi_{i_b} \sum_{c=1}^B r_{i_b j_c}.

  5. Knowl 5 — Parameter Derivatives and Softmax Optimization for Mixture SNE

    equation

    In the mixture formulation of Stochastic Neighbor Embedding, the derivative of the cost function C=ijipjilogpjiqjiC = \sum_i \sum_{j \neq i} p_{j|i} \log \frac{p_{j|i}}{q_{j|i}} with respect to the mixing proportion πmg\pi_{m_g} of version gg of object mm is given by:

    Cπmg=ijipjiqjiqjiπmg\frac{\partial C}{\partial \pi_{m_g}} = -\sum_i \sum_{j \neq i} \frac{p_{j|i}}{q_{j|i}} \frac{\partial q_{j|i}}{\partial \pi_{m_g}}

    where the derivative of the low-dimensional neighborhood distribution qjiq_{j|i} with respect to πmg\pi_{m_g} is:

    qjiπmg=δmicrmgjc+bπibπmgribmg[δmjcribjc]\frac{\partial q_{j|i}}{\partial \pi_{m_g}} = \delta_{mi} \sum_c r_{m_g j_c} + \sum_b \frac{\pi_{i_b}}{\pi_{m_g}} r_{i_b m_g} \left[\delta_{mj} - \sum_c r_{i_b j_c}\right]

    where δab=1\delta_{ab} = 1 if a=ba = b and 00 otherwise, and ribjc=πjcexp(yibyjc2)kidπkdexp(yibykd2)r_{i_b j_c} = \frac{\pi_{j_c} \exp(-\|\mathbf{y}_{i_b} - \mathbf{y}_{j_c}\|^2)}{\sum_{k \neq i} \sum_d \pi_{k_d} \exp(-\|\mathbf{y}_{i_b} - \mathbf{y}_{k_d}\|^2)}.

    To ensure positivity and summation to 1 without constrained optimization, mixing proportions are parameterized via softmax weights wibRw_{i_b} \in \mathbb{R}:

    πib=exp(wib)bexp(wib)\pi_{i_b} = \frac{\exp(w_{i_b})}{\sum_{b'} \exp(w_{i_{b'}})}

  6. Knowl 6 — Stochastic Neighbor Embedding Optimization Procedure

    algorithm

    SNE computes low-dimensional coordinates yi\mathbf{y}_i using batch gradient descent combined with decaying additive Gaussian jitter to escape poor local minima.

    Input: High-dimensional points {x_i}_{i=1}^n subset R^D, perplexity k, learning rate \eta, initial jitter std \sigma_jitter, jitter iterations T_jitter, total iterations T
    Output: Low-dimensional points {y_i}_{i=1}^n subset R^d
    for each point i = 1 to n:
        Find \sigma_i via binary search such that -\sum_{j != i} p_{j|i} log_2 p_{j|i} = log_2 k
        for each point j != i:
            p_{j|i} = exp(-||x_i - x_j||^2 / (2 \sigma_i^2)) / \sum_{l != i} exp(-||x_i - x_l||^2 / (2 \sigma_i^2))
        p_{i|i} = 0
    Initialize each y_i randomly in R^d close to the origin
    for iteration t = 1 to T:
        for each pair (i, j) with j != i:
            q_{j|i} = exp(-||y_i - y_j||^2) / \sum_{l != i} exp(-||y_i - y_l||^2)
        for each point i = 1 to n:
            g_i = 2 \sum_{j != i} (y_i - y_j) (p_{j|i} - q_{j|i} + p_{i|j} - q_{i|j})
            y_i = y_i - \eta * g_i
            if t <= T_jitter:
                Sample \epsilon_i ~ Normal(0, \sigma_jitter^2 I_d)
                y_i = y_i + \epsilon_i
    return {y_i}_{i=1}^n

    In standard USPS digit experiments (n=3000,d=2n = 3000, d = 2), the hyperparameters were η=0.2\eta = 0.2, σjitter=0.3\sigma_{\text{jitter}} = 0.3 for Tjitter=3500T_{\text{jitter}} = 3500 iterations, followed by σjitter=0\sigma_{\text{jitter}} = 0 for an additional 500 iterations (T=4000T = 4000).

  7. Knowl 7 — Large-Variance Limit of SNE as Metric Mismatch Minimization

    theoretical result

    When the high-dimensional Gaussian variance σi2\sigma_i^2 \to \infty, the distribution over high-dimensional neighbors PiP_i approaches a uniform distribution. In this high-variance regime, minimizing the SNE Kullback-Leibler cost function is mathematically equivalent to minimizing the squared distance mismatch between high- and low-dimensional representations, centered by their antigeometric means:

    Mismatch=i=1nj=1n[(dij2gi2)(d~ij2g~i2)]2\text{Mismatch} = \sum_{i=1}^n \sum_{j=1}^n \left[(d_{ij}^2 - g_i^2) - (\tilde{d}_{ij}^2 - \tilde{g}_i^2)\right]^2

    where nn is the total number of objects, and the scaled squared distances and antigeometric means are defined as:

    dij2=xixj2σ2,gi2=logkiexp(dik2)n1d_{ij}^2 = \frac{\|\mathbf{x}_i - \mathbf{x}_j\|^2}{\sigma^2}, \quad g_i^2 = -\log \sum_{k \neq i} \frac{\exp(-d_{ik}^2)}{n-1}

    d~ij2=yiyj2σ2,g~i2=logkiexp(d~ik2)n1\tilde{d}_{ij}^2 = \frac{\|\mathbf{y}_i - \mathbf{y}_j\|^2}{\sigma^2}, \quad \tilde{g}_i^2 = -\log \sum_{k \neq i} \frac{\exp(-\tilde{d}_{ik}^2)}{n-1}

    This equivalence links SNE in its large-variance limit to stress objective functions used in nonmetric multidimensional scaling (MDS).

  8. Knowl 8 — SNE Dimension Reduction on USPS Handwritten Digit Bitmaps

    empirical result

    SNE was evaluated on 3000 grayscale 16×1616 \times 16 pixel digit bitmaps (D=256D = 256) from the USPS database, comprising 600 examples from each of five classes (0, 1, 2, 3, 4), embedded into d=2d = 2 dimensions with perplexity k=15k = 15.

    Key empirical findings:

    • SNE separated the five digit classes into cleanly segregated clusters without access to class labels, while smoothly ordering continuous within-class geometric variations (orientation, skew, stroke thickness) across the 2D plane.
    • The SNE cost function converged to a value of 6719 nats6719\text{ nats}, compared to a theoretical baseline cost of 3000loge(2999/15)15894 nats3000 \log_e(2999/15) \approx 15894\text{ nats} under a uniform low-dimensional neighbor distribution.
    • In comparison, Principal Component Analysis (PCA) projection onto the first two principal components failed to separate classes cleanly and jumbled boundaries between similar classes because PCA optimizes global variance preservation rather than local neighborhood preservation.
  9. Knowl 9 — Mixture SNE Separation of Hybrid Ambiguous Objects and Topology Unfolding

    empirical result

    A simplified mixture SNE model was evaluated where each object had exactly two low-dimensional components (B=2B=2) with equal mixing proportions πi1=πi2=0.5\pi_{i_1} = \pi_{i_2} = 0.5, constrained by an attractive spring force pulling the two components together with a force increasing linearly up to a separation threshold of 0.05 (with a force of 0.025 nats per unit length at threshold) and remaining constant beyond it.

    Two experiments demonstrated its properties:

    1. Hybrid Digit Disambiguation: Tested on 300 USPS digits (100 each of classes 2, 3, 4) plus 100 synthetic hybrid digits generated by randomly sampling pixels from two different parent classes (perplexity k=10k = 10, gradient multiplier 0.7, constant jitter 0.05). After optimization, 66%66\% of the hybrid digits had their two mixture components placed in widely separated locations corresponding precisely to the two parent digit clusters (and never in the third class cluster), compared to only 19%19\% of non-hybrid digits having separated components.
    2. Circle-to-Line Unfolding: Mixture SNE mapped a 2D circle onto a 1D line without altering neighbor relationships by splitting the point at the cut into two mixture components located at opposite ends of the line.
  10. Knowl 10 — Author-Topic Mapping on NIPS Conference Text Corpus

    empirical result

    SNE was applied to embed 676 authors who published more than one paper in NIPS volumes 0--12 into d=2d = 2 dimensions based on log aggregate author word counts.

    Experimental setup and results:

    • Representation: Author representations were generated from a vocabulary of 13,649 non-stop words appearing in 6\ge 6 papers, with co-authored counts allocated fractionally. Distances dijd_{ij} were calculated as the Euclidean norm of differences between log aggregate word-count vectors.
    • Hyperparameter: Perplexity was set to k=25k = 25 neighbors.
    • Outcome: SNE mapped authors into distinct spatial clusters that corresponded cleanly to broad research subfields, including generative models, support vector machines, neuroscience, reinforcement learning, and VLSI.
  11. Knowl 11 — SNE Computational Complexity and Proposed Acceleration Strategies

    limitation

    The standard SNE gradient evaluation requires O(n2)O(n^2) operations per iteration due to all-pairs normalization in qjiq_{j|i} and force updates, requiring several hours of computation for n=3000n = 3000 points under gradient descent with noise annealing.

    The paper proposes three strategies to accelerate and improve optimization:

    1. Sparsification: Since high-dimensional probabilities pjip_{j|i} are static, values below a threshold can be zeroed out and renormalized. Point pairs where both pji=0p_{j|i} = 0 and pij=0p_{i|j} = 0 can be ignored in gradient calculations when both qjiq_{j|i} and qijq_{i|j} are also small.
    2. Spatial Data Structures: Identifying pairs with negligible qjiq_{j|i} can be performed in O(logn)O(\log n) time using geometric spatial trees (e.g., K-D trees, ball-trees, AD-trees) or fast multipole algorithms from NN-body physics.
    3. Perplexity Annealing and Extra Dimensions: Gradually annealing the perplexity kk from large to small values, or optimizing in extra dimensions with an increasing penalty on non-zero coordinates, helps circumvent low-dimensional topological barriers without getting trapped in local optima.

Coverage note — The brief conceptual discussion interpreting SNE as a special case of Linear Relational Embedding (LRE) with an identity relation matrix was omitted as it is an interpretive analogy rather than a concrete contributed model or result.

References

  1. 1.T. Cox and M. Cox. Multidimensional Scaling. Chapman & Hall, London, 1994.
  2. 2.J. Tenenbaum. Mapping a manifold of perceptual observations. In Advances in Neural Information Processing Systems, volume 10, pages 682–688. MIT Press, 1998.
  3. 3.J. B. Tenenbaum, V. de Silva, and J. C. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290:2319–2323, 2000.
  4. 4.S. T. Roweis and L. K. Saul. Nonlinear dimensionality reduction by locally linear embedding. Science, 290:2323–2326, 2000.
  5. 5.T. Kohonen. Self-organization and Associative Memory. Springer-Verlag, Berlin, 1988.
  6. 6.C. Bishop, M. Svensen, and C. Williams. GTM: The generative topographic mapping. Neural Computation, 10:215, 1998.
  7. 7.J. J. Hull. A database for handwritten text recognition research. IEEE Transaction on Pattern Analysis and Machine Intelligence, 16(5):550–554, May 1994.
  8. 8.I. T. Jolliffe. Principal Component Analysis. Springer-Verlag, New York, 1986.
  9. 9.Yann LeCun. Nips online web site. http://nips.djvuzone.org, 2001.
  10. 10.Andrew Kachites McCallum. Bow: A toolkit for statistical language modeling, text retrieval, classification and clustering. http://www.cs.cmu.edu/ mccallum/bow, 1996.
  11. 11.A. Paccanaro and G.E. Hinton. Learning distributed representations of concepts from relational data using linear relational embedding. IEEE Transactions on Knowledge and Data Engineering, 13:232–245, 2000.

Citation

MLA
Hinton, G. E., and S. T. Roweis. “Stochastic Neighbor Embedding”. Neural Information Processing Systems, vol. 15, 2002, pp. 857–64, http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.7959.
APA
Hinton, G. E., & Roweis, S. T. (2002). Stochastic Neighbor Embedding. Neural Information Processing Systems, 15, 857–864. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.7959
Chicago
Hinton, G. E., and S. T. Roweis. 2002. “Stochastic Neighbor Embedding”. Neural Information Processing Systems 15: 857–64. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.7959.
Harvard
Hinton, G.E. and Roweis, S.T. (2002) “Stochastic Neighbor Embedding”, Neural Information Processing Systems, 15, pp. 857–864. Available at: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.7959.
Vancouver
1. Hinton GE, Roweis ST (2002) Stochastic Neighbor Embedding. Neural Information Processing Systems 15:857–864

BibTeX

@article{hinton2002stochastic,
  title = {Stochastic Neighbor Embedding},
  author = {Hinton, Geoffrey E. and Roweis, Sam T.},
  year = {2002},
  journal = {Neural Information Processing Systems},
  volume = {15},
  pages = {857-864},
  url = {http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.7959}
}
Metadata:DOI registry

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF

License: Published with permission