betaFeedback

WorksComputer Science

Quantifying Local and Global Fidelity of Nonlinear Embeddings

Abstract

Dimension reduction rests on a claim: t-SNE and UMAP preserve local structure, PCA global structure. Our DLP curve is the share of each point's k nearest neighbors a map keeps. Corrected for chance, it gives L at k=10 and G over 30 to 50% of the data, local and global fidelity. At the midpoint the curve is provably a rank correlation of distances. The LG reversal test decides, with a stated error rate, which of two maps is local and which global. On twelve datasets of up to 1.38 million points, G agrees with established global scores at 0.84 and 0.93, and the area under R_NX at 0.22 and 0.30. The entity fidelity E, read at each point's entity size, predicts which entities a map loses beyond L and G where entity sizes differ. In an agent memory of one million passages, t-SNE and PCA cross at 150,000 passages (p=2.6e-5).

Embeddings are how people and machines look at large high-dimensional data. Analysts draw two-dimensional maps of single-cell atlases, pathology slides, customer records and text collections with t-SNE[1], UMAP[2], PHATE[3], TriMAP[4], PaCMAP[5] and PCA. AI agents keep their memories as embedding vectors and retrieve them by nearest-neighbor search[6]. Large memories are compressed, by truncation[7], by principal components, or by product quantization[8], so that they fit in memory and can be sent between agents. Both kinds of embedding are described in two words. A method preserves local structure if nearby points stay nearby, and global structure if the layout of clusters, branches and regions is kept. PCA is called global and t-SNE local, and UMAP is said to be more global than t-SNE. A compressed memory is judged by the recall of its nearest neighbors[9], a local score. Agents also consolidate, delete and summarize memories by topic[10], and these tasks depend on global structure.

Two questions decide which map to use. How much local and how much global structure does a map keep? And on given data, is one map more local and another more global? The answers set the method, the parameter or the compression that an analyst or an agent designer picks. A pathologist who searches the right map for tiles like a tumor tile finds their true neighbors. An agent that groups topics on the right map keeps distant topics apart. Answering the two questions takes two things. The first is a common scale. Local structure is scored by neighbor overlap or trustworthiness[11], and global structure by distance rank correlation, random-triplet accuracy[5] or centroid distances[12]. These scores have different ranges and chance levels. The second is a test that separates a real difference from chance. PCA’s global lead over t-SNE is 0.056 on one million text passages, at perplexity 200, and on Renal-Cortex, a kidney single-cell atlas, at perplexity 30. A test shows it is real on the first (p=8.6×10−6p = 8.6 \times10^{-6}) and within chance on the second (p=0.15p = 0.15). The questions are now pressing, because single-cell atlases and agent memories hold millions of points, and maps of that size are judged by numbers.

One curve gives both fidelities. We read both kinds of fidelity from the two ends of one chance-corrected curve, the locality profile, and we compare two maps point by point. The share of each point’s kk nearest neighbors that a map keeps, corrected for chance, is a curve over kk. At k=10k = 10 it gives the local fidelity LL. At neighborhoods of 30 to 50 percent of the data it gives the global fidelity GG. We prove that this upper end is the agreement on which half of the data is near each point, which converges to a rank correlation of the distances. LL and GG are one statistic at two scales, so they can be compared directly. Both are means over points, so two maps can be tested against each other. This curve is our DLP curve[13], corrected for chance.

On MNIST[14] t-SNE is more faithful below 20 percent of the data and PCA above it. The profile starts from the degree of locality preservation, DLPk_k, the average fraction of each point’s kk nearest neighbors that remain among its kk nearest in the map[13]. Read over all kk and corrected for chance, it gives the locality profile. In the t-SNE map, point ii keeps 6 of its 10 nearest neighbors (Figure 1a).

Averaged and corrected, this overlap gives the profile (Figure 1b,c). At the upper end, each point’s agreement with the data on its near and far halves tracks the rank correlation of its distances. The Pearson correlation is 0.94 over 400 points (Figure 1d,e). PCA overtakes t-SNE at sx=0.20s_x = 0.20, the crossover scale. Raising t-SNE’s perplexity from 30 to 200 gains 0.21 of global fidelity for each unit of local fidelity traded, the exchange rate η\eta (Figure 1c,f).

Our DLP curve[13] decides between two maps. Quality curves have so far scored maps one at a time, with no test between two. Three results make the test possible. First, a proof: at its midpoint the curve tends to a rank correlation of the distances, so its upper end, read as GG, measures global structure. Second, a curve for every point: each score becomes a mean over points with a standard error, which gives the LG reversal test and an interval for the size at which to change maps. Third, a reading at each point’s entity size: the entity fidelity EE tells which entities a map loses. None of the closest methods[15, 16, 17, 18] gives the upper end of a neighbor curve a proven meaning or tests whether two maps reverse their order. The area under RNXR_{NX} agrees with established global scores at only 0.22 and 0.30 over the 84 default maps, against 0.84 and 0.93 for GG (Supplementary Table 1).

The LG reversal test tells which map to use. It decides with a stated error rate whether one map is local and another global. It is designed for any local and any global dimensional reduction method, because it needs the data and the two maps alone. It runs two one-sided tests on the scores of single points, one at each end of the profile. A block jackknife accounts for the dependence between neighboring points, and the intersection–union principle combines the two tests into one decision. Figure 2a shows what the two scores check in the memory of a financial agent. A recall check sees one passage and its 10 neighbors, and a topic check sees the shared themes. Figure 2b–d applies the test to the memory of a retrieval agent: one million MS MARCO passages[19] embedded with BGE-base[20]. t-SNE is more local than PCA by 0.213 and PCA is more global by 0.062, and the test declares the reversal with p=2.6×10−5p = 2.6 \times10^{-5}. The crossover lies at 150,400 passages, with 95% interval 79,100 to 221,700. Retrieval itself runs in the full embedding space; the maps serve the person who audits the memory. That person should use the t-SNE map to inspect the passages near a query and any subtopic of fewer than 79,000 passages, and the PCA map to see which of the eight kk-means topics lie far apart and which to merge or delete.

Contributions. We make three contributions. First, from our DLP curve[13] we derive the local fidelity LL, the global fidelity GG, whose upper end has a proven meaning, and the entity fidelity EE. Against an uncompressed reference, DLPk_k is the recall at kk by which vector search is already judged, so GG and EE measure what recall cannot see. Second, the LG reversal test decides, with a stated error rate, whether one map is local and another global, and returns, with a 95% interval, the size at which to change maps. Third, the scores change what applications conclude. The claim that t-SNE is local and PCA global holds firmly on six of twelve large datasets, narrowly on three, within

chance on two, and is reversed on one. In a compressed financial memory, PNC Financial Services keeps L=0.96L = 0.96 yet loses 17 of its 105 passages, and EE, read before any query, flags such companies. In a memory of one million passages, the test places the change from t-SNE to PCA near 150,000 passages. The released SEA-AD UMAP[21] is more faithful than PCA only below 16% of the data.

Results

The LG reversal test: which map answers which question

Each comparison returns a declaration, a p-value and a crossover. For two maps AA and BB of the same data, the test returns one of three declarations. Either AA is local and BB global, or BB is local and AA global, or one map is at least as faithful at both ends. Then the user needs that one map. With a reversal it returns a p-value and the crossover size s×ns^{\times}n with its 95% interval. A question about fewer than s×ns^{\times}n points goes to the local map, and a question about more points goes to the global map. Figure 2b–Figure 2d works through one example.

Figure 2. LL and GG tell which map to use for a memory, and EE tells which entities a map or a compressed memory loses. (a) The memory of a financial agent on an SR-tSNE2 map: 8,356 passages of 106 S&P 500 companies, colored by theme. After binary compression and rescoring, PNC Financial Services (PNC, gold) keeps L=0.96L = 0.96 and loses 17 of its 105 passages (×); circles mark one passage with its 10 neighbors (LL) and the shared themes (GG). (b)–(d) MS MARCO: t-SNE for the passages near a query, PCA for the layout of topics, crossover at 150,400 passages. (b) Profiles; purple line and band, the crossover and its 95% interval; gray band, the range that gives GG. (c) The two one-sided tests with 95% intervals. (d) Which map answers each question. (e)–(i) GG measures what the established global scores measure. (e)–(g) GG and LL against the distance rank correlation and random-triplet accuracy over 156 maps. (h) Agreement rises with the scale at which the profile is read. (i) Within each dataset, GG orders the methods as the distance rank correlation does. (j)–(m) Entity fidelity predicts which entities a map or a compressed memory loses. (j) SEA-AD: miss rate for each cell type against its EE, 24 cell types on seven maps. (k) The same pairs against LL. (l) The same memory compressed to binary codes: miss rate of each company after rescoring, against EE of the company on the codes; star, PNC. (m) Partial rank correlation of the miss rate with EE given LL, GG and MM, the profile read at the median entity size, with 95% bootstrap intervals over entities; green, interval below zero; *, entities of nearly equal size.

The upper end of the profile measures global structure

The test relies on GG measuring global structure. GG ranks maps as the established global scores do, and it is stable across bands and subsamples (Supplementary Note 5).

GG agrees with the established global scores. Over the 84 maps of the twelve large datasets, GG has rank correlation 0.84 with the distance rank correlation and 0.93 with random-triplet accuracy. Adding the 72 maps of the MNIST parameter paths, it reaches 0.89 and 0.96 (Figure 2e,Figure 2f). These are the two scores that Kobak and Berens [12] and Wang et al. [5] used for global structure, and they correlate with each other at 0.97. LL correlates with them at −0.19 (Figure 2g), so it carries separate information. On large data the maps that keep neighbors best and the maps that keep the global layout best are different maps. Correlation rises with the scale at which the profile is read (Supplementary Table S2 and Figure 2h). The area under RNXR_N^X, the usual summary of neighbor curves [17], reaches 0.22 and 0.30, because it weights the lower end.

Supplementary Table 2 | GG agrees with the established global scores at 0.84 and 0.93, and the area under RNXR_{NX} at 0.22 and 0.30. Spearman rank correlation between profile-based scores and established global scores over the 84 maps of the large datasets (twelve datasets, seven methods).

Profile scoreDistance ρ\rhoRandom-triplet accuracy
L=ν10L = \nu_{10} (exact)−0.18−0.10
Middle band, 0.1≤k/n≤0.20.1 \leq k/n \leq0.20.570.70
Area under RNXR_{NX}0.220.30
GG, 0.2≤k/n≤0.50.2 \leq k/n \leq0.50.800.91
GG, 0.3≤k/n≤0.50.3 \leq k/n \leq0.50.840.93
GG, 0.4≤k/n≤0.50.4 \leq k/n \leq0.50.910.97
Midpoint νk⋆\nu_{k^\star}0.940.98

Table S2.

Within each dataset GG orders the methods as the distance rank correlation does. The rank correlation is 0.71 or more on ten of the thirteen groups of maps, the twelve datasets and the MNIST paths, with a median of 0.79 (Figure 2i). It exceeds that of LL on all thirteen. Proposition 3 explains the agreement: the upper end of the profile is a rank correlation of distances, read point by point.

Entity fidelity predicts which entities a map loses

Between the two ends lies the scale of an entity, and there EE predicts which entities a map loses. The entity fidelity EE reads the profile at the size of each point’s own entity, such as its cell type (Methods). MM reads it at the median entity size for every point.

Where entity sizes differ, EE predicts the miss rate beyond LL, GG and MM. The partial correlation is −0.90 on SEA-AD, whose 24 cell types hold 1,496 to 330,085 nuclei (95% interval −0.94 to −0.83; Figure 2j,Figure 2m). On the same cell types and maps the rank correlation of the miss rate is −0.93 with EE and −0.37 with LL (Figure 2k). The partial correlation is −0.81 on Brain-Cortex (−0.87 to −0.71), −0.65 on Instacart (−0.77 to −0.45) and −0.44 on Renal-Cortex (−0.64 to −0.21). Where entities have nearly equal sizes, EE and MM read nearly the same kk and carry the same information (Figure 2m).

EE flags the companies that a compressed memory loses. An agent’s memory of 8,356 passages from the annual reports of 106 S&P 500 companies [22], embedded with BGE-base [20], was compressed to binary codes. Each company’s passages were selected as a vector database does: twice as many candidates as passages, at least 100, were taken on the codes and rescored at full precision [23]. The selection missed passages of their own company for 65 of the 106 companies, 223 passages in all. EE, read on the codes before any query, has rank correlation −0.74 with the miss rate, and LL has −0.44. The partial correlation of EE given LL is −0.66 (95% interval −0.76 to −0.52; Figure 2l). PNC Financial Services (PNC) keeps L=0.96L = 0.96 after rescoring and loses 17 of its 105 passages (Figure 2a); its EE is the 16th lowest of 106.

Four applications: pathology, single cells, supply chains, and AI agent memory

In all four applications LL and GG pick different maps: SR-tSNE2, our rank refinement of t-SNE, is the most local, and the most global map changes with the data. Figure 3 shows the four applications, and Supplementary Figure 2 three smaller datasets. On Pathology-100K and MS MARCO PCA has the highest GG, 0.597 and 0.283 (Figure 3b,Figure 3q). On SEA-AD and Instacart PaCMAP has the highest GG, 0.417 and 0.268, and t-SNE is above PCA on Instacart, 0.236 against 0.213 (Figure 3g,Figure 3l). The claim that PCA is global thus holds on Pathology-100K and MS MARCO, and on SEA-AD and Instacart PaCMAP takes its place; the reversal test below checks each case, and Supplementary Table 9 tests PaCMAP.

Figure 3. On the four applications SR-tSNE2 is the most local map, and the most global map is PCA on two and PaCMAP on two. Rows: Pathology-100K, SEA-AD, Instacart and MS MARCO. Columns: the profile; GG against LL; O-DLP@10, the share of the 10 nearest neighbors returned at their exact rank, which is what a ranked search result shows; the NPCA map with named axes, on Pathology-100K with the hematoxylin and eosin (H&E) tile nearest each cell of a 6×66 \times6 grid, framed in its tissue color; the SR-tSNE2 map colored by tissue, cell subclass, department or kk-means cluster. Maps show 20,000 random points.

Supplementary Figure 2. On three smaller datasets PCA is the most global map of Pathology-7K and 8-K, and t-SNE and SR-tSNE2 the most global of Online Retail. Columns as in Figure 3, with PHATE and DREAMS [18] added and t-SNE200_{200} omitted; the SR-tSNE2 map is colored by tissue, purchase cluster or main 8-K item.

The score that each task needs picks the map. In each application some tasks depend on LL: finding the tiles that resemble a tumor tile, the cells of a rare type, the customers who buy like a given one, and the passages near a query in an agent’s memory. Other tasks depend on GG: the layout of tissue classes, the distance between cell types, customer segmentation and stocking, and topic consolidation in an agent’s memory. For the first kind, SR-tSNE2 gives the highest LL on all four datasets: 0.458 on Pathology-100K, 0.117 on SEA-AD, 0.124 on Instacart and 0.309 on MS MARCO.

The reversal test at scale

The reversal test decides which map serves which task: the usual claim holds firmly on six of the twelve large datasets, and the crossover tells a user which map to use for each question.

A worked example: the memory of a retrieval agent

For the memory of a retrieval agent the test declares t-SNE local and PCA global, and it places the change of maps near 150,000 passages.

Both one-sided tests reject. We test t-SNE against PCA on a uniform subsample of 5,000 passages with 20-means blocks (Figure 2b–Figure 2d). The local test gives Lt−SNE−LPCA=0.213L^{\mathrm{t-SNE}} - L^{\mathrm{PCA}} = 0.213 with jack-knife standard error 0.009 and pL=3.6×10−16p_L = 3.6 \times10^{-16}. The global test gives GPCA−Gt−SNE=0.062G^{\mathrm{PCA}} - G^{\mathrm{t-SNE}} = 0.062 with standard error 0.012 and pG=2.6×10−5p_G = 2.6 \times10^{-5}. Both nulls are rejected, and the reversal is declared with p=2.6×10−5p = 2.6 \times10^{-5}.

Where to change maps. The crossover is s×=0.150s^{\times} = 0.150, with 95% interval 0.079 to 0.222, that is, 150,400 passages (79,100 to 221,700). Figure 2d lists which map answers each question about the memory. SR-tSNE2 and UMAP give the same declaration, with crossovers at 150,200 and 135,600 passages.

Seven of twelve large datasets show the reversal

Run on all twelve large datasets, the test declares t-SNE local and PCA global on seven: MNIST, Fashion-MNIST, Speech Commands, Covertype, AG News, Pathology-100K and MS MARCO, each with p≤0.012p \leq0.012 (Figure 4a). UMAP and SR-tSNE2 are declared local on the same seven. Six of the seven hold with 10, 20 and 50 blocks; on these the claim holds firmly. It holds narrowly on MNIST, at p=0.061p = 0.061 with 10 blocks, and on CIFAR-10 and Renal-Cortex, declared with 50 blocks (Supplementary Note 8). On the other five, t-SNE is more local with pL<10−4p_L < 10^{-4}. The global gap is within chance on Brain-Cortex (0.006) and SEA-AD (0.044), and within its 20-block sampling error on CIFAR-10 (0.026) and Renal-Cortex (0.056). On Instacart t-SNE is the more global map, by 0.021 (p=0.032p = 0.032). For t-SNE the crossover lies at k/nk/n of 0.10 on Pathology-100K (0.04 to 0.16) and 0.15 on MS MARCO (0.08 to 0.22). On the other five datasets with a declared reversal it lies between 0.09 and 0.20 (Figure 4d).

Figure 4. The reversal test declares t-SNE local and PCA global on seven of the twelve large datasets at the default 20 blocks, and identifies where the neighbor embeddings (t-SNE, SR-tSNE2 and UMAP) are the more global maps. (a)–(d) Large datasets, applications above the line, four maps against PCA: (a) pp-value of the declaration, check mark at level 0.05; (b) LA−LPCAL^{A}-L^{\mathrm{PCA}} and (c) GPCA−GAG^{\mathrm{PCA}}-G^{A} with 95% intervals; (d) crossover scale with its 95% interval. (e)–(h) The same for the smaller datasets and the synthetic manifolds. (i) Rejection rates of the global test under a null that resamples the 20 blocks; all lie near the level 0.05.

Where the neighbor embeddings are global

On four datasets the neighbor embeddings (t-SNE, SR-tSNE2 and UMAP) are the more global maps: the Swiss roll, the S-curve and both retail datasets. The test identifies each case (Figure 4e–Figure 4i). On the Swiss roll and the S-curve, where the reference is geodesic, every neighbor embedding is more global than PCA, by 0.54 to 0.61 in GG.

The reversal test at scale

One neighbor embedding thus serves both ends. On the tree PCA reaches t-SNE at k/n=0.88k/n = 0.88. On Online Retail, t-SNE and SR-tSNE2 are more global than PCA by 0.088, and PCA reaches them at k/n=0.99k/n = 0.99. There t-SNE leads at both ends, as on Instacart, so the test names it the one map to use (p=0.99p = 0.99 and 0.97). On Pathology-7K the reversal is declared with s×=0.11s^{\times} = 0.11 (0.05 to 0.16), close to its value of 0.10 on Pathology-100K. A reversal thus depends on the pair of methods, the dataset, and, through the PCA map, its size, as the next subsection shows.

Large data make the reversal reproducible

On MNIST, three nested series of subsets from 2,500 to 70,000 points show how. The reversal is declared in all three series at 10,000, 40,000 and 70,000 points and in two of three at 5,000 and 20,000 (Supplementary Fig. 1a). PCA’s two axes are stable from 10,000 points (Supplementary Note 2.5.4). In smaller subsets they change from draw to draw: GG of PCA is under 0.20 in four of the six subsets of 2,500 and 5,000 points (Supplementary Fig. 1c). From 10,000 points on, GG of PCA lies between 0.296 and 0.308 in every subset, and PCA’s global advantage over t-SNE lies between 0.09 and 0.13. At perplexity 200, from 20,000 points on, the advantage lies within 0.03 of its value at perplexity 30 (Supplementary Fig. 1b). Large data make the reversal reproducible because they make the PCA map stable.

Published cell atlases: where a released map can be trusted

The same test checks the maps that consortia release with their atlases. The released SEA-AD UMAP can be trusted below 16% of the data. The SEA-AD UMAP was computed from the scVI space {sup}24`, the latent space of a deep generative model of the counts. Judged against that space, it is more faithful than PCA below s×=0.16s^{\times} = 0.16 (95% interval 0.135–0.193) and less faithful above it (fig:5a,b; p=9.2×10−9p = 9.2 \times10^{-9} and 7.9×10−67.9 \times10^{-6}). Among interneurons from the medial ganglionic eminence (MGE), UMAP keeps SST and Pvalb nuclei nearly as separate as the scVI space at the neighbor scale (2.2% versus 1.6% Pvalb among the 10 nearest neighbors; PCA 9.0%; fig:5c,g). On both atlases SR-tSNE2 is more local and PCA more global than PHATE3, which is designed to keep both (LL 0.03 and 0.06, GG 0.47 and 0.45; Figure 5c).

Figure 5. On published cell atlases, LL and GG tell where a released map can be trusted, and EE tells which supertypes and tissues it loses. (a),(b) SEA-AD, the consortium’s released UMAP judged against the scVI space it was built from, the latent space of a deep generative model of the counts (1,378,211 nuclei). (a) The released map, colored by subclass. (b) Locality profiles of the released UMAP and of PCA, and the two one-sided tests declare the reversal. (c)–(h) SEA-AD interneurons from the medial ganglionic eminence (MGE; 161,493 nuclei, 33 supertypes). (c) PCA, t-SNE, SR-tSNE2, UMAP and PHATE maps colored by subclass, with LL and GG; against PHATE the test declares a reversal for t-SNE and SR-tSNE2, and none for UMAP (global p=0.079p = 0.079). (d)–(f) EE, miss rate and LL of each supertype on each map, ordered by EE on UMAP. (g) Share of Pvalb nuclei among the kk nearest neighbors of each Sst nucleus; UMAP keeps the two subclasses nearly as separate as the scVI space at the neighbor scale. (h) Miss rate of each supertype against its EE. (i)–(k) Tabula Sapiens endothelial cells (73,198 cells, 29 tissues). (i) UMAP colored by the tissue. (j) EE of each tissue on each map, ordered by EE on UMAP, with each map’s LL and GG; against PCA the test declares a reversal for every map, PHATE included (global p=0.006p = 0.006). (k) Miss rate of each tissue against its EE.

EE predicts which supertypes and tissues a map loses. On SEA-AD EE predicts which supertypes a map loses (rank correlation −0.93, against −0.51 for LL; Figure 5d–Figure 5f,Figure 5h). In Tabula Sapiens endothelial cells25, it predicts which tissues a map loses (−0.76, against −0.07 for LL; Figure 5i–Figure 5k).

The test on independent samples

The declarations above come from one subsample of each dataset. On 50 independent subsamples, the declarations of t-SNE against PCA and the crossovers do not change (Figure 6). The local test keeps its error rate at or below 0.020, against up to 0.20 for a test that treats points as independent.

Figure 6. On independent samples the LG reversal test keeps its declarations and its crossover, and it stays within its error rate. (a) The test on one uniform subsample of 5,000 MS MARCO passages, t-SNE against PCA, a different subsample from Figure 2c: the 20 k-means blocks, the per-passage local and global differences dL(i)d^{L}(i) and dG(i)d^{G}(i), and the 20 leave-one-block-out estimates with their 95% interval. (b) Twelve large datasets, four maps against PCA, 50 independent subsamples of 5,000 points with the maps fixed: estimates of the global and local differences (dots), the full-data global difference and the mean local difference (black), the mean jackknife 95% interval (band), and the share of subsamples with a declared reversal; bold, datasets on which Figure 4 declares a reversal for t-SNE. (c) Crossover of t-SNE against PCA in the 50 subsamples (dots), mean 95% interval (band) and the test of Figure 4 (black); on Instacart, where t-SNE leads at both ends, the profiles meet only at the end (s×=0.99s^{\times} = 0.99). (d) Standard error used by the test against the standard deviation of the estimate over subsamples, for the block jackknife and for a test that treats points as independent, and the highest rejection rate of a true null at level 0.05 over six pairs of maps on the twelve datasets.

Discussion

Local and global fidelity are one statistic read at two scales, so whether a map is local or global becomes a question with a tested answer. Analysts choose a map by the size of the question. The upper end of the profile has a proven meaning: the agreement on which half of the data is near each point. Both ends are the same statistic, so the reversal test turns their comparison into a decision, and the crossover marks where to change maps. A parameter value, such as a perplexity, becomes a point (L,G)(L,G) on the path that the parameter traces. Across

24 parameter settings on 60,000 digits, PCA keeps the highest GG and t-SNE the highest LL (Supplementary Note 2.4). A claim of global structure should report GG with its run-to-run spread.

The same scale applies to the memory of an AI agent. For a compressed agent memory, the uncompressed embedding is the natural reference. Against it, DLPk\mathrm{DLP}_k is the recall of the compressed index at kk, the quantity by which approximate nearest-neighbor search is already evaluated[9], and LL adds the correction for chance. GG is new to this setting. It measures whether topics, episodes or documents that lie far apart in the full memory stay far apart in the compressed one. Questions about a whole corpus depend on this organization[10]. GG can be estimated from a few thousand stored items, however large the memory (Methods). EE adds a check that needs no query: read on the codes of a compressed memory, it flags the companies whose passages retrieval misses. For an uncompressed memory, retrieval runs in the full embedding, and a two-dimensional map is the view in which a person audits what the agent stores, merges and deletes. The reversal test says which map answers which question, and NPCA adds axes named by the input variables.

The user chooses the geometry, and the test answers for it. In each of these uses, global structure is defined relative to a reference dissimilarity. Here the reference is the Euclidean or cosine distance for real data and the geodesic distance for the synthetic manifolds, where Isomap and the neighbor embeddings lead. A geodesic or diffusion distance on real data enters the profile in the same way. The profile is rank-based, so it is invariant to the stretched distances of t-SNE and UMAP.

Conclusion. For nearly two decades the choice of a map has rested on the claim that t-SNE and UMAP keep local structure and PCA global structure. Our strongest result is the LG reversal test, built on our DLP curve. It decides with a stated error rate which of two maps is local and which global, and where to change between them. It turns that claim into a result that users check on their own data. The test serves single-cell atlases, pathology, supply chains and the memories of AI agents, and other settings where a representation is compared with a reference. On twelve datasets of up to 1.38 million points the claim holds firmly on six, narrowly on three, within chance on two, and is reversed on one. On independent subsamples the test keeps its error rate at or below 0.020 (Figure 6). We suggest reporting (L,G)(L, G) with published maps, and the reversal test whenever two maps are compared.

Methods

The locality profile, local and global fidelity

One chance-corrected statistic, read at a small and at a large neighborhood size, gives a local and a global fidelity on the same scale.

Setting and notation

Let x1,…,xnx_1,\ldots,x_n be data points with a reference dissimilarity dXd_X, the Euclidean or, for unit vectors, cosine distance in the chosen representation, and let y1,…,yn∈R2y_1,\ldots,y_n \in\mathbb{R}^2 be a map with Euclidean distance dYd_Y. For each point ii write riX(j)∈{1,…,n−1}r_i^X(j) \in\{1,\ldots,n-1\} for the rank of jj among the other points by increasing dX(xi,⋅)d_X(x_i,\cdot), and riY(j)r_i^Y(j) likewise in the map. For 1≤k≤n−21 \le k \le n-2 let NkX(i)={j:riX(j)≤k}N_k^X(i) = \{j : r_i^X(j) \le k\} and NkY(i)N_k^Y(i) be the kk-nearest-neighbor sets. Superscripts XX and YY mark the data and the map, superscripts AA and BB mark two methods, the subscript kk marks the neighborhood size, and the argument (i)(i) marks a single point. Supplementary tbl:3 collects the notation.

At every scale the profile asks one question: what share of each point’s kk nearest neighbors does the map keep, by chance?

Definition 1 (Locality profile). For point ii and scale kk, let Ok(i)=∣NkX(i)∩NkY(i)∣O_k(i) = \lvert N_k^X(i) \cap N_k^Y(i) \rvert be the number of its kk nearest neighbors in the data that are also among its kk nearest in the map. The chance-corrected profile of point ii is

νk(i)=(n−1)Ok(i)/k−kn−1−k.(1)\nu_k(i) = \frac{(n-1)O_k(i)/k-k}{n-1-k}. \tag*{(1)}

The locality profile of a map is the mean of these curves over points,

k↦νkk \mapsto\nu_k, 1≤k≤n−21 \le k \le n-2, indexed by the relative scale s=k/ns = k/n. With the degree of locality preservation

DLPk=1n∑i=1nOk(i)k,(2)\mathrm{DLP}_k = \frac{1}{n}\sum_{i=1}^{n}\frac{O_k(i)}{k}, \tag*{(2)}

it reads

νk=(n−1)DLPk−kn−1−k.(3)\nu_k = \frac{(n-1)\mathrm{DLP}_k-k}{n-1-k}. \tag*{(3)}

DLPk\mathrm{DLP}_k over kk is the DLP curve[13], and νk\nu_k is its chance-corrected form. From this curve we read LL, GG, the crossover, the test and EE.

In plain terms, a map that scatters points at random scores 0 in expectation at every scale, a perfect map scores 1, and any monotone stretching of distances leaves the score unchanged.

Proposition 1 (Chance level and invariance). Assume no ties among distances. (i) If the map carries no information about the data, so that each NkY(i)N_k^Y(i) is a uniformly random kk-subset of the other n−1n-1 points, then E DLPk=k/(n−1)\mathbb{E}\,\mathrm{DLP}_k = k/(n-1) and E νk=0\mathbb{E}\,\nu_k = 0; a perfect map has νk=1\nu_k = 1. (ii) νk\nu_k is invariant under any rotation, reflection, translation, or uniform scaling of the map, and under any strictly increasing transformation of dXd_X or dYd_Y.

Proof. (i) Fix ii. Each of the kk members of NkX(i)N_k^X(i) falls in the random set NkY(i)N_k^Y(i) with probability k/(n−1)k/(n-1). By linearity of expectation, E∣NkX(i)∩NkY(i)∣=k2/(n−1)\mathbb{E}|N_k^X(i) \cap N_k^Y(i)| = k^2/(n-1). Averaging over ii and dividing by kk gives E DLPk=k/(n−1)\mathbb{E}\,\mathrm{DLP}_k = k/(n-1). Equation (3) is affine in DLPk\mathrm{DLP}_k and vanishes at DLPk=k/(n−1)\mathrm{DLP}_k = k/(n-1), so E νk=0\mathbb{E}\,\nu_k = 0. A perfect map has NkY(i)=NkX(i)N_k^Y(i) = N_k^X(i) for all ii, so DLPk=1\mathrm{DLP}_k = 1 and νk=((n−1)−k)/(n−1−k)=1\nu_k = ((n-1)-k)/(n-1-k) = 1. (ii) A rotation, reflection or translation leaves every map distance unchanged, and a uniform scaling multiplies all of them by one positive constant. A strictly increasing transformation of dXd_X or dYd_Y keeps the order of the distances from each point. In every case the ranks riX(j)r_i^X(j) and riY(j)r_i^Y(j) are unchanged, and so are the sets NkX(i)N_k^X(i) and NkY(i)N_k^Y(i), DLPk\mathrm{DLP}_k and νk\nu_k. □\square

The data bear this out. On 1,999 MNIST digits, 200 random maps give νk\nu_k with mean −0.0002-0.0002 and standard deviation 0.005 for kk from 10 to 999. Replacing each map distance dYd_Y by dY3+edYd_Y^3 + e^{d_Y}, a strictly increasing transformation, leaves ν10\nu_{10} and ν999\nu_{999} of PCA, t-SNE and SR-tSNE2 unchanged.

Invariance to monotone transformations matters for nonlinear embeddings, whose distances are distorted on purpose. t-SNE and UMAP expand the contrast between near and far pairs by an order of magnitude[13]. This changes scores built on raw distances and leaves rank-based scores intact.

From DLPk_k to LL and GG. After the chance correction the profile has two readable ends, one local and one global. The raw curve first needs a correction for chance, and Figure 1b shows why. DLPk_k rises toward 1 for every map, because a neighborhood that holds most of the points shares most of them by chance; its chance level is k/(n−1)k/(n-1) (Proposition 1). Equation (3) subtracts this level and rescales, so that νk\nu_k is 0 for a random map and 1 for a perfect one at every kk (Figure 1c). At a small fixed neighborhood, ν10\nu_{10} says how many of each point’s closest neighbors the map keeps beyond chance; this is LL. At k∗=(n−1)/2k^* = (n-1)/2, Proposition 2 shows that νk∗\nu_{k^*} is the agreement on which half of the data is near each point. Proposition 3 ties this agreement to the rank correlation of distances, which global scores measure (Figure 1d,Figure 1e). GG averages the profile over 0.3≤k/n≤0.50.3 \le k/n \le0.5, a band that ends at this midpoint; the average keeps the meaning of the midpoint and lowers its variance.

From the locality profile to $L$ and $G$ on MNIST

Figure 1. From the locality profile to LL and GG on MNIST (n=70,000n = 70{,}000): t-SNE is more faithful below 20 percent of the data and PCA above it. (a) Point ii keeps 6 of its 10 nearest neighbors in the t-SNE map. (b)–(e) A subsample of m=2,000m = 2{,}000 points. (b) DLP⁡k\operatorname{DLP}_k rises to 1, partly by chance (dashed). (c) After the chance correction the profiles cross at s×=0.20s^{\times} = 0.20; the shaded band gives GG. Values in (c) come from the subsample; LL in the text is computed on all points. (d) Ranks from point ii in the data and the map; h(i)h(i) is the share in the shaded quadrants. (e) 2h(i)−12h(i) - 1 tracks 2πarcsin⁡γ(i)\frac{2}{\pi}\arcsin\gamma(i), where γ(i)\gamma(i) is the normal-scores correlation of the two rank vectors from point ii, a rank-based estimate of the GG plane. (f) Seven maps in the (L,G)(L,G) plane; η\eta from one run, or 0.330.33 as a three-run mean on 60,000 digits. (g) Study design: four applications and eight benchmarks, seven maps each, scored by LL, GG and EE. (h) The twelve large datasets, 50,000 to 1.38 million points in 50 to 2,000 dimensions. (i) LL and GG of the 84 maps; bold, the highest on each dataset.

Near sets, far sets, and the upper end of the profile

The upper end of the profile measures global structure. At the midpoint it is the agreement on which half of the data is near each point. This agreement is Blomqvist’s rank correlation of the distances, and Kendall’s τ\tau under a Gaussian copula. The proof starts from a counting identity. At the midpoint, a map that keeps a point’s near half has also kept its far half, so each pair asks one question, near or far.

Proposition 2 (Near–far duality). Let FkX(i)F_k^X(i) and FkY(i)F_k^Y(i) be the complements of NkX(i)N_k^X(i) and NkY(i)N_k^Y(i) among the other n−1n-1 points. Then ∣FkX(i)∩FkY(i)∣=n−1−2k+∣NkX(i)∩NkY(i)∣|F_k^X(i) \cap F_k^Y(i)| = n-1-2k+|N_k^X(i) \cap N_k^Y(i)|. In particular, for k⋆=(n−1)/2k^\star=(n-1)/2 with nn odd,

νk⋆=2h−1,h=1n∑ih(i),(4)\nu_{k^\star}=2h-1,\qquad h=\frac{1}{n}\sum_i h(i), \tag*{(4)}
h(i)=1n−1∣{j:1[rjX(i)≤k⋆]=1[rjY(i)≤k⋆]}∣,h(i)=\frac{1}{n-1}\left|\left\{j: \mathbf{1}[r_j^X(i)\leq k^\star]=\mathbf{1}[r_j^Y(i)\leq k^\star]\right\}\right|,

where h(i)h(i) is the probability that the data and the map agree, for point ii, on whether a random other point lies in the nearer or the farther half.

Proof. Among the other n−1n-1 points, ∣NkX(i)∪NkY(i)∣=2k−∣NkX(i)∩NkY(i)∣|N_k^X(i)\cup N_k^Y(i)|=2k-|N_k^X(i)\cap N_k^Y(i)| by inclusion–exclusion. The set FkX(i)∩FkY(i)F_k^X(i)\cap F_k^Y(i) is the complement of this union, which gives the first identity. Point jj is classified alike by the data and the map exactly when it lies in NkX(i)∩NkY(i)N_k^X(i)\cap N_k^Y(i) or in FkX(i)∩FkY(i)F_k^X(i)\cap F_k^Y(i). At 2k⋆=n−12k^\star=n-1 the two sets have the same size, so the number of agreements is 2∣Nk⋆X(i)∩Nk⋆Y(i)∣2|N_{k^\star}^X(i)\cap N_{k^\star}^Y(i)| and h(i)=∣Nk⋆X(i)∩Nk⋆Y(i)∣/k⋆h(i)=|N_{k^\star}^X(i)\cap N_{k^\star}^Y(i)|/k^\star. Averaging over ii gives h=DLPk⋆h=\mathrm{DLP}_{k^\star}. With n−1=2k⋆n-1=2k^\star, Equation (3) reads νk⋆=(2k⋆DLPk⋆−k⋆)/k⋆=2DLPk⋆−1=2h−1\nu_{k^\star}=(2k^\star\mathrm{DLP}_{k^\star}-k^\star)/k^\star=2\mathrm{DLP}_{k^\star}-1=2h-1. For even nn the same count at k=n/2k=n/2 gives νk=2h−1+O(1/n)\nu_k=2h-1+O(1/n). □

On the same 1,999 digits, where k⋆=999k^\star=999, the identity holds to machine precision. νk⋆\nu_{k^\star} and 2h−12h-1 are both 0.328 for PCA and 0.183 for t-SNE and SR-tSNE2, and they differ by less than 10−1510^{-15}.

Past the midpoint the profile mirrors itself. The first identity of Proposition 2 also bounds the band of GG. Let νkF\nu_k^F be the chance-corrected overlap of the jj farthest points, defined as in Equation (3) with FF in place of NN. Substituting the identity into Equation (3) gives νk=νn−1−kF\nu_k=\nu_{n-1-k}^F for every kk. A neighborhood larger than half the data is the complement of a far set smaller than half, so above k⋆k^\star the profile reads the far end of the same rankings again. On the 2,000 digits of Figure 1 the two sides differ by less than 3×10−143\times10^{-14} for PCA. GG therefore stops at the midpoint, where the near and far sets have the same size.

At small kk the profile asks whether a point keeps its nearest neighbors. At k⋆k^\star it asks, for every point, which half of the data is near and which is far. The large distances decide this, so the answer depends on the layout of clusters, branches and regions. The next result connects this agreement to the rank correlation of distances, the usual measure of global structure. In short, a map that sorts every point’s near and far halves correctly has medial correlation 1 with the data.

Proposition 3 (Near–far agreement and rank correlation). Fix a point ii and let (Uj,Vj)=(dX(xi,xj),dY(yi,yj))(U_j,V_j)=(d_X(x_i,x_j),d_Y(y_i,y_j)) for the n−1n-1 other points jj. (i) 2h(i)−12h(i)-1 is Blomqvist’s medial correlation β\beta of these pairs: the share of pairs on the same side of both sample medians minus the share on opposite sides. (ii) If, given point ii, the pairs are i.i.d. draws from a distribution with continuous margins and copula CiC_i, then as n→∞n\to\infty

2h(i)−1→β(i)=4Ci(12,12)−1,(5)2h(i)-1\to\beta(i)=4C_i\left(\frac{1}{2},\frac{1}{2}\right)-1, \tag*{(5)}

a rank correlation of the two distances that needs no model. (iii) Under a Gaussian copula with correlation γ(i)\gamma(i),

β(i)=2πarcsin⁡γ(i),(6)\beta(i)=\frac{2}{\pi}\arcsin\gamma(i), \tag*{(6)}

which is Kendall’s τ\tau of the pair and a strictly increasing function of its Spearman correlation ρS(i)=6πarcsin⁡γ(i)2\rho_S(i)=\frac{6}{\pi}\arcsin\frac{\gamma(i)}{2}.

Proof. (i) With n−1=2k⋆n-1=2k^\star and no ties, rjX(i)≤k⋆r_j^X(i)\leq k^\star holds exactly when UjU_j lies below the sample median of the UU’s, and likewise for VV. By Proposition 2, h(i)h(i) is the share of pairs on the same side of both medians, and 2h(i)−1=h(i)−(1−h(i))2h(i)-1=h(i)-(1-h(i)) is the medial correlation. (ii) With continuous margins the sample medians converge to the population medians, and the share of pairs below both medians converges to Ci(12,12)C_i\left(\frac{1}{2},\frac{1}{2}\right). The share above both medians equals 1−12−12+Ci(12,12)=Ci(12,12)1-\frac{1}{2}-\frac{1}{2}+C_i\left(\frac{1}{2},\frac{1}{2}\right)=C_i\left(\frac{1}{2},\frac{1}{2}\right), so h(i)→2Ci(12,12)h(i)\to2C_i\left(\frac{1}{2},\frac{1}{2}\right) and 2h(i)−1→4Ci(12,12)−12h(i)-1\to4C_i\left(\frac{1}{2},\frac{1}{2}\right)-1. (iii) For a Gaussian copula, Sheppard’s formula gives Ci(12,12)=14+12πarcsin⁡γ(i)C_i\left(\frac{1}{2},\frac{1}{2}\right)=\frac{1}{4}+\frac{1}{2\pi}\arcsin\gamma(i), hence β(i)=2πarcsin⁡γ(i)\beta(i)=\frac{2}{\pi}\arcsin\gamma(i). For the bivariate normal, Kendall’s τ\tau equals 2πarcsin⁡γ\frac{2}{\pi}\arcsin\gamma and Spearman’s ρ\rho equals 6πarcsin⁡γ2\frac{6}{\pi}\arcsin\frac{\gamma}{2}; both increase with γ\gamma. □

Proposition 3 explains why the upper end of the profile agrees with the rank correlation of distances, and the prediction holds on data. Over 400 MNIST points, 2h(i)−12h(i)-1 tracks 2πarcsin⁡γ(i)\frac{2}{\pi}\arcsin\gamma(i) with Pearson correlation 0.94 (Figure 1e). On real data GG ranks maps as the established global scores do (Results).

Local fidelity, global fidelity, and derived quantities

With the meaning of both ends established, the two scores follow. LL reads the profile at k=10k=10 and GG averages it over 0.3≤k/n≤0.50.3\leq k/n\leq0.5. Both lie on one scale, so they can be compared directly.

Definition 2 (Local and global fidelity). For a map of nn points, the local fidelity and the global fidelity are

L=ν10,G=1∣K∣∑k∈Kνk,K={k:0.3≤k/n≤0.5}.(7)L=\nu_{10},\qquad G=\frac{1}{|\mathcal{K}|}\sum_{k\in\mathcal{K}}\nu_k,\qquad\mathcal{K}=\{k:0.3\leq k/n\leq0.5\}. \tag*{(7)}

The chance correction reverses the order of the maps. On the 70,000 MNIST digits the chance correction reverses the order of the maps between the two ends (Supplementary Figure 4). Every DLPk\mathrm{DLP}_k curve ends at 1, and near k=n−1k=n-1 it is close to its chance level, so the raw curve hides the differences at the upper end (panel a). The chance correction removes the level k/(n−1)k/(n-1) and spreads the profiles apart (panel b). At k=10k=10, LL is 0.390 for SR-tSNE2 and 0.377 for t-SNE, against 0.007 for PCA and 0.008 for NPCA. Over the band, the order reverses: PCA has G=0.301G=0.301 and NPCA 0.266, against 0.187 for SR-tSNE2 and for t-SNE (panel c).

LL and GG are compared directly. Because LL and GG are the same statistic at two scales, they are set side by side for one map and compared between maps of the same data. LL uses an absolute neighborhood and GG a band of relative scale, so comparisons are made within a dataset, and the reversal test decides them for two maps. LL is read at a fixed small neighborhood, the scale at which t-SNE, UMAP, and their relatives are designed to be faithful. GG averages the profile over its upper end, where Proposition 2 makes it a statement about near and far halves. Two methods can then be compared on both axes at once.

A relative scale makes GG estimable from a subsample. GG is defined at a scale relative to nn, which makes it comparable across datasets and estimable from a subsample. A fixed kk is a global scale on a small dataset and a local one on a large dataset; k=50k=50 is a third of 150 points and 0.005 percent of a million. Take a relative scale s=k/ns=k/n and a uniform subsample of mm points. The [sm][sm] nearest points within the subsample approximate the ss-quantile neighborhood in the full data. GG computed on the subsample therefore estimates GG of the full map. LL at fixed k=10k=10 behaves differently: on the subsample it refers to the relative scale 10/m10/m, which grows as mm shrinks. Both are measured below.

EE reads the profile at each point’s entity size. Many tasks ask for a whole entity: all cells of a type, all records of a customer, all passages on a topic. The scale of such a task lies between LL and GG, and it changes from entity to entity. We therefore read the profile at each point’s own entity size.

Definition 3 (Entity fidelity). Let point ii belong to entity c(i)c(i) with nc(i)n_{c(i)} members, and let ki=nc(i)−1k_i=n_{c(i)}-1, with 1≤ki≤n−21\leq k_i\leq n-2. With oi=∣NkiX(i)∩NkiY(i)∣o_i=|N_{k_i}^X(i)\cap N_{k_i}^Y(i)| the entity fidelity of point ii and of the map are

E(i)=(n−1)oi−kin−1−ki,E=1n∑i=1nE(i).(8)E(i)=\frac{(n-1)o_i-k_i}{n-1-k_i},\qquad E=\frac{1}{n}\sum_{i=1}^{n}E(i). \tag*{(8)}

EE applies the chance correction of Equation (3) at a scale that varies with the point, so it is corrected point by point before the average. $E uses the entity sizes alone. When every entity has n0n_0 members, E=νn0−1E = \nu_{n_0-1}, a single point of the profile; EE adds most where entity sizes differ.

Two quantities compare maps. Two derived quantities summarize comparisons. The crossover scale says where the other map becomes the more faithful one. The exchange rate says how much global fidelity a parameter gains for each unit of local fidelity it trades. Both need the two ends on one scale.

Definition 4 (Crossover scale and exchange rate). The crossover scale of a local method AA against a global method BB, with profiles νkA\nu_k^A and νkB\nu_k^B, is

s×(A,B)=min⁡{k/n:νkB≥νkA}.(9)s^{\times}(A,B)=\min\{k/n:\nu_k^B\geq\nu_k^A\}. \tag*{(9)}

If νkA>νkB\nu_k^A>\nu_k^B at every kk, there is no crossover and AA is the one map to use. A parameter path is the sequence of maps of one method as one parameter θ\theta changes. The exchange rate of a path from θ0\theta_0 to θ1\theta_1, with fidelities (L0,G0)(L_0,G_0) and (L1,G1)(L_1,G_1) and L1≠L0L_1\ne L_0, is

η=−G1−G0L1−L0.(10)\eta=-\frac{G_1-G_0}{L_1-L_0}. \tag*{(10)}

Below s×s^\times method AA is the more faithful map, and above it BB is. The reversal test turns this reading into a test. The rate η\eta is the global fidelity gained per unit of local fidelity traded, for example when t-SNE’s perplexity rises from 30 to 200. The rate is defined because LL and GG are the same statistic, so their differences share one unit.

Computation

All these quantities come from one profile. The whole profile follows from one cumulative sum, and on large data GG is estimated from a subsample. Point ii keeps neighbor jj at every k≥μi(j)=max⁡{riX(j),riY(j)}k\geq\mu_i(j)=\max\{r_i^X(j),r_i^Y(j)\}, so its overlap ∣NkX(i)∩NkY(i)∣|N_k^X(i)\cap N_k^Y(i)| is the number of jj with μi(j)≤k\mu_i(j)\leq k. One histogram of μi(j)\mu_i(j) per point and its cumulative sum give the whole profile of every point, and their mean gives νk\nu_k at every kk. This needs the two n×nn\times n rank matrices, O(n2log⁡n)O(n^2\log n) time and O(n2)O(n^2) memory; for n=5,000n=5{,}000 this takes a few seconds on one core. For larger nn, GG is estimated on a uniform subsample of a few thousand points, with the next subsection shows to be accurate. The code is released with the paper.

G is estimated from a few thousand points

Because GG is defined on a relative scale, a uniform subsample of a few thousand points estimates it at any nn, with fixed time and memory. On each large dataset we drew five uniform subsamples of each size m=1,000m=1{,}000, 2,0002{,}000, 4,0004{,}000 and 8,0008{,}000 points for the PCA and t-SNE maps. GG was computed on each subsample from the subsampled data and map alone (Supplementary Figure S5,Figure S5).

Figure S5. GG is stable across bands and subsample sizes, and it varies across runs more than LL. (a) Correlation of three other bands with GG; gray, agreement of the method rankings within a dataset. (b) Run-to-run standard deviation of GG against that of LL; dotted line y=xy=x. (c) Change in GG with the subsample size mm, PCA solid and t-SNE dashed; colored, the four applications. (d) GG on SEA-AD from m=1,000m=1{,}000 to 8,0008{,}000.

At m=2,000m=2{,}000 the mean estimate lies within 0.010 of its value at m=8,000m=8{,}000 on every dataset and for both maps, and at m=4,000m=4{,}000 within 0.005. The standard deviation over draws is at most 0.012 at m=2,000m=2{,}000. On SEA-AD, with 1.38 million nuclei, GG of PCA is 0.287, 0.288, 0.285 and 0.286 at the four sizes, and that of t-SNE 0.241, 0.240, 0.237 and 0.242 (Supplementary Figure S5). We therefore report GG as the mean over ten subsamples of 2,000 points, which takes seconds for any nn. LL is defined on an absolute scale. At fixed k=10k=10, a subsample of 2,000 points asks about the nearest 0.5 percent of the data. On a million points the same kk asks about the nearest 0.001 percent, a far more local scale. LL is therefore computed exactly from the 10 nearest neighbors of every point.

How the test works

The test has three steps. Per-point scores turn the comparison into paired means, two one-sided tests give the declaration, and a block jackknife gives standard errors for dependent points.

Step 1: every score is a mean over points. From the profile of each point (Equation (1)) define

L(i)=ν10(i),G(i)=1∣K∣∑k∈Kνk(i).(11)L(i)=\nu_{10}(i),\qquad G(i)=\frac{1}{|\mathcal{K}|}\sum_{k\in\mathcal{K}}\nu_k(i). \tag*{(11)}

The score of a whole map is then the average of the scores of its points.

By Equations (1) and (3), averaging νk(i)\nu_k(i) over points gives ((n−1)DLPk−k)/(n−1−k)=νk((n-1)DLP_k-k)/(n-1-k)=\nu_k, so

νk=1n∑iνk(i),L=1n∑iL(i),G=1n∑iG(i).(12)\nu_k=\frac{1}{n}\sum_i\nu_k(i),\qquad L=\frac{1}{n}\sum_iL(i),\qquad G=\frac{1}{n}\sum_iG(i). \tag*{(12)}

On the 1,999 MNIST digits, the mean of ν10(i)\nu_{10}(i) over points equals ν10\nu_{10} to machine precision for PCA, t-SNE and SR-tSNE2. (12) is what makes standard errors possible: on MS MARCO the per-point differences give a standard error of 0.009 for the local difference and 0.012 for the global one (Results).

By Equation (12), comparing two maps of the same data means comparing paired means. For methods AA and BB, the differences dL(i)=LA(i)−LB(i)d^L(i)=L^A(i)-L^B(i) and dG(i)=GB(i)−GA(i)d^G(i)=G^B(i)-G^A(i) have means LA−LBL^A-L^B and GB−GAG^B-G^A.

Step 2: a reversal needs both one-sided tests to reject. A reversal is declared only when the data support both claims at once.

Definition 5 (LG reversal test). For methods AA and BB applied to the same data, the local test has null hypothesis H0L:LA≤LBH_0^L:L^A\leq L^B and the global test has null hypothesis H0G:GB≤GAH_0^G:G^B\leq G^A. AA is declared local and BB global, a reversal, when both nulls are rejected at level α\alpha. With pLp_L and pGp_G the p-values of the two tests, the p-value of the declaration is p=max⁡(pL,pG)p=\max(p_L,p_G).

By the intersection–union principle2, the declaration has level α\alpha: a false declaration needs a false rejection, and each test makes one at rate at most α\alpha. The two tests therefore run at the full level, with no correction.

The level holds on data: over 48 one-sided global tests on the large datasets the rejection rate of a true null averages 0.046. On 50 independent subsamples the local test rejects at no more than 0.020 (Calibration, below). On the Swiss roll, for example, t-SNE stays above PCA at every scale, so t-SNE is the one map to use.

Step 3: a block jackknife allows for shared neighbors. Two points that are near each other share neighbors, so a map that tears one region apart lowers the L(i)L(i) of every point in it, and the per-point differences are dependent. Write d(i)d(i) for either dL(i)d^L(i) or dG(i)d^G(i) and dˉ\bar d for its mean over all nn points. We cut the data into C=20C=20 blocks by kk-means in the input space, so that most shared neighborhoods fall inside one block. For the upper end, the calibration below checks the resulting standard errors against a null that resamples the same blocks. The delete-a-group jackknife3 leaves out one block cc at a time and recomputes the mean difference dˉ(c)\bar d_{(c)} from the remaining points. With dˉ(⋅)\bar d_{(\cdot)} the mean of the CC values dˉ(c)\bar d_{(c)}, it estimates

SE^=C−1C∑c=1C(dˉ(c)−dˉ(⋅))2.(13)\widehat{\mathrm{SE}}=\sqrt{\frac{C-1}{C}\sum_{c=1}^{C}\left(\bar d_{(c)}-\bar d_{(\cdot)}\right)^2}. \tag*{(13)}

The statistic t=dˉ/SE^t=\bar d/\widehat{\mathrm{SE}} is compared with a tt distribution with C−1C-1 degrees of freedom. Its upper-tail probability is the one-sided p-value: pLp_L for the local test and pGp_G for the global test. The neighbor sets are computed once from all nn points, and the jackknife leaves out blocks of the points over which the per-point scores are averaged.

The crossover interval. The same leave-one-block-out means give an interval for the crossover. With νˉcA\bar\nu_c^A and νˉcB\bar\nu_c^B the profiles averaged over the points outside block cc, s(c)×s^\times_{(c)} is read from them by Equation (9). The interval is s×±tC−1,0.975SE⁡(s×)s^\times\pm t_{C-1,0.975}\operatorname{SE}(s^\times), where tC−1,0.975t_{C-1,0.975} is the 0.975 quantile of the tt distribution with C−1C-1 degrees of freedom and SE⁡^(s×)\widehat{\operatorname{SE}}(s^\times) is Equation (13) applied to the values s(c)×s^\times_{(c)}. When the profile of AA stays above that of BB at every scale, the test reports AA as the one map to use.

Calibration

The global test rejects a true null at close to its stated rate. We built a null with the dependence of each dataset. The per-point differences d(i)d(i) were centered so that their mean is exactly zero. The 20 blocks were then resampled with replacement, 500 times on the large datasets and 2,000 times on the small ones, and the jackknife statistic was recomputed each time. On the large datasets the test runs on a uniform subsample of 5,000 points. On this subsample k=10k = 10 is a coarser relative scale than in the exact LL of Supplementary Table 4, so the local differences of the test are read at that scale. On MS MARCO the local difference of t-SNE is 0.213 in the test and 0.253 in the table. Over the 48 one-sided global tests (twelve datasets, four maps against PCA) the rejection rate at level 0.05 averages 0.046. On the three smaller datasets and the three manifolds, tested on all points, the rejection rate of the 36 one-sided tests averages 0.051. On 50 independent subsamples of each large dataset, with the maps fixed, the local test rejects a true null at no more than 0.020 and the global test at 0. A test that treats points as independent rejects at up to 0.20 and 0.48 (Figure 6, Supplementary Table 10 and Supplementary Note 6). The two kinds of error answer different questions. The spread over subsamples is the error of drawing other points from the same dataset. The block jackknife also counts the variation between regions of the data, the error of drawing another dataset from the distribution the data come from, and that distribution is what the test makes inference about. Its standard errors therefore exceed the spread over subsamples, by a median factor of 4.3 for LL and 6.3 for GG, by design. Supplementary Note 8 repeats the declarations with 10 and 50 blocks. Refitting t-SNE on MNIST with five more seeds moves the global difference by a standard deviation of 0.010, about a sixth of its jackknife standard error. Four of the six maps are declared, and the other two reach p≤0.061p \le0.061 (Supplementary Note 9). The test makes inference for the two fitted maps.

Experimental design

The main claims of this paper are tested on 156 maps of twelve datasets of 50,000 to 1.38 million points: seven methods on each dataset and 72 maps from 24 parameter settings on MNIST.

Twelve large datasets, four of them applications. The study rests on twelve datasets of 50,000 to 1.38 million points (Supplementary Table 5). Four are applications, which lead every table and figure, and eight are the benchmark datasets of our earlier SR-t-SNE study[30]. The four applications are as follows. For pathology, Pathology-100K holds 100,000 colorectal tissue tiles (NCT-CRC-HE-100K)[31] embedded with Phikon[32]. For single cells, SEA-AD holds the 1,378,211 nuclei of the SEA-AD middle temporal gyrus atlas[21], as 50 principal components. For supply chains, Instacart holds the purchases of 195,827 Instacart customers over the 2,000 products bought by the most customers. Each customer has at least five of these products and is a unit vector of log⁡(1+count)\log(1 + \text{count}). For AI agent memory, MS MARCO holds one million passages drawn at random from the 8.8 million of MS MARCO[19]. They are embedded with BGE-base[20] as the long-term memory of a retrieval agent. Among the benchmarks, MNIST[14] and Fashion-MNIST[33] enter as pixels and Covertype[34] as its 54 attributes. CIFAR-10[35] enters as 512 pooled features of an ImageNet-trained ResNet-18[36], Speech Commands[37] as mean-pooled wav2vec 2.0 features[38], and AG News[39] as mean-pooled BERT embeddings[40]. Renal-Cortex and Brain-Cortex are the two single-cell datasets of the SR-t-SNE study, each reduced to 50 principal components of the log-normalized expression of 2,000 variable genes. The reference dissimilarity is the Euclidean distance in the representation of Supplementary Table 5, and the cosine distance for unit vectors.

Smaller datasets and manifolds with known structure. Two further groups of data complete the study. Three smaller datasets of a few thousand points show the scores at the size an analyst often works with (Results). Pathology-7K holds 7,180 colorectal tissue tiles in nine classes (CRC-VAL-HE-7K)[31], embedded with Phikon. Online Retail holds the purchases of 5,459 customers of a UK online wholesaler over 2,000 products, from about one million invoices[41]. Each customer is a unit vector of log⁡(1+quantity)\log(1 + \text{quantity}). 8-K holds 5,000 SEC 8-K filings, drawn at random from 18,289 and embedded with BGE-base. Three synthetic manifolds have a known global structure. The Swiss roll and the S-curve have 1,500 points each, and their reference is the Euclidean distance between the unrolled two-dimensional coordinates, the true geodesic distance. The tree is a ten-branch diffusion-limited aggregation in 100 dimensions with 2,000 points, generated with the PHATE package. Its reference is the shortest-path distance in the 10-nearest-neighbor graph. On the Swiss roll and the S-curve the true global structure is the unrolled sheet.

Seven maps on every large dataset. Seven maps are fitted on every large dataset, on all points with a fixed seed. The first is PCA. Nonnegative PCA (NPCA)[42], our earlier method, maximizes variance under nonnegative loadings by projected gradient ascent (two components, orthonormality penalty 0.1, 3,000 steps). t-SNE uses openTSNE[43], accelerated by the fast Fourier transform, with PCA initialization, which shapes its global layout[44]. It runs at perplexity 30, the default, and at perplexity 200 (t-SNE200_{200}). SR-tSNE2[30], our rank refinement of t-SNE, refines the perplexity-30 t-SNE map in O(nlog⁡n)O(n \log n) time. It adds a smooth rank loss on each point’s 10 nearest neighbors in the input (learning rate 50, rank weight λ=20\lambda= 20, 2,000 iterations). UMAP and PaCMAP run at their package defaults. On the 60,000 MNIST training digits, four parameter paths vary one setting each. They are t-SNE’s perplexity (5 to 500), UMAP’s number of neighbors (5 to 500), the exaggeration of t-SNE (1 to 32), and the number of principal components before t-SNE (2 to 50). Each setting has three runs, one with PCA initialization and two random, which gives 72 further maps. The three smaller datasets are embedded by the same methods except t-SNE200_{200}, and also by PHATE and DREAMS[18]. On them SR-tSNE2 runs at the setting of the SR-tSNE study for fewer than 50,000 points (rank weight λ=5\lambda= 5, 1,000 iterations). The three manifolds are embedded by PCA, t-SNE, SR-tSNE2, UMAP and PaCMAP, and also by kernel PCA (KPCA), LLE[45], Isomap[46], PHATE and TriMAP[4].

LL is exact and GG is averaged over ten subsamples. LL is computed exactly over all points from the exact 10 nearest neighbors in the data, found on a GPU. GG and the profile νk\nu_k are the means over 10 uniform subsamples of 2,000 points, which the subsample check above shows is enough. From the profile we also read the average over the middle band 0.1≤k/n≤0.20.1 \le k/n \le0.2, the midpoint value and two alternative global bands (0.2–0.5 and 0.4–0.5). We also compute the area under RNXR_{NX} on a logarithmic axis, the usual summary of neighbor curves[17]. As established global scores we compute two quantities on the same subsamples. The distance rank correlation (distance ρ\rho in the figures) is the Spearman correlation ρ\rho between pairwise map distances and the reference dissimilarities. Random-triplet accuracy is the fraction of random triplets (i,j,l)(i, j, l) for which data and map agree on whether jj or ll is closer to ii[5]. O-DL@10 is the share of each point’s 10 nearest neighbors that the map returns at their exact rank, averaged over points.

The task retrieves each entity from its centroid. For entity cc, the exact selection is the ncn_c points nearest to the centroid of cc in the data. The map selection is the ncn_c points nearest to its centroid on the map. The miss rate is the share of the exact selection that the map does not return. For each pair of an entity and a map we average E(i)E(i), LL, GG and a common-scale reading MM over up to 200 sampled members of the entity (seed 0). All four come from the exact rankings of the n−1n - 1 other points. MM reads the profile at one kk for every point, the median of nc(i)−1n_c(i) - 1 over all points. MM separates the effect of reading each point at its own entity size. Over the seven maps of each dataset we report the partial rank correlation of the miss rate with EE given LL, GG and MM. Its 95% interval comes from a bootstrap over entities (2,000 resamples).

Supplementary information Supplementary Notes, Supplementary Results, Supplementary Figure 1–11 and Supplementary tbl:1–12 follow the references.

Data availability All data are public. Pathology-100K and Pathology-7K are NCT-CRC-HE-100K and CRC-VAL-HE-7K[31]. SEA-AD is the middle temporal gyrus atlas of the Seattle Alzheimer’s Disease Brain Cell Atlas[21]. The endothelial cells come from the Tabula Sapiens atlas[25], as released in the CZ CELLxGENE Census. Instacart is the Instacart Online Grocery Shopping Dataset 2017, released by Instacart and distributed on Kaggle. Online Retail is Online Retail II of the UCI Machine Learning Repository[41]. MS MARCO[19], FinQA[22], LoCoMo[47], MNIST, Fashion-MNIST, CIFAR-10, Speech Commands, Covertype and AG News come from their public releases (Methods). The 8-K filings come from SEC EDGAR. Renal-Cortex and Brain-Cortex are the single-cell benchmarks of the SR-t-SNE study, which gives their sources[30].

Code availability The package lgfid computes LL, GG, O-DLP@10 and the profile of any map from the data and the map. It runs the reversal test (Methods) on two maps, from a command line or from Python. It computes LL exactly and GG from ten subsamples of 2,000 points, as in Methods, and its tests check the identity map and a random map. Data and code: https://github.com/hank08819/LG2Test.

Author contributions H.H. designed the study, ran the experiments and wrote the paper.

Competing interests The author declares no competing interests.

Supplementary notes

Related work

Our DLP curve [13] is the curve from which every score here is read. Earlier work supplies the global scores we use to validate GG, and other neighbor-based quality curves, reviewed below. Three things are new here, and all three come from our DLP curve: a proven meaning for its upper end, local and global scores on one scale, and an error rate for comparing two maps.

Rank-based quality curves. Lee and Verleysen[15] unified several neighborhood-based quality criteria through the co-ranking matrix and defined QNX(k)Q_{NX}(k), the average overlap of kk-neighborhoods. Its chance-corrected rescaling, RNX(k)R_{NX}(k), appears in later work of the same group. Lee et al. [17] summarized RNX(k)R_{NX}(k) by its area on a log kk axis to compare multiscale neighbor embeddings. Trustworthiness and continuity[11] penalize intrusions and extrusions by rank and are usually reported at a single small kk. NeRV[48] casts a map as an information-retrieval display and trades the precision of retrieved neighbors against their recall. The coRanking package[49] computes these co-ranking criteria in R, and two surveys compare projection techniques with many quality measures[50, 51]. In single-cell genomics, [52] scored dimension reductions by how well they preserve the structure of the data, and[53] showed that reducing such data to two dimensions inevitably distorts it, neighborhoods included. Our DLP curve [13] is the starting point of this paper, because one statistic covers every scale. Their summaries weight the lower end: the area under RNXR_{NX} is dominated by small kk by design. Lee and Verleysen[15] split QNXQ_{NX} at a data-dependent size kmax⁡k_{\max} into QlocalQ_{\mathrm{local}} and QglobalQ_{\mathrm{global}} and advised consulting QglobalQ_{\mathrm{global}} to break ties. Lueks et al. [16] found that this global measure depends on absolute ranks and one parameter, and replaced it with a weighting governed by two user-set thresholds. Our GG keeps the single curve, reads it on a fixed band of relative scale after the chance correction, and gives its upper end a proven meaning.

Global structure of neighbor embeddings. Kobak and Berens[12] and Kobak and Linderman[44] showed that the global layout of t-SNE and UMAP maps is largely set by initialization, and that large perplexities or multiscale affinities improve it. They measured global structure by the distance rank correlation, often between cluster centroids. Böhm et al. [54] placed t-SNE, UMAP and related methods on a spectrum of attraction against repulsion, which the exaggeration of t-SNE traverses. Wang et al. [5] analyzed the losses of t-SNE, UMAP and TriMAP[4], introduced PaCMAP, and measured global structure by random-triplet accuracy. Huang et al. [55] compared methods for transcriptomic data on separate local and global criteria. These studies shaped what is now believed about each method. Their evidence pairs a local score with a global score of a different kind; weighing a gain at one end against a change at the other calls for one scale. DREAMS[18] comes closest: it traces a path between t-SNE and PCA in the plane of neighbor recall and distance rank correlation. Its two axes keep their own ranges and chance levels. Our (L,G)(L,G) plane puts both axes on one scale, which defines the crossover and the exchange rate, and the Results check GG against the global scores these studies used.

Compressed memories of AI agents. Compressed embeddings, from truncated[7] to product-quantized[8], are judged by the recall of their nearest neighbors[9]. Recall is a local score. Agents also consolidate memories and answer questions from their organization into topics[10], and these tasks depend on global structure. With the uncompressed embedding as the reference, the profile scores a compressed memory at both ends.

Comparing two maps. The studies above compare maps by point values of their scores. Our LG reversal test adds inference to this comparison: a standard error for the difference between two maps of the same data, and a decision on whether one map is local and the other global. Neighboring points share neighbors; a block jackknife[29] handles this dependence, and the intersection–union principle[28] combines the two one-sided tests.

The Methods define LL and GG on one chance-corrected profile, prove what its upper end measures, and build the LG reversal test on the per-point form of the same scores.

Contributions

Contributions. We apply the scores and the test to twelve datasets of 50,000 to 1.38 million points. Four come from applications: Pathology-100K, 100,000 pathology tiles; SEA-AD, 1.38 million single nuclei; Instacart, the purchases of 195,827 customers of a grocery supply chain; and MS MARCO, the one million passages above. The other eight are benchmarks of images, speech, text and single cells. Three smaller datasets complete the study, among them the Online Retail purchases. So do three synthetic manifolds, among them the Swiss roll and the S-curve. The contributions are listed by importance, and each rests on the one before it.

  1. A new test of whether one map is local and another global. The LG reversal test turns the usual claim, that t-SNE is local and PCA global, into a decision with a stated error rate. Its global test holds its level, with a mean rejection rate of 0.046 over 48 tests at level 0.05. It also gives the crossover size, with a 95% interval, at which a user should change maps. On the memory of a retrieval agent it gives that size in passages (Results, Figure 2b–Figure 2d).

  1. New definitions of local and global fidelity on one scale, with a proven upper end. The test is possible because LL and GG are one chance-corrected statistic at two scales. We prove that at k=(n−1)/2k=(n-1)/2 the profile is the agreement on which half of the data is near each point. It converges to a rank correlation of the distances for i.i.d. pairs with continuous margins, and to Kendall’s τ\tau under a Gaussian copula (Propositions 2 and 3). The common scale defines two new quantities, the crossover scale and the exchange rate (Methods).

  1. Validation on 156 maps of up to 1.38 million points. The propositions lead us to expect that GG ranks maps as the established global scores do, and the data agree. GG has rank correlation 0.89 with the distance rank correlation and 0.96 with random-triplet accuracy. Over 84 maps the area under RNXR_{NX} reaches 0.22 and 0.30, against 0.84 and 0.93 for GG. The value of GG changes little with the band, and 2,000 points estimate it to within 0.01.

  1. Tests of the usual claims in four applications. With a validated GG and the test, the usual claims can be checked. The test declares t-SNE local and PCA global on seven of the twelve datasets, with the crossover at 9 to 20 percent of the data. On Instacart, Online Retail, the Swiss roll and the S-curve the test finds the neighbor embeddings more global. PCA has the highest GG on six datasets and PaCMAP on four. The parameters said to add global structure have measured exchange rates and estimated energy costs. On the 60,000 MNIST digits PCA keeps the highest GG and t-SNE the highest LL across all 24 settings (Results and Supplementary Note 2.4).

  1. Our own methods on the same scale. The scale also measures design choices. SR-tSNE230^{230}, an O(nlog⁡n)O(n \log n) rank refinement of t-SNE, has the highest LL on all twelve datasets. It returns neighbors at their exact rank 18% to 76% more often than t-SNE, with GG within 0.0005. Nonnegative PCA42^{42} names its axes by tissue, cell type or product, with GG within 0.14 of PCA’s (Supplementary Note 2.4).

  1. Software. The Python package lgfid returns LL, GG, the profile and the reversal test with its crossover interval for any data and one or two maps. It computes them exactly up to 5,000 points and from subsamples beyond.

Supplementary results

The LG reversal test: which map answers which question

The question every user faces. Analysts often keep two maps of the same data and use each for a different purpose. A pathologist searches one map for tiles that resemble a tumor tile and reads the layout of tissues from another. The keeper of an AI agent’s memory inspects the passages near a query on one map and the grouping of topics on another. A supply-chain planner finds customers who buy like a given customer, and also segments all customers for stocking. Each of them must decide which map answers which question (Supplementary Fig. 6).

The test puts evidence behind the choice. The choice is usually made by citing the design of a method or by looking at a map. The test adds an error rate. Two profiles computed on a finite sample can cross by chance, through the choice of points drawn. On SEA-AD, PCA is more global than t-SNE by 0.044 in GG, a gap that looks decisive on a plot, and the test places it within chance (p=0.16p = 0.16).

The test is new. Earlier quality curves and scores [5, 11, 15, 17] report point values for one map at a time. The LG reversal test adds what a comparison of two maps needs: a decision on whether they reverse their order between the two ends, and an interval for the scale at which they cross. The test is possible here because LL and GG are the same statistic at two scales, and both are means of per-point scores.

What the test returns

The four applications. Results applies the test to every dataset, and the four applications show what it gives a user.

  • Pathology. On Pathology-100K t-SNE is local and PCA global (p=1.4×10−7p = 1.4 \times10^{-7}), with the crossover at 10,040 tiles (4,210 to 15,870). The search for tiles that resemble a tumor tile uses the t-SNE map, and the layout of the nine tissues uses the PCA map.

  • AI agent memory. On MS MARCO t-SNE is local and PCA global (p=2.6×10−5p = 2.6 \times10^{-5}), with the crossover near 150,000 passages (Results). The passages near a query are inspected on the t-SNE map, and the layout of topics for consolidation on the PCA map (Figure 2b–d).

  • Supply chains. On Instacart t-SNE is more local than PCA by 0.080 and also more global by 0.021, so t-SNE leads at both ends and no reversal is declared (p=0.97p = 0.97).

  • Single cells. On SEA-AD the global gap between PCA and t-SNE stays within its sampling error ($p = 0.16). t-SNE serves the neighbors of a cell, and PaCMAP, the map with the highest GG, the distances between cell types.

Protection against biased conclusions. The test guards against three sources of bias in common practice. The first is to take the design of a method as a property of the data; on Instacart, Online Retail, the Swiss roll and the S-curve the test finds the neighbor embeddings more global. The second is to read a chance gap as a difference; the test places the SEA-AD gap within chance. The third is to treat neighboring points as independent; a block jackknife gives standard errors of the right size. The global test holds its level: over 48 global tests the rejection rate under the null averages 0.046 at level 0.05.

The upper end of the profile measures global structure

Two profile shapes. Two shapes recur in the profiles of the seven methods (Supplementary Fig. 7). The profile of PCA rises on every dataset, from its lowest value at the nearest neighbors to its highest at the near and far halves. The profile of t-SNE is higher at its lower end than in the global band on five of the twelve. Local and global behavior thus appear as the two ends of one profile, and the question is whether its upper end measures what the established global scores measure.

G is stable across bands and subsamples

A useful global score also stays put when its band, its random seed and its sample change. This subsection checks the band and the seed, and the next one the sample.

The conclusions hold for every global band tested. Other bands give nearly the same scores at 0.3≤k/n≤0.50.3 \le k/n \le0.5. Over the 84 maps of the large datasets, GG correlates at 0.98 with the 0.2–0.5 band and with the 0.4–0.5 band, and at 0.96 with the single midpoint value (Supplementary Fig. 5a). Narrower bands at the top correlate more closely with the distance rank correlation, 0.91 for 0.4–0.5 and 0.94 for the midpoint, and the 0.3–0.5 band averages over more scales. Within a dataset, the global bands rank the methods as GG does, with mean Kendall τ\tau of 0.83 and 0.89. The middle band 0.1≤k/n≤0.20.1 \le k/n \le0.2 gives a different ranking (τ=0.15\tau= 0.15), so the ranking is set at the upper end. Supplementary Table 12 in Supplementary Note 5 gives the full comparison.

GG shows how much the global layout of a map depends on its seed. On the MNIST parameter paths each setting was run three times; on the t-SNE paths seed 0 starts from PCA and seeds 1 and 2 at random, so the spread includes the change of initialization. The refits of Supplementary Note 9 all start at random and move the global difference by 0.010. The standard deviation of GG over the runs exceeds that of LL in 23 of the 24 settings, by a median factor of 34 (Supplementary Fig. 5b). At perplexity 30 it is 0.038 for GG and 0.0005 for LL, a factor of 84. Over all settings the standard deviation of LL is at most 0.0017, and that of GG reaches 0.128 with two principal components before t-SNE. The nearest neighbors in a stochastic map are reproducible across runs, and the global layout depends on the random start. We therefore report the run-to-run standard deviation of GG wherever runs are repeated (Supplementary Note 2.4).

Agreement rises with the scale. With the distance rank correlation it rises from −0.18 at k=10k = 10 to 0.57 at the middle band and 0.84 to 0.94 at the upper end. With random-triplet accuracy it rises from −0.10 to 0.70 and 0.93 to 0.98.

Four applications: pathology, single cells, supply chains, and AI agent memory

Named axes. NPCA names its axes on the three datasets that have class labels or named variables (Figure 3d,i,n). On Pathology-100K the axes are debris and muscle, which hold 36% and 49% of the 5% of tiles scoring highest on them. On SEA-AD they are oligodendrocytes, 54%, and microglia with perivascular macrophages, 58%. On Instacart they are two baskets: organic bananas, organic baby spinach and organic strawberries on one, and bananas, large lemons and organic avocados on the other. Named axes keep GG within 0.002 of PCA’s on SEA-AD and Instacart, and within 0.136 on Pathology-100K.

Smaller datasets. The three smaller datasets show the same pattern at a few thousand points (Supplementary Fig. 2). They are Pathology-7K, Online Retail and 8-K described in Methods; the filings serve as the long-term memory of a finance agent. PCA has the highest GG on Pathology-7K and 8-K, 0.549 and 0.440. On Online Retail t-SNE and SR-tSNE2 are the most global maps, with G=0.191G = 0.191 against 0.103 for PCA, as on Instacart. NPCA’s axes are two tissues on Pathology-7K, background and normal mucosa, and two product groups on Online Retail, with the GG of PCA. On 8-K they are two filing types, earnings releases (item 2.02, 100%) and officer changes (item 5.02, 96%).

What LL means for a pathologist. A difference in LL has a direct reading for a user. On the SR-tSNE2 map a tumor tile keeps 6.1 of its 10 nearest neighbors, and on UMAP 4.1 (Supplementary Figure S8). The SR-tSNE2 map separates the nine tissues and keeps the morphology continuous across them (Supplementary Figure S8,Figure S8). The NPCA axes are tissues, and the tiles that score highest on them are the tissue they name (Supplementary Figure S8). These counts are averages over all 1,233 tumor tiles, with neighbors defined in the Phikon space; for SR-tSNE2 the 95% bootstrap interval is 6.0 to 6.2. The t-SNE map keeps 6.0, UMAP 4.1, PaCMAP 3.7 and PCA 0.4. SR-tSNE2 returns at least half of the true neighbors for 80% of the tumor tiles, and UMAP for 41%. Supplementary Figure S8 shows one tumor tile drawn at random. For a pathologist who searches a map for similar tissue, the map with the higher LL returns more of the true neighbors.

Figure S8. On the SR-tSNE2 map a tumor tile keeps 6.1 of its 10 true neighbors on average, and on UMAP 4.1. (a) The SR-tSNE2 map of Pathology-7K by tissue. (b) The same map, showing the tile nearest each grid cell. (c) The NPCA map with the six top tiles on each axis. (d) A tumor tile and its five nearest neighbors on each map; green frames mark true neighbors in the Phikon space.

What L and G show about common methods

SR-tSNE2 is the most local map on every large dataset, the most global map changes with the data, and across all 24 MNIST parameter settings PCA keeps the highest GG and t-SNE the highest LL.

Which method is global depends on the data at every size tested. The four applications showed that the most global map changes from one dataset to the next. Supplementary Table S4 and Supplementary Figure S9 give the scores on all twelve datasets. SR-tSNE2 has the highest LL on all twelve large datasets, by 0.0002 to 0.056 over t-SNE, and t-SNE the highest among the published methods. A one-sided test on all points finds the gain of SR-tSNE2 significant on nine datasets, by 0.010 to 0.056 with p≤3.7×10−5p \le3.7 \times10^{-5}, and within 0.001 on CIFAR-10, Speech Commands and AG News (Supplementary Note 7). The highest GG belongs to PCA on six of the twelve: MNIST, Fashion-MNIST, Speech Commands, AG News, Pathology-100K and MS MARCO. PaCMAP has the highest GG on Brain-Cortex, Covertype, SEA-AD and Instacart, 0.413 against 0.328 for PCA on Brain-Cortex and 0.417 against 0.286 on SEA-AD. NPCA leads by 0.002 on Renal-Cortex and UMAP by 0.001 on CIFAR-10. PCA has the highest GG on half of the large datasets.

Figure S9. SR-tSNE2 is the most local map on every large dataset, and the most global map changes with the data. Applications above the line. (a) LL. (b) GG; bold, the best. (c) G−LG - L, compared between maps of one dataset; blue, positive. (d) Crossover scale at which PCA reaches each neighbor embedding.

Supplementary Table 4 | SR-tSNE2 has the highest or tied-highest LL on all twelve datasets; PCA has the highest GG on six and PaCMAP on four. LL (left) and GG (right) of seven methods on the twelve large datasets, the four applications first; bold: best on the dataset. †t-SNE200: perplexity 200.

DatasetLL PCALL NPCALL t-SNELL t-SNE200LL SR-tSNE2LL UMAPLL PaCMAPGG PCAGG NPCAGG t-SNEGG t-SNE200GG SR-tSNE2GG UMAPGG PaCMAP
Pathology-100K0.0120.0080.4360.3310.4580.2330.2050.5970.4610.4420.4560.4420.2900.494
SEA-AD (single cell)0.0000.0000.0820.0480.1170.0180.0140.2860.2850.2430.2320.2430.3400.417
Instacart (supply chain)0.0010.0010.1020.0570.1230.0090.0040.2130.2110.2360.2540.2360.2210.268
MS MARCO (agent memory)0.0000.0000.2530.2000.3090.0650.0300.2830.1880.2220.2270.2220.1530.211
MNIST0.0070.0080.3770.2890.3900.1530.1030.3010.2660.1870.2050.1870.1060.117
CIFAR-100.0020.0020.1990.1250.2000.0370.0230.3270.3030.2970.3240.2970.3280.326
Fashion-MNIST0.0130.0130.3260.2320.3360.1130.0820.7430.7010.4710.4920.4720.4560.451
Speech Commands0.0100.0090.3000.2240.3010.0520.0320.6680.6550.5440.5650.5440.5910.597
Renal-Cortex0.0120.0120.3150.2020.3270.1410.1200.3850.3870.3270.3250.3280.2830.311
Brain-Cortex0.0060.0060.3340.2150.3460.1400.1160.3280.3220.3170.3170.3170.3560.413
Covertype0.0360.0360.6240.4550.6380.3890.2980.3020.2580.1970.1870.1970.1840.328
AG News0.0050.0040.3410.2760.3410.1330.0850.4140.3510.3290.3440.3300.3270.329

Table S4.

On large data, PaCMAP leads at the upper end and t-SNE at the lower end. PaCMAP was designed to preserve both local and global structure[5]. It has a higher GG than t-SNE on seven of the twelve large datasets, by up to 0.174 on SEA-AD, and equals it on AG News. UMAP is above t-SNE on four. At the lower end t-SNE leads both: its LL is 1.6 to 11 times that of UMAP and 2.1 to 26 times that of PaCMAP on every large dataset. Among the published methods we tested, the leaders at the two ends are different maps, and the reversal test declares t-SNE local and PaCMAP global on seven datasets (Supplementary Note 2.5.3).

On the Swiss roll and the S-curve the neighbor embeddings are global. PCA keeps the large Euclidean distances by construction, and the large datasets use a Euclidean or cosine reference. The three synthetic manifolds have a known geometry and a geodesic reference (Supplementary Figure 10 and Supplementary Table 6). PCA has GG of 0.24 and 0.29 on the Swiss roll and the S-curve, where t-SNE reaches 0.84 and 0.85 and Isomap, whose objective is the geodesic distance, 0.98 and 0.90. SR-tSNE2 has the highest LL on both, 0.93 and 0.82. NPCA matches PCA on the Swiss roll, and PCA leads it on the S-curve, 0.29 against 0.13. The PCA map of the Swiss roll overlays the turns of the roll that the neighbor embeddings unroll (Supplementary Figure 10–Supplementary Figure 10). On the tree PCA’s GG of 0.53 is close to t-SNE’s 0.55, and Isomap has the highest, 0.60. The claim that PCA is global holds when the large-scale structure of the data is close to linear, and on manifolds that roll up the neighbor embeddings take its place.

Supplementary Figure 10. On the Swiss roll and the S-curve the neighbor embeddings unroll the manifold and are far more global than PCA. The reference is the geodesic distance. (a)–(c) Profiles of eleven methods; blue, highest GG; red, highest LL; dashed gray, PCA. (d)–(f) GG against LL. (g)–(k) Swiss-roll maps colored by position along the roll: PCA and NPCA overlay its turns.

The scores measure the design choices of our two methods. The same scale applies to new methods. Supplementary Table 7 compares each of our two methods with the method it modifies on the twelve large datasets. SR-tSNE2 returns the 10 nearest neighbors at their exact rank 18% to 76% more often than the t-SNE map it refines, and by more than 35% on eight (Supplementary Figure 11). Its LL rises by up to 0.056 on MS MARCO, and its GG stays within 0.0005 of that of t-SNE (Supplementary Figure 11). On large data the rank refinement improves local order without changing GG, and the reversal test declares SR-tSNE2 local on the same datasets as t-SNE. NPCA keeps every loading nonnegative, so each axis is an additive combination of the input variables. Its GG is within 0.005 of PCA’s on Renal-Cortex, SEA-AD and Instacart, and PCA leads it by 0.006 to 0.136 on the other nine (Supplementary Figure 11). NPCA thus gains interpretable axes, with GG close to PCA’s on three datasets. The reversal test declares t-SNE local and NPCA global on four datasets (Supplementary Note 2.5.3). Supplementary Figure 11,Supplementary Figure 11 shows how the settings were chosen on the 60,000 MNIST training digits. With learning rate 50 and 2,000 iterations, a rank weight λ=20\lambda= 20 raises O-DLP@10 by 29% and LL by 0.007, and λ=50\lambda= 50 lowers DD by 0.030.

Supplementary Figure 11. SR-tSNE2 improves local order with GG within 0.0005, and NPCA gains named axes with GG close to PCA’s on three datasets. (a), (b) Tuning the rank weight λ\lambda on 60,000 MNIST digits. (c) GG of NPCA against GG of PCA; colored, the applications; squares, the smaller datasets. (d), (e) SR-tSNE2 against the t-SNE map it refines: (d) gain in O-DLP@10; (e) change in LL and GG.

Parameter paths have measurable exchange rates. Across all 24 settings of four parameter paths, PCA keeps the highest GG and t-SNE the highest LL. Besides the choice of method, each method has parameters that are said to move a map toward global structure. Supplementary Figure 3 traces four parameter paths in the (L,G)(L,G) plane on the 60,000 MNIST training digits, and Supplementary Table 8 lists them with their energy. LL is computed exactly over all points and GG from ten subsamples of 2,000. Each point is the mean of three runs, one with PCA initialization and two random.

Three-panel analysis of MNIST parameter paths, energy, and run-to-run standard deviation

Supplementary Figure 3. On 60,000 MNIST digits PCA keeps the highest GG and t-SNE the highest LL across all parameter settings. (a) Four parameter paths in the (L,G)(L, G) plane, mean ±\pm one standard deviation over three runs; squares, PCA and NPCA. (b) Energy along each path. (c) Run-to-run standard deviation of GG against that of LL; dotted line y=xy=x, dashed line y=10xy=10x.

Perplexity. Raising t-SNE’s perplexity from 30 to 500 lowers LL by 0.190 and raises GG by 0.051, an exchange rate of 0.27. It costs 6.2 times the energy, because t-SNE computes its sparse affinities over three times the perplexity in neighbors (Supplementary Figure 3). From 30 to 200, the rate is 0.33 at 3.4 times the energy; on the 70,000 digits of Figure 1, from a single run, it is 0.21. At perplexity 500 t-SNE’s GG is 0.269 and PCA’s 0.318: at 60,000 points PCA stays the global map across the perplexities we tested. Whether t-SNE is local thus depends on its perplexity, and on large data each gain in GG comes at an estimated energy.

Neighbors, exaggeration and preprocessing. For every UMAP setting, some perplexity of t-SNE has both a higher LL and a higher GG. From 5 to 500 neighbors, UMAP’s LL moves from 0.151 to 0.063 and its GG stays within 0.018. Exaggeration moves t-SNE along the attraction–repulsion spectrum toward UMAP-like maps[54]. From exaggeration 1 to 32, LL moves from 0.370 to 0.045 and GG stays within 0.011. Stronger attraction tightens the clusters and leaves their layout almost unchanged. PCA preprocessing interpolates between the two maps. Five components give the highest GG of all 24 settings, 0.311, within 0.007 of PCA, at L=0.084L = 0.084. Two components raise the run-to-run spread of GG to 0.128, larger than any difference between methods.

The reversal test at scale

A worked example: the memory of a retrieval agent

Two kinds of question. An agent keeps one million MS MARCO passages as BGE-base vectors and retrieves in that 768-dimensional space. A two-dimensional map is the view in which a person or the agent inspects and organizes the memory, and it serves two kinds of question. One asks which passages lie near a query and its retrieved set, a question about a few points. The other asks which topics lie far apart and which to merge or delete, a question about large parts of the memory.

Which local map. SR-tSNE2 is the map for the passages nearest a query. At the exact 10 nearest neighbors of all one million passages it leads t-SNE by 0.056 (p=1.2×10−21p = 1.2 \times10^{-21}, Supplementary Note 7), and in the subsample of 5,000 passages t-SNE leads it by 0.0008.

The test on independent samples

The maps of each large dataset were kept fixed, and the test was rerun on 50 independent uniform subsamples of 5,000 points (Figure 6, Supplementary Table 10). For t-SNE against PCA the declaration is the same in all 50 subsamples of every dataset, and the crossover moves by a standard deviation of 0.002 to 0.008. Its jackknife interval covers the mean crossover in every subsample on the eleven datasets with a crossover inside the data. Over six pairs of maps on twelve datasets, the local test rejects a true null at level 0.05 at no more than 0.020 and the global test at 0. A test that treats the points as independent rejects at up to 0.20 and 0.48. In this experiment the null for the global test is centered at the full-data difference in GG, which is read on a band of relative scale, and for the local test at the mean over the subsamples, because LL is read at k=10k = 10 and so depends on nn.

Neighbor embeddings against PaCMAP and NPCA

Against PaCMAP, t-SNE and SR-tSNE2 are declared local on seven of the twelve large datasets, and on the other five they lead PaCMAP at both ends. The test compares any two maps, and PaCMAP has the highest GG on four large datasets (Supplementary Table S4). Supplementary Table 9 sets UMAP, t-SNE and SR-tSNE2 against PaCMAP with the procedure used against PCA. Each of the three is more local than PaCMAP on every dataset, with pL≤0.021p_L \le0.021. The test declares t-SNE local and PaCMAP global on Pathology-100K, SEA-AD, Instacart, CIFAR-10, Speech Commands, Brain-Cortex and Covertype, the seven datasets on which PaCMAP has the higher GG in Supplementary Table S4. The test and the scores of Supplementary Table S4, computed on separate subsamples, thus agree on all twelve datasets.

SR-tSNE2 is declared local on the same seven, and UMAP on six, MS MARCO among them. For SR-tSNE2 the crossover lies at 0.4% to 8.4% of the data, below its crossover with PCA on every dataset, so PaCMAP becomes the better map at smaller question sizes than PCA does. On MS MARCO, MNIST, Fashion-MNIST, Renal-Cortex and AG News, the GG of t-SNE and SR-tSNE2 in the test is 0.002 to 0.071 above that of PaCMAP, and no reversal is declared.

NPCA, whose axes are additive combinations of the input variables, takes the place of PCA as the global map on three datasets, and at the level on a fourth. The test declares t-SNE local and NPCA global on Fashion-MNIST, Speech Commands and Covertype, and at the level on AG News (p=0.04999p = 0.04999), and SR-tSNE2 on the first three, each more local with pL≤3.8×10−9p_L \le3.8 \times10^{-9}. The crossover lies at 11% to 32% of the data, 1.1 to 1.7 times that with PCA. On the other eight datasets the global gap stays within its sampling error or favors t-SNE. Set directly against PCA on these subsamples of 5,000 points, NPCA matches it at the upper end on Instacart, Renal-Cortex and Brain-Cortex, with gaps within their sampling error, and comes within 0.002 on SEA-AD. On the other eight PCA leads by 0.012 to 0.129, and NPCA offers named axes at that cost. On a subsample of 10,000 points the same eight gaps are significant. Over these 60 one-sided global tests the rejection rate under the null averages 0.052 at level 0.05 and ranges from 0.010 to 0.128. The test thus holds its level with PaCMAP or NPCA as the global map, as it does with PCA.

A stable PCA map

The stability of the PCA map explains this dependence. PCA gives a stable map when its plane is well determined. The test compares two given maps, so a map that changes when it is refitted changes the declaration. PCA changes in this way when the second and third eigenvalues of the covariance are close. A wide gap between them fixes the plane of the first two principal axes. A perturbation of the data turns it by an angle bounded by the size of the perturbation divided by the eigenvalue gap[56]. On the 70,000 MNIST points the two eigenvalues differ by 8% (ratio 1.08). The sampling perturbation shrinks as 1/n1/\sqrt{n}, so at 70,000 points an 8% gap fixes the plane, and at 5,000 points a larger gap is needed.

We drew 40 random subsets of 5,000 MNIST points and fitted PCA on each (Supplementary Fig. 1d,e). LL of the PCA map stays at 0.040 (standard deviation 0.005), as in Supplementary Table S1. In 30 of 40 the plane stays close to the full-data plane and GG averages 0.303. In the other 10 the second axis turns by an angle θ2\theta_2 of more than 60 degrees (cos⁡θ2<0.5\cos\theta_2 < 0.5), and GG averages 0.162. PCA fitted on the subset is more global than t-SNE in 31 of the 40 subsets. The full-data plane, applied to the same subsets, has G=0.303G = 0.303 (standard deviation 0.004) and is more global than t-SNE in all 40.

Supplementary Table 1 | Our DLP curve 13{}^{13} is the curve from which every score here is read. Earlier work supplies the global scores we use to validate GG and the other curves listed here. This paper adds five features. One statistic: the local and global scores are one statistic at two scales. Relative band: the global score uses a fixed range of k/nk/n. Proven meaning: a proof of what the upper end of the score measures. Rate: a crossover or an exchange rate. Test: a test of whether one map is local and another global.

WorkLocal scoreGlobal scoreOne statisticRelative bandProven meaningRateTest
Our DLP curve 13{}^{13}DLPk\mathrm{DLP}_k over all kk, the curve every score here is read from
Lee and Verleysen 15{}^{15}QlocalQ_{\mathrm{local}}, mean QNXQ_{NX}, k≤kmax⁡k \leq k_{\max}QglobalQ_{\mathrm{global}}, mean QNXQ_{NX}, k>kmax⁡k > k_{\max}✓
Lee et al. 17{}^{17}RNX(k)R_{NX}(k) over all kk, area on a log kk axis✓
DREAMS 18{}^{18}kkNN recall, k=10k = 10Spearman ρ\rho of distances
This paperL=ν10L = \nu_{10}GG, mean νk\nu_k, 0.3≤k/n≤0.50.3 \leq k/n \leq0.5✓✓✓✓✓

Table S1.

Checking the plane. A turning plane is best detected by refitting it: four MNIST subsets of 5,000 points with eigenvalue ratios from 1.11 to 1.32 all turn. The function pca_stability of lgfid (command lgfid pca DATA) refits the plane on 10 random halves of the data and reports the smallest cosine between a refit and the full-data plane. The smallest cosine is 0.001 to 0.067 on those four subsets and 0.996 on all 70,000 points. A cosine of 0.9 or more marks a stable plane; below it, the user compares maps against the PCA plane of the largest available sample, which the command saves.

What the test tells a user

Taken together, these results answer four questions a user has about the four applications (Supplementary Table 11).

One map or two. A declared reversal means that each map answers one kind of question better, and the user needs two maps. A pair in which one map is more faithful at both ends needs one map. A pair without a declared reversal gives no evidence that two maps are needed, and the estimates of LL and GG show which map leads. On Online Retail t-SNE is more local than PCA by 0.239 and more global by 0.088, and its GG is the highest of all maps, shared with SR-tSNE2. One t-SNE map therefore serves both the search for customers who buy alike and the layout of customer segments.

When to change maps. The crossover gives the size of question at which the user changes maps. A question about fewer than s×ns \times n points, such as the nearest neighbors of one point or a small subtype, goes to the local map. A question about more points, such as the layout of classes, goes to the global map. On Pathology-100K the crossover lies at about 10,000 tiles, and on Pathology-7K at 776 tiles, the same tenth of the data.

How to compare clusters. The distance between two clusters that together hold more points than the crossover size is read from the global map, and that between two small clusters from the local map. The pp-value of the declaration gives the evidence for this choice on the data at hand.

Whether the usual claim holds. The test checks the claim that t-SNE is local and PCA global on the user’s data. It holds firmly on six of the twelve large datasets, with 10, 20 and 50 blocks, and narrowly on MNIST, CIFAR-10 and Renal-Cortex. On the Swiss roll, the S-curve, Instacart and Online Retail the neighbor embeddings are the more global maps, and on SEA-AD the global gap stays within its sampling error. The command lgfid test DATA A B returns the declaration, its p-value, and the crossover with its interval for any two maps of the user’s data.

Perplexity. Raising the perplexity from 30 to 200 lowers PCA’s global advantage over t-SNE on nine of the twelve datasets, and the reversal stays declared on six. A larger neighborhood moves t-SNE toward the upper end, as the perplexity path of Supplementary Figure 3 shows.

Memories of artificial agents

The scale also applies when the memory is text. In a pilot on four LoCoMo conversations[47], Qwen2.5-14B read a compressed context of about a quarter of the conversation’s tokens and restated each turn from the turn before it. We embedded the restated turns and compared them with the originals. Five compressions, among them the dataset’s session summaries, lowered LL from 0.57 to 0.05–0.08 and GG from 0.69 to 0.09–0.15, close to the values of an empty context (0.04 and 0.07). Compressing the text of a conversation loses both its local and its global structure.

PCA and NPCA place a new item by projection, and openTSNE places one on a t-SNE map[43]. SR-tSNE2 places a new item on the t-SNE map it refines and refines it with the map at the next refit.

Supplementary figures

Figure Supplementary Fig. 1. From 10,000 points PCA’s two axes are stable and the reversal is declared in at least two of three nested series, and in all three at 40,000 and 70,000. (a), (b) GPCA−Gt-SNEG^{\mathrm{PCA}} - G^{\mathrm{t\text{-}SNE}} on nested MNIST subsets at perplexity 30 and 200; filled markers, reversal declared. (c) GG of PCA fitted on each subset. (d), (e) Forty subsets of 5,000 points: the full-data plane keeps GG near 0.30 in all of them.

Figure S4. The chance correction reveals the reversal on MNIST: SR-tSNE2 is the most local of four maps and PCA the most global. (a) DLPkDLP_k nears its chance level at large kk. (b) The profile νk\nu_k; dots mark LL. (c) Over the shaded band, which gives GG, the order reverses.

The LG reversal test tells a user which of two maps answers which question

Supplementary Figure 6. The LG reversal test tells a user which of two maps answers which question (schematic). (a) Map A keeps the neighbors; map B keeps the layout of the groups. (b) A reversal is declared when both one-sided tests reject. (c) Questions about fewer points than the crossover go to map A, larger ones to map B.

Supplementary Figure 7. Which method is most faithful depends on the scale and the data. Profiles of seven methods on the twelve large datasets, the four applications in the top row; blue, highest GG; red, highest LL; shaded band, the range that gives GG.

Supplementary tables

Supplementary Table 3 | Notation.

SymbolMeaning
xi,yi,nx_i, y_i, ndata point, its position in the map, number of points
dX,dYd_X, d_Yreference dissimilarity of the data; Euclidean distance in the map
rX(i)(j),rY(i)(j)r_X^{(i)}(j), r_Y^{(i)}(j)rank of point jj among the other points by distance from point ii
NX(i),NY(i)N_X^{(i)}, N_Y^{(i)}the kk nearest neighbors of point ii in the data and in the map
DLPk,νk\mathrm{DLP}_k, \nu_kdegree of locality preservation at kk, and its chance-corrected value
h(i),hh(i), hhalves agreement of point ii, and its mean over points
s=k/ns = k/nrelative neighborhood size (relative scale)
k⋆=(n−1)/2k^\star= (n - 1)/2neighborhood size of the near half of the data
L,GL, Glocal fidelity ν10\nu_{10}; global fidelity, mean of νk\nu_k over 0.3≤k/n≤0.50.3 \leq k/n \leq0.5
s⋆(A,B)s^\star(A, B)crossover scale of method AA against method BB
η\etaexchange rate of a parameter path
LA,νA,L(i)L^A, \nu^A, L(i)a score of method AA; a score of one point ii
Ok(i),νk(i)O_k(i), \nu_k(i)neighbors of point ii kept at kk; its chance-corrected profile
E(i),E,ME(i), E, Mentity fidelity of point ii and of the map; the profile at the median entity size
nc(i),kin_c(i), k_isize of the entity of point ii; ki=nc(i)−1k_i = n_c(i) - 1
dL(i),dG(i)d^L(i), d^G(i)per-point local and global differences between two maps
C,pL,pG,αC, p_L, p_G, \alphanumber of jackknife blocks; pp-values of the two tests; level
β(i),γ(i)\beta(i), \gamma(i)median correlation and Gaussian-copula correlation of the distances from point ii
μj(i),νjF\mu_j(i), \nu_j^Fsmallest kk at which point ii keeps jj; chance-corrected overlap of the jj farthest points
θ,λ\theta, \lambdaa method parameter along a path; rank weight of SR-tSNE2

Table S3.

DatasetDomainnnddRepresentation
Pathology-100KPathology100,000768Phikon
SEA-AD (single cell)Single cell1,378,2115050 PCs
Instacart (supply chain)Supply chain195,8272,000purchases
MS MARCO (agent memory)Agent memory1,000,000768BGE-base
MNISTVision70,000784pixels
CIFAR-10Vision60,000512ResNet-18
Fashion-MNISTVision70,000784pixels
Speech CommandsAudio59,387768wav2vec 2.0
Renal-CortexSingle cell50,0275050 PCs
Brain-CortexSingle cell50,2125050 PCs
CovertypeRemote sensing59,99954attributes
AG NewsText60,000768BERT

Table 5. The twelve large datasets span 50,000 to 1.38 million points and 50 to 2,000 dimensions. dd: dimension of the reference representation.

Swiss rollS-curveTree
PCA.41/.24.45/.29.10/.53
NPCA.41/.24.32/.13.07/.47
KPCA.41/.26.52/.52.01/.01
LLE.63/.60.55/.55.33/.57
Isomap.88/.98.80/.90.22/.60
t-SNE, PCA init.85/.84.78/.85.51/.55
SR-tSNE2.93/.81.82/.84.51/.56
UMAP†.77/.85.72/.85.42/.42
PHATE†.56/.73.56/.75.32/.25
PaCMAP†.79/.66.74/.81.40/.52
TriMAP†.72/.57.69/.71.40/.57

Table 6. On the Swiss roll and the S-curve the neighbor embeddings are far more global than PCA. L/GL/G on the three synthetic manifolds, whose reference is the geodesic distance; mean over ten seeds for methods marked †\dagger and for SR-tSNE2. Bold: best LL and best GG on each manifold.

DatasetPCANPCAt-SNESR-tSNE2ΔL\Delta LΔG\Delta G
Pathology-100K0.012/0.5970.008/0.4610.436/0.4420.458/0.442+0.022−0.0004
SEA-AD0.000/0.2860.000/0.2850.082/0.2430.117/0.243+0.036−0.0000
Instacart0.001/0.2130.001/0.2110.102/0.2360.123/0.236+0.021−0.0001
MS MARCO0.000/0.2830.000/0.1880.253/0.2220.309/0.222+0.056−0.0000
MNIST0.007/0.3010.008/0.2660.377/0.1870.390/0.187+0.013+0.0004
CIFAR-100.002/0.3270.002/0.3030.199/0.2970.200/0.297+0.001+0.0001
Fashion-MNIST0.013/0.7430.013/0.7010.326/0.4710.336/0.472+0.010+0.0002
Speech Commands0.010/0.6680.009/0.6550.300/0.5440.301/0.544+0.000−0.0001
Renal-Cortex0.012/0.3850.012/0.3870.315/0.3270.327/0.328+0.013+0.0003
Brain-Cortex0.006/0.3280.006/0.3220.334/0.3170.346/0.317+0.011−0.0003
Covertype0.036/0.3020.036/0.2580.624/0.1970.638/0.197+0.014−0.0003
AG News0.005/0.4140.004/0.3510.341/0.3290.341/0.330+0.000+0.0005

Table 7. SR-tSNE2 never lowers LL, raises it by up to 0.056, and moves GG by at most 0.0005. Our methods against the methods they modify on the twelve large datasets, L/GL/G. Δ\Delta: SR-tSNE2 minus the t-SNE map it refines.

PathValueLLGGsd GGJJ
t-SNE, perplexity50.3630.1890.0501,986
150.3790.2200.0362,692
300.3700.2180.0383,424
500.3540.2440.0044,246
1000.3150.2340.0077,164
2000.2590.2550.01111,480
5000.1800.2690.00321,359
UMAP, n_neighbors50.1510.2180.010953
150.1100.2060.0011,055
500.0870.2060.0021,629
1000.0780.2140.0052,289
2000.0710.2230.0013,385
5000.0630.2200.0135,556
t-SNE, exaggeration10.3700.2180.0383,617
20.1580.2120.0312,928
40.1000.2050.0223,003
80.0770.2090.0193,085
160.0590.2320.0023,065
320.0450.2290.0012,971
PCA(qq) + t-SNE, qq20.0080.1460.1283,445
50.0840.3110.0013,238
100.2010.2690.0283,009
300.3260.2060.0322,864
500.3530.2180.0362,800

Table 8. Raising t-SNE’s perplexity from 5 to 500 trades LL (0.363 to 0.180) for GG (0.189 to 0.269); no setting reaches PCA’s GG of 0.318. Local fidelity, global fidelity, the standard deviation of GG over three runs (t-SNE paths: one PCA and two initializations), and energy (JJ, CPU time at 15 W per core) along each parameter path on 60,000 MNIST digits; means over three runs. PCA has L=0.008L = 0.008 and G=0.318G = 0.318.

Dataset\multicolumn{2}{c}{B: PaCMAP UMAP}\multicolumn{2}{c}{B: PaCMAP t-SNE}\multicolumn{2}{c}{B: PaCMAP SR-tSNE2}\multicolumn{2}{c}{B: NPCA t-SNE}\multicolumn{2}{c}{B: NPCA SR-tSNE2}\multicolumn{2}{c}{B: PCA NPCA}
Datasetpps×s^{\times}pps×s^{\times}pps×s^{\times}pps×s^{\times}pps×s^{\times}ΔG\Delta GpGp_G
Pathology-100K1.8×10−4\mathbf{1.8 \times10^{-4}}0.31.6×10−3\mathbf{1.6 \times10^{-3}}0.61.5×10−3\mathbf{1.5 \times10^{-3}}0.40.2833.80.2833.70.1292.6×10−4\mathbf{2.6 \times10^{-4}}
SEA-AD0.0631.03.5×10−5\mathbf{3.5 \times10^{-5}}0.93.5×10−5\mathbf{3.5 \times10^{-5}}0.90.1734.50.1734.50.0025.3×10−3\mathbf{5.3 \times10^{-3}}
Instacart8.1×10−3\mathbf{8.1 \times10^{-3}}4.57.6×10−6\mathbf{7.6 \times10^{-6}}8.47.4×10−6\mathbf{7.4 \times10^{-6}}8.40.8199.30.8199.30.0010.48
MS MARCO8.1×10−4\mathbf{8.1 \times10^{-4}}0.70.941.10.941.10.9664.60.9664.60.0921.4×10−8\mathbf{1.4 \times10^{-8}}
MNIST0.202.21.001.51.001.40.08025.20.08125.20.0351.6×10−3\mathbf{1.6 \times10^{-3}}
CIFAR-100.476.90.0125.90.0115.70.5339.80.5339.90.0280.013
Fashion-MNIST0.892.20.851.50.851.44.3×10−7\mathbf{4.3 \times10^{-7}}11.04.3×10−7\mathbf{4.3 \times10^{-7}}11.00.0421.4×10−3\mathbf{1.4 \times10^{-3}}
Speech Commands0.018\mathbf{0.018}7.64.6×10−9\mathbf{4.6 \times10^{-9}}3.64.3×10−9\mathbf{4.3 \times10^{-9}}3.63.6×10−5\mathbf{3.6 \times10^{-5}}18.23.5×10−5\mathbf{3.5 \times10^{-5}}18.20.0123.1×10−3\mathbf{3.1 \times10^{-3}}
Renal-Cortex0.232.30.791.40.791.10.1430.10.1430.2−0.0020.94
Brain-Cortex0.049\mathbf{0.049}1.41.3×10−3\mathbf{1.3 \times10^{-3}}1.31.2×10−3\mathbf{1.2 \times10^{-3}}1.00.5140.60.5140.60.0070.16
Covertype1.5×10−3\mathbf{1.5 \times10^{-3}}0.66.3×10−3\mathbf{6.3 \times10^{-3}}1.16.1×10−3\mathbf{6.1 \times10^{-3}}0.70.01322.90.01222.70.0437.3×10−3\mathbf{7.3 \times10^{-3}}
AG News0.452.50.591.80.601.70.0499931.80.05331.90.0663.3×10−6\mathbf{3.3 \times10^{-6}}

Table 9. t-SNE and SR-tSNE2 are declared local and PaCMAP global on the same seven large datasets, and NPCA global on three, with AG News at the level for t-SNE. Map A, the column head, against map B, PaCMAP or NPCA. Last pair, upper end only: ΔG=GPCA−GNPCA\Delta G = G_{\mathrm{PCA}} - G_{\mathrm{NPCA}} and its one-sided pGp_G, bold below 0.05. pp: p-value of the declaration, bold when declared at level 0.05. s×s^{\times}: crossover, in percent of nn. Each test runs on a uniform subsample of 5,000 points. On AG News p=0.04999p = 0.04999 for t-SNE against NPCA, at the level; we count it as borderline.

DatasetΔG\Delta GSDSE of ΔG\Delta G jackknifeSE of ΔG\Delta G independentSize, jackknife LLSize, jackknife GGSize, independent LLSize, independent GGDeclareds×s^{\times}
Pathology-100K+0.1550.00290.02050.00190.000.000.060.141.000.101 (0.003)
SEA-AD+0.0430.00610.04410.00300.000.000.140.180.000.344 (0.008)
Instacart−0.0230.00250.00960.00180.000.000.140.080.000.986 (0.014)
MS MARCO+0.0610.00370.01250.00150.000.000.140.221.000.145 (0.006)
MNIST+0.1140.00480.03780.00310.000.000.100.281.000.190 (0.004)
CIFAR-10+0.0300.00410.02350.00190.000.000.140.280.000.307 (0.008)
Fashion-MNIST+0.2720.00440.02780.00220.000.000.060.021.000.092 (0.002)
Speech Commands+0.1240.00310.01970.00190.000.000.080.241.000.163 (0.004)
Renal-Cortex+0.0570.00490.06170.00290.000.000.200.140.000.302 (0.008)
Brain-Cortex+0.0110.00790.03700.00250.000.000.080.100.000.401 (0.006)
Covertype+0.1050.00430.02340.00180.000.000.100.261.000.179 (0.003)
AG News+0.0850.00360.01460.00130.000.000.060.341.000.180 (0.004)

Table 10. On 50 independent subsamples of 5,000 points the test of t-SNE against PCA never rejects a true null, and its declaration does not change. ΔG\Delta G: full-data GPCA−Gt−SNEG_{\mathrm{PCA}} - G_{\mathrm{t-SNE}}. SD: standard deviation of the estimate over subsamples. SE: mean standard error by the block jackknife and by a test that treats points as independent. Size: rate at which each rejects a true null at level 0.05, local and global. Declared: share of subsamples with a declared reversal. s×s^{\times}: mean crossover (standard deviation).

DatasetQuestion about fewer points: use the local mapQuestion about more points: use the global mapCrossover size
Pathology-100Kthe tiles that resemble a tumor tilethe layout of the nine tissues10,040 tiles (4,210–15,870)
Pathology-7Kthe tiles that resemble a tumor tilethe layout of the nine tissues776 tiles (387–1,165)
MS MARCOthe passages near a query and its retrieved set (t-SNE)the topics of the memory and their distances (PCA)150,400 passages (79,100–221,700), t-SNE against PCA
8-Kthe filings near a new event (UMAP)the topics of the memory (PCA)427 filings (226–628), UMAP against PCA
SEA-ADt-SNE for the neighbors of a cell and for subtypes; the global gap of 0.044 between PCA and t-SNE stays within its sampling error (p=0.16p = 0.16), and PaCMAP has the highest GG, 0.417, for the distances between cell types
Instacartagainst PCA, t-SNE is more local by 0.080 and more global by 0.021; PaCMAP has the highest GG, 0.268, for the layout of segments
Online Retailt-SNE leads at both ends: it is more local by 0.239 and more global by 0.088

Table 11. Which map to use, by the LG reversal test against PCA on the four applications; the local map is t-SNE unless the row names another. The crossover size is s×ns^{\times}n, the number of points at the crossover, with its 95% jackknife interval.

Sensitivity of G to its band

GG changes little when its band 0.3≤k/n≤0.50.3 \le k/n \le0.5 is replaced. Supplementary Table 12 replaces the band by alternatives on the 84 maps of the twelve large datasets. It reports three quantities: the rank correlation with GG, the agreement of the method rankings within each dataset, and the rank correlation with the two established global scores. All variants are read from the same stored profiles, so the comparison involves no new maps.

VariantDefaultτ\tau meanτ\tau minDistance ρ\rhoTriplets
GG, 0.3≤k/n≤0.50.3 \le k/n \le0.5 (default)1.0001.001.000.840.93
GG, 0.2≤k/n≤0.50.2 \le k/n \le0.50.9820.830.430.800.91
GG, 0.4≤k/n≤0.50.4 \le k/n \le0.50.9790.890.520.910.97
Midpoint νk⋆\nu_k^\star0.9570.790.240.940.98
Middle band, 0.1≤k/n≤0.20.1 \le k/n \le0.20.7520.15−0.81-0.810.570.70

Table 12. GG changes little with its band (84 maps of the twelve large datasets). Default: correlation with GG across all maps. Kendall τ\tau: agreement of the method rankings within a dataset, mean and minimum. Distance ρ\rho and triplets: correlation with the distance rank correlation and with random-triplet accuracy.

Global fidelity. The bands 0.2–0.5 and 0.4–0.5 correlate at 0.98 with GG and the midpoint at 0.96, and these scores correlate at 0.80 to 0.94 with the distance rank correlation and 0.91 to 0.98 with random-triplet accuracy. Narrower bands at the top of the profile agree more closely with the established global scores. Within a dataset they rank the methods with mean τ\tau 0.89 for 0.4–0.5 and 0.79 for the midpoint alone. These bands average fewer values of kk, and the methods on a large dataset often lie within 0.01 of each other in GG. The middle band 0.1 ≤k/n≤\le k/n \le 0.2 ranks the methods differently from GG (mean τ\tau 0.15) and agrees with the references at 0.57 and 0.70. The default band is the widest that stays at the upper end.

Calibration of the local test

On independent subsamples the local test rejects a true null at no more than 0.020 (Supplementary Note 2.5.2), and this is its calibration. Independent subsamples reproduce the drawing of points, which the centered null of Results, built for the global test, holds fixed. The local declarations rest on pL≤1.3×10−5p_L \le1.3 \times10^{-5} (Figure 4b), far below any of these rates.

The local test on all points

The local test on all points

The local test also runs on all points. Per-point L(i)L(i) uses the exact 10 nearest neighbors in the data and in the map, so its mean is the exact LL of Supplementary Table S4. The 20 kk-means blocks are fitted on 50,000 points and assigned to all, and the jackknife is the one described in Methods. Against the t-SNE map it refines, SR-tSNE2 gains in LL on nine large datasets, by 0.010 to 0.056 with p≤3.7×10−5p \le3.7 \times10^{-5}. On CIFAR-10, Speech Commands and AG News the gain is 0.0002 to 0.0007, within its sampling error. Under the centered null the twelve tests reject at 0.053 on average at level 0.05, and from 0.014 to 0.148. On the 5,000-point subsample used by the test, the 10 nearest neighbors stand for about the 100 to 2,800 nearest in the full data, and there t-SNE leads SR-tSNE2 by 0.001 to 0.049. The rank refinement thus acts at the exact neighbor scale it optimizes.

Number of blocks

The declarations of t-SNE against PCA change little with the number of blocks CC. With C=10C = 10, 20 and 50 the declaration is the same on nine of the twelve large datasets, and the crossover does not depend on CC. With C=10C = 10 six of the seven declarations of Figure 4a hold, and on MNIST pp rises to 0.061. With C=50C = 50 all seven hold, and CIFAR-10 and Renal-Cortex join them with p=0.049p = 0.049 and 0.042. More blocks give smaller standard errors, so C=10C = 10 gives the most cautious test and C=20C = 20 lies between. Under the centered null the global test rejects at 0.059, 0.046 and 0.043 on average for C=10C = 10, 20 and 50.

Refitting the map

A refit of the map moves the global difference far less than the sampling of points does. On MNIST we refitted t-SNE five more times from random starts and tested each map against PCA as in Figure 4. Over the six maps GPCA−Gt−SNEG^{\mathrm{PCA}} - G^{\mathrm{t-SNE}} lies between 0.104 and 0.130, with standard deviation 0.010 across maps. Its jackknife standard error is 0.045 to 0.074, about five to seven times larger. The crossover lies between 0.180 and 0.197. The reversal is declared for four of the six maps, and for the other two p=0.051p = 0.051 and 0.061, close to the level, as the pp of 0.012 for the first map leads one to expect.

References

  1. [1]van der Maaten, L. & Hinton, G. Visualizing data using t-SNE. Journal of Machine Learning Research 9, 2579–2605 (2008).
  2. [2]McInnes, L., Healy, J. & Melville, J. UMAP: Uniform manifold approximation and projection for dimension reduction. arXiv:1802.03426 (2018).arxiv.org/abs/1802.03426
  3. [3]Moon, K. R. et al. Visualizing structure and transitions in high-dimensional biological data. Nature Biotechnology 37, 1482–1492 (2019).DOI
  4. [4]Amid, E. & Warmuth, M. K. TriMap: Large-scale dimensionality reduction using triplets. arXiv:1910.00204 (2019).
  5. [5]Wang, Y., Huang, H., Rudin, C. & Shaposhnik, Y. Understanding how dimension reduction tools work: An empirical approach to deciphering t-SNE, UMAP, TriMAP, and PaCMAP for data visualization. Journal of Machine Learning Research 22, 1–73 (2021).arxiv.org/abs/2012.04456
  6. [6]Lewis, P. et al. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems, Vol. 33, 9459–9474 (2020).arxiv.org/abs/2005.11401
  7. [7]Kusupati, A. et al. Matryoshka representation learning. In Advances in Neural Information Processing Systems, Vol. 35, 30233–30249 (2022).
  8. [8]Jégou, H., Douze, M. & Schmid, C. Product quantization for nearest neighbor search. IEEE Transactions on Pattern Analysis and Machine Intelligence 33, 117–128 (2011).DOI
  9. [9]Aumüller, M., Bernhardsson, E. & Faithfull, A. ANN-Benchmarks: A benchmarking tool for approximate nearest neighbor libraries. Information Systems 87, 101374 (2020).
  10. [10]Edge, D. et al. From local to global: A graph RAG approach to query-focused summarization. arXiv preprint arXiv:2404.16130 (2024).arxiv.org/abs/2404.16130
  11. [11]Venna, J. & Kaski, S. Neighborhood preservation in nonlinear projection methods: An experimental study. In Artificial Neural Networks — ICANN 2001, 485–491 (2001).DOI
  12. [12]Kobak, D. & Berens, P. The art of using t-SNE for single-cell transcriptomics. Nature Communications 10, 5416 (2019).DOI
  13. [13]Han, H., Li, W., Wang, J., Qin, G. & Qin, X. Enhance explainability of manifold learning. Neurocomputing 500, 877–895 (2022).DOI
  14. [14]LeCun, Y., Bottou, L., Bengio, Y. & Haffner, P. Gradient-based learning applied to document recognition. Proceedings of the IEEE 86, 2278–2324 (1998).
  15. [15]Lee, J. A. & Verleysen, M. Quality assessment of dimensionality reduction: Rank-based criteria. Neurocomputing 72, 1431–1443 (2009).DOI
  16. [16]Lueks, W., Mokbel, B., Biehl, M. & Hammer, B. How to evaluate dimensionality reduction? Improving the co-ranking matrix. arXiv preprint arXiv:1110.3917 (2011).arxiv.org/abs/1110.3917
  17. [17]Lee, J. A., Peluffo-Ordóñez, D. H. & Verleysen, M. Multi-scale similarities in stochastic neighbour embedding: Reducing dimensionality while preserving both local and global structure. Neurocomputing 169, 246–261 (2015).DOI
  18. [18]Kury, N., Kobak, D. & Darch, S. DREAMS: Preserving both local and global structure in dimensionality reduction. Transactions on Machine Learning Research (2026).arxiv.org/abs/2508.13747
  19. [19]Bajaj, P. et al. MS MARCO: A human generated MAchine Reading COmprehension dataset. arXiv preprint arXiv:1611.09268 (2016).arxiv.org/abs/1611.09268
  20. [20]Xiao, S. et al. Packed resources for general Chinese embeddings. In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval, 641–649 (2024).arxiv.org/abs/2309.07597
  21. [21]Gabitto, M. I., Travaglini, K. J., Rachleff, V. M. et al. Integrated multimodal cell atlas of Alzheimer's disease. Nature Neuroscience 27, 2366–2383 (2024).
  22. [22]Chen, Z. et al. FinQA: A dataset of numerical reasoning over financial data. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, 3697–3711 (2021).arxiv.org/abs/2109.00122
  23. [23]Govindaraju, A. & Nakkiritha, V. V. Cost optimized vector database: Introduction to Amazon OpenSearch Service quantization techniques. AWS Big Data Blog (2025). January 9, 2025.
  24. [25]The Tabula Sapiens Consortium. The Tabula Sapiens: A multiple-organ, single-cell transcriptomic atlas of humans. Science 376, eabl4968 (2022).DOI
  25. [28]Berger, R. L. Multiparameter hypothesis testing and acceptance sampling. Technometrics 24, 295–300 (1982).
  26. [29]Efron, B. The Jackknife, the Bootstrap and Other Resampling Plans. Vol. 38 of CBMS-NSF Regional Conference Series in Applied Mathematics (SIAM, Philadelphia, 1982).
  27. [30]Han, H., Niu, L., Di, B. & Wang, J. Differential rank preservation (manifold learning) (2026). https://arxiv.org/abs/2610.41107. Pattern Recognition, under review.
  28. [31]Kather, J. N. et al. Patching survival from colorectal cancer histology slides using deep learning: A retrospective multicenter study. PLOS Medicine 16, e1002730 (2019).
  29. [32]Filiot, A. et al. Scaling self-supervised learning for histopathology with masked image modeling. medRxiv (2023).DOI
  30. [33]Xiao, H., Rasul, K. & Vollgraf, R. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747 (2017).arxiv.org/abs/1708.07747
  31. [34]Blackard, J. A. & Dean, D. J. Comparative accuracies of artificial neural networks and discriminant analysis in predicting forest cover types from cartographic variables. Computers and Electronics in Agriculture 24, 131–151 (1999).
  32. [35]Krizhevsky, A. Learning multiple layers of features from tiny images. Tech. Rep., University of Toronto (2009).
  33. [36]He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 770–778 (2016).arxiv.org/abs/1512.03385
  34. [37]Warden, P. Speech commands: a dataset for limited-vocabulary speech recognition. arXiv preprint arXiv:1804.03209 (2018).arxiv.org/abs/1804.03209
  35. [38]Baevski, A., Zhou, Y., Mohamed, A. & Auli, M. wav2vec 2.0: a framework for self-supervised learning of speech representations. In Advances in Neural Information Processing Systems, Vol. 33, 12449–12460 (2020).arxiv.org/abs/2006.11477
  36. [39]Zhang, X., Zhao, J. & LeCun, Y. Character-level convolutional networks for text classification. In Advances in Neural Information Processing Systems, Vol. 28, 649–657 (2015).arxiv.org/abs/1509.01626
  37. [40]formers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics, 4171–4186 (2019).arxiv.org/abs/1810.04805
  38. [41]Chen, D. Online retail II. UCI Machine Learning Repository (2012).
  39. [42]Han, X. Nonnegative principal component analysis for cancer molecular pattern discovery. IEEE/ACM Transactions on Computational Biology and Bioinformatics 7, 537–549 (2010).DOI
  40. [43]Poličar, P. G., Stražar, M. & Zupan, B. openTSNE: A modular Python library for t-SNE dimensionality reduction and embedding. Journal of Statistical Software 109 (2024).DOI
  41. [44]Kobak, D. & Linderman, G. C. Initialization is critical for preserving global data structure in both t-SNE and UMAP. Nature Biotechnology 39, 156–157 (2021).DOI
  42. [45]Roweis, S. T. & Saul, L. K. Nonlinear dimensionality reduction by locally linear embedding. Science 290, 2323–2326 (2000).pubmed.ncbi.nlm.nih.gov/11125150
  43. [46]Tenenbaum, J. B., de Silva, V. & Langford, J. C. A global geometric framework for nonlinear dimensionality reduction. Science 290, 2319–2323 (2000).pubmed.ncbi.nlm.nih.gov/11125149
  44. [47]Maharana, A. et al. Evaluating very long-term conversational memory of LLM agents. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL) (2024).
  45. [48]Venna, J., Peltonen, J., Nybo, K., Aidos, H. & Kaski, S. Information retrieval perspective to nonlinear dimensionality reduction for data visualization. Journal of Machine Learning Research 11, 451–490 (2010).DOI
  46. [49]Kraemer, G., Reichstein, M. & Mahecha, M. D. dimRed and CoRanking—unifying dimensionality reduction in R. The R Journal 10, 342–358 (2018).DOI
  47. [50]Espadoto, M., Martins, R. M., Kerren, A., Hirata, N. S. T. & Telea, A. C. Toward a quantitative survey of dimension reduction techniques. IEEE Transactions on Visualization and Computer Graphics 27, 2153–2173 (2021).
  48. [51]Nonato, L. G. & Aupetit, M. Multidimensional projection for visual analytics: Linking techniques with distortions, tasks, and layout enrichment. IEEE Transactions on Visualization and Computer Graphics 25, 2650–2673 (2019).DOI
  49. [52]Heiser, C. N. & Lau, K. S. A quantitative framework for evaluating single-cell data structure preservation by dimensionality reduction techniques. Cell Reports 31, 107576 (2020).DOI
  50. [53]Chari, T. & Pachter, L. The specious art of single-cell genomics. PLOS Computational Biology 19, e1011288 (2023).DOI
  51. [54]Böhm, J. N., Berens, P. & Kobak, D. Attraction-repulsion spectrum in neighbor embeddings. Journal of Machine Learning Research 23, 1–32 (2022).
  52. [55]Huang, H., Wang, Y., Rudin, C. & Browne, E. P. Towards a comprehensive evaluation of dimension reduction methods for transcriptomic data visualization. Communications Biology 5, 719 (2022).DOI
  53. [56]Davis, C. & Kahan, W. M. The rotation of eigenvectors by a perturbation. III. SIAM Journal on Numerical Analysis 7, 1–46 (1970).DOI

Paper details

vlnc:W_fhumhnw4
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 5

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents