Clustering
Grouping items by similarity without pre-specifying what the groups should be. An unsupervised view of the corpus.
Last updated
On this page
Grouping items by similarity without pre-specifying what the groups should be. Unlike classification — which learns known labels from examples — clustering is an unsupervised view of the corpus: the algorithm surfaces structure that was not asked for.
Why it matters for your research
Clustering is the right tool for the “what is even in this corpus?” question. It surfaces themes, subgenres, and noise. Because it is unsupervised, every cluster needs a human read — the algorithm doesn’t know what the clusters mean.
In Archēglyph
Via HDBSCAN on embeddings, presented text-first rather than as a scatterplot. See Reading clusters as a researcher.
Not to be confused with
Topic modelling is a form of clustering that specifically produces word-list-labelled topics; plain clustering may or may not.
Why the algorithm choice matters
K-means forces every point into exactly one of k clusters and needs k fixed in advance — awkward for a corpus where you genuinely don’t know how many themes it holds. Density-based methods like HDBSCAN instead grow clusters from dense regions of the embedding space and are willing to leave sparse points unassigned as noise rather than forcing them into a nearby group they don’t really belong to. For an archival corpus — which typically has a long tail of one-off documents alongside a few dense recurring themes — that willingness to say “this one doesn’t fit anywhere” is usually more useful than a forced assignment.
Reading a cluster, not just plotting it
A scatterplot of clustered points answers “how many groups, and how separated are they” but not “what is this group actually about.” The more useful artefact is a sample of the actual passages assigned to each cluster, read in order of how close they sit to the cluster’s centre — the centre-most passages are usually the clearest statement of what the cluster is about, and the edge passages show where it starts to blur into a neighbouring theme.
Noise is a finding, not a failure
HDBSCAN’s willingness to leave points unlabelled means a run typically reports some fraction of a corpus as “noise” — passages too dissimilar to their neighbours to join any dense group. Treating that fraction as a bug to eliminate by forcing every point into a cluster (the way k-means would) throws away real information: a high noise fraction can mean the corpus is genuinely heterogeneous, or that the embedding model isn’t a good fit for the language or genre, both of which are worth knowing before trusting the clusters that did form.
How clusters get used downstream
Once formed, clusters become the unit that other analyses build on: a co-occurrence graph can be scoped to one cluster instead of the whole corpus, and a dataset’s technique note records which embedding model and clustering parameters produced the current grouping, so a researcher citing “cluster 14” can say precisely which run of which model produced it.
Clusters change when the pipeline re-runs
Re-embedding a dataset with a different model, or re-clustering with different parameters, can reshuffle cluster membership entirely — cluster 14 in one run has no guaranteed relationship to cluster 14 in the next. This is why a cited cluster needs a version reference, not just a number: the versioning system exists precisely so a citation to “cluster 14, version 3” stays checkable even after the dataset owner re-runs the pipeline with a newer embedding model.
A cluster is a hypothesis, not a fact
Two different embedding models can produce meaningfully different clusters from the same corpus, and neither is simply “more correct” — they encode different notions of similarity. Presenting clusters as suggestions to read and judge, rather than as ground truth about what the corpus contains, is the posture the text-first browser is built around: the algorithm proposes a grouping, the researcher decides whether it means anything.