Manuscript Offprint
arXiv:2611.00290Quantifying Local and Global Fidelity of Nonlinear Embeddings
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
HENRY HAN, Data Science and AI Innovation Laboratory, Baylor University, USA
Dimension reduction methods are chosen by a common claim: t-SNE and UMAP preserve local structure, and PCA preserves global structure. Checking it on given data takes local and global scores on one scale and a test that compares two maps. Both scores come from one curve. The locality profile is the chance-corrected share of each point's nearest neighbors that a map keeps, over all neighborhood sizes. Its value at is the local fidelity , and its mean over 30 to 50 percent of the data is the global fidelity . We prove that at the midpoint the profile is the agreement on which half of the data is near each point, a rank correlation of the distances. Because and are one statistic, two maps can be tested against each other. The LG reversal test applies to any two dimension reduction methods. It decides, with a block-jackknife p-value, whether one map is more local and the other more global, and returns the scale at which to change maps. On 156 maps of twelve datasets with up to 1.38 million points, agrees with established global scores at 0.89 and 0.96, and 2,000 points estimate it. The test confirms the usual claim on seven datasets. On both retail datasets and both rolled-up manifolds, it finds the neighbor embeddings more global. In an agent memory of one million passages, the two maps cross at 150,000 passages (). Applications span pathology, single cells, supply chains and AI agent memory.
Additional Key Words and Phrases: dimension reduction, t-SNE, UMAP, local structure, global structure, neighborhood preservation, embedding quality
1 Introduction
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 [42], UMAP [36], PHATE [37], TriMAP [1], PaCMAP [45] and PCA. AI agents keep their memories as embedding vectors and retrieve them by nearest-neighbor search [34]. Large memories are compressed, by truncation [30], by principal components, or by product quantization [23], 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. Raising t-SNE's perplexity or UMAP's number of neighbors is said to move a map toward global structure. A compressed memory is judged by the recall of its nearest neighbors [2], a local score. Agents also consolidate, delete and summarize memories by topic [12], and these tasks depend on global structure.
The problem. 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 them takes two things. The first is a common scale. Local structure is scored by neighbor overlap or trustworthiness [43], and global structure by distance rank correlation, random-triplet accuracy [45] or centroid distances [25]. 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 both on one million text passages, at perplexity 200, and on a kidney single-cell atlas. 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.
Author's Contact Information: Henry Han, Data Science and AI Innovation Laboratory, Baylor University, Waco, Texas, USA, Henry_Han@baylor.edu.
Henry Han
Our idea. 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. The idea is new in two ways. It gives the upper end of this profile a proven meaning, where earlier work used it to break ties. It also adds a test of whether two maps reverse their order between the two ends.
(a) : point keeps 6 of 10

(b) rises to 1 by chance
(c) : on 0.3–0.5
(d) Near and far halves,

(e) Halves vs. rank corr.,
(f) plane,
Fig. 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 . (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 distances from point , a rank-based estimate of the Gaussian-copula correlation (Proposition 3.4). (f) Seven maps in the plane (NPCA: nonnegative PCA).
Figure 1 shows the idea on the 70,000 MNIST digits. The profile starts from the degree of locality preservation, , the average fraction of each point's nearest neighbors that remain among its nearest in the map [18]. Read as a function of and corrected for chance, is the rank-based quality curve , with the neighborhood size, of Lee et al. [32], Lee and Verleysen [33]. That curve has been summarized by its area on a logarithmic scale of , which weights small neighborhoods most. Lee and Verleysen [33] also averaged its upper part, beyond a split point chosen from the data, and advised using that average to break ties between methods ranked by the lower part. We read the upper end as a global score in its own right. In the t-SNE map, point keeps 6 of its 10 nearest neighbors (Figure 1a). Averaged over points and corrected for chance, this overlap becomes the locality profile over all neighborhood sizes (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). On the same profile, PCA overtakes t-SNE at 20 percent of the data; we call this size 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).
What is new. and are new definitions. They are local and global fidelity scores defined as one chance-corrected statistic at two fixed scales. The global score is read on a fixed band of relative scale. Each of the closest methods differs from them in one respect. Lee and Verleysen [33] split the uncorrected neighbor curve at a data-dependent size and used the upper part to break ties; our is chance-corrected, on a fixed band, and the end of its band has a proven meaning. Lueks et al. [35] weight pairs of neighbor ranks by two user-set thresholds; needs no thresholds, and its band ends where the profile is a rank correlation of the distances. The area under [32] weights small neighborhoods and agrees with the established global scores at 0.22 and 0.30 over our 156 maps, against 0.89 and 0.96 for . DREAMS [29] plots neighbor recall against distance rank correlation, two scores of different kinds; our plane adds a common scale, a crossover and an exchange rate. Random-triplet accuracy [45] and centroid-distance correlation [25] score global structure apart from local structure; we use them to validate . The LG reversal test is new to this paper. It combines a one-sided test at each end of the profile into one declaration with a stated level, through a block jackknife [13] and the intersection–union principle [5]. It also gives an interval for the crossover. is also defined on a scale relative to , so 2,000 points estimate it to within 0.01 on every dataset tested, up to 1.38 million points. Table 1 sets these features side by side.
Table 1. Earlier work supplies the curve and the global scores, and this paper adds five features to them. 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 global 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 |
|---|---|---|---|---|---|---|---|
| Lee and Verleysen [33] | ✓ | ||||||
| Lee et al. [32] | over all , area on a log axis | ✓ | |||||
| DREAMS [29] | kNN recall, | Spearman of distances | |||||
| This paper | ✓ | ✓ | ✓ | ✓ | ✓ |
A test of reversal. The LG reversal test decides with a stated error rate whether one map is local and another global. It is designed for any local and any global dimension reduction method, because it needs only the data and the two maps. It brings statistical robustness to dimension reduction. It tells a user which map to use for which question. 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. The test returns whether the reversal holds at a stated level, the scale at which the other map becomes the more faithful one, and a 95% interval for that scale. Figure 2 applies the test to the memory of a retrieval agent: one million MS MARCO passages embedded with BGE-base [48]. SR-tSNE2, our rank refinement of t-SNE [19], is more local than PCA by 0.212 and PCA is more global by 0.062, and the test declares the reversal with . The crossover lies at 150,200 passages, with 95% interval 78,900 to 221,500. The agent should therefore use the SR-tSNE2
Henry Han
map to find the passages nearest a question and to examine any subtopic of fewer than 79,000 passages. It should use the PCA map to see which of its eight topics lie far apart and which topics to merge or delete.
(a) crossover at 150,200 passages (78,900–221,500)

(c) which map to use
SR-tSNE2 the passages near a query
SR-tSNE2 a subtopic of under 79,000 passages
PCA which of the eight topics lie far apart
PCA merge or delete whole topics
both a group of 79,000 to 222,000 passages
Fig. 2. The LG reversal test tells which map to use to inspect the memory of an AI agent: SR-tSNE2 for the passages near a query and PCA for the layout of topics, with the crossover at 150,200 passages. (a) Profiles; purple line and band, the crossover and its 95% interval; gray band, the range that gives G. (b) The two one-sided tests with 95% intervals. (c) Which map answers each question.
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 rolled-up Swiss roll and S-curve. The contributions are listed by importance, and each rests on the one before it.
(1) A new test of whether one map is local and another global. The LG reversal test turns the usual claim, that t-SNE is local and PCA global, into a decision with a stated error rate. Its global test holds its level, with a mean rejection rate of 0.046 over 48 tests at level 0.05. It also gives the crossover size, with a 95% interval, at which a user should change maps. On the memory of a retrieval agent it gives that size in passages (Sections 4 and 9, Figure 2).
(2) New definitions of local and global fidelity on one scale, with a proven global end. The test is possible because L and G 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 3.3 and 3.4). The common scale defines two new quantities, the crossover scale and the exchange rate (Section 3).
(3) Validation on 156 maps of up to 1.38 million points. The propositions lead us to expect that G ranks maps as the established global scores do, and the data agree. G has rank correlation 0.89 with the distance rank correlation and 0.96 with random-triplet accuracy, against 0.22 and 0.30 for the logarithmic area. Its value changes little with the band, 2,000 points estimate it to within 0.01, and across runs its standard deviation is a median 34 times that of L (Section 6).
(4) Tests of the usual claims in four applications. With a validated G 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 and the rolled-up manifolds the test finds the neighbor embeddings more global. PCA has the highest G 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 G and t-SNE the highest L across all 24 settings (Sections 7, 8 and 9).
(5) Our own methods on the same scale. The scale also measures design choices. SR-tSNE2 [19], an rank refinement of t-SNE, has the highest L on all twelve datasets. It returns neighbors at their exact rank 18% to 76% more often than t-SNE, with G within 0.0005. Nonnegative PCA [20] names its axes by tissue, cell type or product, with G within 0.14 of PCA's (Section 8).
(6) Software. The Python package 1gfid returns L, G, 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.
Broader impact. Pathology, single-cell biology, supply chains and AI agent memory all read structure from embeddings. Each can now state how much local and global structure a map keeps. Each can also support its choice of map with a test. The same profile scores any compressed representation against its uncompressed reference, so a compressed agent memory can be judged at both ends, beyond the recall of its nearest neighbors.
Rank-based quality curves. Lee and Verleysen [33] unified several neighborhood-based quality criteria through the co-ranking matrix and defined , the average overlap of K-neighborhoods. Its chance-corrected rescaling, , appears in later work of the same group. Lee et al. [32] summarized by its area on a log K axis to compare multiscale neighbor embeddings. Trustworthiness and continuity [43] penalize intrusions and extrusions by rank and are usually reported at a single small K. NeRV [44] casts a map as an information-retrieval display and trades the precision of retrieved neighbors against their recall. The coRanking package [27] computes these co-ranking criteria in R, and two surveys compare projection techniques with many quality measures [14, 38]. Our degree of locality preservation [18] is at a single K. These curves are the right starting point, because one statistic covers every scale. Their summaries weight the local end: the logarithmic area is dominated by small K by design. Lee and Verleysen [33] split at a data-dependent size into and and advised consulting to break ties. Lueks et al. [35] 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 G 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 [25] and Kobak and Linderman [26] 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. [8] placed t-SNE, UMAP and related methods on a spectrum of attraction against repulsion, which the exaggeration of t-SNE traverses. Wang et al. [45] analyzed the losses of t-SNE, UMAP and TriMAP [1], introduced PaCMAP, and measured global structure by random-triplet accuracy. Huang et al. [22] compared methods for transcriptomic data on
Henry Han
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 [29] 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 Section 6 checks against the global scores these studies used.
Compressed memories of AI agents. Compressed embeddings, from truncated [30] to product-quantized [23], are judged by the recall of their nearest neighbors [2]. Recall is a local score. Agents also consolidate memories and answer questions from their organization into topics [12], 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 [13] handles this dependence, and the intersection–union principle [5] combines the two one-sided tests.
The next two sections take the three steps. Section 3 defines and on one chance-corrected profile and proves what its upper end measures. Section 4 builds the LG reversal test on the per-point form of the same scores.
3 The locality profile and two fidelity scores
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. This takes the first two steps of Section 2. This section defines the statistic, proves what its upper end measures, and derives the two scores and two quantities that compare them.
3.1 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. Table 2 collects the notation.
Table 2. 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 |
Definition 3.1 (Locality profile). The degree of locality preservation at scale is
and its chance-corrected value is
The locality profile of a map is the curve , , indexed by the relative scale .
DLP [18] equals the neighborhood-preservation criterion of Lee and Verleysen [33], and equals their rescaled criterion [32]. The contribution of this paper is what is read from the profile and how that reading is validated.
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 3.2 (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 (2) 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, 20 random maps give with mean -0.0002 and standard deviation 0.005 for k from 10 to 999. Replacing the map distances 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 [18]. This changes scores built on raw distances and leaves rank-based scores intact.
From DLP_k to L and G. 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 1(b) shows why. DLP_k rises toward 1 for every map, because a neighborhood that holds most of the points shares most of them by chance; its chance level is (Proposition 3.2). Equation (2) subtracts this level and rescales, so that is 0 for a random map and 1 for a perfect one at every k (Figure 1c). At a small fixed neighborhood, says how many of each point's closest neighbors the map keeps beyond chance; this is L. At , Proposition 3.3 shows that is the agreement on which half of the data is near each point. Proposition 3.4 ties this agreement to the rank correlation of distances, which global scores measure (Figure 1d,e). G averages the profile over , a band that ends at this midpoint; the average keeps the meaning of the midpoint and lowers its variance.
Henry Han
3.2 Near sets, far sets, and the global 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 first step is a counting fact: 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 3.3 (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 (2) 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 .
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 halves 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.4 (HALVES AGREEMENT AND RANK CORRELATION). Fix a point and let for the other points . (i) is Blomqvist's medial correlation [7] of these pairs: the share of pairs on the same side of both sample medians minus the share on opposite sides. (ii) If 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) If is a Gaussian copula with correlation , then
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 3.3, 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 [7]. (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.4 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 (Section 6).
3.3 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 3.5 (Fidelity scores). For a map of points, the local fidelity and the global fidelity are

Fig. 3. 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 k. (b) The profile ; dots mark L. (c) Over the shaded band, which gives G, the order reverses.
Example. On the 70,000 MNIST digits the chance correction reverses the order of the maps between the two ends (Figure 3). 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).
One scale. Because L and G are the same statistic at two scales, they are set side by side for one map and compared between maps of the same data. L uses an absolute neighborhood and G a band of relative scale, so comparisons are made within a dataset, and the reversal test of Section 4 decides them for two maps. L is read at a fixed small neighborhood, the scale at which t-SNE, UMAP, and their relatives are designed to be faithful. G averages the profile
Henry Han
over its upper end, where Proposition 3.3 makes it a statement about near and far halves. Two methods can then be compared on both axes at once.
Relative scale. 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. Section 6.2 measures both.
Crossover and exchange rate. 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 3.6 (Crossover scale and exchange rate). The crossover scale of a local method against a global method , with profiles and , is
The exchange rate of a parameter path from value to value , with fidelities and , is
Below method is the more faithful map, and above it is. Section 4 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 500. The rate is defined because and are the same statistic, so their differences share one unit.
3.4 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. All for follow from the co-ranking matrix [33], since is a two-dimensional cumulative sum. Building 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, which Section 6.2 shows to be accurate. The code is released with the paper.
4 The LG reversal test: which map answers which question
The LG reversal test tells a user which of two maps to use for which question, with a stated error rate. It works for any local and any global dimension reduction method, since it uses only the data and the two maps, and it brings statistical robustness to dimension reduction. It decides whether one map is more faithful to the neighbors of each point and the other to the layout of the whole data. It also gives the size of question at which the user should change maps, with a confidence interval. The usual claim about embeddings, that t-SNE and UMAP are local and PCA global, thus becomes a result checked on the user's own data.
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) two maps of the same data

(b) two one-sided tests
(c) which map for which question
Fig. 4. 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.
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 (Figure 4).
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 G, a gap that looks decisive on a plot, and the test places it within chance (p = 0.16).
The test is new. Earlier quality curves and scores [32, 33, 43, 45] 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 L and G are the same statistic at two scales, and both are means of per-point scores.
4.1 What the test returns
We first state what a user receives from the test, and then show how it is computed.
A declaration, a p-value and a crossover. For two maps A and B of the same data, the test returns one of three declarations. Either A is local and B global, or B is local and A global, or one map is at least as faithful at both ends and 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.
The four applications. Section 9 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.
Henry Han
-
AI agent memory. On MS MARCO SR-tSNE2 is local and PCA global (), with the crossover near 150,000 passages (Section 9.2). The passages near a query are inspected on the SR-tSNE2 map, and the layout of topics for consolidation on the PCA map (Figure 2).
-
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 (). 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 and the two rolled-up manifolds 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.
4.2 How the test works
These outputs come from the profile in 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. For point and scale , let be the number of its nearest neighbors in the data that are also among its nearest in the map. Define
The score of a whole map is then the average of the scores of its points, each point casting one vote.
LEMMA 4.1 (PER-POINT DECOMPOSITION). for every , so and .
PROOF. By definition . Averaging Equation (9) over gives , by Equation (2). is the profile at and an average of the profile over , so both are means of the corresponding per-point scores.
On the 1,999 MNIST digits, the mean of over points equals to machine precision for PCA, t-SNE and SR-tSNE2. The lemma 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 (Section 9.2).
By Lemma 4.1, 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.
Definition 4.2 (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 .
Put simply, the two tests need no correction: a false declaration requires a false rejection, and each test makes one at rate at most .
PROPOSITION 4.3 (LEVEL). If each one-sided test has level , the probability of declaring a reversal when or holds is at most .
PROOF. Let and be the events that the local and the global test reject. A reversal is declared on . If holds, , because the local test has level . If holds, the same bound follows from . A false declaration requires one of the two nulls to hold, so its probability is at most . Each test runs at the full level , with no split between them; this is the intersection–union principle [5].
The level holds on real data for the global test, which decides every declaration on the large datasets. We built a null that keeps the block dependence of each dataset. At level 0.05, the 48 one-sided global tests on the large datasets reject at 0.046 on average, and the 36 tests on the smaller datasets and the manifolds at 0.051 (Section 9).
A declaration requires both: A more local and B more global. 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 global end, Section 9 checks the resulting standard errors against a null that resamples the same blocks. The delete-a-group jackknife [13] 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 (7). The interval is , where is the 0.975 quantile of the distribution with degrees of freedom and is Equation (10) applied to the values . When the profile of stays above that of at every scale, the test reports as the one map to use. The interval covers the sampling of points for two given maps; for maps refitted with new seeds, the run-to-run spread of in Section 6.1 adds to it.
5 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 parameter settings on MNIST.
Datasets. The study rests on twelve datasets of 50,000 to 1.38 million points (Table 3): four applications, which lead every table and figure, and the eight benchmark datasets of our earlier SR-tSNE study [19]. The four applications are as follows. For pathology, Pathology-100K holds 100,000 colorectal tissue tiles (NCT-CRC-HE-100K, 24) embedded with Phikon [15]. For single cells, SEA-AD holds the 1,378,211 nuclei of the SEA-AD middle temporal gyrus atlas [16], 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
Henry Han
MS MARCO [4]. They are embedded with BGE-base [48] as the long-term memory of a retrieval agent. Among the benchmarks, MNIST [31] and Fashion-MNIST [47] enter as pixels and Covertype [6] as its 54 attributes. CIFAR-10 [28] enters as 512 pooled features of an ImageNet-trained ResNet-18 [21], Speech Commands [46] as mean-pooled wav2vec 2.0 features [3], and AG News [49] as mean-pooled BERT embeddings [11]. Renal-Cortex and Brain-Cortex are the two single-cell datasets of the SR-tSNE 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 Table 3, and the cosine distance for unit vectors.
Table 3. The twelve large datasets. : dimension of the reference representation.
| 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 |
Smaller datasets and manifolds. 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 (Section 7). Pathology-7K holds 7,180 colorectal tissue tiles in nine classes (CRC-VAL-HE-7K, 24), 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 invoice lines [9]. Each customer is a unit vector of . 8-K holds 5,000 SEC 8-K filings, drawn at random from 18,329 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.
Methods. Seven maps are fitted on every large dataset, on all points with a fixed seed. The first is PCA. Nonnegative PCA (NPCA) [20] maximizes variance under nonnegative loadings by projected gradient ascent (two components, orthonormality penalty 0.1, 3,000 steps). t-SNE uses the FFT-accelerated implementation of openTSNE [39] with PCA initialization. It runs at perplexity 30, the default, and at perplexity 200 (t-SNE). SR-tSNE2 [19] 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 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 [29]. 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 [40], Isomap [41], PHATE and TriMAP [1].
Scores. 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 Section 6.2 shows is enough. From the profile we also read the average over the middle band , the midpoint value, two alternative global bands and , and the area under on a logarithmic axis, [32]. 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 [45]. O-DLP@10 is the share of each point's 10 nearest neighbors that the map returns at their exact rank, averaged over points. Energy is CPU time times 15 W per core.
6 The upper end of the profile measures global structure
ranks maps as the established global scores do, and it is stable across bands and subsamples.
Two profile shapes. Two shapes recur in the profiles of the seven methods (Figure 5). 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 local 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.
Table 4. 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 |
| 0.22 | 0.30 | |
| 0.80 | 0.91 | |
| 0.84 | 0.93 | |
| 0.91 | 0.97 | |
| Midpoint * | 0.94 | 0.98 |
agrees with the established global scores. Over the 156 maps of 50,000 to 1.38 million points, has rank correlation 0.89 with the distance rank correlation and 0.96 with random-triplet accuracy (Figure 6a,b). These are the two scores that Kobak and Berens [25] and Wang et al. [45] used for global structure, and they correlate with each other at 0.97. correlates with them at -0.19 (Figure 6c), 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. Over the 84 maps of the twelve datasets, correlation rises with the scale at which the profile is read (Table 4 and Figure 6d). 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. The logarithmic area, the usual summary of the same profile, reaches 0.22 and 0.30, because it weights the local end.
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, with a median of 0.79 (Figure 6e). It exceeds that of on all thirteen. On CIFAR-10
Henry Han
(a) Pathology-100K

(b) SEA-AD (single cell)
(c) Instacart (supply chain)
(d) MS MARCO (agent memory)
(e) MNIST
(f) CIFAR-10
(g) Fashion-MNIST

(h) Speech Commands
(i) Renal-Cortex
(j) Brain-Cortex
(k) Covertype

(l) AG News
method with the highest G
method with the highest L
other methods
band 0.3–0.5 of k/n giving G
Fig. 5. 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 G; red, highest L; shaded band, the range that gives G.

(c)
(d) agreement grows with scale

(e) within each dataset
Fig. 6. G measures what the established global scores measure, and L complements it at the local end. (a)-(c) G and L against the distance rank correlation and random-triplet accuracy over 156 maps. (d) Agreement rises with the scale at which the profile is read. (e) Within each dataset, G orders the methods as the distance rank correlation does.
all seven maps have G between 0.297 and 0.328, a near tie at the global end. Proposition 3.4 explains the agreement: the global end of the profile is a rank correlation of distances, read point by point.
6.1 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 as . Over the 84 maps of the large datasets, G 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 (Figure 7a). 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 G does, with mean Kendall of 0.83 and 0.89. The middle band gives a different ranking ( ), so the ranking is set at the global end. Table 11 in Appendix A gives the full comparison.
Random seeds move G a median 34 times more than L. On the MNIST parameter paths each setting was run three times. The standard deviation of G over the runs exceeds that of L in 23 of the 24 settings, by a median factor of 34 (Figure 7b). At perplexity 30 it is 0.038 for G and 0.0005 for L, a factor of 84. Over all settings the standard deviation of L is at most 0.0017, and that of G reaches 0.128 with two principal components before t-SNE. The nearest neighbors in a
Henry Han

Fig. 7. G is stable across bands and subsample sizes, and it varies across runs more than L. (a) Correlation of three other bands with G; gray, agreement of the method rankings within a dataset. (b) Run-to-run standard deviation of G against that of L; dotted line y = x. (c) Change in G with the subsample size m, PCA solid and t-SNE dashed; colored, the four applications. (d) G on SEA-AD from m = 1,000 to 8,000.
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 G wherever runs are repeated (Section 8).
6.2 G is estimated from a few thousand points
The last check is the sample. Because G is defined on a relative scale, a uniform subsample of a few thousand points estimates it at any n, with fixed time and memory. On each large dataset we drew five uniform subsamples of each size m = 1,000, 2,000, 4,000 and 8,000 points for the PCA and t-SNE maps. G was computed on each subsample from the subsampled data and map alone (Figure 7c,d).
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 (Figure 7d). 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.
7 Four applications: pathology, single cells, supply chains, and AI agent memory
In all four applications SR-tSNE2 is the most local map, and the most global map changes with the data. Section 6 showed that G measures global structure and can be estimated on any n. We now apply L and G to the four application datasets (Figure 8) and to three smaller datasets of a few thousand points (Figure 9). Each application has tasks that depend on one end of the profile or the other. On Pathology-100K and MS MARCO PCA has the highest G, 0.597 and

Fig. 8. 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; G against L; O-DLP@10; the NPCA map with named axes; the SR-tSNE2 map colored by tissue, cell subclass, department or k-means cluster. Maps show 20,000 random points.
Henry Han
0.283 (Figure 8b,q). 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 8g,l). The claim that PCA is global thus holds on Pathology-100K and MS MARCO, and on SEA-AD and Instacart PaCMAP takes its place; Section 9 tests each case.
Local and global tasks. SR-tSNE2 has 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. It returns the 10 nearest neighbors at their exact rank 34% to 76% more often than t-SNE and 3.8 to 29 times as often as UMAP (Figure 8c,h,m,r). 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 distances between cell types, customer segmentation and stocking, and topic consolidation in an agent's memory. For each task, the score that matters picks the map.
Named axes. NPCA names its axes on the three datasets that have class labels or named variables (Figure 8d,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 (Figure 9). They are Pathology-7K, Online Retail and 8-K of Section 5; 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 (Figure 10). The SR-tSNE2 map separates the nine tissues and keeps the morphology continuous across them (Figure 10a,b). The NPCA axes are tissues, and the tiles that score highest on them are the tissue they name (Figure 10c). 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%. Figure 10d 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.

(i) NPCA
(j) SR-tSNE2
(n) NPCA
(a) SR-tSNE2
Fig. 9. 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 8, with PHATE and DREAMS [29] added and t-SNE omitted; the SR-tSNE2 map is colored by tissue, purchase cluster or main 8-K item.
Henry Han
(a) SR-tSNE2 map of 7,180 tiles (L=0.599, G=0.443)

(b) The same map paved with the tiles
(c) NPCA: each axis a tissue (G=0.452; PCA 0.549)

NPCA 1: background (100% of top 5%)
highest on NPCA axis 1

highest on NPCA axis 2

(d) Retrieval of tumor tissue; green: among the 10 true neighbors (mean over 1,233 tumor tiles at left)
Phikon space
this tile: 10 of 10

query
SR-tSNE2 map
this tile: 4 of 10
all tumor tiles: 6.1





UMAP map
this tile: 2 of 10
all tumor tiles: 4.1



Fig. 10. 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.
8 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 G and t-SNE the highest L.
Table 5. L (left) and G (right) of seven methods on the twelve large datasets, the four applications first; bold: best on the dataset. t-SNE_{200}: perplexity 200.
| Dataset | L | G | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PCA | NPCA | t-SNE | t-SNE_{200} | SR-tSNE2 | UMAP | PaCMAP | PCA | NPCA | t-SNE | t-SNE_{200} | 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 |

Fig. 11. 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) L. (b) G; bold, the best. (c) G - L, compared between maps of one dataset; blue, positive. (d) Crossover scale at which PCA reaches each neighbor embedding.
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. Table 5 and Figure 11 give the scores on all twelve datasets. SR-tSNE2 has the highest L 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 (Appendix C). The highest G belongs to PCA on six of the twelve: MNIST, Fashion-MNIST, Speech Commands, AG News, Pathology-100K and MS
Henry Han
MARCO. PaCMAP has the highest G 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. The claim that PCA is global holds on half of the large datasets.
On large data, PaCMAP leads at the global end and t-SNE at the local end. PaCMAP was designed to preserve both local and global structure [45]. It has a higher G 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 local end t-SNE leads both: its L 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 (Section 9.5).
On rolled-up manifolds 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 (Figure 12 and Table 6). PCA has G 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 L 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 (Figure 12g–k). On the tree PCA's G 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.
Table 6. L/G on the three synthetic manifolds, whose reference is the geodesic distance; mean over ten seeds for methods marked † and for SR-tSNE2. Bold: best L and best G on each manifold.
| 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 |
The scores measure the design choices of our two methods. The same scale applies to new methods. 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 (Figure 13d). Its L rises by up to 0.056 on MS MARCO, and its G stays within 0.0005 of that of t-SNE (Figure 13e). On large data the rank refinement improves local order without changing G, and the reversal test (Section 9) 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 G 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 (Figure 13c). NPCA thus gains interpretable axes, with G close to PCA's on three datasets. The reversal test declares t-SNE local and NPCA global on four datasets (Section 9.5). Figure 13a,b shows how the settings were chosen on the 60,000 MNIST training digits. With learning rate 50 and 2,000 iterations, a rank weight λ = 20 raises O-DLP@10 by 29% and L by 0.007, and λ = 50 lowers L by 0.030.


(g) PCA
(h) NPCA
(i) t-SNE
(j) SR-tSNE2
(k) UMAP





Fig. 12. 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 G; red, highest L; dashed gray, PCA. (d)-(f) G against L. (g)-(k) Swiss-roll maps colored by position along the roll: PCA and NPCA overlay its turns.
Henry Han

(d) SR-tSNE2: more neighbors at their exact rank

(e) SR-tSNE2: L rises,
Fig. 13. SR-tSNE2 improves local order with G within 0.0005, and NPCA gains named axes with G close to PCA's on three datasets. (a), (b) Tuning the rank weight on 60,000 MNIST digits. (c) G of NPCA against G 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 L and G.
Table 7. Our methods against the methods they modify on the twelve large datasets, L/G. : SR-tSNE2 minus the t-SNE map it refines.
| 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 |
Parameter paths have measurable exchange rates. Across all 24 settings of four parameter paths, PCA keeps the highest G and t-SNE the highest L. Besides the choice of method, each method has parameters that are said to move a map toward global structure. Figure 14 traces four parameter paths in the plane on the 60,000 MNIST training digits, and Table 8 lists them with their energy. L is computed exactly over all points and G from ten subsamples of 2,000. Each point is the mean of three runs, one with PCA initialization and two random.
(a) Parameter paths, n = 60,000

(b) G against energy
(c) Seeds move G, not L
Fig. 14. On 60,000 MNIST digits PCA keeps the highest G and t-SNE the highest L 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 G against that of L; dotted line y = x, dashed line y = 10x.
Perplexity. Raising t-SNE's perplexity from 30 to 500 lowers L by 0.190 and raises G 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 (Figure 14b). 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 G 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 G comes at an estimated energy.
Neighbors, exaggeration and preprocessing. For every UMAP setting, some perplexity of t-SNE has both a higher L and a higher G. From 5 to 500 neighbors, UMAP's L moves from 0.151 to 0.063 and its G stays within 0.018. Exaggeration moves t-SNE along the attraction–repulsion spectrum toward UMAP-like maps [8]. From exaggeration 1 to 32, L moves from 0.370 to 0.045 and G 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 G of all 24 settings, 0.311, within 0.007 of PCA, at L = 0.084. Two components raise the run-to-run spread of G to 0.128, larger than any difference between methods.
Henry Han
Table 8. Local fidelity, global fidelity, the standard deviation of G over three runs, and energy (J, CPU time at 15 W per core) along each parameter path on 60,000 MNIST digits; means over three runs. PCA has L = 0.008 and G = 0.318.
| Path | Value | L | G | sd G | J |
|---|---|---|---|---|---|
| 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 (FFT), 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(k) + t-SNE, k | 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 |
9 The reversal test at scale
The global test holds its level on real data, the usual claim holds on seven of the twelve large datasets, and the crossover tells a user which map to use for each question. This section calibrates the test of Section 4, works through the memory of a retrieval agent, and applies the test to the twelve large datasets, the three smaller datasets and the three manifolds, and sets the neighbor embeddings against PaCMAP and NPCA. It ends with what the test tells a user.
9.1 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 Table 5, so the local differences of the test are read at that scale. On MS MARCO the local difference is 0.212 in the test and 0.309 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 and ranges from 0.014 to 0.106. 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 and ranges from 0.028 to 0.081. Every local difference in Figure 15b has , so each local declaration holds by a wide margin (Appendix B). The number of declarations depends on the number of blocks: t-SNE is declared local and PCA global on seven of the twelve large datasets with 20 blocks, on six with 10 and on nine with 50 (Appendix D). 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 (Appendix E).
9.2 A worked example: the memory of a retrieval agent
With its level confirmed, the test is first applied in full to one dataset. For the memory of a retrieval agent the test declares SR-tSNE2 local and PCA global, and it places the change of maps near 150,000 passages.
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.
The two one-sided tests. We test SR-tSNE2 against PCA on a uniform subsample of 5,000 passages with 20 k-means blocks (Figure 2). The local test gives with jackknife 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,200 passages (78,900 to 221,500). Figure 2c lists which map answers each question about the memory. t-SNE and UMAP give the same declaration, with crossovers at 150,400 and 135,600 passages.
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 (, Appendix C), and on the subsample of 5,000 passages t-SNE leads it by 0.0008. The companion study of compressed agent memory finds the same division: retrieval follows , and consolidation and deletion follow [17].
9.3 Reversals at scale
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 15a). UMAP and SR-tSNE2 are declared local on the same seven. On the other five, t-SNE is more local with . On four of them the global gap stays within its sampling error: 0.026 on CIFAR-10, 0.056 on Renal-Cortex, 0.006 on Brain-Cortex and 0.044 on SEA-AD. 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 15d).
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 global end, as the perplexity path of Figure 14 shows.
9.4 Where the neighbor embeddings are global
On four datasets the neighbor embeddings are the more global maps: the two rolled-up manifolds and both retail datasets. The test identifies each case (Figure 15e-i). 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 , so one neighbor embedding 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, PCA reaches them at , and no reversal is declared, as on Instacart ( and 0.97); there t-SNE leads at both ends. On Pathology-7K the reversal is declared with (0.05 to 0.16), close to its value of 0.10 on
Henry Han

(e) Reversal p-value
(f) Local difference
(h) Crossover with 95% interval
(g) Global difference
(i) Calibration at level 0.05
Fig. 15. The reversal test declares t-SNE local and PCA global on seven of the twelve large datasets, and identifies where the neighbor embeddings are the more global maps. (a)–(d) Large datasets, applications above the line, four maps against PCA: (a) p-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 under the null.
Pathology-100K. A reversal thus depends on the pair of methods, the dataset and, through the PCA plane, its size, as the next two subsections show.
9.5 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 G on four large datasets (Table 5). 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 G in Table 5. The test and the scores of Table 5, 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 G 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 four datasets. The test declares t-SNE local and NPCA global on Fashion-MNIST, Speech Commands, Covertype and 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 no reversal is declared: the global gap stays within its sampling error or favors t-SNE. Set directly against PCA, NPCA matches it at the global 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.
Table 9. t-SNE and SR-tSNE2 are declared local and PaCMAP global on the same seven large datasets, and NPCA global on four and three. Map A, the column head, against map B, PaCMAP or NPCA. Last pair, global 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.
| Dataset | B: PaCMAP | B: NPCA | B: PCA | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| UMAP | t-SNE | SR-tSNE2 | t-SNE | SR-tSNE2 | NPCA | |||||||
| 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 | 0.018 | 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 | 0.049 | 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 | |
Henry Han


(e) MNIST: G follows the second axis
Fig. 16. From 10,000 points the PCA plane is stable and the reversal is declared in at least two of three ladders, 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) G of PCA fitted on each subset. (d), (e) Forty subsets of 5,000 points: the full-data plane keeps G near 0.30 in all of them.
9.6 The reversal and the size of the data
A reversal also depends on the size of the data, through the PCA map. On MNIST we built three ladders of subsets from 2,500 to 70,000 points. The reversal is declared in all three ladders at 10,000, 40,000 and 70,000 points and in two of three at 5,000 and 20,000 (Figure 16a). PCA's plane settles at 10,000 points (Section 9.7); in smaller subsets it turns between draws, and G of PCA is under 0.20 in four of the six subsets of 2,500 and 5,000 points (Figure 16c). From 10,000 points on, G of PCA lies between 0.296 and 0.308 in every subset, and PCA's global advantage over t-SNE settles at 0.09 to 0.13. At perplexity 200, from 20,000 points on, the advantage lies within 0.03 of its value at perplexity 30 (Figure 16b). Large data make the reversal reproducible because they make the PCA map stable.
9.7 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 [10]. 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 (Figure 16d,e). L of the PCA map stays at 0.040 (standard deviation 0.005), and G splits in two. In 30 of them the plane stays close to the full-data plane and
G averages 0.303. In the other 10 the second axis turns by an angle of more than 60 degrees (), and G 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.
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.
9.8 What the test tells a user
Table 10. Which map to use, by the LG reversal test against PCA on the datasets of Section 7; 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.
| 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 (SR-tSNE2) | the topics of the memory and their distances (PCA) | 150,200 passages (78,900–221,500), SR-tSNE2 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 | ||
Taken together, these results answer four questions a user has about the datasets of Section 7 (Table 10).
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 p-value of the declaration gives the evidence for this choice on the data at hand.
Henry Han
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 on seven of the twelve large datasets. 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.
10 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.
One scale changes how maps are chosen. The upper end of the profile has a proven meaning: the agreement on which half of the data is near each point. Over 156 maps it ranks maps as the established global scores do. Both ends are the same statistic, so the reversal test turns their comparison into a decision. Analysts gain three practices. They choose a map for the size of the question, and the crossover marks where to change maps. They report a parameter value, such as a perplexity, as a point on the method's path. They support a claim of global structure with and its run-to-run variability.
Memories of artificial agents. The same scale carries over to the memory of an 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 [2], 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 [12]. can be estimated from a few thousand stored items, however large the memory (Section 6.2). A companion study applies and to compressed agent memory with six encoders and four memories [17]. There retrieval follows , and consolidation and deletion follow , with partial rank correlations of 0.55 to 0.93 given . The same reasoning applies when compressed vectors are sent between devices or agents, because the receiver retrieves and organizes with what arrives. 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 shows which part, and NPCA adds axes named by the input variables. PCA and NPCA place a new item by projection, and openTSNE places one on a t-SNE map [39]. SR-tSNE2 places a new item on the t-SNE map it refines and refines it with the map at the next refit. The profile can also be read on the latent states of agents that learn world models, with the number of actions between two states as the reference.
Scope and extensions. Global structure is defined relative to a reference dissimilarity, so the user chooses the geometry that matters, and the test answers for that geometry. 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 distance amplification of neighbor embeddings. The package returns the full profile, so any band and any local scale can be read from it. The test treats the two fitted maps as given. On MNIST a refit of t-SNE moves the global difference by a standard deviation of 0.010, a sixth of its jackknife standard error (Appendix E), and a comparison of two methods over refits adds this spread to the error.
Software. The package lgfid computes , , O-DLP@10 and the profile of any map from the data and the map. It runs the reversal test of Section 4 on two maps, from a command line or from Python. It computes exactly and from ten subsamples of 2,000 points, as in Section 5, and its tests check the identity map and a random map.
11 Conclusion
Local and global fidelity are two ends of one chance-corrected profile, and the LG reversal test decides which map answers which question. The test is our strongest contribution. It is designed for any local and any global dimension reduction method, and it brings statistical robustness to dimension reduction. It turns the usual claim that t-SNE is local and PCA global into a result that any user can check on their own data. The check comes with a stated error rate and the size of question at which to change maps. It serves any field that compares a representation with a reference, from pathology and single-cell atlases to supply chains, compressed vector stores and the memories of AI agents.
The results bear this out. On twelve datasets of up to 1.38 million points, the test confirms the usual claim on seven. It holds its level whichever map stands at the global end: with PaCMAP or NPCA in that place, 60 tests at level 0.05 reject a true null at 0.052 on average. Against PaCMAP its declarations agree on all twelve datasets with the scores computed on separate subsamples. On Instacart, Online Retail and the two rolled-up manifolds it finds the neighbor embeddings more global. In an agent memory of one million passages, the two maps cross at 150,000 passages: the neighborhood of a query is read on SR-tSNE2 and the layout of topics on PCA, while retrieval runs in the full embedding. PCA has the highest G on six large datasets and PaCMAP on four. Across 24 parameter settings on 60,000 digits, PCA keeps the highest G and t-SNE the highest L. SR-tSNE2 has the highest L on all twelve large datasets with G within 0.0005 of t-SNE, and NPCA names its axes. We suggest reporting with published maps, and the reversal test whenever two maps are compared.
Data and code: https://github.com/hank08819/LG2Test
References
[1] Ehsan Amid and Manfred K. Warmuth. 2019. TriMap: Large-scale dimensionality reduction using triplets. arXiv:1910.00204 (2019).
[2] Martin Aumüller, Erik Bernhardsson, and Alexander Faithfull. 2020. ANN-Benchmarks: A benchmarking tool for approximate nearest neighbor algorithms. Information Systems 87 (2020), 101374. doi:10.1016/j.is.2019.02.006
[3] Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. 2020. wav2vec 2.0: a framework for self-supervised learning of speech representations. In Advances in Neural Information Processing Systems, Vol. 33. 12449–12460.
[4] Payal Bajaj, Daniel Campos, Nick Craswell, Li Deng, Jianfeng Gao, Xiaodong Liu, Rangan Majumder, Andrew McNamara, Bhaskar Mitra, Tri Nguyen, Mir Rosenberg, Xia Song, Alina Stoica, Saurabh Tiwary, and Tong Wang. 2016. MS MARCO: A Human Generated Machine Reading Comprehension Dataset. arXiv preprint arXiv:1611.09268 (2016).
[5] Roger L. Berger. 1982. Multiparameter hypothesis testing and acceptance sampling. Technometrics 24, 4 (1982), 295–300. doi:10.1080/00401706.1982.10487790
[6] Jock A. Blackard and Denis J. Dean. 1999. Comparative accuracies of artificial neural networks and discriminant analysis in predicting forest cover types from cartographic variables. Computers and Electronics in Agriculture 24, 3 (1999), 131–151. doi:10.1016/S0168-1699(99)00046-0
[7] Nils Blomqvist. 1950. On a measure of dependence between two random variables. The Annals of Mathematical Statistics 21, 4 (1950), 593–600.
[8] Jan Niklas Böhm, Philipp Berens, and Dmitry Kobak. 2022. Attraction-repulsion spectrum in neighbor embeddings. Journal of Machine Learning Research 23, 95 (2022), 1–32.
[9] Daqing Chen. 2012. Online Retail II. UCI Machine Learning Repository. doi:10.24432/C5CG6D
[10] Chandler Davis and W. M. Kahan. 1970. The Rotation of Eigenvectors by a Perturbation. III. SIAM J. Numer. Anal. 7, 1 (1970), 1–46. doi:10.1137/0707001
[11] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics. 4171–4186. doi:10.18653/v1/N19-1423
[12] Darren Edge, Ha Trinh, Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt, Dasha Metropolitansky, Robert Osazuwa Ness, and Jonathan Larson. 2024. From local to global: A graph RAG approach to query-focused summarization. arXiv preprint arXiv:2404.16130 (2024).
[13] Bradley Efron. 1982. The Jackknife, the Bootstrap and Other Resampling Plans. CBMS-NSF Regional Conference Series in Applied Mathematics, Vol. 38. SIAM, Philadelphia.
[14] Mateus Espadoto, Rafael M. Martins, Andreas Kerren, Nina S. T. Hirata, and Alexandru C. Telea. 2021. Toward a Quantitative Survey of Dimension Reduction Techniques. IEEE Transactions on Visualization and Computer Graphics 27, 3 (2021), 2153–2173. doi:10.1109/TVCG.2019.2944182
[15] Alexandre Filiot, Ridouane Ghermi, Antoine Olivier, Paul Jacob, Lucas Fidon, Axel Camara, Alice Mac Kain, Charlie Saillard, and Jean-Baptiste Schiratti. 2023. Scaling Self-Supervised Learning for Histopathology with Masked Image Modeling. medRxiv. doi:10.1101/2023.07.21.23292757
Henry Han
[16] Mariano I. Gabitto, Kyle J. Travaglini, Victoria M. Rachleff, et al. 2024. Integrated multimodal cell atlas of Alzheimer's disease. Nature Neuroscience 27, 12 (2024), 2366–2383. doi:10.1038/s41593-024-01774-5
[17] Henry Han. 2026. Measuring and Enhancing Local and Global Structure in Compressed AI Agent Memory. (2026). Manuscript.
[18] Henry Han, Wentian Li, Jiacun Wang, Guimin Qin, and Xianya Qin. 2022. Enhance explainability of manifold learning. Neurocomputing 500 (2022), 877–895. doi:10.1016/j.neucom.2022.05.119
[19] Henry Han, Luyu Niu, Diane Li, and Jiacun Wang. 2026. Differential rank preservation manifold learning. (2026). Pattern Recognition, under review.
[20] Xiaoxu Han. 2010. Nonnegative Principal Component Analysis for Cancer Molecular Pattern Discovery. IEEE/ACM Transactions on Computational Biology and Bioinformatics 7, 3 (2010), 537–549. doi:10.1109/TCBB.2009.36
[21] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. 2016. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). 770–778. doi:10.1109/CVPR.2016.90
[22] Haiyang Huang, Yingfan Wang, Cynthia Rudin, and Edward P. Browne. 2022. Towards a Comprehensive Evaluation of Dimension Reduction Methods for Transcriptomic Data Visualization. Communications Biology 5 (2022), 719. doi:10.1038/s42003-022-03628-x
[23] Hervé Jégou, Matthijs Douze, and Cordelia Schmid. 2011. Product quantization for nearest neighbor search. IEEE Transactions on Pattern Analysis and Machine Intelligence 33, 1 (2011), 117–128. doi:10.1109/TPAMI.2010.57
[24] Jakob Nikolas Kather, Johannes Krisam, Pormpimol Charoentong, Tom Luedde, Esther Herpel, Cleo-Aron Weis, Timo Gaiser, Alexander Marx, Nektarios A. Valous, Dyke Ferber, Lina Jansen, Constantino Carlos Reyes-Aldasoro, Inka Zörnig, Dirk Jäger, Hermann Brenner, Jenny Chang-Claude, Michael Hoffmeister, and Niels Halama. 2019. Predicting survival from colorectal cancer histology slides using deep learning: A retrospective multicenter study. PLOS Medicine 16, 1 (2019), e1002730. doi:10.1371/journal.pmed.1002730
[25] Dmitry Kobak and Philipp Berens. 2019. The art of using t-SNE for single-cell transcriptomics. Nature Communications 10 (2019), 5416. doi:10.1038/s41467-019-13056-x
[26] Dmitry Kobak and George C. Linderman. 2021. Initialization is critical for preserving global data structure in both t-SNE and UMAP. Nature Biotechnology 39 (2021), 156–157. doi:10.1038/s41587-020-00809-z
[27] Guido Kraemer, Markus Reichstein, and Miguel D. Mahecha. 2018. dimRed and coRanking—Unifying Dimensionality Reduction in R. The R Journal 10, 1 (2018), 342–358. doi:10.32614/RJ-2018-039
[28] Alex Krizhevsky. 2009. Learning Multiple Layers of Features from Tiny Images. Technical Report. University of Toronto.
[29] Noël Kury, Dmitry Kobak, and Sebastian Damrich. 2026. DREAMS: Preserving both Local and Global Structure in Dimensionality Reduction. Transactions on Machine Learning Research (2026).
[30] Aditya Kusupati, Gantavya Bhatt, Aniket Rege, Matthew Wallingford, Aditya Sinha, Vivek Ramanujan, William Howard-Snyder, Kaifeng Chen, Sham Kakade, Prateek Jain, and Ali Farhadi. 2022. Matryoshka representation learning. In Advances in Neural Information Processing Systems, Vol. 35. 30233–30249.
[31] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. 1998. Gradient-Based Learning Applied to Document Recognition. Proc. IEEE 86, 11 (1998), 2278–2324. doi:10.1109/5.726791
[32] John A. Lee, Diego H. Peluffo-Ordóñez, and Michel Verleysen. 2015. Multi-scale similarities in stochastic neighbour embedding: Reducing dimensionality while preserving both local and global structure. Neurocomputing 169 (2015), 246–261. doi:10.1016/j.neucom.2014.12.095
[33] John A. Lee and Michel Verleysen. 2009. Quality assessment of dimensionality reduction: Rank-based criteria. Neurocomputing 72, 7–9 (2009), 1431–1443. doi:10.1016/j.neucom.2008.12.017
[34] Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, and Douwe Kiela. 2020. Retrieval-augmented generation for knowledge-intensive NLP tasks. In Advances in Neural Information Processing Systems, Vol. 33. 9459–9474.
[35] Wouter Lueks, Bassam Mokbel, Michael Biehl, and Barbara Hammer. 2011. How to Evaluate Dimensionality Reduction? Improving the Co-ranking Matrix. arXiv preprint arXiv:1110.3917 (2011).
[36] Leland McInnes, John Healy, and James Melville. 2018. UMAP: Uniform manifold approximation and projection for dimension reduction. arXiv:1802.03426 (2018).
[37] Kevin R. Moon, David van Dijk, Zheng Wang, Scott Gigante, Daniel B. Burkhardt, William S. Chen, Kristina Yim, Antonia van den Elzen, Matthew J. Hirn, Ronald R. Coifman, Natalia B. Ivanova, Guy Wolf, and Smita Krishnaswamy. 2019. Visualizing structure and transitions in high-dimensional biological data. Nature Biotechnology 37 (2019), 1482–1492. doi:10.1038/s41587-019-0336-3
[38] Luis Gustavo Nonato and Michael Aupetit. 2019. Multidimensional Projection for Visual Analytics: Linking Techniques with Distortions, Tasks, and Layout Enrichment. IEEE Transactions on Visualization and Computer Graphics 25, 8 (2019), 2650–2673.
[39] Pavlin G. Polićar, Martin Stražar, and Blaž Zupan. 2024. openTSNE: A modular Python library for t-SNE dimensionality reduction and embedding. Journal of Statistical Software 109, 3 (2024). doi:10.18637/jss.v109.i03
[40] Sam T. Roweis and Lawrence K. Saul. 2000. Nonlinear dimensionality reduction by locally linear embedding. Science 290 (2000), 2323–2326. doi:10.1126/science.290.5500.2323
[41] Joshua B. Tenenbaum, Vin de Silva, and John C. Langford. 2000. A global geometric framework for nonlinear dimensionality reduction. Science 290 (2000), 2319–2323. doi:10.1126/science.290.5500.2319
[42] Laurens van der Maaten and Geoffrey Hinton. 2008. Visualizing data using t-SNE. Journal of Machine Learning Research 9 (2008), 2579–2605.
[43] Jarkko Venna and Samuel Kaski. 2001. Neighborhood preservation in nonlinear projection methods: An experimental study. In Artificial Neural Networks — ICANN 2001. 485–491. doi:10.1007/3-540-44668-0_68
[44] Jarkko Venna, Jaakko Peltonen, Kristian Nybo, Helena Aidos, and Samuel Kaski. 2010. Information Retrieval Perspective to Nonlinear Dimensionality Reduction for Data Visualization. Journal of Machine Learning Research 11 (2010), 451–490.
[45] Yingfan Wang, Haiyang Huang, Cynthia Rudin, and Yaron Shaposhnik. 2021. 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, 201 (2021), 1–73.
[46] Pete Warden. 2018. Speech Commands: a dataset for limited-vocabulary speech recognition. arXiv preprint arXiv:1804.03209 (2018).
[47] Han Xiao, Kashif Rasul, and Roland Vollgraf. 2017. Fashion-MNIST: a novel image dataset for benchmarking machine learning algorithms. arXiv preprint arXiv:1708.07747 (2017).
[48] Shitao Xiao, Zheng Liu, Peitian Zhang, Niklas Muennighoff, Defu Lian, and Jian-Yun Nie. 2024. C-Pack: Packed resources for general Chinese embeddings. In Proceedings of the 47th International ACM SIGIR Conference on Research and Development in Information Retrieval. 641–649. doi:10.1145/3626772.3657878
[49] Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In Advances in Neural Information Processing Systems, Vol. 28. 649–657.
A Sensitivity of G to its band
G changes little when its band is replaced. Table 11 replaces the band by alternatives on the 84 maps of the twelve large datasets. It reports three quantities: the rank correlation with G, 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.
Table 11. G changes little with its band (84 maps of the twelve large datasets). Default: correlation with G 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.
| 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.81 | 0.57 | 0.70 |
Global fidelity. The bands 0.2–0.5 and 0.4–0.5 correlate at 0.98 with G 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 k, and the methods on a large dataset often lie within 0.01 of each other in G. The middle band ranks the methods differently from G (mean 0.15) and agrees with the references at 0.57 and 0.70. The default band is the widest that stays at the global end.
B Calibration of the local test
Under the centered null of Section 9, the local test rejects at level 0.05 at a rate of up to 0.236, on Brain-Cortex. The local declarations rest on (Figure 15b), far below any of these rates.
C 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 Table 5. The 20 k-means blocks are fitted on 50,000 points and assigned to all, and the jackknife
Henry Han
is that of Section 4. 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 of Section 9, 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.
D Number of blocks
The declarations of t-SNE against PCA change little with the number of blocks . With 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 Section 9 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 and 50, and the local test at most at 0.264, 0.204 and 0.090.
E 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 Section 9. 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.