# Ultrametric Fitting by Gradient Descent

arXiv: https://arxiv.org/abs/1905.10566 · HTML: https://mlsanity.com/paper/1905.10566/

## Key facts

- Cited by 12 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 25 May 2019.

## Built on by (most cited first, 12 of 12)

- [Entity Linking and Discovery via Arborescence-based Supervised Clustering](https://mlsanity.com/paper/2109.01242/) (2021)
- [Contrastive Multi-view Hyperbolic Hierarchical Clustering](https://mlsanity.com/paper/2205.02618/) (2022)
- [Tree-Wasserstein Distance for High Dimensional Data with a Latent Feature Hierarchy](https://mlsanity.com/paper/2410.21107/) (2024)
- [Learning with the p-adics](https://mlsanity.com/paper/2512.22692/) (2025)
- [HyperAid: Denoising in hyperbolic spaces for tree-fitting and hierarchical clustering](https://mlsanity.com/paper/2205.09721/) (2022)
- [Hyperbolic Continuous Structural Entropy for Hierarchical Clustering](https://mlsanity.com/paper/2512.00524/) (2025)
- [Component Tree Loss Function: Definition and Optimization](https://mlsanity.com/paper/2101.08063/) (2021)
- [A Novel Approach to Regularising 1NN classifier for Improved Generalization](https://mlsanity.com/paper/2402.08405/) (2024)
- [Semi-Supervised Clustering via Structural Entropy with Different Constraints](https://mlsanity.com/paper/2312.10917/) (2023)
- [On Hamming-Lipschitz Type Stability of the Subdominant (Minmax) Ultrametric: Theory and Simple Proofs](https://mlsanity.com/paper/2608.04014/) (2026)
- [Continuous Optimization for p-adic Models](https://mlsanity.com/paper/2609.25501/) (2026)
- [Playing with Kruskal: algorithms for flat and hierarchical watershed cuts](https://mlsanity.com/paper/2610.10012/) (2026)

## Abstract (arXiv)

We study the problem of fitting an ultrametric distance to a dissimilarity graph in the context of hierarchical cluster analysis. Standard hierarchical clustering methods are specified procedurally, rather than in terms of the cost function to be optimized. We aim to overcome this limitation by presenting a general optimization framework for ultrametric fitting. Our approach consists of modeling the latter as a constrained optimization problem over the continuous space of ultrametrics. So doing, we can leverage the simple, yet effective, idea of replacing the ultrametric constraint with a min-max operation injected directly into the cost function. The proposed reformulation leads to an unconstrained optimization problem that can be efficiently solved by gradient descent methods. The flexibility of our framework allows us to investigate several cost functions, following the classic paradigm of combining a data fidelity term with a regularization. While we provide no theoretical guarantee to find the global optimum, the numerical results obtained over a number of synthetic and real datasets demonstrate the good performance of our approach with respect to state-of-the-art agglomerative algorithms. This makes us believe that the proposed framework sheds new light on the way to design a new generation of hierarchical clustering methods. Our code is made publicly available at urlhttps://github.com/PerretB/ultrametric-fitting.
