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 () and within chance on the second (). 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 nearest neighbors that a map keeps, corrected for chance, is a curve over . At it gives the local fidelity . At neighborhoods of 30 to 50 percent of the data it gives the global fidelity . 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. and 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, DLP, the average fraction of each point’s nearest neighbors that remain among its nearest in the map[13]. Read over all and corrected for chance, it gives the locality profile. In the t-SNE map, point 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 , 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 (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 , 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 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 agrees with established global scores at only 0.22 and 0.30 over the 84 default maps, against 0.84 and 0.93 for (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 . 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 -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 , the global fidelity , whose upper end has a proven meaning, and the entity fidelity . Against an uncompressed reference, DLP is the recall at by which vector search is already judged, so and 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 yet loses 17 of its 105 passages, and , 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 and of the same data, the test returns one of three declarations. Either is local and global, or is local and 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 with its 95% interval. A question about fewer than 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. and tell which map to use for a memory, and 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 and loses 17 of its 105 passages (×); circles mark one passage with its 10 neighbors () and the shared themes (). (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 . (c) The two one-sided tests with 95% intervals. (d) Which map answers each question. (e)–(i) measures what the established global scores measure. (e)–(g) and 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, 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 , 24 cell types on seven maps. (k) The same pairs against . (l) The same memory compressed to binary codes: miss rate of each company after rescoring, against of the company on the codes; star, PNC. (m) Partial rank correlation of the miss rate with given , and , 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 measuring global structure. ranks maps as the established global scores do, and it is stable across bands and subsamples (Supplementary Note 5).
agrees with the established global scores. Over the 84 maps of the twelve large datasets, 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. 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 , the usual summary of neighbor curves [17], reaches 0.22 and 0.30, because it weights the lower end.
Supplementary Table 2 | agrees with the established global scores at 0.84 and 0.93, and the area under 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 score | Distance | Random-triplet accuracy |
| (exact) | −0.18 | −0.10 |
| Middle band, | 0.57 | 0.70 |
| Area under | 0.22 | 0.30 |
| , | 0.80 | 0.91 |
| , | 0.84 | 0.93 |
| , | 0.91 | 0.97 |
| Midpoint | 0.94 | 0.98 |
Table S2.
Within each dataset 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 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 predicts which entities a map loses. The entity fidelity reads the profile at the size of each point’s own entity, such as its cell type (Methods). reads it at the median entity size for every point.
Where entity sizes differ, predicts the miss rate beyond , and . 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 and −0.37 with (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, and read nearly the same and carry the same information (Figure 2m).
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. , read on the codes before any query, has rank correlation −0.74 with the miss rate, and has −0.44. The partial correlation of given is −0.66 (95% interval −0.76 to −0.52; Figure 2l). PNC Financial Services (PNC) keeps after rescoring and loses 17 of its 105 passages (Figure 2a); its is the 16th lowest of 106.
Four applications: pathology, single cells, supply chains, and AI agent memory
In all four applications and 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 , 0.597 and 0.283 (Figure 3b,Figure 3q). On SEA-AD and Instacart PaCMAP has the highest , 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; against ; 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 grid, framed in its tissue color; the SR-tSNE2 map colored by tissue, cell subclass, department or -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-SNE 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 : 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 : 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 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 with jack-knife standard error 0.009 and . The global test gives with standard error 0.012 and . Both nulls are rejected, and the reversal is declared with .
Where to change maps. The crossover is , 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 (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 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 . 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 (). For t-SNE the crossover lies at 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) -value of the declaration, check mark at level 0.05; (b) and (c) 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 .
The reversal test at scale
One neighbor embedding thus serves both ends. On the tree PCA reaches t-SNE at . On Online Retail, t-SNE and SR-tSNE2 are more global than PCA by 0.088, and PCA reaches them at . There t-SNE leads at both ends, as on Instacart, so the test names it the one map to use ( and 0.97). On Pathology-7K the reversal is declared with (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: 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, 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 (95% interval 0.135–0.193) and less faithful above it (fig:5a,b; and ). 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 ( 0.03 and 0.06, 0.47 and 0.45; Figure 5c).
Figure 5. On published cell atlases, and tell where a released map can be trusted, and 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 and ; against PHATE the test declares a reversal for t-SNE and SR-tSNE2, and none for UMAP (global ). (d)–(f) , miss rate and of each supertype on each map, ordered by on UMAP. (g) Share of Pvalb nuclei among the 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 . (i)–(k) Tabula Sapiens endothelial cells (73,198 cells, 29 tissues). (i) UMAP colored by the tissue. (j) of each tissue on each map, ordered by on UMAP, with each map’s and ; against PCA the test declares a reversal for every map, PHATE included (global ). (k) Miss rate of each tissue against its .
predicts which supertypes and tissues a map loses. On SEA-AD predicts which supertypes a map loses (rank correlation −0.93, against −0.51 for ; Figure 5d–Figure 5f,Figure 5h). In Tabula Sapiens endothelial cells25, it predicts which tissues a map loses (−0.76, against −0.07 for ; 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 and , 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 (). (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 on the path that the parameter traces. Across
24 parameter settings on 60,000 digits, PCA keeps the highest and t-SNE the highest (Supplementary Note 2.4). A claim of global structure should report 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, is the recall of the compressed index at , the quantity by which approximate nearest-neighbor search is already evaluated[9], and adds the correction for chance. 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]. can be estimated from a few thousand stored items, however large the memory (Methods). 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 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 be data points with a reference dissimilarity , the Euclidean or, for unit vectors, cosine distance in the chosen representation, and let be a map with Euclidean distance . For each point write for the rank of among the other points by increasing , and likewise in the map. For let and be the -nearest-neighbor sets. Superscripts and mark the data and the map, superscripts and mark two methods, the subscript marks the neighborhood size, and the argument marks a single point. Supplementary tbl:3 collects the notation.
At every scale the profile asks one question: what share of each point’s nearest neighbors does the map keep, by chance?
Definition 1 (Locality profile). For point and scale , let be the number of its nearest neighbors in the data that are also among its nearest in the map. The chance-corrected profile of point is
The locality profile of a map is the mean of these curves over points,
, , indexed by the relative scale . With the degree of locality preservation
it reads
over is the DLP curve[13], and is its chance-corrected form. From this curve we read , , the crossover, the test and .
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 is a uniformly random -subset of the other points, then and ; a perfect map has . (ii) is invariant under any rotation, reflection, translation, or uniform scaling of the map, and under any strictly increasing transformation of or .
Proof. (i) Fix . Each of the members of falls in the random set with probability . By linearity of expectation, . Averaging over and dividing by gives . Equation (3) is affine in and vanishes at , so . A perfect map has for all , so and . (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 or keeps the order of the distances from each point. In every case the ranks and are unchanged, and so are the sets and , and .
The data bear this out. On 1,999 MNIST digits, 200 random maps give with mean and standard deviation 0.005 for from 10 to 999. Replacing each map distance by , a strictly increasing transformation, leaves and 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 DLP to and . 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. DLP 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 (Proposition 1). Equation (3) subtracts this level and rescales, so that is 0 for a random map and 1 for a perfect one at every (Figure 1c). At a small fixed neighborhood, says how many of each point’s closest neighbors the map keeps beyond chance; this is . At , Proposition 2 shows that 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). averages the profile over , a band that ends at this midpoint; the average keeps the meaning of the midpoint and lowers its variance.

Figure 1. From the locality profile to and on MNIST (): t-SNE is more faithful below 20 percent of the data and PCA above it. (a) Point keeps 6 of its 10 nearest neighbors in the t-SNE map. (b)–(e) A subsample of points. (b) rises to 1, partly by chance (dashed). (c) After the chance correction the profiles cross at ; the shaded band gives . Values in (c) come from the subsample; in the text is computed on all points. (d) Ranks from point in the data and the map; is the share in the shaded quadrants. (e) tracks , where is the normal-scores correlation of the two rank vectors from point , a rank-based estimate of the plane. (f) Seven maps in the plane; from one run, or as a three-run mean on 60,000 digits. (g) Study design: four applications and eight benchmarks, seven maps each, scored by , and . (h) The twelve large datasets, 50,000 to 1.38 million points in 50 to 2,000 dimensions. (i) and 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 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 and be the complements of and among the other points. Then . In particular, for with odd,
where is the probability that the data and the map agree, for point , on whether a random other point lies in the nearer or the farther half.
Proof. Among the other points, by inclusion–exclusion. The set is the complement of this union, which gives the first identity. Point is classified alike by the data and the map exactly when it lies in or in . At the two sets have the same size, so the number of agreements is and . Averaging over gives . With , Equation (3) reads . For even the same count at gives . □
On the same 1,999 digits, where , the identity holds to machine precision. and are both 0.328 for PCA and 0.183 for t-SNE and SR-tSNE2, and they differ by less than .
Past the midpoint the profile mirrors itself. The first identity of Proposition 2 also bounds the band of . Let be the chance-corrected overlap of the farthest points, defined as in Equation (3) with in place of . Substituting the identity into Equation (3) gives for every . A neighborhood larger than half the data is the complement of a far set smaller than half, so above 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 for PCA. therefore stops at the midpoint, where the near and far sets have the same size.
At small the profile asks whether a point keeps its nearest neighbors. At 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 and let for the other points . (i) is Blomqvist’s medial correlation 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 , the pairs are i.i.d. draws from a distribution with continuous margins and copula , then as
a rank correlation of the two distances that needs no model. (iii) Under a Gaussian copula with correlation ,
which is Kendall’s of the pair and a strictly increasing function of its Spearman correlation .
Proof. (i) With and no ties, holds exactly when lies below the sample median of the ’s, and likewise for . By Proposition 2, is the share of pairs on the same side of both medians, and 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 . The share above both medians equals , so and . (iii) For a Gaussian copula, Sheppard’s formula gives , hence . For the bivariate normal, Kendall’s equals and Spearman’s equals ; both increase with . □
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, tracks with Pearson correlation 0.94 (Figure 1e). On real data 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. reads the profile at and averages it over . Both lie on one scale, so they can be compared directly.
Definition 2 (Local and global fidelity). For a map of points, the local fidelity and the global fidelity are
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 curve ends at 1, and near 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 and spreads the profiles apart (panel b). At , 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 and NPCA 0.266, against 0.187 for SR-tSNE2 and for t-SNE (panel c).
and are compared directly. Because and are the same statistic at two scales, they are set side by side for one map and compared between maps of the same data. uses an absolute neighborhood and a band of relative scale, so comparisons are made within a dataset, and the reversal test decides them for two maps. is read at a fixed small neighborhood, the scale at which t-SNE, UMAP, and their relatives are designed to be faithful. 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 estimable from a subsample. is defined at a scale relative to , which makes it comparable across datasets and estimable from a subsample. A fixed is a global scale on a small dataset and a local one on a large dataset; is a third of 150 points and 0.005 percent of a million. Take a relative scale and a uniform subsample of points. The nearest points within the subsample approximate the -quantile neighborhood in the full data. computed on the subsample therefore estimates of the full map. at fixed behaves differently: on the subsample it refers to the relative scale , which grows as shrinks. Both are measured below.
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 and , 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 belong to entity with members, and let , with . With the entity fidelity of point and of the map are
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 members, , a single point of the profile; 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 against a global method , with profiles and , is
If at every , there is no crossover and is the one map to use. A parameter path is the sequence of maps of one method as one parameter changes. The exchange rate of a path from to , with fidelities and and , is
Below method is the more faithful map, and above it is. The reversal test turns this reading into a test. The rate 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 and 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 is estimated from a subsample. Point keeps neighbor at every , so its overlap is the number of with . One histogram of per point and its cumulative sum give the whole profile of every point, and their mean gives at every . This needs the two rank matrices, time and memory; for this takes a few seconds on one core. For larger , 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 is defined on a relative scale, a uniform subsample of a few thousand points estimates it at any , with fixed time and memory. On each large dataset we drew five uniform subsamples of each size , , and points for the PCA and t-SNE maps. was computed on each subsample from the subsampled data and map alone (Supplementary Figure S5,Figure S5).
Figure S5. is stable across bands and subsample sizes, and it varies across runs more than . (a) Correlation of three other bands with ; gray, agreement of the method rankings within a dataset. (b) Run-to-run standard deviation of against that of ; dotted line . (c) Change in with the subsample size , PCA solid and t-SNE dashed; colored, the four applications. (d) on SEA-AD from to .
At the mean estimate lies within 0.010 of its value at on every dataset and for both maps, and at within 0.005. The standard deviation over draws is at most 0.012 at . On SEA-AD, with 1.38 million nuclei, 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 as the mean over ten subsamples of 2,000 points, which takes seconds for any . is defined on an absolute scale. At fixed , a subsample of 2,000 points asks about the nearest 0.5 percent of the data. On a million points the same asks about the nearest 0.001 percent, a far more local scale. 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
The score of a whole map is then the average of the scores of its points.
By Equations (1) and (3), averaging over points gives , so
On the 1,999 MNIST digits, the mean of over points equals 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 and , the differences and have means and .
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 and applied to the same data, the local test has null hypothesis and the global test has null hypothesis . is declared local and global, a reversal, when both nulls are rejected at level . With and the p-values of the two tests, the p-value of the declaration is .
By the intersection–union principle2, the declaration has level : a false declaration needs a false rejection, and each test makes one at rate at most . 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 of every point in it, and the per-point differences are dependent. Write for either or and for its mean over all points. We cut the data into blocks by -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 at a time and recomputes the mean difference from the remaining points. With the mean of the values , it estimates
The statistic is compared with a distribution with degrees of freedom. Its upper-tail probability is the one-sided p-value: for the local test and for the global test. The neighbor sets are computed once from all 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 and the profiles averaged over the points outside block , is read from them by Equation (9). The interval is , where is the 0.975 quantile of the distribution with degrees of freedom and is Equation (13) applied to the values . When the profile of stays above that of at every scale, the test reports 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 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 is a coarser relative scale than in the exact 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 and 6.3 for , 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 (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 . 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 . 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-SNE). SR-tSNE2[30], our rank refinement of t-SNE, refines the perplexity-30 t-SNE map in time. It adds a smooth rank loss on each point’s 10 nearest neighbors in the input (learning rate 50, rank weight , 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-SNE, 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 , 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].
is exact and is averaged over ten subsamples. is computed exactly over all points from the exact 10 nearest neighbors in the data, found on a GPU. and the profile 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 , the midpoint value and two alternative global bands (0.2–0.5 and 0.4–0.5). We also compute the area under 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 in the figures) is the Spearman correlation between pairwise map distances and the reference dissimilarities. Random-triplet accuracy is the fraction of random triplets for which data and map agree on whether or is closer to [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 , the exact selection is the points nearest to the centroid of in the data. The map selection is the 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 , , and a common-scale reading over up to 200 sampled members of the entity (seed 0). All four come from the exact rankings of the other points. reads the profile at one for every point, the median of over all points. 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 given , and . 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 , , 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 exactly and 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 , 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 , the average overlap of -neighborhoods. Its chance-corrected rescaling, , appears in later work of the same group. Lee et al. [17] summarized by its area on a log axis to compare multiscale neighbor embeddings. Trustworthiness and continuity[11] penalize intrusions and extrusions by rank and are usually reported at a single small . 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 is dominated by small by design. Lee and Verleysen[15] split at a data-dependent size into and and advised consulting 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 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 plane puts both axes on one scale, which defines the crossover and the exchange rate, and the Results check 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 and 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.
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).
New definitions of local and global fidelity on one scale, with a proven upper end. The test is possible because and are one chance-corrected statistic at two scales. We prove that at 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 under a Gaussian copula (Propositions 2 and 3). The common scale defines two new quantities, the crossover scale and the exchange rate (Methods).
Validation on 156 maps of up to 1.38 million points. The propositions lead us to expect that ranks maps as the established global scores do, and the data agree. has rank correlation 0.89 with the distance rank correlation and 0.96 with random-triplet accuracy. Over 84 maps the area under reaches 0.22 and 0.30, against 0.84 and 0.93 for . The value of changes little with the band, and 2,000 points estimate it to within 0.01.
Tests of the usual claims in four applications. With a validated 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 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 and t-SNE the highest across all 24 settings (Results and Supplementary Note 2.4).
Our own methods on the same scale. The scale also measures design choices. SR-tSNE, an rank refinement of t-SNE, has the highest on all twelve datasets. It returns neighbors at their exact rank 18% to 76% more often than t-SNE, with within 0.0005. Nonnegative PCA names its axes by tissue, cell type or product, with within 0.14 of PCA’s (Supplementary Note 2.4).
Software. The Python package
lgfidreturns , , 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 , a gap that looks decisive on a plot, and the test places it within chance ().
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 and 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 (), 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 (), 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 ().
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 , 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 . Over the 84 maps of the large datasets, 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 does, with mean Kendall of 0.83 and 0.89. The middle band gives a different ranking (), so the ranking is set at the upper end. Supplementary Table 12 in Supplementary Note 5 gives the full comparison.
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 over the runs exceeds that of in 23 of the 24 settings, by a median factor of 34 (Supplementary Fig. 5b). At perplexity 30 it is 0.038 for and 0.0005 for , a factor of 84. Over all settings the standard deviation of is at most 0.0017, and that of 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 wherever runs are repeated (Supplementary Note 2.4).
Agreement rises with the scale. With the distance rank correlation it rises from −0.18 at 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 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 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 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 of PCA. On 8-K they are two filing types, earnings releases (item 2.02, 100%) and officer changes (item 5.02, 96%).
What means for a pathologist. A difference in 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 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 and t-SNE the highest .
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 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 , and within 0.001 on CIFAR-10, Speech Commands and AG News (Supplementary Note 7). The highest belongs to PCA on six of the twelve: MNIST, Fashion-MNIST, Speech Commands, AG News, Pathology-100K and MS MARCO. PaCMAP has the highest 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 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) . (b) ; bold, the best. (c) , 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 on all twelve datasets; PCA has the highest on six and PaCMAP on four. (left) and (right) of seven methods on the twelve large datasets, the four applications first; bold: best on the dataset. †t-SNE200: perplexity 200.
| Dataset | PCA | NPCA | t-SNE | t-SNE200 | SR-tSNE2 | UMAP | PaCMAP | PCA | NPCA | t-SNE | t-SNE200 | SR-tSNE2 | UMAP | PaCMAP |
| Pathology-100K | 0.012 | 0.008 | 0.436 | 0.331 | 0.458 | 0.233 | 0.205 | 0.597 | 0.461 | 0.442 | 0.456 | 0.442 | 0.290 | 0.494 |
| SEA-AD (single cell) | 0.000 | 0.000 | 0.082 | 0.048 | 0.117 | 0.018 | 0.014 | 0.286 | 0.285 | 0.243 | 0.232 | 0.243 | 0.340 | 0.417 |
| Instacart (supply chain) | 0.001 | 0.001 | 0.102 | 0.057 | 0.123 | 0.009 | 0.004 | 0.213 | 0.211 | 0.236 | 0.254 | 0.236 | 0.221 | 0.268 |
| MS MARCO (agent memory) | 0.000 | 0.000 | 0.253 | 0.200 | 0.309 | 0.065 | 0.030 | 0.283 | 0.188 | 0.222 | 0.227 | 0.222 | 0.153 | 0.211 |
| MNIST | 0.007 | 0.008 | 0.377 | 0.289 | 0.390 | 0.153 | 0.103 | 0.301 | 0.266 | 0.187 | 0.205 | 0.187 | 0.106 | 0.117 |
| CIFAR-10 | 0.002 | 0.002 | 0.199 | 0.125 | 0.200 | 0.037 | 0.023 | 0.327 | 0.303 | 0.297 | 0.324 | 0.297 | 0.328 | 0.326 |
| Fashion-MNIST | 0.013 | 0.013 | 0.326 | 0.232 | 0.336 | 0.113 | 0.082 | 0.743 | 0.701 | 0.471 | 0.492 | 0.472 | 0.456 | 0.451 |
| Speech Commands | 0.010 | 0.009 | 0.300 | 0.224 | 0.301 | 0.052 | 0.032 | 0.668 | 0.655 | 0.544 | 0.565 | 0.544 | 0.591 | 0.597 |
| Renal-Cortex | 0.012 | 0.012 | 0.315 | 0.202 | 0.327 | 0.141 | 0.120 | 0.385 | 0.387 | 0.327 | 0.325 | 0.328 | 0.283 | 0.311 |
| Brain-Cortex | 0.006 | 0.006 | 0.334 | 0.215 | 0.346 | 0.140 | 0.116 | 0.328 | 0.322 | 0.317 | 0.317 | 0.317 | 0.356 | 0.413 |
| Covertype | 0.036 | 0.036 | 0.624 | 0.455 | 0.638 | 0.389 | 0.298 | 0.302 | 0.258 | 0.197 | 0.187 | 0.197 | 0.184 | 0.328 |
| AG News | 0.005 | 0.004 | 0.341 | 0.276 | 0.341 | 0.133 | 0.085 | 0.414 | 0.351 | 0.329 | 0.344 | 0.330 | 0.327 | 0.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 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 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 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 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 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 ; red, highest ; dashed gray, PCA. (d)–(f) against . (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 rises by up to 0.056 on MS MARCO, and its stays within 0.0005 of that of t-SNE (Supplementary Figure 11). On large data the rank refinement improves local order without changing , 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 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 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 raises O-DLP@10 by 29% and by 0.007, and lowers by 0.030.
Supplementary Figure 11. SR-tSNE2 improves local order with within 0.0005, and NPCA gains named axes with close to PCA’s on three datasets. (a), (b) Tuning the rank weight on 60,000 MNIST digits. (c) of NPCA against 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 and .
Parameter paths have measurable exchange rates. Across all 24 settings of four parameter paths, PCA keeps the highest and t-SNE the highest . 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 plane on the 60,000 MNIST training digits, and Supplementary Table 8 lists them with their energy. is computed exactly over all points and from ten subsamples of 2,000. Each point is the mean of three runs, one with PCA initialization and two random.

Supplementary Figure 3. On 60,000 MNIST digits PCA keeps the highest and t-SNE the highest across all parameter settings. (a) Four parameter paths in the plane, mean one standard deviation over three runs; squares, PCA and NPCA. (b) Energy along each path. (c) Run-to-run standard deviation of against that of ; dotted line , dashed line .
Perplexity. Raising t-SNE’s perplexity from 30 to 500 lowers by 0.190 and raises 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 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 comes at an estimated energy.
Neighbors, exaggeration and preprocessing. For every UMAP setting, some perplexity of t-SNE has both a higher and a higher . From 5 to 500 neighbors, UMAP’s moves from 0.151 to 0.063 and its stays within 0.018. Exaggeration moves t-SNE along the attraction–repulsion spectrum toward UMAP-like maps[54]. From exaggeration 1 to 32, moves from 0.370 to 0.045 and 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 of all 24 settings, 0.311, within 0.007 of PCA, at . Two components raise the run-to-run spread of 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 (, 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 , which is read on a band of relative scale, and for the local test at the mean over the subsamples, because is read at and so depends on .
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 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 . 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 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 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 (), and SR-tSNE2 on the first three, each more local with . 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 , 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). 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 averages 0.303. In the other 10 the second axis turns by an angle of more than 60 degrees (), and 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 (standard deviation 0.004) and is more global than t-SNE in all 40.
Supplementary Table 1 | Our DLP curve is the curve from which every score here is read. Earlier work supplies the global scores we use to validate 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 . 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.
| Work | Local score | Global score | One statistic | Relative band | Proven meaning | Rate | Test |
| Our DLP curve | over all , the curve every score here is read from | ||||||
| Lee and Verleysen | , mean , | , mean , | ✓ | ||||
| Lee et al. | over all , area on a log axis | ✓ | |||||
| DREAMS | NN recall, | Spearman of distances | |||||
| This paper | , mean , | ✓ | ✓ | ✓ | ✓ | ✓ |
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 and 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 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 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 -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 from 0.57 to 0.05–0.08 and 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) on nested MNIST subsets at perplexity 30 and 200; filled markers, reversal declared. (c) of PCA fitted on each subset. (d), (e) Forty subsets of 5,000 points: the full-data plane keeps 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) nears its chance level at large . (b) The profile ; dots mark . (c) Over the shaded band, which gives , the order reverses.

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 ; red, highest ; shaded band, the range that gives .
Supplementary tables
Supplementary Table 3 | Notation.
| Symbol | Meaning |
| data point, its position in the map, number of points | |
| reference dissimilarity of the data; Euclidean distance in the map | |
| rank of point among the other points by distance from point | |
| the nearest neighbors of point in the data and in the map | |
| degree of locality preservation at , and its chance-corrected value | |
| halves agreement of point , and its mean over points | |
| relative neighborhood size (relative scale) | |
| neighborhood size of the near half of the data | |
| local fidelity ; global fidelity, mean of over | |
| crossover scale of method against method | |
| exchange rate of a parameter path | |
| a score of method ; a score of one point | |
| neighbors of point kept at ; its chance-corrected profile | |
| entity fidelity of point and of the map; the profile at the median entity size | |
| size of the entity of point ; | |
| per-point local and global differences between two maps | |
| number of jackknife blocks; -values of the two tests; level | |
| median correlation and Gaussian-copula correlation of the distances from point | |
| smallest at which point keeps ; chance-corrected overlap of the farthest points | |
| a method parameter along a path; rank weight of SR-tSNE2 |
Table S3.
| Dataset | Domain | Representation | ||
| Pathology-100K | Pathology | 100,000 | 768 | Phikon |
| SEA-AD (single cell) | Single cell | 1,378,211 | 50 | 50 PCs |
| Instacart (supply chain) | Supply chain | 195,827 | 2,000 | purchases |
| MS MARCO (agent memory) | Agent memory | 1,000,000 | 768 | BGE-base |
| MNIST | Vision | 70,000 | 784 | pixels |
| CIFAR-10 | Vision | 60,000 | 512 | ResNet-18 |
| Fashion-MNIST | Vision | 70,000 | 784 | pixels |
| Speech Commands | Audio | 59,387 | 768 | wav2vec 2.0 |
| Renal-Cortex | Single cell | 50,027 | 50 | 50 PCs |
| Brain-Cortex | Single cell | 50,212 | 50 | 50 PCs |
| Covertype | Remote sensing | 59,999 | 54 | attributes |
| AG News | Text | 60,000 | 768 | BERT |
Table 5. The twelve large datasets span 50,000 to 1.38 million points and 50 to 2,000 dimensions. : dimension of the reference representation.
| Swiss roll | S-curve | Tree | |
| 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. on the three synthetic manifolds, whose reference is the geodesic distance; mean over ten seeds for methods marked and for SR-tSNE2. Bold: best and best on each manifold.
| Dataset | PCA | NPCA | t-SNE | SR-tSNE2 | ||
| Pathology-100K | 0.012/0.597 | 0.008/0.461 | 0.436/0.442 | 0.458/0.442 | +0.022 | −0.0004 |
| SEA-AD | 0.000/0.286 | 0.000/0.285 | 0.082/0.243 | 0.117/0.243 | +0.036 | −0.0000 |
| Instacart | 0.001/0.213 | 0.001/0.211 | 0.102/0.236 | 0.123/0.236 | +0.021 | −0.0001 |
| MS MARCO | 0.000/0.283 | 0.000/0.188 | 0.253/0.222 | 0.309/0.222 | +0.056 | −0.0000 |
| MNIST | 0.007/0.301 | 0.008/0.266 | 0.377/0.187 | 0.390/0.187 | +0.013 | +0.0004 |
| CIFAR-10 | 0.002/0.327 | 0.002/0.303 | 0.199/0.297 | 0.200/0.297 | +0.001 | +0.0001 |
| Fashion-MNIST | 0.013/0.743 | 0.013/0.701 | 0.326/0.471 | 0.336/0.472 | +0.010 | +0.0002 |
| Speech Commands | 0.010/0.668 | 0.009/0.655 | 0.300/0.544 | 0.301/0.544 | +0.000 | −0.0001 |
| Renal-Cortex | 0.012/0.385 | 0.012/0.387 | 0.315/0.327 | 0.327/0.328 | +0.013 | +0.0003 |
| Brain-Cortex | 0.006/0.328 | 0.006/0.322 | 0.334/0.317 | 0.346/0.317 | +0.011 | −0.0003 |
| Covertype | 0.036/0.302 | 0.036/0.258 | 0.624/0.197 | 0.638/0.197 | +0.014 | −0.0003 |
| AG News | 0.005/0.414 | 0.004/0.351 | 0.341/0.329 | 0.341/0.330 | +0.000 | +0.0005 |
Table 7. SR-tSNE2 never lowers , raises it by up to 0.056, and moves by at most 0.0005. Our methods against the methods they modify on the twelve large datasets, . : SR-tSNE2 minus the t-SNE map it refines.
| Path | Value | sd | |||
| t-SNE, perplexity | 5 | 0.363 | 0.189 | 0.050 | 1,986 |
| 15 | 0.379 | 0.220 | 0.036 | 2,692 | |
| 30 | 0.370 | 0.218 | 0.038 | 3,424 | |
| 50 | 0.354 | 0.244 | 0.004 | 4,246 | |
| 100 | 0.315 | 0.234 | 0.007 | 7,164 | |
| 200 | 0.259 | 0.255 | 0.011 | 11,480 | |
| 500 | 0.180 | 0.269 | 0.003 | 21,359 | |
| UMAP, n_neighbors | 5 | 0.151 | 0.218 | 0.010 | 953 |
| 15 | 0.110 | 0.206 | 0.001 | 1,055 | |
| 50 | 0.087 | 0.206 | 0.002 | 1,629 | |
| 100 | 0.078 | 0.214 | 0.005 | 2,289 | |
| 200 | 0.071 | 0.223 | 0.001 | 3,385 | |
| 500 | 0.063 | 0.220 | 0.013 | 5,556 | |
| t-SNE, exaggeration | 1 | 0.370 | 0.218 | 0.038 | 3,617 |
| 2 | 0.158 | 0.212 | 0.031 | 2,928 | |
| 4 | 0.100 | 0.205 | 0.022 | 3,003 | |
| 8 | 0.077 | 0.209 | 0.019 | 3,085 | |
| 16 | 0.059 | 0.232 | 0.002 | 3,065 | |
| 32 | 0.045 | 0.229 | 0.001 | 2,971 | |
| PCA() + t-SNE, | 2 | 0.008 | 0.146 | 0.128 | 3,445 |
| 5 | 0.084 | 0.311 | 0.001 | 3,238 | |
| 10 | 0.201 | 0.269 | 0.028 | 3,009 | |
| 30 | 0.326 | 0.206 | 0.032 | 2,864 | |
| 50 | 0.353 | 0.218 | 0.036 | 2,800 |
Table 8. Raising t-SNE’s perplexity from 5 to 500 trades (0.363 to 0.180) for (0.189 to 0.269); no setting reaches PCA’s of 0.318. Local fidelity, global fidelity, the standard deviation of over three runs (t-SNE paths: one PCA and two initializations), and energy (, CPU time at 15 W per core) along each parameter path on 60,000 MNIST digits; means over three runs. PCA has and .
| 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} | ||||||
| Dataset | ||||||||||||
| Pathology-100K | 0.3 | 0.6 | 0.4 | 0.28 | 33.8 | 0.28 | 33.7 | 0.129 | ||||
| SEA-AD | 0.063 | 1.0 | 0.9 | 0.9 | 0.17 | 34.5 | 0.17 | 34.5 | 0.002 | |||
| Instacart | 4.5 | 8.4 | 8.4 | 0.81 | 99.3 | 0.81 | 99.3 | 0.001 | 0.48 | |||
| MS MARCO | 0.7 | 0.94 | 1.1 | 0.94 | 1.1 | 0.96 | 64.6 | 0.96 | 64.6 | 0.092 | ||
| MNIST | 0.20 | 2.2 | 1.00 | 1.5 | 1.00 | 1.4 | 0.080 | 25.2 | 0.081 | 25.2 | 0.035 | |
| CIFAR-10 | 0.47 | 6.9 | 0.012 | 5.9 | 0.011 | 5.7 | 0.53 | 39.8 | 0.53 | 39.9 | 0.028 | 0.013 |
| Fashion-MNIST | 0.89 | 2.2 | 0.85 | 1.5 | 0.85 | 1.4 | 11.0 | 11.0 | 0.042 | |||
| Speech Commands | 7.6 | 3.6 | 3.6 | 18.2 | 18.2 | 0.012 | ||||||
| Renal-Cortex | 0.23 | 2.3 | 0.79 | 1.4 | 0.79 | 1.1 | 0.14 | 30.1 | 0.14 | 30.2 | −0.002 | 0.94 |
| Brain-Cortex | 1.4 | 1.3 | 1.0 | 0.51 | 40.6 | 0.51 | 40.6 | 0.007 | 0.16 | |||
| Covertype | 0.6 | 1.1 | 0.7 | 0.013 | 22.9 | 0.012 | 22.7 | 0.043 | ||||
| AG News | 0.45 | 2.5 | 0.59 | 1.8 | 0.60 | 1.7 | 0.04999 | 31.8 | 0.053 | 31.9 | 0.066 |
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: and its one-sided , bold below 0.05. : p-value of the declaration, bold when declared at level 0.05. : crossover, in percent of . Each test runs on a uniform subsample of 5,000 points. On AG News for t-SNE against NPCA, at the level; we count it as borderline.
| Dataset | SD | SE of jackknife | SE of independent | Size, jackknife | Size, jackknife | Size, independent | Size, independent | Declared | ||
| Pathology-100K | +0.155 | 0.0029 | 0.0205 | 0.0019 | 0.00 | 0.00 | 0.06 | 0.14 | 1.00 | 0.101 (0.003) |
| SEA-AD | +0.043 | 0.0061 | 0.0441 | 0.0030 | 0.00 | 0.00 | 0.14 | 0.18 | 0.00 | 0.344 (0.008) |
| Instacart | −0.023 | 0.0025 | 0.0096 | 0.0018 | 0.00 | 0.00 | 0.14 | 0.08 | 0.00 | 0.986 (0.014) |
| MS MARCO | +0.061 | 0.0037 | 0.0125 | 0.0015 | 0.00 | 0.00 | 0.14 | 0.22 | 1.00 | 0.145 (0.006) |
| MNIST | +0.114 | 0.0048 | 0.0378 | 0.0031 | 0.00 | 0.00 | 0.10 | 0.28 | 1.00 | 0.190 (0.004) |
| CIFAR-10 | +0.030 | 0.0041 | 0.0235 | 0.0019 | 0.00 | 0.00 | 0.14 | 0.28 | 0.00 | 0.307 (0.008) |
| Fashion-MNIST | +0.272 | 0.0044 | 0.0278 | 0.0022 | 0.00 | 0.00 | 0.06 | 0.02 | 1.00 | 0.092 (0.002) |
| Speech Commands | +0.124 | 0.0031 | 0.0197 | 0.0019 | 0.00 | 0.00 | 0.08 | 0.24 | 1.00 | 0.163 (0.004) |
| Renal-Cortex | +0.057 | 0.0049 | 0.0617 | 0.0029 | 0.00 | 0.00 | 0.20 | 0.14 | 0.00 | 0.302 (0.008) |
| Brain-Cortex | +0.011 | 0.0079 | 0.0370 | 0.0025 | 0.00 | 0.00 | 0.08 | 0.10 | 0.00 | 0.401 (0.006) |
| Covertype | +0.105 | 0.0043 | 0.0234 | 0.0018 | 0.00 | 0.00 | 0.10 | 0.26 | 1.00 | 0.179 (0.003) |
| AG News | +0.085 | 0.0036 | 0.0146 | 0.0013 | 0.00 | 0.00 | 0.06 | 0.34 | 1.00 | 0.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. : full-data . 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. : mean crossover (standard deviation).
| Dataset | Question about fewer points: use the local map | Question about more points: use the global map | Crossover size |
| Pathology-100K | the tiles that resemble a tumor tile | the layout of the nine tissues | 10,040 tiles (4,210–15,870) |
| Pathology-7K | the tiles that resemble a tumor tile | the layout of the nine tissues | 776 tiles (387–1,165) |
| MS MARCO | the 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-K | the filings near a new event (UMAP) | the topics of the memory (PCA) | 427 filings (226–628), UMAP against PCA |
| SEA-AD | t-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 (), and PaCMAP has the highest , 0.417, for the distances between cell types | ||
| Instacart | against PCA, t-SNE is more local by 0.080 and more global by 0.021; PaCMAP has the highest , 0.268, for the layout of segments | ||
| Online Retail | t-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 , the number of points at the crossover, with its 95% jackknife interval.
Sensitivity of G to its band
changes little when its band 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 , 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.
| Variant | Default | mean | min | Distance | Triplets |
| , (default) | 1.000 | 1.00 | 1.00 | 0.84 | 0.93 |
| , | 0.982 | 0.83 | 0.43 | 0.80 | 0.91 |
| , | 0.979 | 0.89 | 0.52 | 0.91 | 0.97 |
| Midpoint | 0.957 | 0.79 | 0.24 | 0.94 | 0.98 |
| Middle band, | 0.752 | 0.15 | 0.57 | 0.70 |
Table 12. changes little with its band (84 maps of the twelve large datasets). Default: correlation with across all maps. Kendall : agreement of the method rankings within a dataset, mean and minimum. Distance 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 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 0.89 for 0.4–0.5 and 0.79 for the midpoint alone. These bands average fewer values of , and the methods on a large dataset often lie within 0.01 of each other in . The middle band 0.1 0.2 ranks the methods differently from (mean 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 (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 uses the exact 10 nearest neighbors in the data and in the map, so its mean is the exact of Supplementary Table S4. The 20 -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 on nine large datasets, by 0.010 to 0.056 with . 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 . With , 20 and 50 the declaration is the same on nine of the twelve large datasets, and the crossover does not depend on . With six of the seven declarations of Figure 4a hold, and on MNIST rises to 0.061. With all seven hold, and CIFAR-10 and Renal-Cortex join them with and 0.042. More blocks give smaller standard errors, so gives the most cautious test and lies between. Under the centered null the global test rejects at 0.059, 0.046 and 0.043 on average for , 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 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 and 0.061, close to the level, as the of 0.012 for the first map leads one to expect.
References
- [1]van der Maaten, L. & Hinton, G. Visualizing data using t-SNE. Journal of Machine Learning Research 9, 2579–2605 (2008).
- [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]Moon, K. R. et al. Visualizing structure and transitions in high-dimensional biological data. Nature Biotechnology 37, 1482–1492 (2019).DOI
- [4]Amid, E. & Warmuth, M. K. TriMap: Large-scale dimensionality reduction using triplets. arXiv:1910.00204 (2019).
- [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]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]Kusupati, A. et al. Matryoshka representation learning. In Advances in Neural Information Processing Systems, Vol. 35, 30233–30249 (2022).
- [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]Aumüller, M., Bernhardsson, E. & Faithfull, A. ANN-Benchmarks: A benchmarking tool for approximate nearest neighbor libraries. Information Systems 87, 101374 (2020).
- [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]Venna, J. & Kaski, S. Neighborhood preservation in nonlinear projection methods: An experimental study. In Artificial Neural Networks — ICANN 2001, 485–491 (2001).DOI
- [12]Kobak, D. & Berens, P. The art of using t-SNE for single-cell transcriptomics. Nature Communications 10, 5416 (2019).DOI
- [13]Han, H., Li, W., Wang, J., Qin, G. & Qin, X. Enhance explainability of manifold learning. Neurocomputing 500, 877–895 (2022).DOI
- [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]Lee, J. A. & Verleysen, M. Quality assessment of dimensionality reduction: Rank-based criteria. Neurocomputing 72, 1431–1443 (2009).DOI
- [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]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]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]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]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]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]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]Govindaraju, A. & Nakkiritha, V. V. Cost optimized vector database: Introduction to Amazon OpenSearch Service quantization techniques. AWS Big Data Blog (2025). January 9, 2025.
- [25]The Tabula Sapiens Consortium. The Tabula Sapiens: A multiple-organ, single-cell transcriptomic atlas of humans. Science 376, eabl4968 (2022).DOI
- [28]Berger, R. L. Multiparameter hypothesis testing and acceptance sampling. Technometrics 24, 295–300 (1982).
- [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).
- [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.
- [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).
- [32]Filiot, A. et al. Scaling self-supervised learning for histopathology with masked image modeling. medRxiv (2023).DOI
- [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
- [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).
- [35]Krizhevsky, A. Learning multiple layers of features from tiny images. Tech. Rep., University of Toronto (2009).
- [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
- [37]Warden, P. Speech commands: a dataset for limited-vocabulary speech recognition. arXiv preprint arXiv:1804.03209 (2018).arxiv.org/abs/1804.03209
- [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
- [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
- [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
- [41]Chen, D. Online retail II. UCI Machine Learning Repository (2012).
- [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
- [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
- [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
- [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
- [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
- [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).
- [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
- [49]Kraemer, G., Reichstein, M. & Mahecha, M. D. dimRed and CoRanking—unifying dimensionality reduction in R. The R Journal 10, 342–358 (2018).DOI
- [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).
- [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
- [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
- [53]Chari, T. & Pachter, L. The specious art of single-cell genomics. PLOS Computational Biology 19, e1011288 (2023).DOI
- [54]Böhm, J. N., Berens, P. & Kobak, D. Attraction-repulsion spectrum in neighbor embeddings. Journal of Machine Learning Research 23, 1–32 (2022).
- [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
- [56]Davis, C. & Kahan, W. M. The rotation of eigenvectors by a perturbation. III. SIAM Journal on Numerical Analysis 7, 1–46 (1970).DOI













