ConceptioArchivearXiv CS
arXiv CSopen access

DiRe-RAPIDS: Topology-faithful dimensionality reduction at scale

2026 · arxiv_cs
arXiv CS · Papers · License: Open Access · 2026
Open Source ↗Direct PDF ↓
software-architecturesoftware-engineeringtesting
software engineering, software architecture, testing

DiRe – RAPIDS: Topology-faithful dimensionality reduction at scale Alexander Kolpakova and Igor Rivinb,1 a

CSTEM, University of Austin, Austin, TX, USA; b Department of Mathematics, Temple University, Philadelphia, PA, USA

dimensionality reduction | topological data analysis | visualization | manifold learning | GPU algorithms

Dimensionality reduction methods such as t-SNE (1) and UMAP (2) are the standard tools for two-dimensional visualisation of high-dimensional datasets, from single-cell expression profiles to language model embeddings. Both methods optimise a local-neighborhood-preservation objective: the embedding is good to the extent that each point’s k nearest neighbors in the original space remain its k nearest neighbors in the embedding. This design emphasises cluster structure and short-range relationships, and both methods are effective at it. The local objective is, however, known to come at the expense of global and topological structure. UMAP in particular produces embeddings whose 2-D layouts introduce gaps, folds, and spurious cycles that are not in the underlying data (3, 4). These artefacts are visually striking and scientifically misleading: two papers appearing in separate UMAP islands need not be more dissimilar than two papers in the same island, yet published biological UMAPs are routinely read as though they were. We make three contributions. First, we argue that the local-neighborhood metric rewards reproduction of sampling noise as well as manifold structure. We demonstrate this by sweeping noise level on manifolds with known topology and showing that UMAP’s β1 estimate tracks the inflating noisysample β1 , while a force-directed alternative (DiRe, (5)) stays near the theoretical value (Figure 1). Second, we propose topology error — the absolute deviation of β1 in the 2-D embedding from the known β1 of a fixed pair of stress manifolds — as a direct, scale-invariant measurement www.pnas.org/cgi/doi/10.1073/pnas.XXXXXXXXXX

of topological faithfulness. Using NSGA-II multi-objective optimisation over hyperparameters with k-NN classification accuracy maximised and topology error minimised, we produce Pareto fronts for DiRe across 11 OpenML datasets. We observe strict Pareto dominance of cuML UMAP on 7 of 11; on every dataset there exist DiRe configurations that reach topology error 0 (Figure 2). Third, we apply the tuned method to 723 457 arXiv papers embedded in R384 . DiRe preserves the reference Betti curves of the high-dimensional corpus 3–4× more faithfully than UMAP (Figure 4) in comparable wall-clock.

Method

T

The DiRe embedding. DiRe (5, 6) is a three-stage method. (i) A k-NN graph of the input point cloud is computed on the GPU via cuVS (7). (ii) An initial low-dimensional embedding is produced by one of: Principal Component Analysis, Laplacian Eigenmaps via LOBPCG on the normalised adjacency (8), diffusion maps (9), or Johnson–Lindenstrauss random projection (10). (iii) A force-directed layout refines the embedding using an attractive/repulsive potential

RA F

We revisit the evaluation of dimensionality-reduction algorithms in light of the observation that metrics based on k-nearest-neighbor preservation reward faithful reproduction of sampling noise as well as manifold structure. We propose a direct replacement: topology error on noisy-manifold stress tests, measuring deviation from known first Betti numbers in the 2-D embedding via ripser-computed persistence diagrams. Using this metric alongside classification accuracy as objectives in a multi-objective NSGA-II search, we tune the DiRe forcedirected embedding method and compare against GPU-accelerated cuML UMAP on 11 OpenML datasets and on a 723-thousand-paper arXiv embedding corpus. On 7 of 11 OpenML datasets, tuned DiRe strictly Pareto-dominates cuML UMAP on both axes; on every dataset, a DiRe configuration exists that recovers exact first Betti numbers on both stress manifolds while UMAP never drops below a topology error of 5. On the arXiv corpus, DiRe preserves 3–4× more topological structure (Betti-curve DTW distance) than UMAP at comparable wallclock (20 s vs 32 s for 723K points on a single H100-class GPU). The resulting hyperparameter preset is published as part of the opensource DiRe library.

D

arXiv:2604.25209v1 [cs.LG] 28 Apr 2026

This manuscript was compiled on April 29, 2026

Φatt (d) = log(1 + a d2b ),

Φrep (d) = − log



a d2b 1+a d2b



,

with (a, b) fit from spread and min_dist parameters, but evaluated with a bounded force kernel and accumulated in mixed precision for efficient GPU execution. The full pipeline is available in dire-rapids, with init=’spectral’ the effective default from the studies reported below.

Significance Statement Dimensionality reduction methods such as UMAP and t-SNE are central tools for visualising high-dimensional data, but their local-neighborhood objectives can preserve sampling noise while distorting global topology. We show that standard local metrics reward this noise memorisation: top-performing embeddings invent cycles and disconnected islands absent from the data. We introduce a topology-faithfulness benchmark based on noisy manifolds with known homology, tune DiRe against it, and find Pareto-optimal configurations that match or beat GPU-accelerated UMAP on classification while recovering exact first Betti numbers on stress tests. On 723K arXiv paper embeddings, DiRe preserves 3–4× more topological structure than UMAP at comparable wall-clock. A.K. and I.R. designed methods, performed research, contributed new analytic tools, analyzed data, and wrote the manuscript. The authors declare no competing interests. 1

To whom correspondence should be addressed. E-mail: [email protected]

PNAS

|

April 29, 2026

|

vol. XXX

|

no. XX

|

1–5

DiRe-pca

DiRe-spec

cuML UMAP

2.0 2.0 2.0 2.1 38.4

2.1 2.0 1.9 1.9 2.5

2.0 1.9 2.0 1.8 3.0

2.2 1.5 1.9 1.9 7.7

figure-8 ( 1 = 2): method response to noise

Table 1. β1 significant-bar count on figure-8 (theoretical β1 = 2). Each entry is mean over 10 seeds at 1000 points.

Why local-neighborhood metrics can be misleading. The stan-

dard k-NN preservation metric rewards an embedding for matching the exact set of k nearest neighbors of each point. On a noisy sampled manifold, which specific k points are closest depends both on the manifold geometry and on the noise draw. An embedding that crinkles itself to reproduce both the signal and the noise scores higher than one that preserves only the signal. The noise sweep (Figure 1) shows this quantitatively on figure-8. Topology error. We define topology error as a single scalar:

TE =

X

β1embed (M ) − β1true (M )

101

100

theoretical 1 = 2 noisy sample DiRe-pca DiRe-spectral cuML UMAP

0.05

0.10

sampling noise

0.15

0.20

Fig. 1. As sampling noise grows, the noisy point-cloud’s β1 count inflates sharply (from 2 at σ = 0.01 to ≈ 38 at σ = 0.2). UMAP’s embedding partially tracks this inflation (β1 ≈ 7.7 at σ = 0.2); DiRe’s embedding stays close to the theoretical value (β1 ≈ 2.5 at σ = 0.2). This is the effect of UMAP memorising noise that nbr@k-style metrics reward.

[1]

M ∈M

Across the four Pareto studies run on different datasets, the Pareto-optimal hyperparameters converge on a consistent region: init=’spectral’, spread ∈ [2.0, 3.9] (vs default 1.0), max_iter_layout ∈ [125, 242] (vs default 128), n_neighbors ∈ [10, 30]. We publish this region as a preset, dire_rapids.presets.TOPOLOGY_TUNED, available with from dire_rapids import TOPOLOGY_TUNED; DiRePyTorch(**TOPOLOGY_TUNED).

RA F

over a fixed stress-test set M. In this work M = {figure-8 at σ = 0.2, torus2 at σ = 0.05}, both with theoretical β1 = 2. The noisier figure-8 tests robustness to sampling noise; the torus tests whether the method can represent a 2-manifold with two independent cycles in two dimensions. β1embed is measured by running ripser (11) on the embedding, converting the persistence diagram to Betti curves, and counting significant bars (persistence ≥ 0.3 of maximum persistence).

T

noisy-sample

0.01 0.02 0.05 0.10 0.20

1 significant-bar count

σ

Multi-objective hyperparameter search. For each benchmark

D

dataset we run an NSGA-II study (12) with two objectives: maximise 2-D k-NN classification accuracy on the dataset, minimise the topology error of Equation 1. The search space covers initialization method ({pca, spectral, diffusion, jl}), k-neighbors ∈ [8, 48], cutoff ∈ [2, 42], spread ∈ [0.5, 4.0], min_dist ∈ [10−4 , 10−1 ], negative-sample ratio ∈ [2, 32], and layout iterations ∈ [64, 256]. We run 150–200 trials per dataset with a population of 25. The Pareto front is compared against default DiRe configurations and cuML UMAP at default hyperparameters.

Results Noise-robustness discriminator. Table 1 reports β1 bar counts

on noisy figure-8 samples (1000 points, 10 seeds per σ). The naive noisy-sample β1 climbs from 2.0 at σ = 0.01 to 38.4 at σ = 0.2. DiRe-pca rises only to 2.5; cuML UMAP rises to 7.7. Pareto dominance on 11 OpenML datasets. Table 2 sum-

marises the outcome of 150-trial NSGA-II searches on 11 OpenML datasets. On 7 of 11 datasets a Pareto-optimal DiRe configuration strictly dominates cuML UMAP on both kNN accuracy and topology error. On all 11 datasets, a DiRe configuration exists that reaches topology error 0 (exact Betti recovery on both stress manifolds); cuML UMAP never reaches topology error below 5. 2

|

www.pnas.org/cgi/doi/10.1073/pnas.XXXXXXXXXX

arXiv paper embeddings. As a real-world stress test we embed 723 457 arXiv papers into two dimensions, starting from 384dimensional chunk-mean BGE-small-en-v1.5 embeddings (13) of the abstracts and full texts. The dataset is available from HuggingFace (14). Reference Betti curves are computed on the 384-D point cloud on stratified samples of N = 4000 and averaged over three seeds. We sweep the k-neighbors parameter for both methods to rule out the possibility that the advantage we report is a single-k artefact. Island-ness. As a sharper diagnosis of how UMAP’s topology is wrong, we measure features of the 0-dimensional persistence diagram on the same 2-D layouts (Table 5, Figure 3). UMAP’s longest H0 bar is consistently 2–5× DiRe’s, and the ratio of the top 5 bars to the median bar is consistently 2–5× higher for UMAP. Both metrics say that UMAP concentrates topological mass into a few very-long bars — the signature of breaking a continuous manifold into well-separated islands. DiRe’s distribution is broader, closer to the reference point cloud’s. The arXiv category taxonomy is genuinely continuous (math.AG continuously touches math.SG, math.DG, math.AT, etc.); UMAP’s embedding presents it as disjoint pieces, DiRe’s preserves the tendril structure.

Discussion Our results argue for two methodological shifts in how dimensionality reduction is evaluated and deployed. First, localneighborhood preservation metrics are necessary but not sufficient: they can be gamed by methods that faithfully reproduce Kolpakov et al.

Dataset

UMAP kNN

UMAP TE

best kNN (TE)

best TE (kNN)

UMAP dominated by

0.893 0.883 0.987 0.810 0.918 0.875 0.766 0.970 0.782 0.648 0.695

5 5 5 5 5 5 5 5 5 5 5

0.915 (7) 0.876 (2) 0.985 (1) 0.842 (11) 0.936 (6) 0.895 (13) 0.762 (7) 0.961 (1) 0.798 (2) 0.663 (1) 0.727 (4)

0.907 (0) 0.874 (0) 0.984 (0) 0.833 (0) 0.925 (0) 0.872 (0) 0.748 (0) 0.960 (0) 0.792 (0) 0.652 (0) 0.715 (0)

3/4 0/2 0/2 2/3 3/4 3/7 0/8 0/2 3/3 2/2 3/3

mfeat-factors satimage pendigits isolet HAR letter magic MNIST Fashion-MNIST connect-4 covertype

Table 2. NSGA-II Pareto search for DiRe versus cuML UMAP on 11 OpenML datasets. Objectives: maximise kNN accuracy in 2-D, minimise topology error (Equation 1). Bold entries indicate a strict improvement over UMAP on that axis. UMAP dominated by reports the number of Pareto trials that strictly dominate cuML UMAP on both axes simultaneously. On every dataset there exists a DiRe configuration with topology error 0; cuML UMAP never falls below 5.

k 8 8 16 16 32 32 64 64 128 128

0.725 dominates UMAP

0.675 0.650 0.625

all trials DiRe Pareto DiRe-pca (default) DiRe-spec (default) cuML UMAP

0.600 0.575 5

10

15

20

topology error (lower = better)

Fig. 2. Pareto front from the 200-trial NSGA-II study on covertype (N = 581 012, D = 54). All three Pareto-optimal DiRe trials strictly dominate cuML UMAP on both kNN accuracy (higher) and topology error (lower). The best-topology trial achieves topology error 0 at kNN = 0.715, a +2 pp absolute kNN improvement over cuML UMAP.

noise, and they rank those methods above alternatives that produce globally more faithful embeddings. Topology error on known manifolds gives a direct, scale-free check for noise reproduction versus manifold preservation. Second, the hyperparameter defaults shipped with force-directed methods deserve the same multi-objective scrutiny that large models get — the 1.0 spread default in DiRe turns out to be off by a factor of 3.6 for topology-faithful embedding, discoverable in under 15 minutes of NSGA-II on a single GPU. Limitations. Ripser’s maxdim=2 cost grows as O(N 3 ), which confined our topology objective to β0 and β1 on N = 1000 stress samples. Scaling the topology objective to higher-dimensional homology at larger N requires GPU-native persistent-homology infrastructure, which to our knowledge does not yet exist at research-grade reliability for dimensions ≥ 2. Our present 2-D/3-D embedding comparisons do not probe βk for k ≥ 3 in the original data. Kolpakov et al.

DiRe cuML UMAP DiRe cuML UMAP DiRe cuML UMAP DiRe cuML UMAP DiRe cuML UMAP

DTW(β1 ) ↓ 423 ± 52 408 ± 70 193 ± 16 818 ± 328 192 ± 13 1084 ± 320 275 ± 41 508 ± 8 224 ± 63 664 ± 158

Table 3. Topology preservation on the 723 457-paper arXiv corpus, swept over k-neighbors. Lower Betti-curve DTW is better. DiRe wins DTW(β0 ) at every k by 2–3×; DiRe wins DTW(β1 ) at every k except k = 8 (where both are close). Means ± std over three seeds on stratified N = 4000 samples.

25

D

0

DTW(β0 ) ↓ 2149 ± 472 6943 ± 1045 3901 ± 506 10429 ± 466 5632 ± 49 11212 ± 313 7663 ± 653 11978 ± 109 5389 ± 550 12125 ± 124

method

T

0.700

RA F

2-D kNN accuracy (higher = better)

covertype (581K × 54)

Trustworthiness kNN-preservation@15 Wall-clock (GH200, 723K pts)

DiRe

cuML UMAP

0.796 0.74 20.3 s

0.869 0.82 32.4 s

1.6×

Table 4. Local-neighborhood and wall-clock metrics at k = 16. As the noise-robustness discriminator argues, UMAP’s local-metric advantage here is at least in part the noise-memorisation effect that local metrics reward. DiRe is 1.6× faster on the same GPU.

Reproducibility. All experiments mentioned above can be reproduced by executing the script benchmarking/bench_topology_pareto.py available from the dire-rapids open-source package (6). The necessary presets can be found in dire_rapids.presets.TOPOLOGY_TUNED. arXiv-corpus-specific code, including the BGE embedding pipeline and stratified Betti evaluation, is in the companion dire-rapids-arxiv repository (15). Materials and Methods Hardware and software. All benchmarks run on a single NVIDIA GH200 GPU under conda env rapids-26.04 (Python 3.14, PyTorch 2.11, RAPIDS 26.04). DiRe is implemented in dire-rapids v0.3.0. UMAP baseline: cuML 26.04 with default hyperparameters (k = 16). PNAS

|

April 29, 2026

|

vol. XXX

|

no. XX

|

3

k 16 16 16 32 32 128 128

layout reference (384-D) DiRe cuML UMAP DiRe cuML UMAP DiRe cuML UMAP

longest H0 bar ↓

top-5 / median ratio ↓

0.70 0.13 0.27 0.09 0.31 0.09 0.39

2.4 17.3 71.2 23.6 74.1 32.2 146.5

Table 5. Island-ness: persistence-diagram features of the 2-D layouts at selected k. Longest H0 bar (lower = more continuous, like reference); top-5-over-median ratio (lower = persistence spread across many bars rather than concentrated into a few). UMAP is 2–5× more "island-y" than DiRe at every k.

level embeddings mean-pooled per paper to form a 384-D vector. Reference Betti curves: ripser maxdim=1 on stratified samples of N ∈ {1000, 4000}, averaged over three seeds. Embedding Betti curves: ripser on the 2-D layout at the same stratified sample indices. DTW distance: fastdtw on the Betti curve time series.

Data Availability Code and scripts needed to reproduce the experiments are available in the open-source dire-rapids repository, including benchmarking/bench_topology_pareto.py. arXiv-corpus-specific code, including the BGE embedding pipeline and stratified Betti evaluation, is available in the companion dire-rapids-arxiv repository.

ACKNOWLEDGMENTS.

arXiv 2-D layouts: island-ness vs k 384-D reference (0.70) DiRe cuML UMAP

0.6 0.5

T

0.4

1. L van der Maaten, G Hinton, Visualizing data using t-sne. J. Mach. Learn. Res. 9, 2579–2605 (2008). 2. L McInnes, J Healy, J Melville, UMAP: Uniform manifold approximation and projection for dimension reduction (arXiv:1802.03426) (2018). 3. T Chari, L Pachter, The specious art of single-cell genomics. PLOS Comput. Biol. 19, e1011288 (2023). 4. T Chari, L Pachter, The specious art of single-cell genomics (extended) (bioRxiv preprint) (2023). 5. A Kolpakov, I Rivin, DiRe-JAX: a JAX-based dimensionality reduction algorithm (Journal of Open Source Software, forthcoming) (2025). 6. A Kolpakov, I Rivin, GPU-accelerated implementation of DiRe using PyTorch and optionally NVIDIA RAPIDS for massive-scale datasets (2026). 7. NVIDIA RAPIDS Team, cuVS: CUDA vector search (https://github.com/rapidsai/cuvs) (2024). 8. AV Knyazev, Toward the optimal preconditioned eigensolver: Locally optimal block preconditioned conjugate gradient method. SIAM J. Sci. Comput. 23, 517–541 (2001). 9. RR Coifman, S Lafon, Diffusion maps. Appl. Comput. Harmon. Analysis 21, 5–30 (2006). 10. WB Johnson, J Lindenstrauss, Extensions of lipschitz mappings into a hilbert space. Contemp. Math. 26, 189–206 (1984). 11. U Bauer, Ripser: efficient computation of Vietoris–Rips persistence barcodes. J. Appl. Comput. Topol. 5, 391–423 (2021). 12. K Deb, A Pratap, S Agarwal, T Meyarivan, A fast and elitist multiobjective genetic algorithm: NSGA-II. IEEE Transactions on Evol. Comput. 6, 182–197 (2002). 13. BAAI, BGE: BAAI general embedding (small, english, v1.5) (https://huggingface.co/BAAI/ bge-small-en-v1.5) (2023). 14. A Kolpakov, I Rivin, Mean-pooled embeddings for 723,457 arXiv papers, produced with BAAI/bge-small-en-v1.5 (2026). 15. A Kolpakov, I Rivin, DiRe – RAPIDS on the arXiv corpus (2026).

0.3 0.2 0.1 8

16

32

RA F

longest H0 persistence bar

0.7

The benchmarks reported in this paper were carried out on an NVIDIA GH200 kindly provided by Lambda Labs (https://lambda.ai); we thank Lambda for the extended access. This work was also supported in part by the Google Cloud Research Award GCP19980904.

k-neighbors

64

128

D

Fig. 3. Longest H0 persistence bar (lower = more continuous) vs. k-neighbors on the arXiv corpus 2-D layouts. Dashed line: reference persistence of the 384-D point cloud (0.70; far above both methods, because the reference manifold is one large continuum with many slow-growing bars rather than a few dominant islands). UMAP sits 2–3× above DiRe at every k. The shape of the deviation (long leading bar) is the island-creation pathology, quantitatively.

TSNE baseline: cuML 26.04 with default perplexity. Topology: ripser 0.6.14 via ripser.py. Preprocessing. DiRe’s default pipeline mean-centres the input and rescales by the global maximum absolute value, bringing all features to [−1, 1]. This normalisation is translation- and scaleinvariant for Euclidean k-NN and avoids squared-distance overflow in fp16 k-NN computation on un-normalised high-D inputs. UMAP is fed the same normalised inputs for fair comparison. Topology-error metric. Stress manifolds: figure-8 (a lemniscate, β1 = 2) sampled at σ = 0.2 Gaussian noise, and a standard torus (R = 2, r = 1, β1 = 2) at σ = 0.05. Both sampled with 1000 points. For each trial, ripser maxdim=1 is run on the 2-D embedding; the first-Betti curve is extracted, and the number of significant bars (persistence ≥ 0.3× max persistence) is recorded. Topology error for a trial is |bfig-8 − 2| + |btorus − 2|. 1 1 Pareto search. optuna 4.x NSGA-II sampler, population 25, seed 0. 150–200 trials per dataset. Search space in the Method section. Each trial fits DiRe on the target dataset, computes kNN accuracy with KNeighborsClassifier(15) on a fixed 70/30 train/test split, and computes topology error on the stress manifolds. Missingvalue rows in OpenML datasets are dropped. arXiv corpus. We create a dataset (14) that consists of 723 457 arXiv papers embedded with BAAI/bge-small-en-v1.5 (13), chunk4

|

www.pnas.org/cgi/doi/10.1073/pnas.XXXXXXXXXX

Kolpakov et al.

cuML UMAP (n=60,000)

cs.IT math-ph

D

RA F

T

DiRe (n=60,000)

math.AG math.AP

math.CA math.CO

math.DG math.DS

math.FA math.GT

math.NA math.NT

math.OC math.PR

math.RT other

Fig. 4. arXiv-paper 2-D layout, DiRe (left) vs cuML UMAP (right), coloured by primary arXiv category. Both methods recover category structure; UMAP produces tighter but more fragmented islands with visible gaps in long-range category similarity (e.g. math.DG vs math.SG). DiRe’s layout is smoother and preserves the inter-category topology of the reference 384-D point cloud more faithfully.

Kolpakov et al.

PNAS

|

April 29, 2026

|

vol. XXX

|

no. XX

|

5

Record · ID 141563 · SHA-256 2e649337f857db8f
Retrieved via Conceptio — every document is proof-bundled with source, license, and retrieval metadata.