Robust Hierarchical Clustering

Statistics
Introduced by
Kaufman & Rousseeuw (building on Ward, 1963 and others)
Year
1990
Type
Robust unsupervised clustering
Family
Multivariate analysis

What does it do?

Robust hierarchical clustering applies agglomerative hierarchical clustering with outlier-resistant distances and, where appropriate, robust linkage rules.

The aim is to keep anomalous observations from distorting the dendrogram and the resulting cluster structure.

The intuition behind the method

Standard hierarchical clustering builds a dendrogram by repeatedly merging the two closest groups. Closeness is usually measured with distances that depend on the sample mean and covariance matrix, and a few outliers can shift these estimates enough that one extreme point appears to bridge two genuinely separate clusters. Robust hierarchical clustering replaces these estimates with outlier-resistant ones, such as those from the minimum covariance determinant (MCD) estimator, and may use linkage rules that are less affected by a single extreme pair. The dendrogram then reflects the grouping in the bulk of the data more closely than the influence of anomalous cases.

History

Hierarchical clustering methods, such as Ward's minimum-variance method (1963), predate robust variants. Kaufman and Rousseeuw's 1990 book, Finding Groups in Data, is a standard introduction to cluster analysis. Robust clustering was later surveyed by Garcia-Escudero and colleagues (2010), in a review of robust clustering methods. The MCD estimator, a widely used robust covariance estimator, underlies many of the robust distance measures used in this setting.

When to use it

Use robust hierarchical clustering when multivariate data may contain outliers, measurement errors or heavy-tailed variation that could distort classical hierarchical clustering. It suits exploratory work in which the number of clusters is unknown and a dendrogram is wanted alongside a partition. The method is designed for continuous variables; for mixed data types, the distance has to be redefined, and robust versions of such distances are a separate choice that needs checking. Do not use it when the data are clean and close to Gaussian, where classical hierarchical clustering is adequate and simpler. For large samples, on the order of a few thousand observations or more, agglomerative algorithms become expensive in memory and time, and partitioning methods such as robust k-means or CLARA are usually more practical. It is also not a confirmatory test of a pre-specified cluster structure; a model-based approach such as robust mixture modeling is better suited to that purpose.

Limitations and considerations

  • Agglomerative algorithms have O(n^2) time and memory cost, which makes them impractical for very large datasets.
  • The MCD scatter estimate needs substantially more observations than variables (n much larger than p); when p is large relative to n, the robust distances become unreliable.
  • Merges are irreversible, so an early erroneous merge propagates through the rest of the dendrogram.
  • Results depend on the linkage criterion, and no single linkage is optimal across cluster shapes.
  • Robustness has a limit: if the contamination exceeds the breakdown level of the scatter estimator, the robust distances can be corrupted as well.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Produces a full dendrogram of the merge history, which helps in judging how many clusters there are and how they nest.
  • Robust distances based on MCD-type scatter estimates reduce the influence of outliers and leverage points on the distances used for merging.
  • The number of clusters need not be fixed in advance; the cut can be chosen after inspecting the dendrogram.
  • Isolated outliers tend to appear as late-joining singletons at large heights, giving a visual check, though not proof, of contamination.
  • The linkage criterion can be matched to the expected cluster shape, with average linkage generally preferred over single linkage because of chaining.

Applications

  • Genomics and bioinformatics, where gene expression or proteomic profiles often contain outlying samples from experimental artifacts.
  • Customer segmentation in marketing analytics when transaction data include anomalous records from data entry errors.
  • Medical and clinical research, grouping patients by multivariate biomarker profiles that may include extreme measurements.
  • Environmental monitoring, clustering monitoring stations by pollution profiles in the presence of sensor malfunctions.
  • Social science survey research, identifying respondent typologies when careless or random responders contaminate the data.

How it works

How it works

1

The first step is computing inter-observation distances whose scaling is not dominated by outliers. A common choice is a Mahalanobis-type distance that uses a robust scatter matrix, typically from the MCD estimator. The MCD searches for a subset of h observations, where h is a user-chosen subset size, typically more than half the sample, whose covariance matrix has the smallest determinant. Because the scatter is estimated from this subset, outliers and leverage points have less influence on the distances than they would with the classical sample covariance.

Formula
d_{rob}(x_i, x_j) = \text{robust distance (e.g., based on MCD covariance estimator)}
2

With robust distances in hand, a linkage criterion determines how the distance between two clusters is computed from pairwise distances between their members. Single linkage uses the smallest pairwise distance and tends to produce elongated, chained clusters, in which groups grow by adding one observation at a time. Average linkage (UPGMA) averages over all member pairs, so a single extreme pair has limited effect, and it suits roughly spherical clusters of similar spread. Complete linkage uses the maximum pairwise distance, which favours compact clusters, but an outlier can directly inflate the inter-cluster distance, so complete linkage is sensitive to outliers. Trimmed-linkage variants, which discard the most extreme pairwise distances, are one way to reduce this effect; their exact rule depends on the implementation and should be checked in the software used. The cophenetic correlation, and how stable the partition remains across linkages, can help compare candidate choices.

3

Agglomerative clustering proceeds bottom-up: each observation starts as its own cluster. At each step the two clusters with the smallest robust inter-cluster distance are merged, until all observations belong to one cluster. Isolated, distant outliers usually have large distances to every other point, so under average or complete linkage they tend to join late and at large heights. A small outlying group, however, can merge early and form its own cluster, so late joining is not proof that a point is contaminated.

4

The full merge history is shown as a dendrogram, a tree whose branch heights give the distance at which clusters were joined. Genuine clusters often appear as branches that join at large heights relative to the merges within them. Outliers often appear as singleton branches that join late, which can serve as a visual check for contamination, although a late singleton is not proof that the point is an error.

5

A flat partition is obtained by cutting the dendrogram at a chosen height, giving k clusters. The cut can be guided by large jumps in merge height, by the gap statistic, by silhouette widths computed on the robust distances, or by subject-matter knowledge. Robust distances reduce the influence of contaminated observations on the merge order, but the chosen cut still determines the final partition and should be checked for stability.

Common pitfalls

  • Using distances based on the classical mean and covariance (for example Mahalanobis distance with the sample covariance) defeats the purpose of robust clustering; check that a robust location and scatter estimate is used, or that the variables are robustly scaled if Euclidean distance is chosen.
  • Choosing the number of clusters from visual inspection of the dendrogram alone, without checking quantitative criteria such as silhouette widths or the gap statistic, can give unstable partitions.
  • Ignoring the breakdown point of the chosen estimator: the MCD subset size h trades robustness against efficiency, and the amount of contamination the estimator can tolerate depends on h, so the choice of h should be reported and checked against the expected contamination level.
  • Applying agglomerative clustering directly to very large samples without subsampling or switching to a partitioning method such as robust k-means or CLARA leads to prohibitive computation.

Frequently asked questions

How does robust hierarchical clustering differ from classical hierarchical clustering?

Classical hierarchical clustering computes distances from the sample mean and covariance matrix, which are sensitive to outliers. Robust hierarchical clustering replaces these with outlier-resistant estimates, most commonly from the Minimum Covariance Determinant estimator, and may also use linkage criteria less affected by extreme pairwise distances. This limits the influence that a small number of anomalous observations can have on the cluster solution.

Which linkage method should I use with robust distances?

Average linkage (UPGMA) is often preferred to single linkage, which is prone to chaining, where clusters elongate by adding one observation at a time. Complete linkage uses the maximum pairwise distance, so outliers can inflate it directly. When outliers are a major concern, trimmed-linkage variants that ignore the most extreme pairwise distances between clusters are an additional option, although their exact rule depends on the implementation and should be checked on the data at hand.

Can robust hierarchical clustering handle mixed data types?

The method is designed for continuous variables. Mixed data require a distance suited to mixed types, and a robust version of such a distance is a separate methodological choice that must be validated. For mixed data, robust model-based clustering may be a more principled alternative.

What sample size do I need?

MCD-based robust distance estimation needs substantially more observations than variables (n much larger than p). If the number of variables is large relative to the number of observations, reduce dimensionality first or use a regularised robust covariance estimator, and check that the estimates are stable.

How do I determine the number of clusters?

Inspect the dendrogram for large jumps in merge height, which can suggest natural cluster boundaries. Complement this with quantitative criteria computed on the robust distances, such as the silhouette coefficient, the gap statistic or the Calinski-Harabasz index. Agreement across several criteria gives more support to the chosen solution than any single criterion.

Related methods

Sources

  1. Kaufman, L. & Rousseeuw, P. J. (1990). Finding Groups in Data: An Introduction to Cluster Analysis. Wiley.

    ISBN: 978-0471878766
  2. Garcia-Escudero, L. A., Gordaliza, A., Matran, C. & Mayo-Iscar, A. (2010). A review of robust clustering methods. Advances in Data Analysis and Classification, 4(2–3), 89–109.

    Open DOI reference