Multidimensional scaling (MDS) constructs low-dimensional embeddings that approximate pairwise distances in a high-dimensional dataset. MDS exists in several flavors, with metric MDS approximating distances directly and non-metric MDS additionally optimizing for an arbitrary monotonic transformation of the high-dimensional distances. Empirically, metric MDS is known to suffer from the curse of dimensionality. Here we extend prior theoretical results for metric MDS on fully uninformative data to a more general case of finite, high-dimensional data with concentrated distances. We show that the metric MDS embeddings of such datasets stay distributionally close to the data-independent limit case. We then show that non-metric MDS is more robust to high-dimensional noise and can yield informative embeddings of such data. While existing implementations of non-metric MDS are slow, we develop a fast implementation using stochastic gradient descent in PyTorch. Using our implementation, we conduct an empirical study using multiple simulated and real-world datasets, including population-genomic and scRNA-seq data, and show that non-metric MDS can strongly outperform other methods in terms of global structure preservation.
Figures & tables
Figure 1: (a) Metric MDS of a 10000×10000 distance matrix with all off-diagonal elements equal to 1+εij with εij∼N(0,0.01) . The dashed circle has radius π/4 . (b) Radial density of points in panel (a). Linear increase corresponds to the uniform 2D density. The dashed line shows theoretical prediction.
Figure 2: (a) Leave-one-out k NN classification accuracy ( k=10 ) in MDS embeddings of noisy three-class dataset. There are n=99 points from 3 equisized classes, equidistant from each other with distance D=10 in R2 . We add d∈[1,106] noise dimensions with i.i.d. N(0,1) values. Metric and non-metric MDS are run with random initializations. Average over 10 runs. (b) Minimum d that yields the average k NN accuracy below 0.7 for D∈[3,30] .
Figure 3: Classical, metric, and non-metric MDS embeddings of the noisy blobs dataset ( n=5000 in 1002 dimensions). Values in the lower-right are triplet accuracies (see text). (b–c) Embeddings obtained using the SMACOF implementation in scikit-learn with our improvements. The dashed circle in (b) shows our theoretical prediction and has radius Dˉπ/4 , where Dˉ is the average high-dimensional pairwise distance. (d) Shepard diagram for the non-metric MDS: embedding distances plotted against normalized high-dimensional distances. Dashed line shows monotonic regression fit.
Stress-1
Runtime
Blobs
Gen.
Digits
Tasic
MNIST
Blobs
Gen.
Digits
Tasic
MNIST
n
5 000
3 450
1 797
23 822
70 000
Metric
0.40
0.41
0.33
–
–
359 s
358 s
15 s
–
–
with SGD
0.40
0.41
0.33
0.25
0.36
21 s
19 s
5 s
1 m
2 m
Non-metric
0.24
0.13
0.28
–
–
1086 s
473 s
152 s
–
–
with SGD
0.24
0.13
0.28
0.06
0.30
18 s
23 s
8 s
23 m
3 m
Table 1: Stress-1 values and runtimes using the SMACOF and SGD implementations. On all datasets, our stochastic implementation achieves the same embedding quality as the reference non-stochastic implementation while being much faster. Tasic and MNIST datasets are too large for the non-stochastic implementation. The runtimes correspond to the setup described in the text. All stress-1 values for SGD have stds 0.00; all runtimes for SGD have stds at most 1s (1m).
Figure 5: Classical, metric, and non-metric MDS embeddings of the Tasic dataset ( n=23822 in 50 dimensions). See caption of Figure 4 for explanations. Colors correspond to cell types (warm colors: inhibitory neurons; cold colors: excitatory neurons; brown/grey colors: non-neural cells). See Figure S6 for the same Shepard diagram as in (d), but colored by cell identity of cell pairs.
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
Blobs
MNIST
Time
Stress-1
Time
Stress-1
Once every 100 epochs
22 ± 0 s
0.245 ± .000
—
—
Once every 10 epochs
22 ± 0 s
0.244 ± .000
182 ± 2 s
0.303 ± .002
Once every epoch (default)
23 ± 1 s
0.244 ± .000
192 ± 2 s
0.298 ± .002
Once every 10 batches
26 ± 1 s
0.244 ± .000
235 ± 0 s
0.299 ± .002
Every batch
55 ± 0 s
0.244 ± .000
654 ± 2 s
0.299 ± .002
Appendix
Table S1: Runtime and stress-1 of our stochastic non-metric MDS implementation depending on how often the isotonic regression is run. Results are shown for the Blobs and the MNIST datasets. All hyperparameters (batch size, number of epochs, etc.) are kept constant at the values described in the main text (Blobs: batch size 100, sample size 5000, 200 epochs; MNIST: batch size 1000, sample size 70 000, 20 epochs).
Blobs
Gen.
Digits
Tasic
MNIST
Classical
0.76
0.83
0.59
0.92 ± .00
0.52 ± .01
Metric
0.67
0.70
0.73
0.90 ± .00
0.62 ± .00
Non-metric
0.85
0.91
0.74
0.87 ± .00
0.76 ± .00
t -SNE
0.68 ± .04
0.66 ± .01
0.56 ± .00
0.46 ± .01
0.36 ± .01
UMAP
0.69 ± .05
0.71 ± .05
0.43 ± .02
0.50 ± .05
0.34 ± .01
PaCMAP
0.68 ± .00
0.64 ± .01
0.54 ± .00
0.56 ± .01
0.34 ± .00
Appendix
Table S2: Pearson correlation coefficient between pairwise distances in the high-dimensional space and in the embedding. The highest value in each column is highlighted in bold, together with all values within 0.02. Deterministic runs are shown without stds. Non-metric MDS always achieves the best (or one of the best) result(s).
Blobs
Gen.
Digits
Tasic
MNIST
Classical
0.78
0.84
0.58
0.91 ± .00
0.49 ± .01
Metric
0.68
0.71
0.73
0.91 ± .00
0.62 ± .00
Non-metric
0.85
0.96
0.76
0.95 ± .00
0.78 ± .00
t -SNE
0.61 ± .09
0.62 ± .01
0.51 ± .00
0.55 ± .00
0.33 ± .01
UMAP
0.70 ± .04
0.62 ± .07
0.37 ± .02
0.58 ± .02
0.30 ± .01
PaCMAP
0.69 ± .00
0.62 ± .01
0.49 ± .00
0.67 ± .01
0.30 ± .00
Appendix
Table S3: Spearman correlation coefficient between pairwise distances in the high-dimensional space and in the embedding. The highest value in each column is highlighted in bold, together with all values within 0.02. Deterministic runs are shown without stds. Non-metric MDS always achieves the best (or one of the best) result(s).
Blobs
Gen.
Digits
Tasic
MNIST
Classical
0.01
0.04
0.12
0.02 ± .00
0.01 ± .00
Metric
0.01
0.04
0.15
0.04 ± .00
0.01 ± .00
Non-metric
0.01
0.04
0.13
0.03 ± .00
0.01 ± .00
t -SNE
0.02 ± .00
0.20 ± .00
0.59 ± .00
0.45 ± .00
0.36 ± .00
UMAP
0.03 ± .00
0.14 ± .00
0.49 ± .00
0.25 ± .00
0.10 ± .00
PaCMAP
0.01 ± .00
0.11 ± .00
0.44 ± .01
0.21 ± .00
0.08 ± .00
Appendix
Table S4: k NN recall, that is the fraction of k=10 original nearest neighbors that are among the k=10 nearest neighbors in the embedding (evaluated on a subset of 5000 query points for datasets with n>5000 ). The highest value in each column is highlighted in bold, together with all values within 0.02. Deterministic runs are shown without stds. As expected, t -SNE always achieves the best result (on Blobs, within-class noise is too large and high-dimensional neighbors are near-random).
Blobs
Gen.
Digits
Tasic
MNIST
Classical
1.00
0.56 ± .02
0.65 ± .02
0.21 ± .00
0.43 ± .01
Metric
1.00
0.49 ± .01
0.72 ± .01
0.44 ± .01
0.47 ± .00
Non-metric
1.00
0.59 ± .01
0.69 ± .02
0.23 ± .01
0.48 ± .00
t -SNE
1.00 ± .00
0.89 ± .01
0.99 ± .03
0.90 ± .01
0.97 ± .00
UMAP
1.00 ± .00
0.83 ± .01
0.99 ± .02
0.90 ± .00
0.97 ± .00
PaCMAP
1.00 ± .00
0.85 ± .01
0.99 ± .02
0.89 ± .00
0.98 ± .00
Appendix
Table S5: k NN accuracy ( k=10 ) in the embedding. The highest value in each column is highlighted in bold, together with all values within 0.02. Deterministic runs are shown without stds. As expected, t -SNE always achieves the best or one of the best result(s).
Blobs
Gen.
Digits
Tasic
MNIST
Classical
2 s
23 s
0 s
0 m
0 m
Metric (SMACOF)
359 s
358 s
15 s
–
–
Metric (SGD)
21 ± 0 s
19 ± 0 s
5 ± 0 s
1 ± 0 m
1 ± 0 m
Non-metric (SMACOF)
1086 s
473 s
152 s
–
–
Non-metric (SGD)
18 ± 0 s
23 ± 0 s
8 ± 0 s
23 ± 1 m
3 ± 0 m
t -SNE
35 ± 0 s
23 ± 0 s
7 ± 0 s
1 ± 0 m
5 ± 0 m
Appendix
Table S6: Runtimes of all methods. Deterministic runs are shown without stds. openTSNE and UMAP are run single-threaded.
Figure S1: Stress-1 and triplet accuracies obtained using the SGD implementation of metric MDS using different batch sizes. All y-axis ranges are fixed to 0.015.
Figure S2: Empirically optimal 2D MDS layouts of n equidistant points, obtained using the scikit-learn implementation. (a) For n=2 and 3 exact equidistance can be achieved. Starting with n=4 pairwise equidistance needs to be approximated. Empirically, for n=4,…,7 a regular polygon is optimal. At n≥8 our experiments showed that adding additional points inside the polygon achieves lower loss. (b) Average stress values for the regular polygons and MDS embeddings (averaged over 3 seeds, standard deviations were negligible), as a function of sample size n . Dotted lines show the optimal stress for the continuum limits from Lemma 4 and Theorem 1 .
Figure S3: Metric MDS embedding of the noisy blobs dataset with the classical MDS and random initializations.
Figure S4: Classical, metric, and non-metric MDS embeddings of the Digits dataset ( n=1797 in 64 dimensions). See caption of Figure 4 for explanations.
Figure S5: Classical, metric, and non-metric MDS embeddings of the MNIST dataset ( n=70000 in 784 dimensions). See caption of Figure 4 for explanations.
Figure S6: Shepard diagram for the non-metric MDS embedding of the Tasic dataset. Reproduced from Figure 5 d but here each pair of cells is colored based on the cells’ identities: excitatory/excitatory and inhibitory/inhibitory neuron pairs are shown in blue; excitatory/inhibitory neuron pairs — in orange; non-neural/non-neural pairs — in green; neural/non-neural pairs — in red.
Noise
σ
Jitter
Size
Sampling
mMDS
nMDS
cMDS
Gaussian
1.0
No
=99
Fixed
2.24
4.11
4.75
Gaussian
1.0
Yes
∼99
Random
2.22
4.05
4.04
Uniform
1.0
Yes
∼99
Random
2.22
3.98
4.07
Exponential
1.0
Yes
∼99
Random
2.33
4.04
4.04
Gaussian
2.0
Yes
∼99
Random
2.33
3.94
4.23
Gaussian
1.0
Yes
∼297
Random
2.02
3.92
3.94
Appendix
Table S7: Extended robustness analysis settings. The first line summarizes the setup for Fig. 2 b, the other lines show the settings for the extended analysis. The last three columns are slopes for metric, non-metric, and classical MDS.
The Gini Multidimensional Scaling (Gini MDS) framework extends the Euclidean multidimensional scaling. We introduce a Gini pseudo-distance based on values and their ranks that depends on a fine-tunable hyperparameter. This pseudo-distance allows flexible exploration of latent configurations, enabling embeddings that best match observed dissimilarities. The Gini MDS is shown to be robust to noise and outliers, making it well-suited for real-world applications. We provide experiments on 16 UCI datasets with outliers and on MNIST images with noise to show that the Gini MDS outperforms the Euclidean MDS on noisy data. Finally, a tensor-based implementation in PyTorch provides GPU acceleration and efficient computation compared to the standard MDS of the sklearn library.
Cassandra Mussard, Stéphane Mussard
CESBIO, Univ. Toulouse Toulouse, France · CHROME, Univ. Nˆımes UM6P, AIRESS Nˆımes, France
This paper examines how metric adjustments to Multidimensional Scaling (MDS) can enhance its effectiveness as a visual tool for pattern recognition. The distance under consideration, referred to as Max-D-SW, is an adjustment of the Max-Sliced Wasserstein distance. In contrast to the original formulation, which optimizes over single unit directions, Max-D-SW aggregates contributions over orthonormal bases. This modification provides a clear numerical advantage in MDS outcomes, particularly when applied to heavy-tailed distributions. We also establish sample-complexity bounds showing that Max-D-SW remains statistically tractable, with rates comparable to those of its max-sliced counterpart. Moreover, we show that a better sample complexity for a metric does not necessarily translate into better performance when the metric is used as an input for MDS.
Flor Martinez-Sermeno, Arturo Jaramillo, Johan Van Horebeek
Exploratory analysis of high-dimensional data rarely stops at a single embedding. In practice, analysts rerun dimensionality reduction after changing preprocessing, subsets, or hyperparameters, and standard nonlinear methods can quickly become the bottleneck. We introduce FastUMAP (Bipartite Manifold Approximation and Projection), a landmark-based method designed for this repeated-use setting. FastUMAP builds a sparse point-landmark fuzzy graph, computes a Nystrom spectral warm start from the induced landmark affinity, and then refines all sample coordinates with a UMAP-style objective on the bipartite graph. The landmark ratio r = m/n provides a direct way to trade runtime against fidelity. On 9 benchmark datasets spanning 178 to 70,000 samples, FastUMAP has the lowest runtime on 7 datasets in our reported default-implementation comparison on one workstation. On MNIST and Fashion-MNIST (n=70000), it runs in about 4.6 seconds, compared with about 73--75 seconds for Barnes--Hut t-SNE, while reaching 91.4% mean kNN accuracy versus 94.6% for the strongest accuracy baseline. FastUMAP is therefore best viewed as a fast option for repeated exploratory embedding, rather than as a replacement for accuracy-first methods.
Hongmin Li
School of Life Science and Technology, Institute of Science Tokyo · 2-12-1 Ookayama, Meguro-ku, Tokyo 152-8550, Japan 2Department of Computational Biology and Medical Sciences Graduate School of Frontier Sciences, The University of Tokyo