Foundations to Frontier
Tests

Divisive Hierarchical Clustering (DIANA)

Divisive clustering builds the hierarchy top-down: start with everything in one cluster and recursively split. Trying every possible bipartition is hopeless (2ⁿ⁻¹ − 1 of them), so DIANA (DIvisive ANAlysis; Kaufman and Rousseeuw) uses a greedy 'splinter group' heuristic. It splits the cluster with the largest diameter, seeds the splinter with the point most dissimilar on average to the rest, and moves over every point that is on average closer to the splinter than to the remainder. It needs only a dissimilarity matrix, decides the coarse structure first, and complements agglomerative methods, which decide the fine structure first. This page covers the algorithm, its cost, how it differs from bisecting k-means and from agglomerative methods, and its sensitivity to outliers through the diameter rule. In the exercises you implement DIANA; then you compare it with bisecting k-means and agglomerative linkages on nested clusters with and without noise.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Split from the top

Agglomerative clustering builds the tree from the leaves up. Divisive clustering starts at the root: everything in one group, then split, then split the pieces. DIANA splits a group like a team falling out:

  1. The member who disagrees most with everyone else walks out and starts a splinter group.
  2. Anyone who, on average, is closer to the splinter group than to those who stayed follows them.
  3. Repeat on the group with the widest spread.
DIANA: split off the most dissimilar points
  1. split a cluster of diameter 21.3 into 60 (splinter) + 60
  2. split a cluster of diameter 9.7 into 30 (splinter) + 30
  3. split a cluster of diameter 8.5 into 31 (splinter) + 29
Without noise, the first split separates the two far-apart super-groups and the next two splits separate their halves: top-down, coarse structure first. Add scattered noise points and the largest-diameter cluster is often just the one stretched by an outlier. DIANA then spends splits peeling off a few noise points as tiny splinters, which is why it degraded with noise in exercise 2.
Why engineers care

When the big picture matters most (two families of failure modes, three mission phases), top-down splitting decides the coarse structure first. Agglomerative methods get it from a long chain of small local merges. DIANA needs only pairwise dissimilarities, so it works for sequences, spectra or anything with a distance.

📝 Quick check (Level 0)
0/3 answered
  1. 1. DIANA starts with…
  2. 2. The splinter group starts with…
  3. 3. Which cluster does DIANA split next?

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

A split by hand

Points 0, 1, 9, 10 on a line, all in one cluster (diameter 10).

  1. Average dissimilarities to the others. Point 0: (1 + 9 + 10)/3 = 6.67. Point 1: (1 + 8 + 9)/3 = 6. Point 9: (9 + 8 + 1)/3 = 6. Point 10: (10 + 9 + 1)/3 = 6.67. A tie: pick 0 or 10. Say 10 starts the splinter.
  2. Should 9 move? Its mean distance to the rest (0 and 1) is (9 + 8)/2 = 8.5. Its distance to the splinter (10) is 1. The gain is 8.5 − 1 = 7.5 > 0, so it moves.
  3. Should 1 move? Its mean distance to the rest (0, excluding itself) is 1. Its mean distance to the splinter (9, 10) is 8.5. The gain is negative, so it stays. The split is (0, 1) | (9, 10).

Why not try every split? A cluster of n points has 2ⁿ⁻¹ − 1 bipartitions: for n = 20 that is 524 287, and for n = 60 about 5.8 × 10¹⁷.

Diameter. The diameter is the largest dissimilarity inside a cluster. For (0, 1, 4) it is 4.

The steps in plain English:

  1. Put all points in one cluster.
  2. Pick the cluster with the largest diameter.
  3. Seed a splinter group with its point of largest average dissimilarity. Repeatedly move the point with the largest positive gain (mean distance to the remainder minus mean distance to the splinter) until no gain is positive.
  4. Repeat 2–3 until there are k clusters, or every point is alone, for the full tree.
📝 Quick check (Level 1)
0/3 answered
  1. 1. Diameter of the cluster (0, 1, 4, 10)?
  2. 2. Bipartitions of 5 points?
  3. 3. A point moves to the splinter group when its gain is…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 30 minUndergraduate students and practising engineers.

Top-down versus bottom-up

What DIANA decides first. The first split separates the most dissimilar parts of the data. Agglomerative methods make their first decisions about nearest neighbours, and the top of their tree is the result of many small merges. Errors made early propagate upward. So, in principle, divisive methods should be better at coarse levels and agglomerative ones at fine levels. In practice (exercise 2) the coarse split was easy for every method. The differences appeared at the finer level.

DIANA versus bisecting k-means. Both are divisive. Bisecting k-means splits with 2-means, needs vector data and uses squared Euclidean geometry. DIANA uses the splinter heuristic on any dissimilarity matrix. Without noise they performed the same in exercise 2 (ARI 0.79 at the fine level).

The diameter rule is fragile. A cluster’s diameter is set by its two most extreme points, so a single outlier makes a compact cluster look like the one most in need of splitting. DIANA then spends splits shaving off noise points. With 12 scattered noise points, its fine-level ARI dropped from 0.79 to 0.57, while bisecting k-means (largest-SSE rule) stayed at 0.77. Using average dissimilarity, or the SSE, instead of the diameter, or removing outliers first, makes it more robust.

Cost. Each split builds the splinter group in O(m²) work per moved point (or O(m²) total with running sums), so the full hierarchy costs O(n³) in the worst case, plus O(n²) memory. It is usually run only to a moderate k.

# DIANA is in R's cluster package: cluster::diana(D). In Python, a few lines (exercise 1) with a distance matrix:
D = scipy.spatial.distance.squareform(scipy.spatial.distance.pdist(X))
labels, heights = diana(D, k=4)
🐍 Exercise 1: DIANA
Implement the splinter-group split (seed by largest average dissimilarity; move points with positive gain) and the DIANA loop that splits the largest-diameter cluster; recover three blobs and check the split heights decrease.
📝 Quick check (Level 2)
0/3 answered
  1. 1. DIANA needs as input only…
  2. 2. Why is the diameter rule fragile?
  3. 3. Bisecting k-means differs from DIANA by…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Monotone heights. A sub-cluster’s diameter can’t exceed its parent’s, so DIANA’s split heights (diameters) are non-increasing down the tree, and the hierarchy can be drawn as a proper dendrogram. The divisive coefficient summarises how strong the clustering structure is. For each point, take the diameter of the last cluster it belonged to before being split off alone, divided by the full diameter. The coefficient is the average of 1 minus that ratio.

Optimal splits are hard. The best 2-way split of a cluster under most criteria, such as minimum maximum diameter or minimum within-cluster sum, is itself a hard combinatorial problem in general. That is why DIANA is greedy, and why bisecting methods use 2-means or a principal direction (Boley’s PDDP).

Agglomerative and divisive are not mirror images. Running a divisive method does not reproduce an agglomerative tree in reverse. Each gets different levels right. Some practitioners compare both and keep the hierarchy whose top levels are more stable under resampling.

Interview questions.

  • When would you prefer divisive clustering? When you mostly need the top few levels, when you have a dissimilarity matrix but no vectors, or when you want coarse decisions made with global information.
  • How would you make DIANA robust to outliers? Choose the cluster to split by average dissimilarity or SSE rather than diameter, use a minimum cluster size, or trim outliers first.
📝 Quick check (Level 3)
0/3 answered
  1. 1. DIANA's split heights down the tree are…
  2. 2. PDDP splits a cluster along…
  3. 3. A divisive tree is the agglomerative tree reversed?

Level 4: Expert

★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.

Does top-down beat bottom-up?

History.

  • P. Macnaughton-Smith et al. (1964) proposed the splinter-group divisive procedure.
  • L. Kaufman and P. Rousseeuw named and popularised it as DIANA (1990), with the R implementation cluster::diana.
  • D. Boley (1998) proposed PDDP, which splits along principal directions.

Exercise 2. Two super-groups far apart, each made of two overlapping sub-groups (standard deviation 1.2, 3.2 apart), plus 0, 12 or 25 uniformly scattered noise points; 5 datasets each. Cells show ARI on the real points at k = 2 (super-groups) and at k = 4 (sub-groups).

noise points DIANA bisecting k-means average linkage Ward linkage
0 1.000, 0.790 1.000, 0.793 1.000, 0.549 1.000, 0.720
12 1.000, 0.567 1.000, 0.769 1.000, 0.493 1.000, 0.754
25 1.000, 0.541 1.000, 0.736 0.985, 0.493 0.995, 0.723
  • The coarse level was easy for everyone. The expected top-down advantage at coarse levels did not appear, because the super-groups were far apart.
  • Without noise, both divisive methods won the fine level (0.79 against 0.72 for Ward and 0.55 for average linkage).
  • With noise, DIANA lost that edge. It fell to 0.54–0.57 because its largest-diameter rule chased outliers. Bisecting k-means, with its largest-SSE rule, held up best.
🐍 Exercise 2 (research): divisive versus agglomerative under noise
On nested data (2 super-groups × 2 sub-groups) with 0, 12 and 25 scattered noise points, compare DIANA, bisecting k-means, average and Ward linkage by ARI on the real points at k = 2 and k = 4.

Divisive clustering in AI, robotics and aerospace

  • Top-level fault taxonomy from a dissimilarity between fault signatures: split into broad families first.
  • Mission segmentation: splitting long telemetry recordings into phases, then sub-phases.
  • Gene and spectral data with custom dissimilarities, where only a distance matrix is available.

References

  1. L. Kaufman, P. J. Rousseeuw (1990). Finding Groups in Data, chapter 6: “Divisive Analysis (Program DIANA).” Wiley.
  2. P. Macnaughton-Smith, W. T. Williams, M. B. Dale, L. G. Mockett (1964). “Dissimilarity analysis: a new technique of hierarchical sub-division.” Nature 202.
  3. D. Boley (1998). “Principal direction divisive partitioning.” Data Mining and Knowledge Discovery 2(4).
  4. M. Maechler et al. “cluster: Cluster Analysis Basics and Extensions.” R package documentation (diana).
  5. S. M. Savaresi, D. L. Boley (2004). “A comparative analysis on the bisecting K-means and the PDDP clustering algorithms.” Intelligent Data Analysis 8(4).