Motivation: Low-dimensional embeddings are widely used to explore cell-state heterogeneity in single-cell and other high-dimensional biological data. Although many methods preserve local neighborhoods, they may distort the apparent sampling density of processed observations, altering the visual contrast between dense and sparse regions and complicating the interpretation of rare, transitional, or continuous cell-state populations. Results: We present DMT-Dens, a parametric manifold-visualization method built on a latent-token Transformer encoder. The model integrates rank-based manifold alignment with hard-pair aggregation. To preserve density, it optimizes a loss based on the Pearson correlation between k-nearest-neighbor log-radius estimates in the processed input and two-dimensional embedding spaces. Benchmark evaluations demonstrate strong density preservation, particularly on biological datasets, while retaining competitive label separability. Availability: Source code, data-processing scripts, and resolved experiment configurations are available at https://github.com/Ruizhe-wang/DMT-Dens.
Figures & tables
Figure 1: Motivation for density-preserving biological visualization. a, Ground-truth synthetic three-dimensional branching tree with a dense root, sparse transitions, and multiple branch points, colored by branch identity. b, Two-dimensional embeddings of the same data. The displayed baseline embeddings differ in local density, apparent continuity, and adjacency. Adding a density objective to t-SNE and UMAP yields the density-aware baselines den-SNE and densMAP. The red outlines mark apparent disconnections in this representative UMAP embedding and their partial reconnection in densMAP. In the displayed DMT-Dens embedding, density variation and continuous paths are visually retained. c, Density preservation versus label separability across the benchmark datasets. Each point shows the mean rank of one method over the eight datasets with complete baseline coverage (density-correlation rank versus SVC-accuracy rank), and whiskers show the standard error across datasets. The dashed curve marks the Pareto frontier of the baseline methods.
Figure 2: DMT-Dens architecture and training objective. (A) A latent-token Transformer encoder and projection module map the input matrix X to the embedding Y . For each observation, the encoder forms a fixed set of latent tokens, applies self-attention within the token set, and pools the result into a 40-dimensional representation for two-dimensional projection. (B) The manifold-preservation loss derives bidirectional rank affinities Pij from paired input-space views. Binary cross-entropy matches these targets to cross-view Student t -kernel affinities Qij over selected hard pairs. (C) The density-preservation loss compares kNN log-density profiles gsX and gsY across anchor observations at scales s∈{⌊k/2⌋,k} . Stop-gradient is applied to the input-space profile. (D) The final objective is L(θ)=Lmanifold(θ)+λdLdens(θ) ; its gradients update the encoder and projection module.
Table 1: Main comparison on density preservation and label separability. Higher is better for both metrics, and the best (highest) value in each row is shown in bold . Entries report mean ± standard deviation over available seeds. The final row of each panel reports the unweighted mean over all nine datasets; this mean is omitted for den-SNE because its EMNIST run did not complete. OOT (out of time) denotes a runtime of 24 h+; this applies to den-SNE on the full EMNIST ( byclass , ≈698 K points) benchmark.
Georgia Institute of Technology · School of Chemical and Biomolecular Engineering Georgia Institute of Technology · School of Chemistry and Biochemistry Georgia Institute of Technology
Department of Biomedical Informatics and Data Science, Yale School of Medicine, 333 Cedar St, New Haven, 06510, CT, USA. · School of Information, University of Michigan, 500 S. State St, Ann Arbor, 48109, MI, USA.
Department of Statistics, Columbia University, New York, NY 10027 · School of Data and Information Sciences, University of North Carolina at Chapel Hill, Chapel Hill, NC 27599 · Irving Institute for Cancer Dynamics, Columbia University, New York, NY 10027 +1