Notes

Single Linkage

Imagine building clusters by tying together the two closest things you can find, then repeating that process step by step. Single linkage is the rule that says two clusters are considered close if any one point in the first cluster is close to any one point in the second.

How it works

In agglomerative hierarchical clustering, every data point starts as its own cluster. The algorithm repeatedly merges the two clusters with the smallest distance between them. With single linkage, that cluster-to-cluster distance is the minimum pairwise distance across the two groups. This creates a hierarchy of merges, usually shown as a dendrogram. If you cut the dendrogram at a chosen height, you get the final clusters.

Why it behaves differently

Single linkage is good at finding long, irregular, chain-like shapes that methods like k-means miss. A classic example is grouping geographic points along a winding river or road. But it also has a famous weakness: the chaining effect. If a few points form a bridge between two dense groups, single linkage can merge them into one large cluster even when a person would see two separate groups. In customer data, a handful of “in-between” customers can accidentally connect distinct segments.

Why it matters in practice

The linkage choice changes the meaning of “cluster.” Single linkage emphasizes connectivity rather than compactness. That matters in anomaly detection, document grouping, and image analysis, where structure can be stretched or non-spherical. In Python, you will see it in scipy.cluster.hierarchy.linkage(method="single") or sklearn.cluster.AgglomerativeClustering(linkage="single"). Ignore the linkage criterion, and you can end up answering the wrong question with the right algorithm.

Single linkage is a hierarchical clustering criterion that defines the distance between two clusters as the smallest distance between any pair of points, one from each cluster. It merges clusters connected by their nearest neighbors, producing elongated, chain-like groupings. Single linkage matters because it can recover irregularly shaped clusters and underlies connectivity-based views of structure, but it is highly sensitive to noise and bridging points that can incorrectly join distinct groups.

Single Linkage is like grouping people at a party by saying two groups should join if even just one person in each group knows each other. It only takes the closest connection to tie groups together.

In AI, this is a way of building clusters — groups of similar things — from unlabeled data. It matters because it can discover long, chain-like patterns that other grouping methods might miss, like towns connected along a river or related photos linked through small visual similarities. The trade-off is that it can sometimes connect things too easily, creating one big stretched-out group just because of a few close “bridges” between otherwise different items.