Semi-supervised HDBSCAN
Semi-supervised Hierarchical Density-Based Spatial Clustering of Applications with Noise · Also known as: Constrained HDBSCAN, Semi-supervised hierarchical density clustering, HDBSCAN with partial labels, SS-HDBSCAN
Semi-supervised HDBSCAN extends the Hierarchical Density-Based Spatial Clustering of Applications with Noise (HDBSCAN) algorithm by incorporating partial supervision — such as must-link and cannot-link pairwise constraints or a small set of labeled examples — to guide the density-based cluster hierarchy toward cluster assignments that are consistent with available domain knowledge.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Choose semi-supervised HDBSCAN when you have unlabeled or mostly unlabeled data with natural density-based cluster structure, and you also hold a small number of pairwise constraints or labeled instances that encode meaningful domain knowledge. It excels when the number of clusters is unknown, clusters vary in density or shape, and some noise or outliers are expected. Avoid it when most data points are labeled (use a supervised classifier instead), when the dataset is very small (fewer than about 100 observations, where density estimates are unreliable), or when the feature space is very high-dimensional without prior dimensionality reduction, as density estimates degrade in high dimensions.
Strengths & limitations
- Discovers clusters of varying density and arbitrary shape without requiring the number of clusters to be specified in advance.
- Naturally identifies and isolates noise points rather than forcing all observations into a cluster.
- Partial supervision steers the solution toward domain-relevant groupings without requiring full annotation.
- Inherits HDBSCAN's robustness: cluster extraction is based on cluster persistence rather than a fixed epsilon threshold.
- Scales reasonably to medium-sized datasets and is available in mature open-source libraries (hdbscan Python package).
- Combines well with dimensionality reduction steps such as UMAP before clustering.
- Density estimation degrades in high-dimensional feature spaces; dimensionality reduction is often necessary.
- Constraint integration methods vary across implementations and are not yet standardized, making reproducibility harder to ensure.
- Choosing the minimum cluster size hyperparameter still requires domain judgment or grid search.
- Cannot easily incorporate soft or probabilistic label information — constraints are typically hard must-link or cannot-link pairs.
Frequently asked
How do I incorporate must-link and cannot-link constraints in practice?
The most common approach modifies the mutual-reachability distance matrix before MST construction: shrink distances for must-link pairs and expand them for cannot-link pairs. Some implementations also post-process the condensed cluster tree to enforce constraints during extraction.
What if I only have a few labeled examples, not pairwise constraints?
Labeled examples can be converted to pairwise constraints: all pairs sharing the same label become must-link pairs, and all cross-label pairs become cannot-link pairs. With very few labels, apply this selectively to avoid an explosion of constraints that overwhelms the density signal.
How does this differ from plain HDBSCAN?
Plain HDBSCAN is fully unsupervised and relies entirely on the data's density structure. Semi-supervised HDBSCAN biases the hierarchy using domain knowledge so the extracted clusters are more consistent with known groupings, at the cost of some additional hyperparameter choices around constraint weighting.
What evaluation metric should I use?
Evaluate against the labeled subset using adjusted Rand index (ARI) or normalized mutual information (NMI). Also inspect the proportion of points labeled as noise and check that known must-link pairs are indeed co-clustered.
Does semi-supervised HDBSCAN work in high dimensions?
Not reliably without preprocessing. Apply UMAP or PCA to reduce dimensionality to a manageable range (typically 10–50 dimensions) before running density-based clustering, as mutual-reachability distances become uninformative in very high-dimensional spaces.
Sources
- McInnes, L., Healy, J., & Astels, S. (2017). hdbscan: Hierarchical density based clustering. Journal of Open Source Software, 2(11), 205. DOI: 10.21105/joss.00205 ↗
- HDBSCAN. Wikipedia. link ↗
How to cite this page
ScholarGate. (2026, June 3). Semi-supervised Hierarchical Density-Based Spatial Clustering of Applications with Noise. ScholarGate. https://scholargate.app/en/machine-learning/semi-supervised-hdbscan
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- DBSCANMachine learning↔ compare
- HDBSCANMachine learning↔ compare
- K-meansMachine learning↔ compare
- Semi-supervised DBSCANMachine learning↔ compare
- Semi-supervised Gaussian Mixture ModelMachine learning↔ compare
- Semi-supervised K-meansMachine learning↔ compare