Learning Distances from Data with Normalizing Flows and Score Matching
Peter Sorrenson, Daniel Behrend-Uriarte, Christoph Schnörr, Ullrich Köthe
Abstract
Density-based distances (DBDs) offer an elegant solution to the problem of metric learning. By defining a Riemannian metric which increases with decreasing probability density, shortest paths naturally follow the data manifold and points are clustered according to the modes of the data. We show that existing methods to estimate Fermat distances, a particular choice of DBD, suffer from poor convergence in both low and high dimensions due to i) inaccurate density estimates and ii) reliance on graph-based paths which are increasingly rough in high dimensions. To address these issues, we propose learning the densities using a normalizing flow, a generative model with tractable density estimation, and employing a smooth relaxation method using a score model initialized from a graph-based proposal. Additionally, we introduce a dimension-adapted Fermat distance that exhibits more intuitive behavior when scaled to high dimensions and offers better numerical properties. Our work paves the way for practical use of density-based distances, especially in high-dimensional spaces.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 14515a1b-4151-4789-bfe5-037263ff75a4Cited by top-tier papers3
- GeodesicNVS: Probability Density Geodesic Flow Matching for Novel View SynthesisXuqin Wang, Tao Wu, Yanfeng Zhang, Lu Liu et al.CVPR 2026 · 4 citations
- Geodesic Calculus on Implicitly Defined Latent ManifoldsFlorine Hartwig, Josua Sassen, Juliane Braunsmann, Martin Rumpf et al.ICML 2026 · 1 citation
- Score-based Pullback Riemannian Geometry: Extracting the Data Manifold Geometry using Anisotropic FlowsWillem Diepeveen, Georgios Batzolis, Zakhar Shumaylov, Carola-Bibiane SchönliebICML 2025
Builds on2
- Score-Based Generative Modeling through Stochastic Differential EquationsYang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar et al.ICLR 2021 · 1,270 citations
- Exact computation of a manifold metric, via Lipschitz Embeddings and Shortest Paths on a GraphTimothy Chu, Gary L. Miller, Donald R. SheehySODA 2020 · 8 citations
Related papers
- Follow the Energy, Find the Path: Riemannian Metrics from Energy-Based ModelsLouis Béthune, David Vigouroux, Yilun Du, Rufin VanRullen et al.NeurIPS 2025 · 8 citations
- Denoising Normalizing FlowChristian Horvat, Jean-Pascal PfisterNeurIPS 2021 · 39 citations
- SoftFlow: Probabilistic Framework for Normalizing Flow on ManifoldsHyeongju Kim, Hyeonseung Lee, Woo Hyun Kang, Joun Yeop Lee et al.NeurIPS 2020 · 149 citations
- Tractable Density Estimation on Learned Manifolds with Conformal Embedding FlowsBrendan Leigh Ross, Jesse C. CresswellNeurIPS 2021 · 39 citations
- Flow Matching on General GeometriesRicky T. Q. Chen, Yaron LipmanICLR 2024 · 193 citations
