Hierarchical clustering with maximum density paths and mixture models

Martin Ritzert, Polina Turishcheva, Laura Hansel, Paul Wollenhaupt, Marissa A. Weis, Alexander S. Ecker

TL;DR

The authors introduce t-NEB, a probabilistically grounded hierarchical clustering method designed specifically for complex, high-dimensional data. By combining Student’s $t$ mixture models for density estimation with a physics-inspired path optimization algorithm, t-NEB successfully uncovers nested data structures and handles overlapping clusters without requiring distortive dimensionality reduction.

What Problem Does This Paper Address?

Hierarchical clustering is a cornerstone of exploratory data analysis, offering a multi-scale view of data that is invaluable when the true number of clusters is unknown (e.g., identifying cell types and subtypes in biology). However, high-dimensional data poses severe challenges:

  1. Vanishing Density Gaps: Clusters in high-dimensional spaces often partially overlap or "touch," lacking clear empty spaces between them.
  2. Algorithmic Failure: Traditional density-based methods (like HDBSCAN) easily merge distinct clusters if they share even a faint bridge of points. Distance-based methods or those relying on dip-statistics degrade rapidly as dimensionality increases.
  3. The Dimensionality Reduction Trap: Researchers frequently apply t-SNE or UMAP before clustering, but these techniques distort inter-point distances, making subsequent cluster interpretations conceptually problematic.

The authors address these gaps by proposing an "overcluster-then-merge" paradigm that relies on a single, unified parametric density model to both define initial subclusters and guide the hierarchical merging process.

Methods

The t-NEB framework operates in three distinct phases:

  1. Density Estimation via Overclustering: The algorithm fits a Student’s $t$ mixture model (TMM) to the data with a large number of components ($m$), intentionally overclustering the data to map out a fine-grained density landscape.
  2. Distance Computation via Nudged Elastic Band (NEB): To determine how "close" two subclusters are, the algorithm finds the path of maximum density connecting their centers. It borrows the Nudged Elastic Band (NEB) algorithm—a technique from physics used to find minimum energy pathways—to shift a path toward high-density regions via gradient descent. The "distance" between two clusters is defined as the lowest density value along this optimized path (the highest "mountain pass" or valley floor between two peaks).
  3. Hierarchy Construction: Using these NEB-derived distances, t-NEB constructs a Minimum Spanning Tree (MST) and iteratively merges clusters bottom-up. Crucially, cluster centers are never recomputed and points are never reassigned during this phase, ensuring a mathematically consistent hierarchy at every level of granularity.
Figure 1: Overview of t-NEB clustering procedure. A: Illustrative toy dataset with hierarchical density model consisting of six Gaussians. Shading: probability density. Points: samples. B: Overclustering using a Student’s t mixture model with 15 components. Centers are marked by ‘x’ and colors indicate overclustered assignments. Lines are maximum density paths, width indicating the minimum density on the path which we use as similarity for cluster merging. C: We iteratively merge clusters starting with the minimum density as threshold. Merges are solely based on the initial overclustered partition, resuling in consistent clusterings at any level of granularity. At both three and six the threshold jumps, indicating meaningful clusterings. D: Dendrogram of the hierarchical merging procedure. The thresholds from C leading to three or six clusters are clearly visible, showing that the algorithm has taken up on the hierarchical nature of the dataset.

Datasets

The authors evaluated t-NEB against a wide array of synthetic and real-world benchmarks across multiple dimensions (8D, 16D, 32D, and 64D):

  • 2D Toy Datasets: Standard checks like noisy circles, moons, and anisotropic blobs.
  • Densired ('circles' and 'Student-t'): High-dimensional synthetic datasets where clusters are density-connected along a random-walk skeleton. The 'Student-t' variant features heavy tails and significant cluster overlap.
  • MNIST-Nd: A naturalistic benchmark consisting of mixture-VAE deep learning embeddings of the MNIST handwritten digit dataset.
  • Tasic Transcriptomic Dataset: A real-world single-cell RNA-seq dataset containing 20,502 cells and 75 fine-grained cortical cell types, processed into 50 dimensions.
  • UniForCE Benchmarks: Standard datasets including Optdigits, Pendigits, EMNIST, Waveform-v1, and Mice Protein Expression.

Key Insights and Ideas

  • The Power of the Unified Model: Most overcluster-then-merge methods use independent algorithms for each step (e.g., $k$-means followed by a dip-test). t-NEB’s use of a single density model for both steps provides a rigorous, probabilistically consistent foundation.
  • Why Student’s $t$ Beats Gaussian: Real-world data is noisy and full of outliers. By utilizing a Student’s $t$ distribution (which features heavier tails than a Gaussian), t-NEB is significantly less susceptible to noise-induced cluster bridging in high dimensions.
  • Physics Meets Machine Learning: Defining cluster similarity via the NEB path optimization allows the algorithm to trace arbitrary, non-linear cluster shapes. It accurately evaluates the density "valleys" separating modes rather than relying on straight-line Euclidean distances.

Key Results

  • State-of-the-Art Performance: Evaluated using the Adjusted Rand Index (ARI), t-NEB consistently outperformed or matched top-tier clustering algorithms (including Leiden, HDBSCAN, and Agglomerative Clustering) on noisy, high-dimensional datasets. For instance, on 32D MNIST-Nd data, t-NEB achieved an ARI of 0.79, outperforming GMMs (0.73) and completely eclipsing HDBSCAN (0.07), which failed due to lack of clear density gaps.
  • Reconstructing Biological Truth: When applied to the Tasic transcriptomic dataset, t-NEB successfully captured the known hierarchical organization of the mouse cortex, cleanly separating non-neuronal cells from neurons, and accurately splitting neurons into their broader GABAergic and Glutamatergic classes before resolving fine-grained subtypes.

Limitations and Future Work

  • The Curse of Extreme Dimensionality: While t-NEB excels up to 64 dimensions, fitting parametric mixture models directly to raw data in thousands of dimensions remains a major statistical challenge, requiring massive sample sizes for accurate density estimation.
  • Initialization Sensitivity: Because it relies on the Expectation-Maximization (EM) algorithm for initial mixture model fitting, the base clustering is sensitive to random initializations (though the authors show t-NEB is more robust than its competitors).
  • Future Directions: The authors suggest replacing the mixture model component with more flexible density estimators, such as normalizing flows, or using domain-specific distributions (like negative binomial mixtures for single-cell RNA data) to expand t-NEB's capabilities.

Summary updated

BibTeX
@misc{ritzert2025hierarchical,
  author = {Martin Ritzert and Polina Turishcheva and Laura Hansel and Paul Wollenhaupt and Marissa A. Weis and Alexander S. Ecker},
  title = {{Hierarchical clustering with maximum density paths and mixture models}},
  year = {2025},
  eprint = {2503.15582},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.15582},
}
Figure