Manuscript Offprint
arXiv:2610.16750NFMap: Topographic 2D Manifold Learning with Invertible Normalizing Flows
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We present NFMAP, a dimensionality reduction method for 2D visualisation that extends Generative Topographic Mapping (GTM) with a bijective normalizing flow. Like GTM, NFMAP places a fixed mixture grid prior over a 2D latent map, giving a parametric embedding, an explicit likelihood, and the ability to project new points onto an existing map; the likelihood is an effective out-of-distribution signal on chemical datasets. Unlike GTM, whose latent-to-data mapping is an RBF network of bounded flexibility, NFMAP's mapping is a normalizing flow, and is therefore fully invertible: any location on the map can be carried back to data space. To alleviate map crowding on large datasets, NFMAP additionally supports heavy-tailed Student-t mixture components.
NFMAP maps data to a latent space of the same dimension, split into a 2-dimensional navigable map and an off-manifold residual. Because the flow is bijective and its objective penalises volume contraction, variance squeezed out of the residual must reappear in the navigable map. The residual scale is the main control between local neighbourhood fidelity and global distance fidelity; its effect depends on the dimensionality of the data and is coupled to the extent of the latent grid.
1 Introduction
Neighbour-embedding methods such as t-SNE [1] and UMAP [2] preserve local structure well and are the default in most pipelines. However, they are non-invertible. Their standard versions are non-parametric, but both have parametric counterparts [3, 4].
Generative topographic mapping [5] (GTM) fits a constrained Gaussian mixture whose centres lie on a fixed 2-D grid, giving a parametric, probabilistic, out-of-sample-capable map. It is the direct ancestor of this work and remains strong on global structure. Its limit is representational: the latent-to-data mapping is an RBF network, so flexibility is bounded by the basis, and the mapping is not invertible.
Normalizing flows [6–10] give exact likelihoods and invertible mappings but are not designed to produce a navigable low-dimensional map — their latent space has the same dimension as the data. Injective variants target density estimation on manifolds [9] rather than visualisation. Some flows put the main structure in their first few latent coordinates [11, 12], but they are built for density estimation, not 2-D visualisation.
This work combines GTM’s fixed grid prior with a flow’s invertibility and exact likelihood, exposing a scalar governing how much of the data’s variance is forced into the visible map.
Preprint.
Closest to NFMAP is FloDR [13], developed independently and concurrently . Both methods use a bijective normalizing flow whose leading coordinates form the 2D map while the remaining coordinates are retained as a residual, ensuring full invertibility and exact density evaluation. The two methods diverge in prior design and residual handling: NFMAP anchors the map prior to a fixed topographic grid and regulates the residual via a global scale , whereas FloDR fits an unconstrained Gaussian mixture to the embedding after training and models the residual conditionally to derive local spread diagnostics. Furthermore, while FloDR relies on an explicit ordinal ranking loss to preserve global ordering, NFMAP obtains global distance fidelity geometrically, through residual variance contraction. NFMAP additionally offers a Student-t mixture prior for large-scale map crowding.
We provide NFMAP as an open-source Python package available at https://github.com/hagax8/nfmap.
Contributions:
-
The residual scale as a control on the map, with a volume argument showing why, under a bijection, contracting forces structure into the visible coordinates .
-
Empirical evidence that trades local against global structure.
-
A coupling analysis showing that , the grid extent, the repulsion weight and the graph weight all act on one quantity.
-
The flow likelihood as an applicability-domain signal for projected data points.
-
Mechanisms to address map crowding at dataset scale: a general heavy-tailed Student-t prior over the map coordinates, and a domain-specific hierarchical chemical kernel demonstrating the framework's extensibility to specialized data types.
Table 1: Capabilities of each method. Parametric: unseen points can be projected onto an existing map. Landscape grid: the prior places components at fixed, known positions, so any quantity can be aggregated per node and rendered as a continuous background field at a resolution set by . Student-t: the low-dimensional model uses Student-t tails, a standard remedy for crowding (built into t-SNE's similarity kernel, and available in NFMAP as a Student-t mixture prior). UMAP's kernel, also used by FloDR, is heavy-tailed but not Student-t.
| Parametric | Invertible | Exact density | Landscape grid | Student-t | |
|---|---|---|---|---|---|
| t-SNE | ✓* | ✕ | ✕ | ✕ | ✓ |
| UMAP | ✓* | ✕ | ✕ | ✕ | ✕ |
| GTM | ✓ | ✕ | ✓ | ✓ | ✕ |
| FloDR | ✓ | ✓ | ✓ | ✕ | |
| NFMAP | ✓ | ✓ | ✓ | ✓ |
- via parametric variants (parametric t-SNE [3], parametric UMAP [4]); the standard implementations are non-parametric; FloDR fits a Gaussian mixture to the embedding after training; its components are not fixed; optional
Development of NFMAP began in May 2026; see the commit history at https://github.com/hagax8/nfmap.
2.1 Architecture
Let be an input observation. NFMAP first maps the data to a PCA-reduced representation of dimension ( ), then learns a bijection built from affine coupling blocks [8]. Block partitions its input by a binary mask and applies
where is a two-hidden-layer GELU network and bounds the log-scale for numerical stability. The final layer of each is zero-initialised, so the flow begins as the identity. The log-determinant of the full map is the sum of the block terms, , and the mapping is invertible in closed form.
The latent vector is partitioned into a two-dimensional map and an off-manifold residual,
Only is plotted; is retained, so no information is discarded and reconstructs exactly.
2.2 Prior
The prior factorises over the two blocks, combining a mixture model over the 2D map with a Gaussian penalty on the residual:
For the map prior , the standard construction is a Gaussian Mixture Model (GMM):
Alternatively, to address map crowding in larger datasets (where heavy-tailed distributions better accommodate moderate similarities), we replace the Gaussian components with Student-t distributions of degrees of freedom to form a Student-t Mixture Model (SMM):
Following GTM [5], in this paper, the component means are fixed on a regular grid of radius grid_bounds and are not learned (although the option exists in NFMAP), and the mixing weights are uniform, . Fixing matters: it denies the model the option of explaining the data by reweighting which nodes are used, so the only available mechanism is warping how points land across the grid. We use and, for the Gaussian prior, throughout, a square grid for manifold datasets, and a hexagonal grid for others.
2.3 Objective
Training minimises
The graph and injectivity terms act on only. Neighbour weights come from UMAP's fuzzy simplicial set [2] over the input space:
(9) where are uniform non-neighbour pairs drawn from the batch, and denotes all pairs within the mini-batch. While repulsion acts as a global force preventing map collapse, the injectivity term is strictly local: by weighting a short-range Gaussian kernel , fixed) by ambient distance, it penalises false neighbours without fighting true neighbours.
Eq. (6) is a weighted objective rather than a likelihood. The manifold term uses the mean over residual coordinates rather than the sum a Gaussian negative log-likelihood would give, which scales it by ; and the volume term is scaled by , which prevents the flow from inflating the log-determinant reward by stretching the residual dimensions without bound. These two choices largely compensate one another . We use , , , , , , ( in the scale study).
2.4 The mechanism
The residual term contributes gradient pressure on scaling as . Because is bijective and the volume term penalises contraction / collapse, variance removed from cannot vanish: it reappears in . Decreasing therefore forces more of the data's geometry into the two visible dimensions, improving global distance fidelity at the cost of local neighbourhood fidelity.
Two consequences follow. First, the effect is bounded by how much variance there is to move: when the residual is low-dimensional there is no reservoir, and shrinking instead destroys the dimension that legitimately carries the manifold's thickness. Second, if is bounded by a grid of fixed radius, the variance pushed into the map needs canvas to occupy, and the map may simply spill outside the grid boundaries.
2.5 Optimisation
Parameters are fitted with AdamW (learning rate , linear warm-up followed by cosine decay) for at most 1000 epochs with early stopping on the training objective (patience 100; 300 epochs and patience 30 in the scale study). We use coupling blocks and a hidden width of .
Specifically, for an isotropic rescaling of the unscaled residual coordinates by a factor (such that ), the exact likelihood is stationary at , and Eq. (6) is stationary within a factor of two of that value.
3 Benchmark design
3.1 Datasets
We evaluate our method across three diverse dataset families. The first family comprises five chemical datasets: BACE, BBBP, and ESOL from MoleculeNet [14], alongside ChEMBL [15] activity sets for DRD2 and EGFR. Molecules are represented by 2048-bit Morgan fingerprints (r = 2) concatenated with eight standard physicochemical descriptors (computed via RDKit [16]). High-dimensional features are standardised, reduced to d = 32 principal components (or d = 128 for the scale study), and standardised again, while low-dimensional benchmarks retain their original dimension d = D. The second family consists of standard low-dimensional machine learning benchmarks: Digits, Wine, Breast Cancer, Iris, Two Moons, and Concentric Circles. The third family comprises synthetic 3-D manifolds designed to test geometric unfolding: the Swiss Roll, the S-Curve, and a synthetic Severed Sphere. With the exception of the chemical datasets and the severed sphere, all standard benchmarks and manifolds are generated or sourced using scikit-learn [17]. Experiments use a 600-sample subset of each dataset, each configuration is fitted across three random seeds (five in the prior ablation), and we report the mean metric. A separate scale study (Section 4.7) uses larger full-scale ChEMBL activity sets: DRD2 (869 molecules), hERG (9,400) and EGFR (10,573), because the crowding effects it examines are properties of large maps and are invisible at the subsample size used above. For that experiment, we use 128 principal components instead of 32, which is closer to what would be used in production cheminformatics pipelines.
3.2 Baselines and Implementation
For our baseline comparisons, we use the scikit-learn [17] implementation of t-SNE. For UMAP, we use the official umap-learn [2] Python package. Finally, for Generative Topographic Mapping (GTM), we use the ugtm package [18] implementation. All baseline models receive the exact same PCA-reduced input matrices as NFMAP.
3.3 Metrics
Let denote inputs and their map coordinates, with and the corresponding pairwise distances.
Global structure. Distance correlation is the Pearson correlation between the two distance vectors,
Local structure. We use trustworthiness and continuity [19]. With and the k-neighbourhoods of in the two spaces and the rank of among 's input-space neighbours,
with continuity defined symmetrically by exchanging the two spaces. We report their harmonic mean, T/C F1 = 2TC/(T + C), at .
Geodesic structure. On a manifold that folds back on itself, Eq. (10) compares against ambient distances and therefore rewards a map that leaves the manifold rolled. For the synthetic manifold datasets we build a k-nearest-neighbour graph (k = 10) on the input and take all-pairs shortest paths [20], reporting DistCor as Eq. (10) with replaced by .
Chemical structure. For chemistry we also measure whether molecules sharing a Bemis–Murcko scaffold remain together. With the scaffold identifier of molecule and the molecules whose scaffold has at least one other member,
Singleton scaffolds are excluded: they can never have a same-scaffold neighbour. We report purity against the chance rate . We also report the silhouette coefficient over map coordinates with as the label, restricted to the same , which captures separation between scaffold groups rather than only neighbourhood composition.
Density as an applicability domain. NFMAP yields an exact data density . We assess it as an out-of-distribution score by the area under the ROC curve separating held-out in-distribution points from out-of-distribution ones, against two baselines: mean distance to the k nearest training points, and PCA reconstruction error.
3.4 Experiments
-
as a local/global control: Examining the effect of the residual variance parameter across different dataset geometries.
-
Graph loss weights: Examining how the attraction and repulsion weights provide further control on map spread.
-
Joint : Sweeping eight values of spanning four orders of magnitude against three grid radii (6, 12, 24) on the chemical datasets to reveal parameter coupling (Figure 3).
-
Comparison at matched tuning: Each method is swept over its own local/global control (14 values of from to with grid_bounds 12 and 24 for NFMAP, perplexity for t-SNE (5–500), n_neighbors and min_dist for UMAP) and compared at its best setting.
-
Prior ablation: Testing a single Gaussian, a learned mixture, and our fixed grid to measure the cost of the structural constraint.
-
Applicability domain: Up to three out-of-distribution constructions (feature-permuted inputs and matched-moment Gaussian noise for every dataset; held-out novel classes where there are at least three classes) across fourteen datasets using exact likelihood.
-
Scale study and domain extensions: Evaluating the hierarchical chemical kernel and Student-t prior on larger DRD2, hERG and EGFR ChEMBL datasets, including a degrees-of-freedom sweep.
4 Results
4.1 is a local/global control whose direction depends on the data
Shrinking transfers variance into the map, improving global distance fidelity at the cost of neighbourhood fidelity; but only where the residual has variance to give. Figure 1 shows the two regimes on one axis: on chemistry () DistCor falls from 0.73 to 0.21 as rises, whereas on the 3-D manifolds () it rises from 0.67 and flattens near 0.73. The curves cross. With one off-manifold dimension there is no reservoir to redistribute, and shrinking instead destroys the dimension carrying the manifold's thickness.
Squeezing the off-manifold subspace helps only when there is variance in it to redistribute

Figure 1: The direction of the trade-off is set by the data's geometry. Mean s.d. over datasets and three seeds, grid_bounds=12.
4.2 The graph loss terms (attraction and repulsion) control map spread
In addition to and the grid radius, the graph loss weights provide further control over embedding geometry (Figure 2).
The attraction term is strictly necessary to produce a usable map: at , local neighbourhood fidelity (T/C F1) drops for all dataset families, indicating that the prior and volume terms alone are insufficient to preserve structure.
Both graph terms act as additional handles on the same underlying quantity: the spread of the 2-D coordinates relative to the fixed grid canvas. Stronger attraction ( ) contracts the map, effectively halving the fraction of out-of-bounds points on manifold datasets. Conversely, the repulsion term ( ) acts as an anti-collapse mechanism that expands the map.
Loss-term weights act differently in the two regimes

repulsion_weight
repulsion_weight
repulsion_weight
Figure 2: Ablation of the graph attraction ( ) and repulsion ( ) weights. The graph terms act as opposing forces on the map’s spread relative to the canvas.
4.3 cannot be chosen independently of the grid
Figure 3 sweeps and grid_bounds together. Widening the canvas from 6 to 12 allows an order of magnitude lower (for high-dimensional datasets); the wider grid absorbs the redistributed variance. In this example, the best shared “global” configuration (optimizing DistCor) keeping of points inside the grid is , grid_bounds = 12. The gain saturates: widening further to grid_bounds = 24 does not admit within the containment constraint and lowers mean DistCor slightly (0.65 vs. 0.68), so the shared optimum sits at the intermediate grid.
and grid_bounds cannot be chosen independently

ESOL (GTM 0.69)
DRD2 (GTM 0.39)
EGFR (GTM 0.45)
grid_bounds

grid_bounds
Figure 3: Joint sweep on the chemical datasets. Hatched cells violate the containment constraint.
4.4 Comparison with existing methods
Table 2: Each method at its own best setting (means over 3 seeds, CPU). G: global structure (DistCor; geodesic DistCor on the 3-D manifolds). L: local structure (T/C F1). Each sweep is reduced to its Pareto front over (G, L); the reported point is the front's knee, or its maximum-G point on the manifolds. Best per dataset in bold. NFMAP's reported maps keep at least of points inside grid_bounds, except the S-curve . Settings in Table B.1.
| NFMAP | GTM | t-SNE | UMAP | |||||
|---|---|---|---|---|---|---|---|---|
| G | L | G | L | G | L | G | L | |
| Chemistry | ||||||||
| BACE | 0.37 | 0.97 | 0.34 | 0.96 | 0.61 | 0.98 | 0.30 | 0.98 |
| BBBP | 0.55 | 0.89 | 0.71 | 0.87 | 0.59 | 0.91 | 0.39 | 0.92 |
| ESOL | 0.76 | 0.85 | 0.70 | 0.87 | 0.57 | 0.89 | 0.18 | 0.91 |
| DRD2 | 0.36 | 0.96 | 0.42 | 0.95 | 0.59 | 0.96 | 0.23 | 0.98 |
| EGFR | 0.44 | 0.92 | 0.47 | 0.91 | 0.67 | 0.92 | 0.34 | 0.95 |
| 3-D manifolds | ||||||||
| Swiss roll | 0.52 | 0.99 | 0.26 | 0.98 | 0.77 | 1.00 | 0.86 | 1.00 |
| S-curve | 0.94 | 0.99 | 0.50 | 0.99 | 0.99 | 1.00 | 0.99 | 1.00 |
| Severed sphere | 0.92 | 1.00 | 0.91 | 0.99 | 0.95 | 1.00 | 0.95 | 1.00 |
| Other | ||||||||
| Digits | 0.63 | 0.97 | 0.53 | 0.97 | 0.70 | 0.96 | 0.59 | 0.96 |
| Iris | 0.98 | 0.98 | 0.75 | 0.95 | 0.98 | 0.98 | 0.91 | 0.98 |
| Cancer | 0.80 | 0.93 | 0.66 | 0.94 | 0.81 | 0.95 | 0.74 | 0.96 |
| Wine | 0.84 | 0.94 | 0.72 | 0.94 | 0.86 | 0.95 | 0.78 | 0.96 |
On global structure, t-SNE at high perplexity is the strongest baseline on most datasets. NFMAP has the best global fidelity on ESOL, ties t-SNE on Iris, and is above UMAP on all five chemical sets, while its local fidelity stays within 0.06 of the best method throughout. It trails t-SNE and UMAP on the geodesic structure of the Swiss roll. Unlike either, it does this with an invertible map. For t-SNE, the global-structure optimum lies at a perplexity approaching the sample size, which is impractical at realistic .
Figures 4 and 5 show maps for DRD2 and the S-curve. For S-curve, we used the best geodesic setup for every map; for DRD2, we show two extreme settings for NFMAP, with (global-optimizing) and (local-optimizing).
DRD2: both ends of the dial, against the baselines
NFMap ( , global)

NFMap ( , local)
DistCor 0.51 T/C F1 0.91
GTM
DistCor 0.05 T/C F1 0.98
t-SNE (p=300)

DistCor 0.42 T/C F1 0.95
UMAP (k=5, d=0.5)
DistCor 0.60 T/C F1 0.96

DistCor 0.25 T/C F1 0.97
inactive (pIC50<7)
active (pIC50 ≥ 7)
Figure 4: DRD2 at both ends of the dial, against GTM, t-SNE and UMAP.
S-curve: all methods

DistCor 0.70 T/C F1 0.99 geodesic 0.94
t-SNE (p=50)
DistCor 0.63 T/C F1 0.99 geodesic 0.50
UMAP (k=100, d=0.5)

DistCor 0.64 T/C F1 1.00 geodesic 0.99
DistCor 0.65 T/C F1 1.00 geodesic 0.99
Figure 5: S-curve. NFMAP and baselines at their Table 2 settings.
4.5 The fixed grid does not harm performance
Fixing the grid (Table 3, Figure 6) is statistically non-inferior to learning the mixture means, for both DistCor (margin 0.02; one-sided paired t-test, ) and T/C F1 (margin 0.01; ), over 43 paired runs on 9 datasets. We therefore adopt the fixed grid for the canonical grid cells it provides.

DistCor 0.65 T/C F1 0.96 Sil 0.24
DistCor 0.62 T/C F1 0.97 Sil 0.39
DistCor 0.61 T/C F1 0.97 Sil 0.37
Figure 6: The prior over the NFMAP coordinates, on digits (, 64 features, coloured by digit). Left: a single Gaussian. Middle: a mixture of 100 components whose means are learned. Right: the same mixture with its means pinned to a fixed hexagonal grid. Crosses mark the mixture means after training: the learned means leave the lattice and gather in the clusters, while the fixed ones stay where they were placed. All three panels at grid_bounds = 6 and . DistCor, T/C F1 and silhouette under each panel are means over 3 seeds.
Table 3: Prior ablation across datasets and seeds (mean sd; 3 seeds for Digits, 5 seeds for the other datasets). Against a single Gaussian the fixed grid gives equal or better T/C F1 and trades some DistCor on Digits and the 3-D manifolds. Off grid: share of points outside grid_bounds (also an average across datasets and seeds). A single Gaussian has no grid, so off-grid is not reported.
| Prior | DistCor | T/C F1 | Off grid |
|---|---|---|---|
| Digits | |||
| Single Gaussian | 0.648 ± 0.002 | 0.963 ± 0.004 | - |
| Learned mixture | 0.624 ± 0.005 | 0.973 ± 0.002 | 0.0% |
| Fixed grid (NFMAP) | 0.608 ± 0.010 | 0.973 ± 0.003 | 0.9% |
| Chemistry (5 datasets) | |||
| Single Gaussian | 0.657 ± 0.090 | 0.848 ± 0.049 | - |
| Learned mixture | 0.679 ± 0.086 | 0.856 ± 0.050 | 12.0% |
| Fixed grid (NFMAP) | 0.677 ± 0.095 | 0.858 ± 0.050 | 3.0% |
| 3-D manifolds (3 datasets) | |||
| Single Gaussian | 0.756 ± 0.041 | 0.940 ± 0.024 | - |
| Learned mixture | 0.682 ± 0.048 | 0.992 ± 0.010 | 3.1% |
| Fixed grid (NFMAP) | 0.719 ± 0.028 | 0.989 ± 0.012 | 1.7% |
4.6 The likelihood is an applicability-domain signal
Figure 7 reports out-of-distribution AUC. NFMAP's exact log-likelihood leads the k-NN distance baseline on every chemical dataset (mean 0.937 versus 0.896). On the non-chemical sets it trails on average (0.834 versus 0.880), most clearly on the two-dimensional toys (circles, moons), where and the density has no residual to measure; results on the remaining sets are mixed (ahead on wine, cancer, S-curve and severed sphere; behind on digits, iris and swiss roll).
NFMap's exact log-likelihood as an applicability-domain signal
Chemistry

Non-chemistry
Mean over the applicable OOD constructions (permuted, noise; plus novel classes where there are 3 classes) and 3 seeds; dashed line is chance. Ahead of the kNN baseline on every chemistry set; behind on the 2D toys, where is empty.
Figure 7: Out-of-distribution detection AUC, averaged over the applicable OOD constructions (feature-permuted inputs and matched-moment noise for every dataset; held-out novel classes in addition where there are 3 classes) and three seeds. Dashed line is chance.
4.7 Crowding: effects that appear only at scale
The experiments so far use small datasets (at most ), where crowding is not addressed: in high dimensions, there is far more room at moderate distances than two dimensions can represent, so as grows the moderately dissimilar points are increasingly compressed together. At there is little crowding to relieve. We investigated the crowding problem in larger chemical datasets, by adding two features: a scaffold-informed hierarchical chemical kernel (Bemis–Murcko scaffold and generic skeleton), and a Student-t prior over the map coordinates (Figure 8). Replacing the Euclidean graph with the hierarchical kernel raises scaffold silhouette by +0.045 on DRD2 ( ), +0.194 on hERG ( ) and +0.280 on EGFR ( ). On EGFR, a Student-t prior over the map coordinates further raises scaffold purity from 0.571 to 0.63–0.64 and silhouette from -0.023 to between +0.07 and +0.10, with little dependence on the degrees of freedom across . The best EGFR configuration (hierarchical kernel, Student-t, ) reaches scaffold purity 0.642 and silhouette +0.104, against 0.388 and -0.303 for the Euclidean-graph Gaussian baseline.
Components that take effect only at full dataset scale
Hierarchical chemical kernel
Prior tail weight (EGFR)

Figure 8: Crowding remedies at full dataset scale (single seed). Left: replacing the Euclidean neighbourhood graph with the hierarchical chemical kernel, on the complete DRD2, hERG and EGFR activity sets. Right: the Student-t degrees-of-freedom sweep on EGFR, with the Gaussian prior shown for reference.
4.8 Discussion
Treating the 2-D map as one half of a bijection, with a volume term that penalises contraction, gives a concrete meaning: it sets how much of the data's variance the flow may leave in the residual. On high-dimensional data, shrinking it moves geometry onto the map and improves global structure; on thin 3-D manifolds it flattens the dimension that carries the manifold's thickness. The right setting therefore depends on the data's geometry rather than being a universal default.
The coupling between and the grid extent also means that grid-based methods should not be tuned one parameter at a time. Chosen jointly, the grid absorbs the redistributed variance, and NFMAP reaches global fidelity close to GTM's and above UMAP's on the chemical datasets without spilling points off the canvas. Fixing the grid, rather than learning the mixture means, had no measurable cost in embedding quality.
The flow formulation also gives NFMAP capabilities that neighbour embeddings lack. Its exact likelihood separates in- from out-of-distribution molecules better than a k-NN distance baseline on all five chemical datasets. At larger scale (up to 10,000 molecules), where crowding becomes visible, a Student-t prior and a scaffold-aware kernel each improve scaffold separation, and both fit into the framework without changing the flow.
5 Conclusions
We introduced NFMAP, an invertible, parametric dimensionality reduction method that combines GTM's fixed latent grid with the exact likelihood of a normalizing flow. The residual scale controls the local/global trade-off; the direction of its effect depends on the intrinsic dimensionality of the data, and it must be chosen together with the grid extent. Unlike t-SNE and UMAP, NFMAP is fully invertible. It also projects new points onto a trained map, carries any map position back to data space, and its density works as an out-of-distribution signal on chemical data. The fixed grid provides a common reference canvas at no measurable cost in embedding quality. The framework is also easy to extend: a Student-t prior and a hierarchical chemical kernel improve map structure on larger datasets. The main limitations are that several hyperparameters affect how far the map spreads, and that points can fall outside the grid. Adaptive calibration of the grid extent is a natural next step.
References
[1] Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(86):2579–2605, 2008. URL http://jmlr.org/papers/v9/vandermaaten08a.html.
[2] Leland McInnes, John Healy, Nathaniel Saul, and Lukas Großberger. Umap: Uniform manifold approximation and projection. Journal of Open Source Software, 3(29):861, 2018. doi: 10.21105/joss.00861. URL https://doi.org/10.21105/joss.00861.
[3] Laurens van der Maaten. Learning a parametric embedding by preserving local structure. In David van Dyk and Max Welling, editors, Proceedings of the Twelfth International Conference on Artificial Intelligence and Statistics, volume 5 of Proceedings of Machine Learning Research, pages 384–391, Hilton Clearwater Beach Resort, Clearwater Beach, Florida USA, 16–18 Apr 2009. PMLR. URL https://proceedings.mlr.press/v5/maaten09a.html.
[4] Tim Sainburg, Leland McInnes, and Timothy Q. Gentner. Parametric umap embeddings for representation and semisupervised learning. Neural Computation, 33(11):2881–2907, 10 2021. ISSN 0899-7667. doi:10.1162/neco_a_01434. URL https://doi.org/10.1162/neco_a_01434.
[5] Christopher M. Bishop, Markus Svensén, and Christopher K. I. Williams. Gtm: The generative topographic mapping. Neural Computation, 10(1):215–234, 1998. doi: 10.1162/089976698300017953.
[6] George Papamakarios, Eric Nalisnick, Danilo Jimenez Rezende, Shakir Mohamed, and Balaji Lakshminarayanan. Normalizing flows for probabilistic modeling and inference. Journal of Machine Learning Research, 22(57):1–64, 2021.
[7] Danilo Jimenez Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International Conference on Machine Learning (ICML), 2015.
[8] Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. In International Conference on Learning Representations, 2017. URL https://openreview.net/forum?id=HkpbnH91x.
[9] Johann Brehmer and Kyle Cranmer. Flows for simultaneous manifold learning and density estimation, 2020. URL https://arxiv.org/abs/2003.13913.
[10] Anthony L. Caterini, Gabriel Loaiza-Ganem, Geoff Pleiss, and John P. Cunningham. Rectangular flows for manifold learning. In Proceedings of the 35th International Conference on Neural Information Processing Systems, NIPS '21, Red Hook, NY, USA, 2021. Curran Associates Inc. ISBN 9781713845393.
[11] Artur Bekasov and Iain Murray. Ordering dimensions with nested dropout normalizing flows, 2020. URL https://arxiv.org/abs/2006.08777.
[12] Edmond Cunningham, Adam D Cobb, and Susmit Jha. Principal component flows. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato, editors, Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 4492–4519. PMLR, 17–23 Jul 2022. URL https://proceedings.mlr.press/v162/cunningham22a.html.
[13] Abdallah Baraka and Daniel Probst. Flodr: An invertible dimensionality reduction method based on a normalising flow, 2026. URL https://arxiv.org/abs/2607.26278.
[14] Zhenqin Wu, Bharath Ramsundar, Evan N. Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S. Pappu, Karl Leswing, and Vijay Pande. Moleculenet: a benchmark for molecular machine learning. Chemical Science, 9(2):513–530, 01 2018. ISSN 2041-6520. doi: 10.1039/c7sc02664a. URL https://doi.org/10.1039/c7sc02664a.
[15] Barbara Zdrazil, Eloy Felix, Fiona Hunter, Emma J Manners, James Blackshaw, Sybilla Corbett, Marleen de Veij, Harris Ioannidis, David Mendez Lopez, Juan F Mosquera, Maria Paula Magarinos, Nicolas Bosc, Ricardo Arcila, Tevfik Kizilören, Anna Gaulton, A Patrícia Bento, Melissa F Adasme, Peter Monecke, Gregory A Landrum, and Andrew R Leach. The chembl database in 2023: a drug discovery platform spanning multiple bioactivity data types and time periods. Nucleic Acids Research, 52(D1): D1180–D1192, 01 2024. ISSN 0305-1048. doi: 10.1093/nar/gkad1004. URL https://doi.org/10.1093/nar/gkad1004.
[16] Greg Landrum and others. RDKit: Open-source cheminformatics. https://www.rdkit.org. Accessed: 2026-10-09.
[17] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
[18] Héléna Alexandra Gaspar. ugtm: A python package for data modeling and visualization using generative topographic mapping. Journal of Open Research Software, 6(1):29, 2018. doi: 10.5334/jors.235. URL https://doi.org.
[19] Jarkko Venna and Samuel Kaski. Local multidimensional scaling with controlled tradeoff between trustworthiness and continuity. 2005. URL https://api.semanticscholar.org/CorpusID:16318128.
[20] Joshua B. Tenenbaum, Vin de Silva, and John C. Langford. A global geometric framework for nonlinear dimensionality reduction. Science, 290(5500):2319–2323, 2000. doi: 10.1126/science.290.5500.2319. URL https://www.science.org/doi/abs/10.1126/science.290.5500.2319.
A Additional Qualitative Results on 3-D Manifolds
In this section, we provide full qualitative map comparisons for the remaining synthetic 3-D benchmark manifolds described in Section 3: the Severed Sphere (Figure A.1) and the Swiss Roll (Figure A.2).
All baselines (GTM, t-SNE, and UMAP) are depicted at their highest geodesic distance correlation configurations, matching the evaluation protocol reported in Table 2.
Severed sphere: all methods
NFMap ( )

DistCor 0.76 T/C F1 1.00 geodesic 0.93
t-SNE (p=100)
GTM
DistCor 0.78 T/C F1 0.99 geodesic 0.91
UMAP (k=400, d=0.99)

DistCor 0.74 T/C F1 1.00 geodesic 0.95
DistCor 0.74 T/C F1 1.00 geodesic 0.95
Figure A.1: Severed sphere manifold embedding. NFMAP and baselines at their Table 2 settings.
Swiss roll: all methods
NFMap ( )

DistCor 0.70 T/C F1 0.99 geodesic 0.52
t-SNE (p=15)
GTM
DistCor 0.61 T/C F1 0.98 geodesic 0.26
UMAP (k=15, d=0.99)

DistCor 0.44 T/C F1 1.00 geodesic 0.77
DistCor 0.33 T/C F1 1.00 geodesic 0.87
Figure A.2: Swiss roll manifold embedding. NFMAP and baselines at their Table 2 settings.
B Experimental Settings and Hyperparameters
Table B.1 details the hyperparameter sweep ranges and selected Pareto-optimal configurations for each baseline and dataset family reported in Table 2.
Table B.1: Hyperparameters selected by the sweep for each entry of Table 2 (the reported Pareto point; not fixed in advance). NFMAP: , swept over values from to and grid_bounds 12 and 24 (number of grid nodes fixed at 100). t-SNE: perplexity. UMAP: n_neighbors / min_dist. GTM: not swept, one configuration ( nodes, RBF centres, RBF width factor 0.3).
| NFMAP | t-SNE | UMAP | |
|---|---|---|---|
| Chemistry | |||
| BACE | 0.3 / 24 | 200 | 5 / 0.99 |
| BBBP | 3 / 24 | 200 | 5 / 0 |
| ESOL | 0.01 / 24 | 300 | 5 / 0.1 |
| DRD2 | 0.3 / 24 | 300 | 5 / 0.5 |
| EGFR | 0.3 / 24 | 300 | 5 / 0 |
| 3-D manifolds | |||
| Swiss roll | 3 / 24 | 15 | 15 / 0.99 |
| S-curve | 100 / 12 | 50 | 100 / 0.5 |
| Severed sphere | 5 / 12 | 100 | 400 / 0.99 |
| Other | |||
| Digits | 10 / 12 | 400 | 400 / 0.5 |
| Iris | 1 / 12 | 100 | 15 / 0.1 |
| Cancer | 5 / 12 | 200 | 15 / 0.1 |
| Wine | 1 / 12 | 100 | 100 / 0.1 |