AI Research Library

Clustering and the Politics of Distance

Clustering does not reveal groups until representation, scale, distance and resolution have already decided which differences count.

Rajesh Ranjan Mahapatra

© 2026 Rajesh Ranjan Mahapatra. 27 min read

Clustering and the Politics of Distance

Clustering does not reveal groups until representation, scale, distance and resolution have already decided which differences count.

TLDR

  1. A cluster is a consequence of a similarity contract. The same records can support several defensible partitions because representation, units, weights, metric, algorithm and resolution define different neighbourhoods.
  2. Distance turns feature differences into geometry. Scaling a variable is mathematically equivalent to changing its weight, while Euclidean, Manhattan, cosine and density notions reward different shapes and relations.
  3. Do not approve a clustering from one silhouette score or one attractive projection. Audit perturbation stability, specification disagreement and the downstream consequences of reassignment.
  4. The strongest counterexample is a set of well-separated islands. When every reasonable representation and metric agrees, the political burden shrinks, although the cluster meaning still requires an external use.
  5. The architecture decision changes from “pick an algorithm” to “govern a similarity contract”. Release the partition only with declared purpose, alternative specifications, unstable cases and a no-cluster baseline.

Two honest teams, two opposite portfolios

A bank has 126 synthetic small-business records. Each record contains annual turnover, employee count, arrears days and cash-flow volatility. The portfolio team asks for three customer groups so that service can be organised more deliberately. No labels exist. There is no target variable to predict and no supervisor who can announce the correct answer.

One team leaves the numerical columns in their source units and runs k-means. Turnover and employee count dominate the squared distances. The resulting groups are effectively small, medium and large firms. The average silhouette is high. The clusters are balanced. Repeated runs return the same answer.

A second team applies a logarithm to the size variables, standardises all four features and multiplies the standardised arrears and volatility coordinates by three. The same algorithm now returns low, medium and high financial-stress groups. Its silhouette is also respectable. Small perturbations leave the assignments unchanged. Yet its agreement with the size partition, measured by the adjusted Rand index, is approximately zero.

Neither team fabricated data. Neither misconfigured the library. Both discovered exactly the geometry they had asked the algorithm to optimise. If the clusters shape relationship coverage, pricing experiments, hardship outreach or enhanced review, the difference is operational. The decisive act occurred before optimisation, when each team encoded a view of which differences should count as large.

This is the politics of distance. “Politics” here does not mean party allegiance. It means the allocation of salience and consequence. A distance function decides which distinctions are amplified, which are normalised away, which cases become neighbours and which people or objects are treated as members of the same kind. Those decisions may be scientifically justified, operationally useful or ethically defensible. They do not become neutral because they are written as algebra.

The adjacent paper Representation Before Intelligence asks which world relations a representation preserves. This paper takes the narrower next step: once records have coordinates, what licenses the geometry used to turn coordinates into groups? The answer is a declared similarity contract, tested through competing specifications and consequence-aware stability.

Part one

Distance is a decision before it is a number

Imagine two shops separated by 600 metres on a map. For a pedestrian, the shops may be neighbours. For a delivery van, a river and a one-way system may make them twelve minutes apart. For a customer with limited mobility, the relevant distance may depend on kerbs, gradients and lifts. For a regulator examining common ownership, physical separation may be irrelevant.

The objects have not moved. What changed is the relation being measured. Straight-line distance, road-network travel time, accessible-route cost and ownership distance answer different questions. The analogy transfers directly to feature data: coordinates are observations, a metric supplies the permitted path between them, and a cluster is a region whose members are close under that path. The analogy stops where tabular features lack a literal route network. A metric may still be useful, but its meaning must be argued rather than inherited from physical space.

A general weighted distance makes the hidden choices visible:

dp,w(x,y) = (Σj=1m wj |rj(xj) - rj(yj)|p)1/p

x and y are two records; j indexes the m features; rj is the representation or scaling applied to feature j; wj is its weight; and p shapes the distance contour. Increasing a weight makes that feature separate records more strongly. Changing p changes how several moderate differences trade against one large difference.

Euclidean distance is the case p = 2 with equal weights after whatever preprocessing has already occurred. Manhattan distance uses p = 1. A Mahalanobis distance adds a matrix that rescales correlated directions, effectively measuring Euclidean distance after whitening. Cosine dissimilarity compares angle and largely ignores magnitude. Gower's coefficient combines feature-wise dissimilarities for mixed numerical and categorical data. Each answer is conditional on what the coordinates and transformations mean.

Published evidence Kleinberg's axiomatic result proves that no clustering function can simultaneously satisfy three intuitive requirements called scale invariance, richness and consistency. The theorem does not say clustering is futile. It shows that unavoidable trade-offs remain even before implementation details enter. Christian Hennig reaches a compatible practical conclusion: a “true” clustering is context- and aim-dependent, so the scientific burden is explicitness about the clustering concept being pursued.
One portfolio under size and risk geometries The same nine groups of points are divided vertically under a size-weighted geometry and horizontally under a risk-weighted geometry. Size-weighted distance Risk-weighted distance turnover and employee scale → stress ↑ turnover and employee scale → stress ↑
Figure 1. One dataset supports two stable, contradictory partitions. Synthetic conceptual view of the included 126-firm experiment. Columns are size regimes; rows are risk regimes. Colour is reinforced with distinct patterns. The generating regimes are diagnostic controls, not claims that real firms possess one hidden true label.

Scale is weight, even when nobody writes a weight

Suppose annual turnover is stored in millions of pounds while cash-flow volatility is stored as a fraction between zero and one. A raw Euclidean calculation treats a one-unit turnover difference as comparable to a one-unit volatility difference. Yet one turnover unit means one million pounds and one volatility unit spans the entire possible range. The comparison is an artefact of notation.

Now change turnover from pounds to pence without changing any firm. Distances along that axis become one hundred times larger. A supposedly invariant grouping may be overwhelmed by a clerical unit conversion. Standardisation prevents units from winning by magnitude, but it makes a different commitment: one observed standard deviation on every feature counts equally. Range scaling says an end-to-end move on every feature counts equally. Robust scaling privileges the interquartile range. Logarithms say ratios matter more than absolute differences.

Preprocessing is part of the metric, not housekeeping before the metric. The transformation rj in the equation determines whether a difference from £1 million to £2 million resembles a difference from £100 million to £101 million, or a difference from £100 million to £200 million. Neither interpretation is universally correct.

Correlated features add another quiet vote. Turnover and employee count may both encode organisational size. Equal-weight Euclidean distance can count size twice. Mahalanobis distance can reduce this duplication by using the covariance structure, but the covariance estimate is population-specific and can be unstable in high dimensions. A learned metric goes further by using labels, pairwise judgements or an objective to decide which directions matter. At that point the clustering is no longer unsupervised in the ordinary sense. Supervision has entered through similarity.

Competing metric topographies Three panels show circular Euclidean contours, diamond Manhattan contours, and tilted elliptical covariance-aware contours around the same centre. The same centre casts three neighbourhoods Euclidean, p = 2 A B many moderate differences Manhattan, p = 1 A B differences add directly Covariance-aware A B common direction discounted
Figure 2. Competing metric topographies. Illustrative unit-distance contours. The point ordering can change even when the centre and coordinates remain fixed. Mahalanobis-style ellipses are covariance-dependent; they should not be read as universally better than Euclidean or Manhattan distance.

A metric names the kind of resemblance

Euclidean distance rewards compact, roughly spherical neighbourhoods in the transformed space. Squaring means a single large difference can dominate several small ones. Manhattan distance makes coordinate-wise deviations additive and often fits sparse or independently accumulated changes better. Cosine distance groups records by direction, so a small and a large vector with the same profile may be close. Correlation distance removes level and compares shape. Dynamic time warping permits local temporal shifts. Graph shortest paths respect connectivity rather than straight lines.

Mixed data make the commitment more visible. A record may contain revenue, a risk band, a region, a yes-or-no flag and a product set. Gower's coefficient creates a feature-wise comparison and averages the available contributions. That solves a type problem, not the value problem. A categorical mismatch can still count too much or too little. A recent weighted-Gower study demonstrates that balancing numerical and categorical contributions materially changes mixed-data clustering performance in its simulations and biomedical applications. The general result is narrower: weighting design matters; it does not establish one universal weighting rule.

The ethical relevance follows from the same mechanism. Dwork and colleagues' individual-fairness framework begins with a task-specific similarity metric and the requirement that similar individuals receive similar treatment. The hard phrase is “task-specific metric”. Whoever defines similarity determines which differences are legitimate grounds for different outcomes. Clustering may sit upstream of treatment rather than make the decision directly, but a service segment, review cohort or experimental population can still transmit that choice.

Thought experiment: the duplicated vote

Hold every record and every algorithm setting fixed. The dataset contains annual turnover, employee count and arrears days. Now add a fourth column called “workforce”, copied exactly from employee count. No observation has become richer. No firm has changed. Yet equal-weight Euclidean distance now gives organisational scale an extra coordinate, so the size relation receives two votes while arrears receives one.

Standardising each column does not remove the duplication. Both copies receive unit variance and contribute separately. One-hot expansion can create a related problem when a categorical variable occupies many coordinates, while several engineered ratios can repeatedly encode the same underlying magnitude. Feature selection, principal components, whitening or a covariance-aware metric may reduce redundant voting, but each introduces another claim about what information is interchangeable.

A useful representation audit therefore tests semantic redundancy, not only numerical scale. Remove one feature from a correlated family, add a deliberately redundant proxy, or aggregate the family into one declared construct, then compare assignments. A large change does not automatically invalidate the clustering. It shows that the partition depends on how many times a relation was encoded. The team must either justify that multiplicity or redesign the representation so that coordinate count is not mistaken for evidential importance.

Practitioner synthesis: the similarity contract Before clustering, declare the unit of analysis, representation, transformation, feature weights, distance, algorithm, resolution, missing-data rule, protected or excluded attributes, intended use and consequences of membership. This contract is the clustering analogue of a model specification and an authority boundary.

Part two

The argument in one passChart · flow
flowchart LR
  A["Two honest teams, two opposite<br/>portfolios"] --> B["Distance is a decision before<br/>it is a number"]
  B --> C["Algorithms inherit the<br/>geometry they are given"]
  C --> D["Stability can expose<br/>arbitrariness, but it cannot<br/>supply purpose"]
  D -. "re-test" .-> A
  classDef first fill:#0a1424,stroke:#7B4CD8,stroke-width:2px,color:#e6f3ff
  classDef step fill:#0a1424,stroke:#3f7da0,stroke-width:1px,color:#e6f3ff
  class A first
  class B,C,D step
A structural route through Clustering and the Politics of Distance, from Two honest teams, two opposite portfolios to Source ledger. Reading use: follow the relation, then test it against the surrounding evidence and limits.

Algorithms inherit the geometry they are given

K-means is often described as though it searches for natural centres. Its actual objective is precise and narrower:

J(C, μ) = Σi=1n d(xi, μc(i))2

n is the number of records; C is a partition; c(i) assigns record i to a cluster; μ contains the cluster centres; and d is normally Euclidean distance in the transformed feature space. The algorithm seeks low within-cluster squared distance. It does not evaluate whether the features or distance express the use case.

Lloyd's iterations alternate assignment to the nearest centre and recomputation of centres. The objective decreases at each step, but the result can depend on initialisation; k-means++ improves the seeding guarantee. Neither mechanism repairs an inappropriate geometry. A well-optimised answer to a poorly specified distance remains poorly specified.

A four-point proof that units can choose the groups

Place four points at the corners of a rectangle: (0,0), (3,0), (0,4) and (3,4). Ask for two clusters. A horizontal partition forms two rows. Its total within-cluster squared error is 9. A vertical partition forms two columns. Its error is 16. K-means therefore prefers the rows.

Now multiply only the first coordinate by two. No relation in the world has changed; only the numerical scale has. The row error rises to 36 while the column error stays 16. The preferred partition flips. Scale has acted as an unannounced feature weight and rewritten the optimisation landscape.

A scale change flips the preferred k-means partition The same four points favour horizontal clusters before x is doubled and vertical clusters afterwards. One unit change, opposite optimum Original coordinates row SSE = 9 column = 16 x × 2 Same cases, rescaled x column SSE = 16 row = 36
Figure 3. Scaling one coordinate flips the k-means optimum. Exact synthetic calculation from the included artefact. Squared-error units are those of the transformed coordinate system.

Changing the algorithm changes the definition of a cluster

K-means seeks centre-based compactness and normally requires k in advance. Hierarchical methods repeatedly merge or split groups according to a linkage rule. Single linkage is governed by the closest cross-cluster pair and can chain through narrow bridges. Complete linkage is governed by the farthest pair and favours bounded diameter. Average linkage integrates all cross-cluster distances. Ward's method chooses merges that minimally increase within-cluster variance and is tied closely to Euclidean geometry.

DBSCAN introduced a density-connected notion intended to recover arbitrary shapes and identify noise. Its neighbourhood radius and minimum-points requirement define what density means. HDBSCAN replaces one fixed radius with a hierarchy across density levels, yet still requires choices such as minimum cluster size and selection method. Spectral clustering first turns similarity into a graph and then partitions the graph through its Laplacian structure. A Gaussian mixture model assumes a probabilistic family and estimates components rather than optimising the k-means objective.

These are not interchangeable solvers for one hidden object. They privilege centres, chains, diameters, density, connectivity or distributional components. Even when they return the same number of integer labels, they have answered different questions. The same applies to resolution. Choosing k = 3, cutting a dendrogram at a height, selecting an epsilon radius or extracting a level from a density hierarchy decides how much variation becomes internal diversity and how much becomes a boundary.

Resolution is often presented as a tuning parameter, yet it can encode an operating constraint. Three service teams may invite three segments; a laboratory may seek cellular subtypes at several nested levels; a fraud investigation may prefer small dense rings and leave most activity as noise. A score that selects one value of k cannot decide whether these organisational or scientific purposes are legitimate. The number of groups belongs in the similarity contract whenever it changes action, review capacity or interpretive claims. Report neighbouring resolutions and identify which cases split, merge or become noise rather than treating one selected value as a natural constant.

The clustering lens stack A cloud of observations is transformed by representation, scale, metric and resolution lenses before a partition appears. A partition appears only after four lenses representation scale metric algorithm + cut raw records coordinates neighbours clusters use
Figure 4. The clustering lens stack. Conceptual system boundary. Representation selects coordinates; scaling and metric create neighbourhoods; algorithm and resolution turn those neighbourhoods into a partition. The downstream use remains outside the optimiser and must supply the purpose.

When distance loses contrast

Distance becomes harder to interpret as dimensions accumulate. In many high-dimensional distributions, pairwise distances concentrate: the nearest and farthest neighbours of a point become less distinguishable relative to their absolute distance. Aggarwal, Hinneburg and Keim analysed how this behaviour depends on the chosen norm. Their result does not justify a slogan that Euclidean distance always fails above a fixed feature count. Distribution, sparsity, dependence and representation matter. It does justify measuring contrast rather than assuming that a familiar metric remains informative.

The included simulation draws 600 standard Gaussian points and measures the median ratio between each query's nearest and farthest Euclidean neighbour. The ratio rises from 0.020 in two dimensions to 0.770 in 200 dimensions. When the ratio approaches one, “nearest” carries less relative distinction. Clustering can then become dominated by weak aggregate effects, hubs, preprocessing and noise.

Nearest and farthest neighbours become less distinct as dimension rises A line chart rises from 0.02 in two dimensions to 0.77 in two hundred dimensions. Distance contrast contracts with dimension 25102050100200 0.00.20.40.60.8 dimensions nearest / farthest distance
Figure 5. Distance contrast contracts in a synthetic high-dimensional sample. Measured by the included artefact on 600 independent standard Gaussian points, using 60 query points per dimension. The plotted value is the median nearest-to-farthest Euclidean distance ratio. It is a diagnostic example, not a universal law for every dataset.

A practical response is not to search for a universally superior norm. Reduce irrelevant dimensions, use domain structure, examine local contrast, test alternative metrics and ask whether neighbours remain neighbours under small representational changes. For learned embeddings, compare task-relevant retrieval or intervention behaviour as well as geometric scores. The earlier paper Vectors as Directions, Not Lists develops the underlying geometry; here the operational point is that a vector space earns trust only through the relations it supports.

Part three

Stability can expose arbitrariness, but it cannot supply purpose

A natural validation rule says that genuine structure should survive small changes. Resample the records, add measurement noise, vary the random seed or retrain on a nearby period. If the assignments collapse, the partition is too fragile for consequential use. Ben-Hur, Elisseeff and Guyon turned this intuition into a resampling-based stability procedure, and later work analysed what such procedures can and cannot establish.

The intuition is valuable, with a serious boundary. Ben-David, von Luxburg and Pál showed that asymptotic stability for centre-based and spectral methods can be determined by whether the underlying objective has a unique minimiser. A stable optimum may express one algorithm's objective cleanly without identifying the right number or concept of clusters. Von Luxburg's overview similarly warns that the details of perturbation, algorithm and comparison matter.

Stability answers “does this specification repeat?”, not “is this specification justified?” The two portfolio teams illustrate the distinction. The size-weighted and risk-weighted clusterings both have median adjusted Rand stability of 1.000 under the included perturbation test. They disagree with each other almost completely. Resampling within one worldview cannot reveal the existence of another worldview.

Three axes of a serious stability audit

The proposed audit separates three forms of repeatability.

Data stability holds the similarity contract fixed and perturbs observations. Bootstrap samples, repeated measurement, plausible noise, time windows and missingness patterns test whether the partition depends on particular rows or small errors. This is the familiar form.

Specification stability holds the use case fixed and varies defensible representations, scales, metrics, algorithms and resolutions. The comparison set must be reasoned, not a random hyperparameter sweep. If two specifications are both credible for the declared purpose yet assign many cases differently, that disagreement is evidence of underdetermination.

Consequence stability asks whether those reassignments change decisions. A record may move between two descriptive clusters with no operational effect. Another may cross a threshold that changes service, review or experimentation. Consequence stability therefore weights disagreement by what membership authorises or influences.

Sdata = E[ARI(C(D, θ), C(P(D), θ))]Sspec = E[ARI(C(D, θa), C(D, θb))]

D is the dataset; θ is the similarity contract and clustering specification; P is a declared perturbation process; C returns a partition; and ARI is the adjusted Rand index. High Sdata means one specification repeats. Low Sspec means plausible specifications disagree. Consequence stability is reported separately because a pairwise partition score cannot encode business harm.

Open hypothesis For consequential clustering, specification disagreement will predict operational contestability better than bootstrap stability alone. The executable audit operationalises this proposal, but the claim requires evaluation across real domains and decision processes.

Internal scores are conditional on the same geometry

The silhouette coefficient compares a point's mean distance to its own cluster with its mean distance to the nearest other cluster:

s(i) = (b(i) - a(i)) / max(a(i), b(i))

a(i) is average within-cluster distance for point i; b(i) is its lowest average distance to another cluster. A value near one indicates compact separation under the supplied metric. Change that metric and both terms change.

Silhouette is therefore useful for detecting overlap and badly assigned points within a declared geometry. It cannot independently validate the geometry. The size partition scores 0.700 under the size-weighted space; the risk partition scores 0.630 under the risk-weighted space. Those values tell us each partition is reasonably compact by its own terms. They do not adjudicate between size and risk.

The adjusted Rand index compares two partitions by pairwise co-assignment and corrects for chance. It ignores the arbitrary names of cluster labels, making it suitable for repeated runs and specification comparisons. An ARI near one means near agreement; values around zero indicate agreement close to chance under the index's adjustment. It still has no opinion about purpose, fairness or utility.

The same five points cluster differently under Euclidean and Manhattan distance Euclidean average linkage groups A and B together, while Manhattan average linkage groups A, B and C together. Hold linkage and k fixed; change only the metric Euclidean average linkage ABCDE Manhattan average linkage ABCDE Partition agreement: ARI = 0.167
Figure 6. A metric-only intervention changes the partition. Exact synthetic result from five points A(3,1), B(4,3), C(4,8), D(9,4), E(9,6), using average-linkage agglomeration and two clusters. Only the distance metric changes.

The negative control: three islands that everybody sees

A strong causal argument needs a case in which the preferred explanation becomes unnecessary. Generate three tight, widely separated two-dimensional clouds. Cluster them with Euclidean and Manhattan average linkage, then double one coordinate. In the included positive control, all three partitions agree perfectly: the minimum pairwise ARI is 1.000.

Here, reasonable metric changes do not alter membership. The data contain a separation margin large enough to dominate the tested choices. This is the best boundary for the paper's claim. It would be wrong to say every cluster is arbitrary in practice. Metric politics matters most near plausible boundaries, under competing operational concepts and in high-dimensional or mixed representations.

Even the islands do not explain themselves. They may be species, manufacturing states, fraud rings, sensor modes or sampling batches. Geometry can make a partition robust while leaving its interpretation open. External evidence must connect the partition to mechanism, use or consequence.

Failure surface for distance politics A two-axis map shows metric sensitivity rising as separation falls and purpose disagreement rises. Where the metric audit earns its cost three islands exploratory segments consequential boundary cases clear separation ← geometry → overlap one purpose → competing purposes
Figure 7. The audit is most valuable where separation is weak and purposes compete. Illustrative failure surface, not measured data. The dashed curve is a decision boundary for review intensity, not a universal threshold.

An explicit failure boundary

The audit assumes a partition remains a useful object. It ceases to help when cases legitimately possess multiple memberships, evolve along trajectories, form a continuum without stable gaps or require relational communities that cannot be represented by independent rows. A customer may be both digitally intensive and financially stressed. A biological specimen may sit between phenotypes. A machine may transition through operating modes rather than belong permanently to one.

In those settings, use soft memberships, latent factors, topic mixtures, change-point models, graph communities, trajectories or direct decision rules. Do not force a hard clustering merely because a dashboard expects a segment label. A no-cluster baseline is part of the decision, not a failure to finish the analysis.

Part four

A production-shaped stability audit

Worked scenario The following portfolio is synthetic and deliberately factorised. It is an instrument for exposing specification dependence, not a report of a bank deployment or a claim about real customer segments.

The generator creates 126 firms from a three-by-three crossing. The size axis has small, medium and large regimes expressed through turnover and employee count. The risk axis has low, medium and high regimes expressed through arrears days and cash-flow volatility. Size and risk are independent by construction. Fourteen noisy records occupy each cell.

This design prevents the experiment from smuggling in one dominant answer. A team interested in relationship coverage has a reason to group by scale. A team interested in support intensity has a reason to group by financial stress. The purpose determines which axis deserves weight.

The audit runs four fixed specifications, all with k-means and three clusters. “Raw units” uses the source numerical values. “Log plus z-score” compresses the size variables and gives each standardised feature equal weight. The size and risk specifications multiply the two relevant standardised dimensions by three, which gives those axes nine times the contribution to squared Euclidean distance. Sixty perturbation trials add three per cent feature-scale noise and rerun the clustering. Adjusted Rand index compares each rerun with its baseline.

View Silhouette ARI to size ARI to risk Median stability 10th percentile
Raw units0.8041.000-0.0161.0000.440
Log + z-score, equal0.5030.2800.5021.0000.564
Size axes ×30.7001.000-0.0161.0001.000
Risk axes ×30.630-0.0161.0001.0001.000

The raw view appears strongest if the analyst reads silhouette alone. It perfectly matches the synthetic size regime, largely because employee count and turnover carry much larger numerical magnitudes. Its 10th-percentile perturbation stability falls to 0.440, showing that the apparently crisp objective can still have a fragile tail under small measurement changes.

The equal standardised view is a compromise that aligns partially with both generating axes. That is not evidence of balance in an ethical sense. Equal variance is one weighting rule, and correlated pairs still give each latent axis two votes. Its mixed groups may be useful or incoherent depending on the service design.

The two weighted views are the decisive result. Each exactly recovers its nominated synthetic regime and remains perfectly stable in every reported perturbation quantile. Their mutual ARI is -0.016. Two stable and internally coherent clusterings can encode opposite operational stories about the same population.

high agreement partial agreement near-chance agreement
Pairwise agreement and perturbation stability for four cluster specifications A four-by-four adjusted Rand matrix shows raw and size-emphasised views agreeing, while the risk-emphasised view disagrees; bars show each view's tenth percentile stability. Repeatability within a view does not createagreement across views rawequalsizeriskrawequalsizerisk 1.000 0.280 1.000 -0.016 0.280 1.000 0.280 0.502 1.000 0.280 1.000 -0.016 -0.016 0.502 -0.016 1.000 10th-percentile stability raw0.440 equal0.564 size1.000 risk1.000
Figure 8. Stability within specifications can coexist with disagreement between specifications. Measured synthetic results from the included artefact. Matrix cells are adjusted Rand index values. Bars report the 10th percentile across 60 three-per-cent perturbation trials.

The similarity contract and release test

The decision instrument below converts the argument into an architecture and governance record. It is deliberately stricter than an algorithm-selection checklist because the partition may become a durable field in downstream systems.

1. Purpose and consequence

Name the decision or investigation the grouping supports. State what membership changes, who can contest it and which uses are prohibited.

2. Unit and representation

Define the entity, time window, aggregation and missingness rules. Explain why every included distinction and every discarded distinction is appropriate.

3. Similarity geometry

Record transformations, weights, metric and treatment of correlation, categories, sequences or graph relations. Translate each choice into plain-language resemblance.

4. Cluster concept

Declare whether the method seeks centres, density, connectivity, components, communities or another structure. State the resolution rule and noise treatment.

5. Alternatives and controls

Run at least one defensible competing specification, a no-cluster baseline and, where possible, a strongly separated positive control and a null or shuffled control.

6. Stability cube

Report data, specification and consequence stability. List boundary cases whose assignments change and the operational effect of that change.

7. External meaning

Use domain evidence, outcomes or interventions to interpret groups. Do not turn a descriptive centroid into a causal story without supporting evidence.

8. Release and expiry

Version the contract and assignments, monitor population and meaning drift, define recomputation triggers, and withdraw labels when the purpose or data changes.

A clustering should fail release when a consequential partition changes under equally defensible specifications and the team cannot justify one contract over the others. It should also fail when the only evidence is a tidy two-dimensional plot, when protected attributes leak through proxies without review, when the intended use differs from the optimisation concept, or when membership acquires authority beyond the declared purpose.

Clustering release path A spiral path moves from purpose through representation, geometry, alternatives and consequences to release, with rejection exits at each stage. Release the contract, not just the labels purpose representation geometry alternatives consequencestability meaning release reject if purpose is vaguereject if alternatives disagreewithout rationalereject if labels gain undeclared authority
Figure 9. A clustering release path. Practitioner decision instrument. Each stage can return the design for revision. The geometry is only one stage; purpose, alternatives, consequences and expiry govern whether the labels may be used.

Executable artefact: clustering stability audit

The companion Python script operates entirely on synthetic data. It reproduces the four-point scale flip, the five-point metric flip, the crossed-portfolio audit, the well-separated positive control and the high-dimensional distance-concentration curve. It contains both positive and negative assertions through expected agreement patterns.

Install NumPy and scikit-learn, save the script as clustering_stability_audit.py, and run python clustering_stability_audit.py. The essential audit loop is small:

for view in views:
    labels, silhouette = cluster_view(raw, view, SEED)
    stability = []

    for trial in range(60):
        noisy = perturb(raw, np.random.default_rng(10_000 + trial))
        rerun, _ = cluster_view(noisy, view, 20_000 + trial)
        stability.append(adjusted_rand_score(labels, rerun))

    report(
        view=view.name,
        silhouette=silhouette,
        median_stability=np.median(stability),
        p10_stability=np.quantile(stability, 0.10),
    )

# Specification stability is separate from perturbation stability.
for left, right in combinations(views, 2):
    print(left.name, right.name,
          adjusted_rand_score(base[left.name], base[right.name]))

The first loop asks whether one contract repeats under noisy observations. The second asks whether alternative contracts agree on the same observations. The distinction is the executable heart of the paper.

Expected output and interpretation
MINIMAL SCALE FLIP
original: row SSE=9.0; column SSE=16.0
x multiplied by 2: row SSE=36.0; column SSE=16.0

METRIC FLIP, SAME FIVE POINTS
euclidean : [['A', 'B'], ['C', 'D', 'E']]
manhattan : [['A', 'B', 'C'], ['D', 'E']]
agreement (ARI): 0.167

CROSSED-PORTFOLIO STABILITY AUDIT (126 synthetic firms)
raw units                silhouette 0.804  ARI-size 1.000  ARI-risk -0.016
size axes ×3             silhouette 0.700  ARI-size 1.000  ARI-risk -0.016
risk axes ×3             silhouette 0.630  ARI-size -0.016 ARI-risk 1.000

POSITIVE CONTROL
minimum pairwise agreement: 1.000

The exact output includes all four views, perturbation quantiles, the complete agreement matrix and distance-concentration values. Small floating-point differences across library versions should not change the qualitative controls.

Extension tests for a real clustering project

Replace the synthetic generator with a versioned public or authorised dataset, then add domain-specific perturbations. Recompute monetary features under plausible inflation or exchange assumptions; move observation windows; simulate missing fields; alter category encodings; withhold one data source; change the distance within a pre-declared defensible set; vary the resolution; and compare the consequences of each reassignment.

Keep the original features and membership snapshots in an evidence ledger. Record the contract version, code version, random seeds, source dataset hash, exclusion rules, pairwise agreement matrix, unstable cases and downstream actions. A cluster label without that evidence is an untraceable derived assertion.

How the claim changes under pressureChart · state
stateDiagram-v2
  [*] --> Claim
  state "Scale is weight, even when<br/>nobody writes a weight" as Claim
  state "A metric names the kind of<br/>resemblance" as Test
  state "Thought experiment, the<br/>duplicated vote" as Revision
  Claim --> Test: expose mechanism
  Test --> Decision: evidence survives
  Test --> Revision: rival survives
  Revision --> Claim: narrow or rebuild
  Decision --> [*]
The revision loop begins with Scale is weight, even when nobody writes… and keeps counterexamples inside the reasoning path. Reading use: follow the relation, then test it against the surrounding evidence and limits.

Compact glossary

Similarity contract
The declared purpose, representation, transformation, weights, distance, algorithm, resolution and use that jointly define a clustering.
Data stability
Agreement when observations are resampled, perturbed or remeasured under one fixed specification.
Specification stability
Agreement across several defensible clustering specifications on the same cases.
Consequence stability
Whether membership changes under perturbations or specifications alter decisions, treatment or authority.
Internal validity
A score such as silhouette that judges compactness or separation under the supplied geometry.
External meaning
Evidence linking a partition to a domain mechanism, outcome, intervention or useful operational distinction.

Do not ask the algorithm what a group is

The durable intuition is simple: a clustering algorithm receives a geometry, not a world. Representation decides which facts become coordinates. Scaling decides their relative voice. A metric turns differences into neighbourhoods. An algorithm and resolution turn neighbourhoods into a partition. Only the external purpose can explain why that partition should matter.

This does not reduce clustering to opinion. The commitments can be constrained by measurement theory, domain knowledge, invariances, causal hypotheses, labelled comparisons, operational costs and empirical stability. Strongly separated structures can survive many reasonable choices. The discipline lies in making the commitments falsifiable and exposing where alternatives disagree.

The changed decision is to govern clustering as a versioned similarity contract rather than release it as a discovered fact. An approved clustering should carry its purpose, representation, metric, resolution, alternatives, unstable cases, consequence analysis and expiry conditions. A silhouette score becomes supporting evidence, not a verdict. Resampling becomes one axis of assurance, not the whole audit. A no-cluster baseline remains available when hard membership adds less truth than administrative convenience.

For research, the next experiment is equally clear. Hold the data and algorithm fixed, intervene on one representational or metric commitment, and measure membership, stability and consequence. A clustering claim becomes defensible when a reader can see which differences created it, which plausible alternatives would undo it, and why the chosen notion of resemblance deserves to govern the use at hand.

The evidence conversationChart · sequence
sequenceDiagram
  participant Q as Question
  participant M as Mechanism
  participant E as Evidence
  participant D as Decision
  Q->>M: Two honest teams, two opposite portfolios
  M->>E: Scale is weight, even when nobody writes a weight
  E-->>M: compare rival explanations
  E->>D: Source ledger
  D-->>Q: revise scope or act
Question, mechanism, evidence and decision exchange the burdens developed in Clustering and the Politics of Distance. Reading use: follow the relation, then test it against the surrounding evidence and limits.

Source ledger