Data visualization with kNN t-SNE
Fatima Shifali, Mohammad QayyoomIntroduction/Purpose: High-dimensional datasets often lie on nonlinear manifolds, where standard techniques like<i> t-</i>SNE, is unable to recover the basic geometric structure. We propose a geodesic-based extension of the <i>t</i>-SNE algorithm, which replaces Euclidean distances with pairwise geodesic distances computed via shortest paths on a k-nearest neighbor graph. Using random initialization and precomputed geodesic metrics, the method keeps up relationships in the embedding. Experiments with manifold-structured datasets show that the quality of the visualizations is better because they show structures that regular <i>t</i>-SNE distorts. Method: A modification to the <i>t</i>-distributed Stochastic Neighbor Embedding (<i>t</i>-SNE) algorithm wherein the standard use of pairwise Euclidean distances is replaced by approximate geodesic distances computed over a k-nearest neighbor graph. Result: The result shows better performance of kNN-based<i> t-</i>SNE, compared to standard <i>t-</i>SNE. Conclusion: A Riemannian variant of <i>t-</i>SNE that leverages localized neighborhood structures via k-nearest neighbors and adapts gradient updates to respect the geometry of underlying manifolds. By relying on sparse affinity computation and geodesic-aware optimization, the method retains both fine-grained local relationships and larger-scale cluster separation, while significantly reducing memory and computational overhead compared to classical<i> t</i>-SNE. The algorithm is especially suited to high-dimensional, non-Euclidean data and demonstrates consistent performance across a range of geometrically structured datasets. Empirical results validate that our approach produces more stable and interpretable visualizations while preserving the manifold-aware relational topology.