ScaleMAP: Preserving Local Density and Neighborhood Structure in Low-Dimensional Embeddings

arXiv cs.LG Papers

Summary

ScaleMAP is a new nonlinear dimensionality reduction method that preserves local density and neighborhood structure by rescaling embedding distances based on original-space local radii, achieving better density preservation than DensMAP while maintaining UMAP-level neighborhood preservation.

arXiv:2605.30597v1 Announce Type: new Abstract: Nonlinear dimensionality-reduction methods such as UMAP and PaCMAP adaptively normalize local distances during graph construction, erasing neighborhood scale from the data. This distorts more than relative cluster sizes: sparse structures like bridges between transitioning cell types and narrow spectral spikes in hyperspectral images can be suppressed or lost entirely. DensMAP adds a density penalty to correct this, but this penalty competes with UMAP's attraction-repulsion forces, scattering points far from their neighborhoods. ScaleMAP takes a different approach: each pairwise embedding displacement is divided by the geometric mean of the two endpoints' original-space local radii, re-injecting scale information as a change of variables rather than as a competing objective. Across standard benchmarks and scientific datasets from transcriptomics, hyperspectral imaging, and flow cytometry, ScaleMAP matches DensMAP on density preservation while maintaining UMAP-level neighborhood preservation. In transcriptomic data, it recovers sparse bridges between cell populations that UMAP collapses; in flow cytometry, it faithfully represents density structure across 17 orders of magnitude. The same principle applied to PaCMAP yields consistently improved density preservation, suggesting the approach generalizes beyond UMAP.
Original Article
View Cached Full Text

Cached at: 06/01/26, 09:28 AM

# ScaleMAP: Preserving Local Density and Neighborhood Structure in Low-Dimensional Embeddings
Source: [https://arxiv.org/html/2605.30597](https://arxiv.org/html/2605.30597)
Rajas Poorna School of Chemical and Biomolecular Engineering Georgia Institute of Technology rajasp@gatech\.eduMarcus T\. Cicerone School of Chemistry and Biochemistry Georgia Institute of Technology cicerone@gatech\.edu

###### Abstract

Nonlinear dimensionality\-reduction methods such as UMAP and PaCMAP adaptively normalize local distances during graph construction, erasing neighborhood scale from the data\. This distorts more than relative cluster sizes: sparse structures like bridges between transitioning cell types and narrow spectral spikes in hyperspectral images can be suppressed or lost entirely\. DensMAP adds a density penalty to correct this, but this penalty competes with UMAP’s attraction–repulsion forces, scattering points far from their neighborhoods\. ScaleMAP takes a different approach: each pairwise embedding displacement is divided by the geometric mean of the two endpoints’ original\-space local radii, re\-injecting scale information as a change of variables rather than as a competing objective\. Across standard benchmarks and scientific datasets from transcriptomics, hyperspectral imaging, and flow cytometry, ScaleMAP matches DensMAP on density preservation while maintaining UMAP\-level neighborhood preservation\. In transcriptomic data, it recovers sparse bridges between cell populations that UMAP collapses; in flow cytometry, it faithfully represents density structure across 17 orders of magnitude\. The same principle applied to PaCMAP yields consistently improved density preservation, suggesting the approach generalizes beyond UMAP\.

## 1Introduction

Low\-dimensional embeddings are often the first step in exploratory analysis of large high\-dimensional datasets\. Nonlinear dimensionality\-reduction methods—UMAP\[[1](https://arxiv.org/html/2605.30597#bib.bib1)\], t\-SNE\[[2](https://arxiv.org/html/2605.30597#bib.bib2)\], PaCMAP\[[3](https://arxiv.org/html/2605.30597#bib.bib3)\]—build an approximatekk\-nearest\-neighbor graph in high\-dimensional space and place points in two dimensions so as to represent that graph\. UMAP in particular has become a default tool for exploratory analysis across the natural sciences\. These methods normalize each point’s distances to its neighbors by an adaptive bandwidth, which makes them robust to varying local density\. Intuitively, one might imagine that neighborhood\-preserving methods would preserve both neighborhood adjacency and scale, but, despite estimating the relevant scale during graph construction, they generally do not incorporate them into the embedding objective\. Consequently, two regions with very different densities become indistinguishable to the embedding objective—and the consequences go beyond relative cluster sizing\. Sparse structures such as bridges between transitioning cell types, narrow spectral spikes in hyperspectral images, and local densities spanning many orders of magnitude, such as in flow cytometry, can all be suppressed or lost\.

DensMAP\[[4](https://arxiv.org/html/2605.30597#bib.bib4)\]addresses this by adding a penalty term to the UMAP loss that discourages mismatches between local density in the original and embedding spaces\. However, this penalty competes with UMAP’s attraction–repulsion forces, and DensMAP scatters a fraction of points far from their true neighbors, making sparse regions of the embedding difficult to interpret\.

If UMAP represents the shape correctly, but not the scale, this suggests an intuitive approach to resolve this issue: rescale the space locally to match the scale in the original space\. We can accomplish this by treating the distances between embedding points as non\-uniform\. ScaleMAP implements this by performing a*change of variables*: each pairwise embedding displacement𝐲i−𝐲j\\mathbf\{y\}\_\{i\}\-\\mathbf\{y\}\_\{j\}is divided by the geometric meanri​rj\\sqrt\{r\_\{i\}r\_\{j\}\}of the two endpoints’ original\-space local radii, leaving the UMAP objective otherwise unchanged\. Because the rescaling applies uniformly to all forces, the local equilibrium that gives UMAP its neighborhood preservation is maintained while original\-scale information is reintroduced\.

Contributions\.

1. 1\.We introduce ScaleMAP, a modification of UMAP that injects local\-scale information through a change of variables rather than an additional loss term\. The same principle transfers to PaCMAP\.
2. 2\.Across standard benchmarks and three scientific data modalities, ScaleMAP attains UMAP\-level neighborhood preservation while broadly matching or exceeding DensMAP on density preservation, with substantially fewer scattered points\.
3. 3\.ScaleMAP recovers structures that UMAP collapses—transcriptomic bridges consistent with known developmental relationships, sparse spectral spikes in hyperspectral imaging—and preserves density faithfully across 17 orders of magnitude in flow\-cytometry data\.

## 2Method

### 2\.1UMAP as attractive and repulsive forces

UMAP\[[1](https://arxiv.org/html/2605.30597#bib.bib1)\]constructs a weighted kNN graph in the original space\. For each point𝐱i\\mathbf\{x\}\_\{i\}withkknearest neighbors, define the directed membership weight

μi​j=exp⁡\(−d​\(𝐱i,𝐱j\)−ρiσi\),\\mu\_\{ij\}=\\exp\\\!\\left\(\-\\frac\{d\(\\mathbf\{x\}\_\{i\},\\mathbf\{x\}\_\{j\}\)\-\\rho\_\{i\}\}\{\\sigma\_\{i\}\}\\right\),\(1\)whereρi\\rho\_\{i\}is the distance from𝐱i\\mathbf\{x\}\_\{i\}to its nearest neighbor andσi\\sigma\_\{i\}is an adaptive bandwidth\. Points that are close relative toσi\\sigma\_\{i\}receive weight near 1; points that are far receive weight near 0\. The bandwidthσi\\sigma\_\{i\}is chosen for each point so that the total weight to itskkneighbors equalslog2⁡k\\log\_\{2\}k, ensuring that every point has a comparable number of effective neighbors regardless of local density\. These directed weights are symmetrized tovi​j=μi​j\+μj​i−μi​j​μj​iv\_\{ij\}=\\mu\_\{ij\}\+\\mu\_\{ji\}\-\\mu\_\{ij\}\\mu\_\{ji\}\.

The embedding𝐲i∈ℝ2\\mathbf\{y\}\_\{i\}\\in\\mathbb\{R\}^\{2\}is initialized by spectral decomposition of the graph Laplacian\[[5](https://arxiv.org/html/2605.30597#bib.bib5)\]and then refined by stochastic gradient descent on a cross\-entropy loss\[[1](https://arxiv.org/html/2605.30597#bib.bib1)\], which decomposes into per\-edge attractive and repulsive update steps\. Writingdi​j2=‖𝐲i−𝐲j‖2d\_\{ij\}^\{2\}=\\\|\\mathbf\{y\}\_\{i\}\-\\mathbf\{y\}\_\{j\}\\\|^\{2\}for the embedding\-space squared distance:

Attractive step\.For a graph edge\(i,j\)\(i,j\)sampled with probability proportional tovi​jv\_\{ij\}, move𝐲i\\mathbf\{y\}\_\{i\}toward𝐲j\\mathbf\{y\}\_\{j\}:

𝐲i←𝐲i−α⋅2​a​b​\(di​j2\)b−11\+a​\(di​j2\)b​\(𝐲i−𝐲j\)\.\\mathbf\{y\}\_\{i\}\\;\\leftarrow\\;\\mathbf\{y\}\_\{i\}\\;\-\\;\\alpha\\cdot\\frac\{2ab\\,\(d\_\{ij\}^\{2\}\)^\{b\-1\}\}\{1\+a\\,\(d\_\{ij\}^\{2\}\)^\{b\}\}\\;\(\\mathbf\{y\}\_\{i\}\-\\mathbf\{y\}\_\{j\}\)\.\(2\)
Repulsive step\.For a randomly sampled non\-neighborkk, push𝐲i\\mathbf\{y\}\_\{i\}away from𝐲k\\mathbf\{y\}\_\{k\}:

𝐲i←𝐲i\+α⋅2​b\(di​k2\+ϵ\)​\(1\+a​\(di​k2\)b\)​\(𝐲i−𝐲k\),\\mathbf\{y\}\_\{i\}\\;\\leftarrow\\;\\mathbf\{y\}\_\{i\}\\;\+\\;\\alpha\\cdot\\frac\{2b\}\{\(d\_\{ik\}^\{2\}\+\\epsilon\)\(1\+a\\,\(d\_\{ik\}^\{2\}\)^\{b\}\)\}\\;\(\\mathbf\{y\}\_\{i\}\-\\mathbf\{y\}\_\{k\}\),\(3\)whereα\\alphais the learning rate,ϵ\\epsilonis a small constant, anda,ba,bare fixed by calibration to UMAP’smin\_distparameter\. The adaptive bandwidthσi\\sigma\_\{i\}makes these updates robust to varying local density, but it also discards information about the absolute scale of neighborhoods\.

### 2\.2Local radius

DensMAP\[[4](https://arxiv.org/html/2605.30597#bib.bib4)\]introduced the*local radius*, a measure of original\-space neighborhood scale:

ri2=∑jvi​j​d​\(𝐱i,𝐱j\)2∑jvi​j\.r\_\{i\}^\{2\}=\\frac\{\\sum\_\{j\}v\_\{ij\}\\,d\(\\mathbf\{x\}\_\{i\},\\mathbf\{x\}\_\{j\}\)^\{2\}\}\{\\sum\_\{j\}v\_\{ij\}\}\.\(4\)This is a weighted\-RMS distance from𝐱i\\mathbf\{x\}\_\{i\}to its UMAP\-graph neighbors, reusing the existing weightsvi​jv\_\{ij\}without introducing additional hyperparameters\. Computation isO​\(n\)O\(n\)given the kNN graph\.

### 2\.3DensMAP: a competing objective

DensMAP maximizes the Pearson correlation betweenlog⁡ro\\log r\_\{o\}\(original\-space local radius\) andlog⁡re\\log r\_\{e\}\(embedding\-space local radius\) by adding a penalty to the UMAP loss:ℒDensMAP=ℒUMAP−λ​Corr​\(log⁡ro,log⁡re\)\\mathcal\{L\}\_\{\\text\{DensMAP\}\}=\\mathcal\{L\}\_\{\\text\{UMAP\}\}\-\\lambda\\,\\text\{Corr\}\(\\log r\_\{o\},\\,\\log r\_\{e\}\)\. In terms of the per\-edge updates, this adds a density gradient to the attractive step while leaving repulsion unchanged:

Attractive:𝐲i\\displaystyle\\textbf\{Attractive:\}\\quad\\mathbf\{y\}\_\{i\}\\;←𝐲i\+Δ​𝐲iattr\+λ​∇𝐲iCorr​\(log⁡re,log⁡ro\),\\displaystyle\\leftarrow\\;\\mathbf\{y\}\_\{i\}\\;\+\\;\\Delta\\mathbf\{y\}\_\{i\}^\{\\,\\text\{attr\}\}\\;\+\\;\\lambda\\,\\nabla\_\{\\mathbf\{y\}\_\{i\}\}\\text\{Corr\}\(\\log r\_\{e\},\\,\\log r\_\{o\}\),\(5\)Repulsive:𝐲i\\displaystyle\\textbf\{Repulsive:\}\\quad\\mathbf\{y\}\_\{i\}\\;←𝐲i\+Δ​𝐲irep,\\displaystyle\\leftarrow\\;\\mathbf\{y\}\_\{i\}\\;\+\\;\\Delta\\mathbf\{y\}\_\{i\}^\{\\,\\text\{rep\}\},\(6\)where the gradient of the correlation involves partial derivatives of the embedding local radius with respect todi​j2d\_\{ij\}^\{2\}\(see\[[4](https://arxiv.org/html/2605.30597#bib.bib4)\]for the full expression\)\. Because the density gradient can oppose the attractive force while the repulsive force is unmodified, DensMAP can scatter points away from their neighborhoods—in our experiments, the misplaced\-point fraction is sometimes up to an order of magnitude larger than UMAP’s\.Wang et al\. \[[3](https://arxiv.org/html/2605.30597#bib.bib3)\]demonstrated in the context of UMAP’s sensitivity to the embedding initialization that UMAP’s attractive force drops off quickly once the point is far from its local neighborhood, which can cause disconnected points to never reach their neighborhood again\.

### 2\.4ScaleMAP: a change of variables

Rather than adding a competing objective, ScaleMAP modifies the distance that enters the existing UMAP forces\. Define the*rescaled squared distance*

d~i​j2=di​j2ri​rj=‖𝐲i−𝐲j‖2ri​rj\.\\tilde\{d\}\_\{ij\}^\{2\}=\\frac\{d\_\{ij\}^\{2\}\}\{r\_\{i\}\\,r\_\{j\}\}=\\frac\{\\\|\\mathbf\{y\}\_\{i\}\-\\mathbf\{y\}\_\{j\}\\\|^\{2\}\}\{r\_\{i\}\\,r\_\{j\}\}\.\(7\)Substitutingd~i​j2\\tilde\{d\}\_\{ij\}^\{2\}fordi​j2d\_\{ij\}^\{2\}in the cross\-entropy loss and differentiating yields the ScaleMAP update rules\. The chain rule introduces a factor of1/\(ri​rj\)1/\(r\_\{i\}r\_\{j\}\)in the displacement direction:

Attractive step\.

𝐲i←𝐲i−α⋅2​a​b​\(d~i​j2\)b−11\+a​\(d~i​j2\)b​𝐲i−𝐲jri​rj\.\\mathbf\{y\}\_\{i\}\\;\\leftarrow\\;\\mathbf\{y\}\_\{i\}\\;\-\\;\\alpha\\cdot\\frac\{2ab\\,\(\\tilde\{d\}\_\{ij\}^\{2\}\)^\{b\-1\}\}\{1\+a\\,\(\\tilde\{d\}\_\{ij\}^\{2\}\)^\{b\}\}\\;\\frac\{\\mathbf\{y\}\_\{i\}\-\\mathbf\{y\}\_\{j\}\}\{r\_\{i\}\\,r\_\{j\}\}\.\(8\)
Repulsive step\.

𝐲i←𝐲i\+α⋅2​b\(d~i​k2\+ϵ\)​\(1\+a​\(d~i​k2\)b\)​𝐲i−𝐲kri​rk\.\\mathbf\{y\}\_\{i\}\\;\\leftarrow\\;\\mathbf\{y\}\_\{i\}\\;\+\\;\\alpha\\cdot\\frac\{2b\}\{\(\\tilde\{d\}\_\{ik\}^\{2\}\+\\epsilon\)\(1\+a\\,\(\\tilde\{d\}\_\{ik\}^\{2\}\)^\{b\}\)\}\\;\\frac\{\\mathbf\{y\}\_\{i\}\-\\mathbf\{y\}\_\{k\}\}\{r\_\{i\}\\,r\_\{k\}\}\.\(9\)
The coefficient functions are identical to UMAP’s \([2](https://arxiv.org/html/2605.30597#S2.E2)–[3](https://arxiv.org/html/2605.30597#S2.E3)\), evaluated atd~2\\tilde\{d\}^\{2\}instead ofd2d^\{2\}\. No new loss term is introduced\. Because the rescaling enters both the attractive and repulsive forces symmetrically, the local equilibrium that gives UMAP its neighborhood preservation is maintained\. Points in sparse regions \(largeri,rjr\_\{i\},r\_\{j\}\) experience weaker forces per unit Euclidean displacement, so the embedding spreads them out; points in dense regions are kept tightly packed\. We show in Section[5](https://arxiv.org/html/2605.30597#S5)that replacing the geometric meanri​rj\\sqrt\{r\_\{i\}r\_\{j\}\}with either endpoint alone destroys the embedding\.

### 2\.5Computational overhead and default settings

The local radius computed in the original space has a distance scale determined by the data, while the UMAP embedding objective has an independent distance scale\. We thus normalize the local radii before substituting them in \([7](https://arxiv.org/html/2605.30597#S2.E7)\):

rnormalized​\(i\)=roriginal​\(i\)Pη​\(\{roriginal​\(j\)\}j=1n\)\.r\_\{\\mathrm\{normalized\}\}\(i\)=\\frac\{r\_\{\\mathrm\{original\}\}\(i\)\}\{P\_\{\\eta\}\\\!\\left\(\\\{r\_\{\\mathrm\{original\}\}\(j\)\\\}\_\{j=1\}^\{n\}\\right\)\}\.\(10\)
Here,nndenotes the total number of points, andPηP\_\{\\eta\}is the normalizing factor, theηt​h\\eta^\{th\}percentile of the local radii\. We use the 95thpercentile,P95P\_\{95\}, as a default for all experiments; we examine sensitivity to this parameter in Appendix[A\.5](https://arxiv.org/html/2605.30597#A1.SS5)\. :

We start with the same spectral initialization as UMAP and apply this modified update function at every iteration, unlike DensMAP, which only applies the modified update function on a fraction of the iterations\.

ScaleMAP addsO​\(n\)O\(n\)overhead to UMAP, identical to DensMAP: only the per\-point local radii must be precomputed\. We parallelized this step, which can otherwise be a bottleneck on large datasets\. However, in comparisons between methods, we do not modify DensMAP’s implementation\. We use 800 epochs by default for ScaleMAP \(versus 200 for UMAP, 400 for DensMAP\)\. Although ScaleMAP gives qualitatively nearly identical embeddings at both 200 and 800 epochs for most datasets, the fraction of disconnected points is larger than UMAP when both are set at 200 epochs\. Using more epochs results in a modest \(6\-33%\) reduction in the fraction of disconnected points while still retaining practical runtimes\. See Appendix[A\.3](https://arxiv.org/html/2605.30597#A1.SS3)for comparisons\.

### 2\.6Extension to PaCMAP

PaCMAP\[[3](https://arxiv.org/html/2605.30597#bib.bib3)\]computes a per\-point distance scaleσi\\sigma\_\{i\}\(the mean distance to the 4th–6th nearest neighbors\) for neighbor selection; pairwise distances are divided byσi​σj\\sigma\_\{i\}\\sigma\_\{j\}when constructing the graph, though these scaled distances are not used during optimization\. We repurposeσi\\sigma\_\{i\}in the embedding by replacingri​rjr\_\{i\}r\_\{j\}withσi​σj\\sigma\_\{i\}\\sigma\_\{j\}in the rescaled distance \([7](https://arxiv.org/html/2605.30597#S2.E7)\) and applying the analogous change of variables to PaCMAP’s attractive and repulsive updates\. We call this Scale\-PaCMAP and treat it as a portability check rather than a co\-equal method\. We also use twice as many iterations as PaCMAP’s default at each stage for the same reason as ScaleMAP\.

## 3Experimental setup

#### Datasets\.

We evaluate on standard benchmarks—MNIST\[[6](https://arxiv.org/html/2605.30597#bib.bib6)\], Fashion\-MNIST\[[7](https://arxiv.org/html/2605.30597#bib.bib7)\], COIL\-20\[[8](https://arxiv.org/html/2605.30597#bib.bib8)\], and Mammoth\[[9](https://arxiv.org/html/2605.30597#bib.bib9)\]—and on three scientific datasets: 264,824 Tabula Sapiens immune cells\[[10](https://arxiv.org/html/2605.30597#bib.bib10)\]represented by the provided 50\-dimensional SCVI latent embedding\[[11](https://arxiv.org/html/2605.30597#bib.bib11)\]; a610×610610\\times 610BCARS\[[12](https://arxiv.org/html/2605.30597#bib.bib12)\]hyperspectral image of a*C\. elegans*gonad with 650 spectral channels\[[13](https://arxiv.org/html/2605.30597#bib.bib13)\]; and human bone\-marrow flow\-cytometry data with 8 raw fluorescence marker channels\[[14](https://arxiv.org/html/2605.30597#bib.bib14)\]\. Two synthetic diagnostics, XOI and Bridge, are described in Section[4\.1](https://arxiv.org/html/2605.30597#S4.SS1)\.

#### Metrics\.

For density preservation, we compute local radii in the original and embedding spaces and report theR2R^\{2\}of a linear fit betweenlog⁡re\\log r\_\{e\}andlog⁡ro\\log r\_\{o\}, reflecting the relationship between hypervolumes across the two spaces\. For neighborhood preservation, we use*kNN recall*atk=15k\{=\}15, calculated as the average fraction of thekkoriginal space nearest neighbors that are retained as nearest neighbors in the embedding\. We measure extreme errors in neighborhood preservation by counting*disconnected*points, which are points such that none of the point’sk=100k\{=\}100nearest neighbors in the embedding are among itsk=100k\{=\}100nearest neighbors in the original space\. This is a conservative lower bound on misplaced points: it does not detect pairs of neighbors that are jointly ejected from their true neighborhood, which we do observe in DensMAP embeddings\. For*class mixing*, we report the fraction of originally label\-pure points, defined as points all of whosek=15k\{=\}15nearest neighbors share their label, which become label\-impure in the embedding, i\.e\., do not all share their label\.

#### Baselines and protocol\.

We compare ScaleMAP with UMAP and DensMAP using their Python implementations and default hyperparameters except where noted\. Each method was run five times using distinct random seeds\. Because UMAP\-family implementations use multithreaded stochastic optimization, these seeds do not make runs bitwise deterministic; variation across runs reflects both seeded randomness and nondeterminism from parallel execution\. Main tables report means, with error bars in Appendix[A\.3](https://arxiv.org/html/2605.30597#A1.SS3)\.

## 4Results

![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/fig_1_xoi_bridge.png)Figure 1:Synthetic diagnostics\.Comparison of UMAP, DensMAP, and ScaleMAP on two datasets designed to isolate density\-preservation failures\.*Top \(XOI\):*three X shapes of equal spatial extent but increasing point count, three Gaussians of equal count but increasing standard deviation, and one high\-aspect\-ratio Gaussian\. UMAP normalizes away density differences\. DensMAP restores some density information but severely distorts the Xs and scatters the I\. ScaleMAP preserves all features\.*Bottom \(Bridge\):*two unequally sized Gaussians connected by a sparse linear bridge\. UMAP compresses the bridge; DensMAP and ScaleMAP both recover it\.### 4\.1Synthetic diagnostic

Figure[1](https://arxiv.org/html/2605.30597#S4.F1)illustrates the two failure modes that motivate ScaleMAP\. On the XOI dataset—three X shapes of equal spatial extent but increasing point count, three Gaussians of equal count but increasing standard deviation, and one high\-aspect\-ratio Gaussian—UMAP renders the X shapes at sizes proportional to their point counts and the O shapes all at the same size, reflecting its density normalization\. DensMAP restores the relative O sizes but enlarges and severely distorts the Xs; the high\-aspect\-ratio I sprays into nearby regions, with visible class mixing throughout\. ScaleMAP correctly preserves equal X sizes, increasing O sizes, and the I shape, with no visible class mixing or disconnected points\. On the Bridge dataset—two unequally sized Gaussians connected by a sparse linear bridge—UMAP renders the clusters at the same size and compresses the bridge significantly\. On clusters with more jagged edges, such as in transcriptomic data, such compressed bridges are easy to miss\. A similar phenomenon occurs in hyperspectral images, where a sparse spectral spike can be compressed\. DensMAP and ScaleMAP both produce correctly sized Gaussians and bridges\.

### 4\.2Standard benchmarks

![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/fig_2_gallery.png)Figure 2:Embedding overview\.On MNIST and Fashion\-MNIST, ScaleMAP closely resembles UMAP with clusters rescaled to reflect density\. On the scientific datasets, DensMAP’s tendency to scatter points is clearly visible, while ScaleMAP preserves density and reveals more underlying structure than UMAP\. ScaleMAP’s flow\-cytometry embedding appears nearly empty at this scale, but this is not a failure: the multiscale structure becomes apparent upon zooming \(Figure[6](https://arxiv.org/html/2605.30597#S4.F6)\)\.Across the four standard benchmarks \(Figure[2](https://arxiv.org/html/2605.30597#S4.F2), Figure[3](https://arxiv.org/html/2605.30597#S4.F3), and Table[1](https://arxiv.org/html/2605.30597#S4.T1)\), we observe a consistent pattern\. UMAP has very few disconnected points \(e\.g\. 0\.11% on Fashion\-MNIST\) but low density preservation \(R2=0\.05R^\{2\}=0\.05\)\. DensMAP improves density preservation substantially \(R2=0\.58R^\{2\}=0\.58\) but at the cost of an order of magnitude more disconnected points \(3\.48%\), worse neighborhood preservation \(recall 7\.0% vs UMAP’s 13\.3%\), and worse class mixing \(47% vs UMAP’s 40%\)\. ScaleMAP attains density preservation comparable to DensMAP \(R2=0\.51R^\{2\}=0\.51\), neighborhood preservation comparable to UMAP \(recall 14\.3%\), disconnected\-point fraction comparable to UMAP \(0\.19%\), and class mixing lower than either baseline \(38% vs UMAP 40% and DensMAP 47%\)\. The pattern is qualitatively similar on MNIST, COIL\-20, and Mammoth\. On Mammoth, DensMAP obtains a significantly higher densityR2R^\{2\}than ScaleMAP \(0\.59 vs 0\.39\), but its embedding is visibly distorted \(Figure[12](https://arxiv.org/html/2605.30597#A1.F12)\)\. ScaleMAP remains visually similar in quality to UMAP\.

![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/fig_3_issue_gallery.png)Figure 3:Disconnected points and density fits\.Same layout as Figure[2](https://arxiv.org/html/2605.30597#S4.F2), with disconnected points overlaid in black\. Inset numbers: bottom\-left, density\-preservationR2R^\{2\}; top\-right, disconnected\-point percentage\. DensMAP produces 2–23x more disconnected points than UMAP\. ScaleMAP’s densityR2R^\{2\}is comparable to or exceeds DensMAP’s on most datasets while keeping the disconnected fraction comparable to UMAP’s\.![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/fig_4_transcriptomic_bridges.png)Figure 4:Transcriptomic bridges\.\(a\) ScaleMAP embedding of Tabula Sapiens immune cells; many bridges between cell types are visible\. \(b\) UMAP embedding of the same data; these bridges are mostly absent\. \(c\) Zoom on the bridge between monocytes \(red/purple, bottom left\) and neutrophils \(pink, top right\)\. \(d\) Network connectivity of \(c\), with edges drawn to each bridge point’s two nearest original\-space neighbors\. \(e\) Zoom on the bridge between B cells \(maroon/dark green, bottom left\) and T cells \(blue, top right\)\. \(f\) Network connectivity of \(e\)\.
### 4\.3Transcriptomics: recovery of sparse cell\-state bridges

In transcriptomic data, sparse bridges between well\-defined cell populations correspond to cell\-state transitions of biological interest\. Figure[4](https://arxiv.org/html/2605.30597#S4.F4)highlights two such bridges in the Tabula Sapiens immune\-cell dataset that are recovered by ScaleMAP but invisible in the UMAP: the bridge between monocytes and neutrophils, which originate from myeloblasts, and the bridge between B and T cells, which originate from small lymphocytes\. Both correspond to well\-known developmental relationships, and we verify their connectivity by drawing edges from each bridge point to its two nearest neighbors in the original space \(Figure[4](https://arxiv.org/html/2605.30597#S4.F4)d, f\)\. These bridges are visible in ScaleMAP across a range of neighborhood sizeskk; in UMAP they are not visible across the full range we tested \(k=10, 15, 30, 60\)\. DensMAP’s point scattering makes it difficult to determine whether potential bridges in its embedding correspond to real structure or to misplaced points\. Several more bridges appear in the ScaleMAP\. While verifying them is outside the scope of this work, these bridges could be used to identify candidate rare transitional cell states that are invisible to other embedding approaches\.

![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/fig_5_hsi_c_elegans.png)Figure 5:Hyperspectral imaging\.Left: spatial image of the*C\. elegans*gonad with highlighted pixels corresponding to the annotated regions\. Top: ScaleMAP and UMAP embeddings with three sparse structures annotated—a spectral spike, a small cluster \(Region A\), and a cloud of outlier pixels \(Region B\)\. UMAP compresses or absorbs all three\. Bottom: linear discriminant projections confirm spectral separation of these regions from the bulk\.
### 4\.4Hyperspectral imaging: recovery of sparse spectral spikes

Figure[5](https://arxiv.org/html/2605.30597#S4.F5)shows a coherent Raman image of a*C\. elegans*gonad, embedded by ScaleMAP and UMAP\. ScaleMAP reveals three kinds of structure that UMAP fails to surface: first, a sharp spike compressed to near\-invisibility by UMAP—the direct analog of the bridge in Figure[1](https://arxiv.org/html/2605.30597#S4.F1)\(Spike\); second, a small cluster \(Region A\) absorbed into the neighboring area in UMAP; and third, a diffuse cloud of outlier pixels \(Region B\) diverging from the main body\. Linear discriminant analysis confirms that these regions are spectrally distinct\. ScaleMAP also renders the large number of dark, background water pixels—the dominant population, occupying the right\-center of both embeddings—at a size proportional to their \(low\) spectral variability, whereas UMAP inflates them to fill the embedding\.

![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/fig_6_flow_cytometry.png)Figure 6:Flow cytometry: multiscale structure\.ScaleMAP embedding at four zoom levels, colored by log local radius, alongside DensMAP and UMAP embeddings at native scale\. ScaleMAP preserves the multiscale structure of the data, and consequently requires300×300\\timeszoom to resolve a dense, highly populated "bulb" of cells that are negative for all 8 markers\. This bulb immediately stands out in both UMAP and DensMAP, reflecting their lack of multiscale structure\. Bottom: log–log scatterplots of embedding versus original local radius\. ScaleMAP maintains a tight linear relationship over 17 orders of magnitude \(R2=0\.81R^\{2\}=0\.81\), while DensMAP mixes different length\-scales\. See Figure[10](https://arxiv.org/html/2605.30597#A1.F10)for a PCA reflecting the multiscale structure\.
### 4\.5Flow cytometry: preserving multiscale structure

Figure[6](https://arxiv.org/html/2605.30597#S4.F6)shows ScaleMAP, DensMAP, and UMAP embeddings of bone\-marrow flow\-cytometry data, colored by log local radius\. The ScaleMAP embedding is shown at four successive zoom levels \(1×1\\times,20×20\\times,100×100\\times,300×300\\times\)\. At300×300\\timesmagnification a dense central bulb becomes visible: a highly populated cluster of cells that are negative for all eight markers\. This cluster is not rare—it accounts for a large fraction of the data—but its size in the embedding is tiny because the cells are indistinguishable under these markers\. ScaleMAP preserves this multiscale structure faithfully: the log–log fit of local radius is approximately linear over 17 orders of magnitude \(R2=0\.81R^\{2\}=0\.81\)\. By contrast, UMAP and DensMAP look nearly identical on this dataset, and lack multiscale structure\. DensMAP achieves anR2R^\{2\}of 0\.68, but the scatterplot reveals that it mixes different length scales—a consequence of the density term competing with the attractive forces rather than reshaping them\.

### 4\.6Portability to PaCMAP

Applying the same change of variables to PaCMAP, Scale\-PaCMAP improves density preservation relative to PaCMAP without dramatic degradation of neighborhood structure across all datasets tested \(Figure[9](https://arxiv.org/html/2605.30597#A1.F9), Figure[12](https://arxiv.org/html/2605.30597#A1.F12), and Table[4](https://arxiv.org/html/2605.30597#A1.T4)\)\. The improvement is smaller than that from UMAP to ScaleMAP, but its consistency indicates that the underlying principle is not specific to UMAP\. A fuller study, including Scale\-PaCMAP’s tendency to disconnect points that neither PaCMAP or ScaleMAP disconnects \(Table[3](https://arxiv.org/html/2605.30597#A1.T3)\), particularly while "reducing" the 2\-D synthetic benchmarks \(such as with the XOI and Bridge datasets\), is left to future work\.

Table 1:Benchmark results\.Values are means across five runs\. U, D, and S denote UMAP, DensMAP, and ScaleMAP\. Bold marks the best mean; underlining marks methods not significantly worse than the best under a paired one\-sidedtt\-test atα=0\.05\\alpha=0\.05\. ScaleMAP achieves DensMAP\-level density preservation \(Dens\.R2R^\{2\}\), maintains UMAP\-comparable neighborhood preservation \(kNN Recall@15, disconnected\-point percentage \(Disconn\. %\)\), and also reduces class mixing \(Mix %\)\. Dashes reflect the absence of class labels to calculate mixing\. ScaleMAP runtime is roughly2×2\\timesUMAP and comparable to DensMAP\. Extended benchmarks with error bars in Section[A\.3](https://arxiv.org/html/2605.30597#A1.SS3)

## 5Ablations

We test two design choices in ScaleMAP: the symmetry of the rescaling, and its overall strength\.

Both endpoints are required\.Replacing the geometric meanri​rj\\sqrt\{r\_\{i\}r\_\{j\}\}with either endpoint alone—that is, dividing the displacement only byrir\_\{i\}or only byrjr\_\{j\}\(the “head\-only” and “tail\-only” ablations\)—causes the embedding to fragment\. Neither asymmetric choice yields a usable embedding \(Figure[7](https://arxiv.org/html/2605.30597#S5.F7)\)\. The geometric mean is a natural symmetric choice that preserves the attraction–repulsion balance\.

Strength of the rescaling\.We expose a single coefficientλ\\lambdathat interpolates between the original UMAP metric \(λ=0\\lambda=0\) and ScaleMAP \(λ=1\\lambda=1\); intermediate values weaken the rescaling andλ\>1\\lambda\>1amplifies it\. Atλ=0\.5\\lambda=0\.5, the embedding looks qualitatively acceptable but the densityR2R^\{2\}is worse, and the X\-shape diagnostic of Figure[1](https://arxiv.org/html/2605.30597#S4.F1)fails \(the X shapes regain their density\-dependent sizing\)\. Atλ=2\\lambda=2, although the densityR2R^\{2\}is preserved, the embedding fragments\.

![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/fig_8_ablations.png)Figure 7:Ablations using XOI\.\(a, b\) Head\-only and tail\-only failure modes: replacing the geometric mean with one endpoint’s radius fragments the embedding\. \(c\)λ=0\.5\\lambda=0\.5: weakened rescaling, X\-shape diagnostic fails\. \(d\)λ=2\\lambda=2: over\-rescaled, embedding breaks\.
## 6Discussion

ScaleMAP performs well across datasets, both qualitatively and quantitatively\. It preserves neighborhood structure at least as well as UMAP on five of seven datasets \(recall@15; Table[1](https://arxiv.org/html/2605.30597#S4.T1)\), with the two exceptions within 3 percentage points and a comparable fraction of disconnected points\. DensMAP consistently has the weakest neighborhood preservation of the three methods—roughly one third of UMAP’s recall on the scientific datasets, with 2–23×\\timesmore disconnected points\. Where class labels are available, ScaleMAP produces the least artificial mixing on every dataset\. It also recovers sparse and multiscale structures not visible in any of the other tested methods—the transcriptomic bridges and spectral features of Sections[4\.3](https://arxiv.org/html/2605.30597#S4.SS3)–[4\.4](https://arxiv.org/html/2605.30597#S4.SS4)are structures in existing, previously analyzed datasets\.

At the same time, ScaleMAP’s density preservation broadly matches DensMAP’s, and substantially exceeds it on the datasets with the widest dynamic range of local radii \(R2R^\{2\}= 0\.81 vs 0\.59 on HSI; 0\.80 vs 0\.68 on flow cytometry\)\. The one clear exception is Mammoth, where DensMAP achieves a higherR2R^\{2\}\(0\.59 vs 0\.39\) but at the cost of a visibly distorted embedding \(Figure[12](https://arxiv.org/html/2605.30597#A1.F12)\)\. The per\-step cost of these improvements is negligible—O\(1\) arithmetic per edge—though we default to4×4\\timesUMAP’s epochs, putting total runtime at roughly2×2\\timesUMAP and comparable to DensMAP\.

We attribute this to how the two methods interact with UMAP’s force balance\. DensMAP adds a density gradient only to the attractive update \(Eq\.[5](https://arxiv.org/html/2605.30597#S2.E5)–[6](https://arxiv.org/html/2605.30597#S2.E6)\), so the density term can oppose attraction while repulsion is unchanged—scattering points away from their neighborhoods\. ScaleMAP’s rescaling enters both forces symmetrically \(Eq\.[8](https://arxiv.org/html/2605.30597#S2.E8)–[9](https://arxiv.org/html/2605.30597#S2.E9)\), shifting the equilibrium rather than breaking it\. The change of variables approach is fundamentally more flexible than an additive penalty\.

Surprisingly, ScaleMAP also improves global distance\-order preservation \(Tables[10](https://arxiv.org/html/2605.30597#A1.T10)–[11](https://arxiv.org/html/2605.30597#A1.T11)\), despite not optimizing for it as PaCMAP does\. The effect is largest where the dynamic range of the local radii is widest: on flow cytometry, ScaleMAP’s pairwise distance\-rank correlation \(Spearmanρ=0\.97\\rho=0\.97\) significantly exceeds both UMAP \(0\.74\) and PaCMAP \(0\.78\)\. This is consistent with a simple geometric intuition: structures cannot be correctly arranged relative to each other when their sizes are wrong\.

## 7Limitations

ScaleMAP consistently produces more disconnected points than UMAP in some datasets \(e\.g\., MNIST, FMNIST\); the reason is not immediately clear, since, in principle, the change of variables preserves the attraction–repulsion balance\. Increasing the number of optimization epochs reduces but does not eliminate the gap\. On a synthetic “beads\-on\-a\-string” dataset \(Figure[11](https://arxiv.org/html/2605.30597#A1.F11)\), ScaleMAP compresses structure along the axis perpendicular to the string \(Figure[12](https://arxiv.org/html/2605.30597#A1.F12)\), which we attribute to the local radius being a scalar representation of an anisotropic neighborhood\. Global structure, although improved in ScaleMAP relative to UMAP, can be weaker than PaCMAP\. See Appendix[A\.3](https://arxiv.org/html/2605.30597#A1.SS3)\. On intrinsically two\-dimensional synthetic datasets, ScaleMAP can require larger neighborhood sizes than UMAP to avoid fragmentation; this sensitivity was not observed in our higher\-dimensional benchmarks \(this issue is resolved even with the 3\-D Mammoth dataset\)\. Finally, many topologies cannot be faithfully represented in two dimensions, which is an issue shared by all the dimension reduction techniques discussed here\. The structures ScaleMAP reveals are themselves more clearly visible in 3D\. While our approach should in principle generalize to higher dimensions, we have not rigorously benchmarked this\.

## 8Conclusion

ScaleMAP re\-injects local scale into UMAP through a change of variables rather than a competing loss term\. Across seven datasets spanning standard benchmarks and three scientific modalities, it is the only method tested that does not sacrifice one axis of embedding quality for another: UMAP discards density, DensMAP degrades neighborhoods, and PaCMAP does not address density at all\. ScaleMAP combines their strengths—UMAP\-level neighborhood preservation, DensMAP\-level density fidelity, and PaCMAP\-competitive global order—and recovers structures that existing methods miss, including transcriptomic bridges, sparse spectral features, and density variation spanning 17 orders of magnitude\. Restoring local scale improves global order: ScaleMAP narrows the gap to PaCMAP on most datasets, and exceeds it on two\. Applied to PaCMAP, the same correction consistently restores density information, suggesting that local\-scale correction is a general missing ingredient in neighborhood\-preserving embeddings\. These results make a case for ScaleMAP as the default embedding method for visualizing high\-dimensional data when faithfully representing scale matters\.

## Acknowledgements

This work was supported by the Department of Energy, Biological and Environmental Research \(DOE BER DE\-SC0022121\)\. We thank Ronit Sharon\-Friling and Abigail Diering for their persistent use of early versions of ScaleMAP in their research; their willingness to adopt the method while it was still evolving motivated the development of the version presented here\.

## Reproducibility statement

All datasets are publicly available\. Hyperparameters and preprocessing are described in Section 2, 3 and the appendix\. We use five independent runs for all main results\. Each run uses a distinct random seed, but multithreaded UMAP\-family implementations are not bitwise deterministic, so we report mean and variation across runs rather than relying on exact reproducibility from a fixed seed\.

## Broader impact

We do not in general foresee specific negative applications for ScaleMAP beyond those associated with general\-purpose data analysis\. Because it is better than standard methods at surfacing small, rare subpopulations, it could in principle make it easier to visually isolate individuals in datasets where membership in a rare subgroup is itself identifying—a concern shared by any density\-faithful visualization or analysis method\. Identifying rare individuals or patterns may also be immediately beneficial to society if used to provide assistance or prevent fraud\.

## References

- \[1\]L\. McInnes, J\. Healy, and J\. Melville\.UMAP: Uniform manifold approximation and projection for dimension reduction\.*arXiv preprint arXiv:1802\.03426*, 2018\.
- \[2\]L\. van der Maaten and G\. Hinton\.Visualizing data using t\-SNE\.*Journal of Machine Learning Research*, 9:2579–2605, 2008\.
- Wang et al\. \[2021\]Y\. Wang, H\. Huang, C\. Rudin, and Y\. Shaposhnik\.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\):1–73, 2021\.
- \[4\]A\. Narayan, B\. Berger, and H\. Cho\.Assessing single\-cell transcriptomic variability through density\-preserving data visualization\.*Nature Biotechnology*, 39:765–774, 2021\.doi:10\.1038/s41587\-020\-00801\-7\.
- \[5\]M\. Belkin and P\. Niyogi\.Laplacian eigenmaps for dimensionality reduction and data representation\.*Neural Computation*, 15\(6\):1373–1396, 2003\.doi:10\.1162/089976603321780317\.
- \[6\]Y\. LeCun, C\. Cortes, and C\. J\. C\. Burges\.The MNIST database of handwritten digits\.Computer Vision Data Foundation mirror\.[https://github\.com/cvdfoundation/mnist](https://github.com/cvdfoundation/mnist)\.Accessed May 7, 2026\.
- \[7\]H\. Xiao, K\. Rasul, and R\. Vollgraf\.Fashion\-MNIST: A novel image dataset for benchmarking machine learning algorithms\.*arXiv preprint arXiv:1708\.07747*, 2017\.
- \[8\]S\. A\. Nene, S\. K\. Nayar, and H\. Murase\.Columbia Object Image Library \(COIL\-20\)\.Technical Report CUCS\-005\-96, Department of Computer Science, Columbia University, February 1996\.
- \[9\]Smithsonian Institution\.*Mammuthus primigenius*\(Blumbach\)\.Smithsonian 3D Digitization, National Museum of Natural History, Paleobiology Department, Record IDnmnhpaleobiology\_3447777\.[https://3d\.si\.edu/object/3d/mammuthus\-primigenius\-blumbach:341c96cd\-f967\-4540\-8ed1\-d3fc56d31f12](https://3d.si.edu/object/3d/mammuthus-primigenius-blumbach:341c96cd-f967-4540-8ed1-d3fc56d31f12)\.Accessed May 7, 2026\.
- \[10\]Tabula Sapiens Consortium\.The Tabula Sapiens: A multiple\-organ, single\-cell transcriptomic atlas of humans\.*Science*, 376\(6594\):eabl4896, 2022\.doi:10\.1126/science\.abl4896\.
- \[11\]R\. Lopez, J\. Regier, M\. B\. Cole, M\. I\. Jordan, and N\. Yosef\.Deep generative modeling for single\-cell transcriptomics\.*Nature Methods*, 15\(12\):1053–1058, 2018\.doi:10\.1038/s41592\-018\-0229\-2\.
- \[12\]C\. H\. Camp Jr\., Y\. J\. Lee, J\. M\. Heddleston, C\. M\. Hartshorn, A\. R\. Hight Walker, J\. N\. Rich, J\. D\. Lathia, and M\. T\. Cicerone\.High\-speed coherent Raman fingerprint imaging of biological tissues\.*Nature Photonics*, 8:627–634, 2014\.doi:10\.1038/nphoton\.2014\.145\.
- \[13\]R\. Poorna, W\.\-W\. Chen, A\. Germond, P\. Qiu, and M\. T\. Cicerone\.Toward gene\-correlated spatially resolved metabolomics with fingerprint coherent Raman imaging\.*The Journal of Physical Chemistry B*, 127\(25\):5576–5587, 2023\.doi:10\.1021/acs\.jpcb\.3c01446\.
- \[14\]P\. Qiu, E\. F\. Simonds, S\. C\. Bendall, K\. D\. Gibbs Jr\., R\. V\. Bruggner, M\. D\. Linderman, K\. Sachs, G\. P\. Nolan, and S\. K\. Plevritis\.Extracting a cellular hierarchy from high\-dimensional cytometry data with SPADE\.*Nature Biotechnology*, 29\(10\):886–891, 2011\.doi:10\.1038/nbt\.1991\.

## Appendix AAppendix

### A\.1Reproducibility information

k=15k=15nearest neighbors were used for all runs except for XOI, XO, and Square, for whichk=60k=60nearest neighbors were used\. Bridge usedk=90k=90nearest neighbors, although equivalent results can be obtained withk=60k=60nearest neighbors\. We set a random seed for each run to control initialization and stochastic sampling where supported\. However, UMAP\-family implementations are multithreaded and include nondeterministic parallel updates, so the same requested seed does not guarantee bitwise\-identical embeddings\. We therefore treat the five runs as independent repetitions under the standard multithreaded implementation and report means, with error bars in the appendix\. All runs were on a Framework 16 laptop with 32 GB RAM with an AMD Ryzen AI 7 350 CPU\. No thread count was specified during embedding \- the embedding methods used all available CPU cores\.

Although more powerful computers were used during iteration, this laptop would have been sufficient for executing the entire project, and would not have been much \(\>3x\) slower than any other resources that were used\.

### A\.2Licenses and Terms of Use for Existing Assets

This appendix summarizes the existing datasets and other assets used in this work, along with their licenses or applicable terms of use\. We cite the original creators or maintainers of each asset in the main paper\.

Table 2:Summary of licenses and terms of use for existing assets used in this work\.
### A\.3Extended benchmarks

Here, we introduce additional metrics for local neighborhood preservation and global distance\-order preservation\. The main text reports density preservation, disconnected points, artificial mixing, and runtime; the metrics below provide more ways of understanding the same neighborhood failures and also provide complementary measures of global structure\.

LetX=\{xi\}i=1nX=\\\{x\_\{i\}\\\}\_\{i=1\}^\{n\}denote the original data representation andY=\{yi\}i=1nY=\\\{y\_\{i\}\\\}\_\{i=1\}^\{n\}the embedding\. Let𝒩Xk​\(i\)\\mathcal\{N\}\_\{X\}^\{k\}\(i\)and𝒩Yk​\(i\)\\mathcal\{N\}\_\{Y\}^\{k\}\(i\)denote thekknearest neighbors of pointiiin the original and embedding spaces, respectively, excludingiiitself\.

#### Neighborhood recall\.

We report neighborhood recall atk=15k=15andk=100k=100:

Recall​@⁡k=1n​∑i=1n\|𝒩Xk​\(i\)∩𝒩Yk​\(i\)\|k\.\\operatorname\{Recall@\}k=\\frac\{1\}\{n\}\\sum\_\{i=1\}^\{n\}\\frac\{\|\\mathcal\{N\}\_\{X\}^\{k\}\(i\)\\cap\\mathcal\{N\}\_\{Y\}^\{k\}\(i\)\|\}\{k\}\.\(11\)This measures the fraction of original\-space neighbors that remain neighbors in the embedding\.

#### Trustworthiness and continuity\.

Recall counts neighbor overlap but does not distinguish small rank errors from catastrophic ones\. We therefore also report trustworthiness and continuity atk=15k=15\. LetrX​\(i,j\)r\_\{X\}\(i,j\)be the rank ofjjby distance fromxix\_\{i\}in the original space, with rank11denoting the nearest non\-self neighbor, and defineUik=𝒩Yk​\(i\)∖𝒩Xk​\(i\)U\_\{i\}^\{k\}=\\mathcal\{N\}\_\{Y\}^\{k\}\(i\)\\setminus\\mathcal\{N\}\_\{X\}^\{k\}\(i\)\. The standard trustworthiness score is

Trust⁡\(k\)=1−2n​k​\(2​n−3​k−1\)​∑i=1n∑j∈Uik\(rX​\(i,j\)−k\)\.\\operatorname\{Trust\}\(k\)=1\-\\frac\{2\}\{nk\(2n\-3k\-1\)\}\\sum\_\{i=1\}^\{n\}\\sum\_\{j\\in U\_\{i\}^\{k\}\}\(r\_\{X\}\(i,j\)\-k\)\.\(12\)It penalizes points that appear close in the embedding despite being far away in the original space\. For computational efficiency on large datasets, we estimate Eq\.[12](https://arxiv.org/html/2605.30597#A1.E12)on a fixed set𝒜\\mathcal\{A\}ofmin⁡\(10,000,n\)\\min\(10\{,\}000,n\)anchor points sampled once per dataset and reused across all embedding methods and runs:

Trust^​\(k\)=1−2\|𝒜\|​k​\(2​n−3​k−1\)​∑i∈𝒜∑j∈Uik\(rX​\(i,j\)−k\)\.\\widehat\{\\operatorname\{Trust\}\}\(k\)=1\-\\frac\{2\}\{\|\\mathcal\{A\}\|k\(2n\-3k\-1\)\}\\sum\_\{i\\in\\mathcal\{A\}\}\\sum\_\{j\\in U\_\{i\}^\{k\}\}\(r\_\{X\}\(i,j\)\-k\)\.\(13\)For these sampled anchors, ranksrX​\(i,j\)r\_\{X\}\(i,j\)are computed exactly by distance counting in the original space; only the anchor set is sampled\.

Continuity measures the complementary failure mode\. LetrY​\(i,j\)r\_\{Y\}\(i,j\)be the rank ofjjby distance fromyiy\_\{i\}in the embedding, and defineVik=𝒩Xk​\(i\)∖𝒩Yk​\(i\)V\_\{i\}^\{k\}=\\mathcal\{N\}\_\{X\}^\{k\}\(i\)\\setminus\\mathcal\{N\}\_\{Y\}^\{k\}\(i\)\. Continuity is

Cont⁡\(k\)=1−2n​k​\(2​n−3​k−1\)​∑i=1n∑j∈Vik\(rY​\(i,j\)−k\)\.\\operatorname\{Cont\}\(k\)=1\-\\frac\{2\}\{nk\(2n\-3k\-1\)\}\\sum\_\{i=1\}^\{n\}\\sum\_\{j\\in V\_\{i\}^\{k\}\}\(r\_\{Y\}\(i,j\)\-k\)\.\(14\)It penalizes original\-space neighbors that are separated in the embedding\. We compute continuity exactly over all points using embedding\-space ranks\. Both trustworthiness and continuity lie in\[0,1\]\[0,1\], with larger values indicating better neighborhood preservation\.

#### Global distance\-order metrics\.

We report two rank\-based proxies for global structure\. Random triplet accuracy samples triples\(i,j,ℓ\)\(i,j,\\ell\)and measures whether the embedding preserves the relative ordering of distances from the anchor:

Triplet=1M​∑m=1M𝟏​\[\(dX​\(im,jm\)<dX​\(im,ℓm\)\)=\(dY​\(im,jm\)<dY​\(im,ℓm\)\)\]\.\\operatorname\{Triplet\}=\\frac\{1\}\{M\}\\sum\_\{m=1\}^\{M\}\\mathbf\{1\}\\\!\\left\[\\left\(d\_\{X\}\(i\_\{m\},j\_\{m\}\)<d\_\{X\}\(i\_\{m\},\\ell\_\{m\}\)\\right\)=\\left\(d\_\{Y\}\(i\_\{m\},j\_\{m\}\)<d\_\{Y\}\(i\_\{m\},\\ell\_\{m\}\)\\right\)\\right\]\.\(15\)Distance Spearman samplesmin⁡\(106,\(n2\)\)\\min\(10^\{6\},\{n\\choose 2\}\)unordered pairs\(i,j\)\(i,j\), forms vectorsam=dX​\(im,jm\)a\_\{m\}=d\_\{X\}\(i\_\{m\},j\_\{m\}\)andbm=dY​\(im,jm\)b\_\{m\}=d\_\{Y\}\(i\_\{m\},j\_\{m\}\), and reports the Spearman rank correlationρs​\(a,b\)\\rho\_\{s\}\(a,b\)\. The same sampled pairs are reused across methods and runs for a given dataset\. Triplet accuracy measures anchor\-relative distance ordering, whereas Distance Spearman measures pairwise distance\-rank preservation over sampled pairs\. Larger values indicate better global distance\-order preservation\.

Table values are mean±\\pmtwo standard deviations across five runs\. Bold marks the best mean; underlining marks methods not significantly worse than the best under a paired one\-sidedtt\-test atα=0\.05\\alpha=0\.05\.

Here, we compare ScaleMAP at both its default 800 epochs as well as when reduced to UMAP’s default 200 epochs\. We also compare against UMAP and DensMAP when given 800 epochs\. DensMAP is also used at its default epochs\. This way, we get to compare these three methods at approximately equal compute and runtime\. PaCMAP is used at its default \(100, 100, 250\) epochs, while Scale\-PaCMAP is given twice the epochs of PaCMAP, at \(200, 200, 500\)\.

Broadly, we note that the even when UMAP and DensMAP are matched to 800 epochs, the pattern reported in the main paper holds\. ScaleMAP performs surprisingly well in the flow cytometry dataset, even exceeding PaCMAP’s global structure metrics despite not actively optimizing for global structure, highlighting the importance of conserving scale in multiscale datasets\. We suspect that Scale\-PaCMAP underperforms at multiple metrics because the mid\-near points use the same change of variables as the near and far points, which is likely inappropriate\. Nonetheless, it outperforms all other tested methods on at least some datasets on multiple benchmarks, and generally shows performance around the median for most metrics\.

Table 3:Disconnected points \(%\)\.Table 4:Density preservation \(R2R^\{2\}\)\.Table 5:Artificial mixing \(%\)Table 6:KNN recall@15 \(%\)Table 7:KNN recall@100 \(%\)Table 8:KNN continuity@15Table 9:KNN trustworthiness@15Table 10:Distance SpearmanTable 11:Random tripletTable 12:Runtime \(s\)

### A\.4Additional figures

![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/supplement/fig_7_tradeoff.png)Figure 8:Tradeoff frontier\.Neighborhood preservation \(x\-axis, misplaced\-point fraction, lower is better\) versus density preservation \(y\-axis,R2R^\{2\}, higher is better\)\. Desirable quadrant is top left\. Each marker corresponds to a \(dataset, method, seed\) combination; markers distinguished by method, color by dataset family\. ScaleMAP broadly accomplishes both with overall very little tradeoff\.![Refer to caption](https://arxiv.org/html/2605.30597v1/x1.png)Figure 9:Synthetic density\-conservation benchmark across dimensionality\-reduction methods\.Embeddings and density\-preservation fits are shown for the XOI, XO, and square synthetic datasets\. Columns correspond to UMAP, DensMAP, ScaleMAP, t\-SNE, den\-SNE, PHATE, SpaceMAP, FeatureMAP\-GEX, FeatureMAP\-GVA, PaCMAP, TriMap, LocalMAP, and Scale\-PaCMAP\. For each dataset, the embedding panel is paired with a density\-preservation panel comparing original\-space log local radius with embedding\-space log local radius; red lines show linear fits and reportedR2R^\{2\}values quantify density conservation\. Among these, the ones with favorable density preservation are DensMAP, ScaleMAP, den\-SNE, FeatureMAP\-GEX, and Scale\-PaCMAP\. Den\-SNE could not embed MNIST, one of the medium sized datasets, in 1 hour and was hence excluded\. FeatureMAP\-GEX, although its densityR2R^\{2\}was comparable to DensMAP, generally showed poor embedding quality\. For instance, in MNIST, its recall@15 was 4\.5% vs DensMAP’s 7\.0% and UMAP’s 11\.9%, and in F\-MNIST, the respective scores were 4\.3%, 7\.1% and 13\.3%\. It also ran out of memory on our machine in the Transcriptomics dataset, and was hence excluded\.![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/supplement/pca_flow_cytometry.png)Figure 10:PCA of Flow cytometry datasetColoring matches Figure[6](https://arxiv.org/html/2605.30597#S4.F6)\. PCA reflects the multiscale structure from Figure[6](https://arxiv.org/html/2605.30597#S4.F6), including a dense cluster of cells that requires significant zoom to observe\.![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/supplement/beads_on_string.png)Figure 11:Beads on string datasetThree Gaussians connected by a thin uniform distribution\.![Refer to caption](https://arxiv.org/html/2605.30597v1/x2.png)Figure 12:All datasets vs embedding methods\.Including PaCMAP and Scale\-PaCMAP\. Scale\-PaCMAP does well in general, except for a tendency to disconnect some points that needn’t be disconnected\.
### A\.5Dependence of embedding quality on local radius normalization percentile

We chooseP95P\_\{95\}as a good default for normalizing the local radius for embedding because it works well across datasets\. It appears that embedding quality in 2\-D datasets depends strongly on this choice, but this effect does not appear in higher dimensional datasets\.

XOI, unlike most other datasets, is sensitive to the percentile we use for local radius normalization\. Here,P50P\_\{50\}gives us very highR2R^\{2\}but does not preserve global structure well\.P98P\_\{98\}gives us very high global structure preservation but poorR2R^\{2\}\.P95P\_\{95\}offers a good balance\.

Below, we show the dependence of the ScaleMAP embedding quality on the choice of percentile for a few different datasets\.

![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/supplement/p95_xoi.png)Figure 13:XOI![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/supplement/p95_mammoth.png)Figure 14:Mammoth![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/supplement/p95_mnist.png)Figure 15:MNIST![Refer to caption](https://arxiv.org/html/2605.30597v1/figures/supplement/p95_fmnist.png)Figure 16:F\-MNIST

Similar Articles

Dual Dimensionality for Local and Global Attention

arXiv cs.CL

Proposes Distance-Adaptive Representation (DAR) which reduces key-value dimensionality for distant tokens while preserving full dimensionality for nearby tokens, improving KV cache efficiency without performance loss.

SurGe: Improved Surface Geometry in Point Maps

Hugging Face Daily Papers

SurGe introduces a Neighborhood Attention Decoder and a reformulated scale-invariant gradient matching loss to improve local surface geometry accuracy in feedforward 3D reconstruction, particularly for thin structures. It achieves state-of-the-art average rank on zero-shot monocular geometry benchmarks, with better local point map and normal metrics.