---
title: "Revisiting k-means: New Algorithms via Bayesian Nonparametrics"
description: "How DP-means turns Bayesian clustering into a simple algorithm, learns cluster counts through penalties, and extends to shared clusters and…"
canonical: "https://research.elamur.ai/free/en/papers/kulis-2011-revisiting-k-means-new-algorithms/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/kulis-2011-revisiting-k-means-new-algorithms/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2011](https://md.research.elamur.ai/free/en/papers/2011/) / Revisiting k-means: New Algorithms via Bayesian Nonparametrics

# Revisiting k-means: New Algorithms via Bayesian Nonparametrics

Paper · 2011 · Brian Kulis and Michael I. Jordan

**Authors:** Brian Kulis and [Michael I. Jordan](https://md.research.elamur.ai/free/en/authors/michael-i-jordan/) · **Year:** 2011 · **Venue:** arXiv (Cornell University) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**262** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2143776582) · arXiv (Cornell University) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [arXiv 1111.0352](https://arxiv.org/abs/1111.0352)
- [OpenAlex](https://openalex.org/W2143776582)

## Deep dive: Revisiting k-means: New Algorithms via Bayesian Nonparametrics

How DP-means turns Bayesian clustering into a simple algorithm, learns cluster counts through penalties, and extends to shared clusters and graphs. · about 34 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Clustering asks which observations belong together. A familiar answer is k-means: choose a number of groups, assign each observation to its nearest group center, and repeatedly move those centers to the averages of their members. Its appeal is practical. The procedure is easy to understand and implement. Its restriction is equally clear: the number of groups must be chosen in advance. More flexible Bayesian approaches can allow the number of occupied clusters to emerge during inference and can coordinate clustering across related datasets, but their inference procedures are often more demanding. This paper asks whether some of that flexibility can be expressed through algorithms as direct as k-means.

The authors derive DP-means by examining a Gibbs sampler for a Dirichlet process mixture of Gaussian distributions. They shrink the observation variance while adjusting the concentration parameter so that creating a cluster remains a meaningful alternative to joining an existing one. In the limit, probabilistic assignments become hard decisions. An observation joins its nearest cluster unless its squared distance to every available center exceeds a threshold, λ. When that happens, it starts a new cluster. The resulting procedure minimizes within-cluster squared distances together with a penalty, λk, for maintaining k clusters. The paper proves that its updates cannot increase this objective and that the procedure reaches a local solution.

The same reasoning produces a hierarchical algorithm for several datasets. Each dataset contains local clusters, while global centers can be shared across datasets. Separate penalties govern the creation of a local cluster and the creation of a global cluster. This makes sharing an explicit optimization decision: a dataset can reuse an existing global center, establish a local connection to one it has not used, or support an additional global center. The paper also develops a spectral relaxation in which an eigenvalue threshold replaces the usual instruction to select a fixed number of eigenvectors. Through a relationship between weighted kernel k-means and graph cuts, it obtains a penalized normalized-cut formulation with a variable cluster count.

The experiments support a practical claim about these particular hard-clustering procedures, rather than equivalence to full Bayesian inference. On a synthetic Gaussian dataset, DP-means converges within 8 iterations across 100 runs and achieves average normalized mutual information of .89. On 8 UCI datasets, its clustering quality is broadly comparable to k-means and a Gibbs sampler. On 312,320 image patches, it reaches convergence in 63 iterations, while the authors regard full Gibbs convergence as impractical. A synthetic experiment with related datasets gives the hierarchical procedure an average normalized mutual information of .81, above the reported non-hierarchical comparisons, although it takes longer than pooled k-means. These findings make the paper a constructive bridge between flexible Bayesian clustering and simple hard optimization, with clear limits: local convergence, sensitivity to processing order, and a continuing need to choose penalties.

### Ideas worth borrowing

Use a limit to discover an algorithm. The authors do not begin by adding an arbitrary exception to k-means. They start with a probabilistic inference procedure and ask which decisions survive when observation noise vanishes. This yields a nearest-center rule with a principled alternative: pay a fixed cost to create a cluster. The reusable idea is to examine a complicated procedure under a carefully chosen limiting regime. Such an analysis can reveal a simpler computational object while preserving a useful structural feature of the original formulation. The important qualification is that the parameters must be scaled together. A limit taken without that care can erase the very choice the new algorithm is supposed to retain.

Charge explicitly for structural complexity. DP-means balances a fit term against a cost for every occupied cluster. That converts an implicit question about the appropriate number of groups into an explicit tradeoff. A new cluster is worthwhile only when the reduction in representation error justifies its cost. This pattern applies wherever an optimization procedure can improve fit by introducing additional structure. The paper’s contribution is especially instructive because the penalty has a direct operational meaning: the same λ appears in the objective and in the decision to create a cluster. The optimization criterion and the update rule therefore explain each other.

Make sharing a decision with its own price. In the hierarchical extension, creating another local cluster and introducing another global center are different actions. They receive different penalties because they have different consequences. A dataset may need access to an already established pattern without requiring a new pattern for the collection as a whole. Separating these costs lets the algorithm express that distinction. This is a useful design principle for systems that organize related collections: reuse, local specialization, and global expansion should not automatically be treated as the same operation. The paper makes their relationship concrete through a single objective.

Update whole groups as well as individual observations. The hierarchical algorithm revisits the global association of an entire local cluster after considering point assignments. That move matters because a group of observations may collectively support a different global center even when individual moves are less revealing. Its cost is evaluated using the sum of the members’ squared distances, so the decision reflects the group’s total fit. This suggests a broader optimization lesson: when a representation has meaningful intermediate units, useful updates can act on those units directly. Restricting every decision to isolated observations may leave available structure underused.

Turn a rank choice into a threshold. The spectral analysis translates the cluster penalty into a rule for retaining eigenvectors. Ordinary fixed-k relaxation asks for the leading k directions; the relaxed DP-means objective retains directions whose eigenvalues exceed λ. The useful abstraction is that a complexity penalty can become a threshold on the value contributed by each direction. This gives a readable relationship between structural cost and relaxed representation size. It also preserves an important distinction: an exact solution to a relaxed matrix problem still needs conversion into a discrete clustering.

Transfer algorithms through objective equivalence. The graph extension works by relating a weighted kernel clustering objective to normalized cut. Once that relationship is established, the cluster-count penalty can be carried across with an adjusted parameter. This is more informative than merely observing that two algorithms behave similarly. It identifies which quantities correspond and which constants affect the translation. Researchers can borrow this strategy whenever an established objective can be rewritten in another representation: a proven update rule in one setting may become a constructive algorithm in the other, provided the conditions of the equivalence are respected.

### How Mova uses it

For Mova, a small transparent language system implemented in Rust, the most relevant contribution is an inspectable rule for growing a collection of groups. A potential clustering component could represent observations as vectors, keep explicit memberships and centers, and introduce a group when the best available squared distance exceeds a stated penalty. The reason for each new group would then be visible in ordinary quantities: an observation, its distances, and the cost of expansion. That is a plausible use of DP-means, rather than an established integration demonstrated by this paper.

The attraction is the agreement between local decisions and a global accounting rule. If Mova were to organize recurring language observations into clusters, an explanation could identify both the nearest existing center and the threshold that made reuse or expansion preferable. The total objective would account for representation error and the number of groups. Such an arrangement could make a clustering subsystem easier to inspect than a procedure whose structural decisions are only implicit. It would not, by itself, explain why the input representation captures a meaningful linguistic distinction. The paper supplies a clustering mechanism; choosing language features remains a separate design decision.

A second possible application concerns related collections of language data. Mova could treat collections as separate datasets while allowing them to share centers. In the paper’s hierarchical formulation, local membership records which observations belong together within a dataset, and a global association records which center represents that local group. Applied cautiously, that separation could support an organization in which collections reuse patterns without being flattened into a single undifferentiated pool. The local penalty would govern whether a collection establishes another group, while the global penalty would govern whether the shared inventory expands.

That proposal needs the paper’s assumptions to remain visible. Its hard Gaussian procedures evaluate squared Euclidean distances and represent a cluster through a mean. A language application would therefore need to justify the vector representation, its scale, and the meaning of distance. Nothing in the experiments establishes that clusters produced this way correspond to linguistic categories, interpretable rules, or useful components of a language system. Those would be questions for a separate evaluation. Transparency about the threshold cannot substitute for evidence about what the threshold is grouping.

The parameter-selection procedure also offers a useful caution for Mova. Though DP-means does not require k inside its assignment loop, the experiments choose λ using an approximate desired cluster count. A future implementation should distinguish allowing the count to change during optimization from selecting that count without prior guidance. Exposing λ would make the tradeoff inspectable, but it would not remove the need to choose it responsibly.

The paper establishes neither a Rust implementation nor a Mova-specific result. Its concrete contribution to a possible Mova design is a compact objective, an understandable expansion rule, and a hierarchical vocabulary for local groups and shared centers. Any claim that these choices improve Mova would require an implementation and measurements beyond the evidence reported here.

### The problem and its context

#### Why a simple clustering algorithm remains attractive

The paper begins with a practical tension in [machine learning](https://md.research.elamur.ai/free/en/concepts/machine-learning/). Flexible probabilistic approaches can express uncertainty, permit varying cluster counts, and coordinate structure across datasets. Yet a much simpler procedure, k-means, remains attractive for large collections because its core operations are straightforward. Compute distances, change assignments, recompute averages, and repeat. The authors want to retain that computational directness while recovering selected capabilities associated with Bayesian nonparametrics.

Their motivating application is visual bag-of-words processing. Collections of image patches are converted into a finite set of representative groups, and k-means is used to perform that quantization. The example establishes why convenience and scalability matter. A clustering method may be statistically expressive, but that expressiveness is less useful if the required inference procedure is difficult to implement or too expensive for the collection being processed.

The paper does not argue that simplicity makes k-means universally preferable. It instead asks whether the contrast between flexibility and simplicity is partly avoidable. The desired outcome is a hard-clustering procedure that can create groups during optimization and, in a hierarchical setting, share centers across datasets. Hard clustering means that an observation receives a definite assignment. This differs from retaining a distribution over possible assignments.

The distinction matters for understanding the contribution. DP-means is not presented as a faster way to produce every quantity that Bayesian inference could provide. It is a new optimization procedure obtained by studying a limit of a Bayesian sampling algorithm. The limit preserves a structural choice—the possibility of another cluster—while replacing probabilistic assignment with an explicit comparison of costs.

#### The established connection between Gaussian mixtures and k-means

The starting point is a known relationship between Gaussian mixture estimation and k-means. A finite Gaussian mixture represents observations through several Gaussian components. Each component has a mean, a covariance, and a mixing weight. An expectation-maximization procedure alternates between estimating how strongly each component accounts for each observation and updating component parameters from those responsibilities.

When the component covariances are fixed and identical, distance to a mean plays a particularly direct role. An observation closer to a component center receives a larger exponential contribution from that component. As the shared variance approaches zero, the closest center dominates the comparison. Under the limiting argument used by the paper, soft responsibilities become hard assignments.

The parameter update then becomes familiar. A mean estimated from hard memberships is the average of the observations assigned to it. The limiting assignment and mean updates therefore match the basic operations of k-means. This earlier connection gives the authors a template for their own question: if a finite mixture yields fixed-count k-means, what happens when the probabilistic starting point permits an unbounded collection of components?

The paper also situates itself beside Kurihara and Welling’s work on Bayesian k-means. It describes that work as reaching related hard-clustering procedures for a non-parametric setting through a different route. The distinction claimed here concerns the derivation: the authors use an asymptotic analysis of a Gibbs sampler, then identify the objective that the limiting updates optimize.

#### What the Dirichlet process changes

A Dirichlet process mixture allows an observation to join an existing cluster or to initiate another one. In the sampler examined here, an existing cluster receives assignment weight according to its current membership count and its likelihood for the observation. Creating a cluster receives weight through a concentration parameter and an average likelihood under a prior over possible means.

This provides a more flexible starting point than a fixed list of centers. The number of occupied clusters can change as inference proceeds. However, the sampler must repeatedly draw assignments and centers. The paper’s goal is to understand whether that mechanism has a hard counterpart with the same kind of simple distance calculations that make k-means useful.

The authors describe the Dirichlet process both through its sampling behavior and as a limit of a finite Bayesian mixture. In the latter view, the number of available components increases while the prior over component weights is scaled appropriately. The resulting construction does not require a finite cluster count to be specified as a structural boundary. That background explains the term non-parametric in this setting: it concerns flexibility in the available collection of components, rather than the absence of numerical parameters.

#### Why the hierarchical setting matters

The hierarchical Dirichlet process supplies the next piece of context. Its purpose here is to let several datasets possess their own clustering arrangements while drawing on a shared collection of component means. The datasets remain distinct, but their cluster structure can inform one another.

That addresses a limitation of two simpler approaches. Clustering every dataset separately provides no automatic mechanism for sharing centers. Pooling all observations permits common centers but discards the explicit distinction between a dataset’s local grouping and the collection’s global inventory. The hierarchical construction preserves both levels.

The authors also place their work within established connections among k-means, spectral relaxation, and graph clustering. Earlier spectral work rewrites clustering in terms of a normalized membership matrix and then relaxes its discrete constraints. Earlier graph work connects weighted kernel clustering with normalized-cut objectives. These relationships give the new cluster penalty somewhere to travel: once DP-means has a clear objective, the same objective can be examined in matrix and graph representations.

Finally, the paper recognizes that penalizing the number of k-means clusters is not itself a new objective. It points to an earlier discussion motivated by the Akaike Information Criterion in Manning, Raghavan, and Schütze. The constructive contribution is the limiting algorithm, its monotonic local optimization argument, and its connection to the Dirichlet process sampler. That distinction keeps the novelty focused on how the objective is obtained and optimized.

### The method, step by step

#### Start with the decisions the algorithm must make

DP-means needs to answer a simple question for each observation: should an existing center represent it, or is a new center worth the additional cost? The Bayesian derivation explains where that alternative comes from. The final algorithm expresses the answer through squared distance and a penalty.

The full progression is:

From Bayesian assignments to hard clustering The steps in order.

The diagram concerns the derivation and resulting loop. It does not describe a separate training stage followed by a deployment stage. The data being clustered supply the observations, the assignments determine the current groups, and the centers are updated from those groups.

#### Establish the finite-mixture starting point

The finite Gaussian mixture density is:

```
p(x) = Σ(c=1,…,k) π_c N(x | μ_c, Σ_c)
```

Here x is an observation vector, p(x) is its density, k is the fixed component count, and π_c is the mixing weight for component c. The notation N denotes a Gaussian density. Its mean is μ_c and its covariance is Σ_c. The sum combines the component densities according to their weights.

An expectation-maximization procedure maintains a responsibility for each observation–component pair. With all covariances fixed to σI, that responsibility has the distance-based form:

```
γ_ic = π_c exp(−‖x_i − μ_c‖²/(2σ)) / Σ(j=1,…,k) π_j exp(−‖x_i − μ_j‖²/(2σ))
```

The symbol γ_ic is the responsibility of component c for observation x_i. The index j ranges over the available components in the denominator. The scalar σ controls the common covariance, I is the identity matrix, exp is the exponential function, and ‖x_i − μ_c‖² is squared Euclidean distance. The denominator normalizes the competing contributions.

The essential effect comes from the exponential. As σ approaches zero, even a distance advantage dominates fixed mixing-weight differences. For a uniquely nearest center, its responsibility approaches a hard assignment. The paper uses this relationship as the conceptual precedent for the Dirichlet process derivation.

The mean update before taking the limit is:

```
μ_c,new = (Σ(i=1,…,n) γ_ic x_i) / n_c
```

Here μ_c,new is the updated mean, n is the observation count, and n_c is the sum of responsibilities for component c. The numerator is a responsibility-weighted sum of observations. When the responsibilities become hard memberships, the weighted average becomes the ordinary average of the assigned observations.

For completeness, the effective membership count is:

```
n_c = Σ(i=1,…,n) γ_ic
```

The quantity n_c measures the total responsibility assigned to component c. In the hard limit it becomes the number of observations belonging to that cluster. With the covariance fixed, no covariance update is required in the limiting procedure.

#### State the ordinary k-means objective

The standard hard-clustering objective is:

```
min_{ℓ₁,…,ℓ_k} Σ(c=1,…,k) Σ(x∈ℓ_c) ‖x − μ_c‖²
```

The sets ℓ_c partition the observations into k clusters. The variable μ_c is the center associated with cluster ℓ_c, and the objective sums the squared error incurred when every observation is represented by its cluster center. The minimization is over possible partitions.

For a fixed membership set, the best center is:

```
μ_c = (Σ(x∈ℓ_c) x) / |ℓ_c|
```

The notation |ℓ_c| means the number of observations in cluster c. The numerator adds their vectors, and division by the membership count gives their arithmetic mean. This choice minimizes the cluster’s summed squared distances.

The ordinary assignment step is:

```
ℓ*(i) = argmin_c ‖x_i − μ_c‖²
```

The symbol ℓ*(i) denotes the selected cluster index for observation i. The operation argmin returns the index with the smallest squared distance. Ordinary k-means repeats this assignment operation and the mean update while holding the number of available clusters fixed.

DP-means will preserve those operations while introducing an additional candidate action. Rather than selecting only among existing centers, it will compare their costs against the cost of making another one.

#### Replace the fixed component inventory with a Dirichlet process

For the non-parametric derivation, the prior over means is a zero-centered Gaussian with covariance ρI:

```
G₀ = N(0, ρI)
```

The symbol G₀ denotes the prior distribution from which potential cluster means are drawn. The scalar ρ controls its covariance, 0 is the zero vector, and I is the identity matrix. This prior is chosen so that the assignment and mean-update expressions can be evaluated analytically.

The Dirichlet process construction can be written as:

```
G ∼ DP(α, G₀)
```

Here G is a random distribution over means, DP denotes the Dirichlet process, α is its concentration parameter, and G₀ is the base distribution. An observation draws a mean from G and then arises from a Gaussian centered at that selected mean with covariance σI. Repeated draws can select the same mean, creating shared cluster memberships.

In the Gibbs sampler, an existing cluster c receives an unnormalized assignment weight proportional to:

```
n_{−i,c} N(x_i | μ_c, σI)
```

The quantity n_{−i,c} counts members of cluster c after excluding observation i. The Gaussian term measures how well its center μ_c explains x_i under covariance σI. Their product combines cluster occupancy with observation fit.

The alternative of creating a cluster receives an unnormalized weight of:

```
α ∫ N(x_i | μ, σI) dG₀(μ)
```

The variable μ ranges over possible new means. Integration averages the observation likelihood under the prior G₀, while α controls the weight given to opening a cluster. A common normalizer converts all existing-cluster and new-cluster weights into probabilities.

This is the exact decision that the limiting argument must preserve. If the new-cluster option disappears or overwhelms every existing assignment as σ shrinks, the limit will not yield a useful variable-count analogue of k-means.

#### Scale concentration to preserve the new-cluster option

The authors therefore make α depend on σ and ρ:

```
α = (1 + ρ/σ)^(d/2) exp(−λ/(2σ))
```

The symbol d is the dimension of an observation vector. The scalar λ is the parameter that will become the new-cluster penalty. The remaining symbols retain their earlier meanings: σ controls observation covariance and ρ controls prior covariance.

This scaling is the pivotal step. Shrinking σ changes both the Gaussian distance terms and their normalization factors. The concentration parameter is adjusted so that the competition has a nontrivial limit. λ then appears alongside the squared distances as a comparable cost.

After substitution and cancellation of common factors, an existing-cluster contribution has the form:

```
a_ic = n_{−i,c} exp(−‖x_i − μ_c‖²/(2σ))
```

The symbol a_ic denotes an unnormalized weight for assigning observation i to existing cluster c. Its membership multiplier remains present at finite σ, but the distance inside the exponential becomes decisive in the limit.

The competing contribution for a new cluster can be expressed as:

```
a_i,new = exp(−[λ + σ‖x_i‖²/(ρ + σ)]/(2σ))
```

Here a_i,new is the new-cluster weight before normalization. The squared norm ‖x_i‖² measures the observation’s distance from the prior’s zero center. Inside the bracket, that term is multiplied by σ divided by ρ + σ.

With ρ fixed and σ approaching zero, the bracketed cost approaches λ. Existing clusters compete through their squared distances, and a new cluster competes through λ. The normalizing denominator is common to all options, so it does not change which option dominates.

The limiting comparison is therefore:

```
min{‖x_i − μ₁‖², …, ‖x_i − μ_k‖², λ}
```

Each μ_c is an existing center, x_i is the current observation, and λ is the cost of creating a cluster. An existing center wins when it supplies the smallest cost. If every available squared distance exceeds λ, opening a cluster is preferable.

The paper describes the resulting assignments as binary. A careful reading of that statement concerns the generic case in which one option is strictly best. Equal costs require a tie decision; they do not alter the main comparison between representation error and the cluster penalty.

#### Show why the centers become ordinary means

The sampler also draws cluster centers from their posterior distributions. Because both prior and observation distributions are Gaussian, the posterior mean and covariance have explicit forms.

The posterior mean is:

```
μ̃_c = (1 + σ/(ρn_c))⁻¹ x̄_c
```

The symbol μ̃_c is the posterior’s center, x̄_c is the arithmetic mean of the observations assigned to cluster c, and n_c is their count. The expression shows the finite-variance influence of the zero-centered prior.

The posterior covariance is:

```
Σ̃_c = [σρ/(σ + ρn_c)] I
```

Here Σ̃_c denotes the covariance of the posterior distribution over the cluster mean. The scalars σ and ρ control observation and prior covariance, while n_c is the cluster size. The identity matrix gives the covariance its isotropic form.

As σ approaches zero, the posterior center approaches x̄_c and the posterior covariance vanishes. Sampling a center therefore becomes selecting the empirical mean. For a newly created singleton cluster, that mean is the observation that created it.

This completes the algorithmic transition. Assignments become deterministic cost comparisons, and center draws become arithmetic updates. The final procedure no longer needs to sample either quantity.

#### Run DP-means and track its objective

The authors initialize DP-means with a single cluster centered at the overall data mean. They process observations, compare squared distances with λ, assign each observation or create a cluster, and then recompute cluster means. Repeating those operations produces the final partition.

The objective is:

```
min_{ℓ₁,…,ℓ_k} Σ(c=1,…,k) Σ(x∈ℓ_c) ‖x − μ_c‖² + λk
```

The first term is within-cluster squared error. The variable k is now the occupied cluster count rather than a fixed structural input. The product λk charges λ for every cluster. The centers μ_c remain the means of their membership sets.

The monotonicity argument follows the operations directly. Assigning an observation to a closer existing center cannot increase its current distance cost. If all such costs exceed λ, a singleton cluster can represent the observation with no within-cluster error at the price of the added penalty. Updating a cluster center to its mean cannot increase the squared-error term.

The theorem concerns local convergence. The procedure has no mechanism guaranteeing that it finds the best possible partition among all partitions. Its objective cannot increase under the stated updates, and the collection of possible hard partitions is finite, which supports the paper’s convergence argument.

The initialization also creates an important behavioral distinction from conventional k-means. DP-means begins with a simple common center, but the order in which observations are processed can affect which additional centers become available to later observations. The authors identify choosing that order adaptively as an open direction.

#### Extend the decisions to several datasets

The hierarchical version distinguishes an observation’s dataset, its local cluster, and that local cluster’s global center. Write x_ij for observation i in dataset j. A local cluster S_jc groups observations within dataset j, while an association links S_jc to a global mean μ_p.

The hierarchical probabilistic construction begins with:

```
G₀ ∼ DP(γ, H)
```

Here G₀ is now a shared random distribution over centers, γ is its concentration parameter, and H is the underlying prior over those centers. The notation differs from the single-dataset derivation because the shared base distribution itself now has Dirichlet process structure.

Each dataset then receives its own distribution:

```
G_j ∼ DP(α, G₀)
```

The symbol G_j denotes the distribution for dataset j, α is its local concentration parameter, and G₀ is the shared base. This arrangement permits dataset-specific usage while keeping the available centers connected across datasets.

The hard limit introduces λ_ℓ for local clusters and λ_g for global clusters. When considering an observation, the algorithm computes its squared distance to each global center. If dataset j has no current local association with a candidate global center, using that center also incurs λ_ℓ.

The adjusted comparison can be expressed as:

```
d_ijp = ‖x_ij − μ_p‖² + λ_ℓ 1{dataset j has no local cluster linked to p}
```

The symbol d_ijp is the adjusted cost for assigning observation x_ij toward global center p. The indicator 1{…} is active when the stated association is absent. It adds the cost of establishing a local cluster without charging for a new global center.

If the smallest adjusted cost exceeds λ_ℓ + λ_g, the procedure creates both a local cluster and a global center. Otherwise it uses the preferred existing global center, adding the local association if needed. This separates global novelty from adopting a pattern already present elsewhere.

#### Reconsider whole local clusters

The hierarchical algorithm next evaluates each local cluster as a group. For every global center, it sums the squared distances of the local cluster’s observations to that center. It compares the best such fit with the cost of establishing a new global center at the local cluster’s own mean.

The new-center comparison uses:

```
λ_g + Σ(x∈S_jc) ‖x − x̄_jc‖²
```

The set S_jc is local cluster c in dataset j, x̄_jc is its mean, and λ_g is the cost of another global center. The sum is the group’s internal squared error when represented by its own mean.

If this alternative is preferable, the local cluster supports a new global center. Otherwise its association moves to the best existing one. Finally, every global mean is recomputed from all observations attached to it across datasets.

The hierarchical objective is:

```
min Σ(p=1,…,g) Σ(x_ij∈ℓ_p) ‖x_ij − μ_p‖² + λ_ℓ k + λ_g g
```

The set ℓ_p contains all observations associated with global center p. The variable g counts global clusters, while k counts local clusters across datasets. The penalties λ_ℓ and λ_g price those structures separately. Each μ_p is the mean of every observation represented by that global cluster.

The paper proves monotonic local optimization for this procedure as well. Its objective makes the benefit of sharing visible: multiple datasets can use a global center without each paying to create a separate global structure. They still pay for their own local groups.

#### Relax membership constraints into a spectral problem

To obtain the spectral extension, the authors represent hard memberships with a matrix Z. Its rows correspond to observations and its columns to clusters. Normalization gives:

```
Y = Z(ZᵀZ)⁻¹ᐟ²
```

The matrix Y is the normalized membership matrix, Zᵀ is the transpose of Z, and the inverse square root adjusts for cluster sizes. This normalization gives Y orthonormal columns, expressed by YᵀY = I.

Up to terms that do not change the maximizing partition, the penalized objective becomes:

```
max_Y tr(Yᵀ(K − λI)Y)
```

The matrix K is the kernel matrix over observations, tr denotes the trace, and λ is the cluster penalty. At this stage, Y must still represent normalized hard memberships. The subtraction of λI incorporates the cost associated with each selected cluster direction.

The relaxation removes the discrete membership requirement:

```
max_{YᵀY=I} tr(Yᵀ(K − λI)Y)
```

The only remaining constraint shown here is orthonormality of Y’s columns. The relaxed solution includes eigenvectors of K whose eigenvalues exceed λ. Each retained direction contributes positively after the penalty is subtracted.

This provides an exact optimum for the relaxed problem, not for the original discrete partitioning problem. The rows of the resulting matrix still need post-processing into clusters. The paper suggests the familiar spectral strategy of clustering those row representations.

#### Carry the objective into kernel and graph settings

Kernelization replaces explicit feature-space calculations with pairwise similarities. If ψ maps observations into a feature space, a kernel κ satisfies:

```
κ(x_i, x_j) = ψ(x_i)ᵀψ(x_j)
```

The function ψ is the feature mapping, κ is the kernel, and the transposed product is the feature-space inner product. The advantage is that the algorithm can use κ without explicitly storing ψ(x).

Distance to an implicit cluster mean can then be calculated as:

```
‖ψ(x) − μ_c‖² = κ(x,x) − 2Σ(x_i∈ℓ_c)κ(x,x_i)/|ℓ_c| + Σ(x_i,x_j∈ℓ_c)κ(x_i,x_j)/|ℓ_c|²
```

Here μ_c is the mean in feature space, ℓ_c is its membership set, and |ℓ_c| is its size. The pairwise sum in the last term runs over members of the same cluster. The expression replaces explicit center storage with kernel evaluations.

The graph connection additionally uses weighted clustering:

```
J = Σ(c=1,…,k) Σ(x_i∈ℓ_c) w_i‖x_i − μ_c‖²
```

The symbol J is the weighted squared-error objective, and w_i assigns a weight to observation i. Cluster centers become weighted averages, so the observations’ contributions to both fit and representation depend on those weights.

For a graph with adjacency matrix A, normalized cut is:

```
Cut(A) = Σ(c=1,…,k) links(V_c, V∖V_c)/deg(V_c)
```

The set V contains graph vertices, V_c is a cluster, and V∖V_c contains vertices outside it. The function links sums edge weights between the indicated sets. The quantity deg(V_c) sums the degrees of vertices in the cluster.

The paper also discusses ratio cut, which uses cluster size rather than summed degree in the denominator. For normalized cut, it invokes an earlier equivalence involving a degree matrix D and a suitable kernel:

```
K = σD⁻¹ + D⁻¹AD⁻¹
```

The matrix D is diagonal and contains vertex degrees. The scalar σ in this graph construction must be large enough to make K positive semidefinite. Its role here is distinct from the shrinking observation-variance parameter used in the earlier derivation.

With weight matrix W = D, the existing relationship is:

```
J(K,W) = σn + tr(D⁻¹ᐟ²AD⁻¹ᐟ²) − (σ + 1)k + Cut(A)
```

The function J(K,W) denotes weighted kernel k-means cost, n is the vertex count, and k is the cluster count. The trace term depends on the graph rather than the chosen partition. This identity exposes how cluster count enters the relationship.

Adding λk to the clustering objective yields a penalized cut objective after adjustment:

```
λ′ = λ − σ − 1
```

The symbol λ′ is the graph cluster-count penalty, λ is the weighted kernel clustering penalty, and σ is the graph-kernel parameter. With that correspondence, the two penalized objectives differ only by a partition-independent constant. The authors therefore adapt DP-means-style optimization to a graph objective whose cluster count can change.

### Experiments and results

#### Evaluation and parameter selection

The experiments use normalized mutual information, abbreviated NMI, to compare output memberships with reference labels. NMI is useful here because the number of produced clusters can differ from the number of reference classes. The evaluation asks how well the two partitions agree, instead of requiring their labels or cluster counts to match exactly.

The parameter-selection setup deserves attention before the scores. To make comparisons with k-means straightforward, the authors start from an approximate desired k and use a farthest-first heuristic to choose λ. A set of representatives begins with the overall mean. Repeatedly, the procedure finds the observation most distant from that set, where distance to a set means distance to its nearest representative. The selected distance supplies the threshold.

Thus the experiments demonstrate variable-count optimization under a chosen penalty, but they do not test cluster-count selection without count-related guidance. For the hierarchical procedure, related heuristics choose the local and global penalties. The local procedure averages threshold estimates across datasets, while the global version uses sums of distances for observations belonging to a dataset.

The Gibbs comparisons assume fixed isotropic component covariance, a Gaussian prior over means, and an inverse-Gamma prior governing σ. The experiments hold ρ at 100. They examine both a gamma prior for α and validation-based selection. On the benchmark collections, validation also chooses σ because the authors found that this improved results.

#### A synthetic illustration of convergence

The first synthetic example contains 3 Gaussian groups. DP-means finishes within 8 iterations over 100 runs, returns 3 clusters in those runs, and obtains average NMI of .89. The authors also report that it usually exceeds .8 NMI after three iterations.

The comparison plots follow two Gibbs trajectories through the first 5000 iterations without burn-in removal. One learns α through a gamma prior. It performs well around 1500 iterations, but later produces more than three clusters and loses agreement with the reference partition. The other selects α using validation. It reaches a three-cluster solution after roughly 3000 iterations.

These trajectories illustrate different convergence behavior on this dataset. They do not establish that every sampler or initialization would behave similarly. All methods begin with the observations assigned to a single cluster, and the authors explicitly expect initialization improvements to help.

A separate synthetic plot varies λ and shows an interval over which DP-means returns three clusters. The reported conclusion is qualitative: the desired count is stable across a substantial threshold range in this example. The paper does not supply numerical interval endpoints in its prose.

#### UCI benchmark comparisons

The benchmark study uses 8 UCI datasets and treats their class labels as reference clusters. Each dataset is divided randomly in a 30/70 validation/clustering split. Validation is used for Gibbs parameter selection, not for tuning DP-means through reference labels.

The Gibbs procedure runs through 1000 burn-in iterations, followed by 5000 further iterations with every 10 samples selected. The authors calculate NMI against the reference labels and average results over 10 runs.

Their reported comparison is mixed rather than uniformly favorable. DP-means exceeds k-means on 5 of 8 datasets and exceeds Gibbs sampling on 4 of 8. The paper presents this as broadly comparable clustering quality. These counts do not establish a general advantage on every collection or provide the size of the differences.

The benchmark discussion points to a table, but the numerical account available in the paper’s text gives these aggregate comparisons rather than individual dataset scores. The evidence therefore supports the authors’ overall characterization, without supporting a reconstructed ranking or an average score across all benchmarks.

#### A larger image-patch collection

For scalability, the authors use the Photo Tourism collection containing 312,320 patches. Each observation has 128 dimensions. The reported time per iteration is:

Photo Tourism image patches, time per iteration DP-means takes longer per iteration, so its practical advantage depends on reaching convergence sooner.

**The numbers**

| System or setting | seconds per iteration |
| --- | --- |
| Gibbs sampler | 29.4 |
| DP-means (this paper) | 37.9 |

The result is useful precisely because it separates iteration cost from convergence. DP-means is not faster in an individual pass here. The practical benefit is that the authors report reaching full convergence after 63 iterations, whereas achieving full convergence with the Gibbs sampler is regarded as infeasible in this experiment.

The paper does not attach a clustering-quality score to this large-scale result. It therefore establishes a reported optimization endpoint and practical runtime behavior, instead of showing that DP-means is more accurate on these image patches.

#### Shared clustering across synthetic datasets

The hierarchical experiment begins with 15 Gaussian distributions. Their means are drawn uniformly from [0,1]² and their covariances are .01 · I. The authors then construct 50 datasets. Each selects 5 of the available Gaussians and contains 25 observations, with 5 contributed by each selected distribution.

The task is to recover useful clustering within each dataset while exploiting shared centers. The evaluation computes NMI separately for each dataset and averages those values. The comparisons include pooling observations before clustering and applying non-hierarchical clustering separately to each dataset.

Shared synthetic datasets, average per-dataset NMI The hard Gaussian HDP has the highest reported agreement while representing shared global structure.

**The numbers**

| System or setting | NMI |
| --- | --- |
| Pooled DP-means | .73 |
| Pooled k-means | .77 |
| Separate DP-means | .79 |
| Separate k-means | .79 |
| Hard Gaussian HDP (this paper) | .81 |

The hierarchical procedure produces 17 global clusters and averages 4.4 local clusters per dataset. Those counts show that the output does not simply reproduce the generating inventory and local counts exactly. Its reported advantage concerns reference-partition agreement under the stated metric.

Sharing also costs computation. The hard Gaussian HDP takes 28.8s, compared with 2.7s for k-means applied to the pooled observations. The result supports the usefulness of the hierarchical formulation on this synthetic construction, while making clear that the additional structure is not free.

### What the ablations show

The paper contains no conventional component-removal ablation suite; its explanatory evidence comes from parameter variation, sampler comparisons, and comparisons between hierarchical and non-hierarchical organization.

#### What changing λ reveals

The synthetic threshold plot examines the most distinctive mechanism in DP-means. λ governs when distance error is large enough to justify another cluster. Varying it therefore tests whether recovering a useful count depends on a single fragile setting.

The authors report an interval in which the output remains at three clusters. This supports a limited robustness claim for that synthetic arrangement: nearby changes in the penalty need not immediately change the recovered structure. It does not establish a universal safe range or show that the same stability holds for the UCI collections.

The experiment also clarifies what λ controls. It is not merely a stopping tolerance. It participates directly in the objective and changes which partitions are preferred. Increasing the price of clusters changes the optimization problem itself, rather than simply making the algorithm run longer or stop earlier.

#### What the Gibbs comparisons isolate

The synthetic Gibbs trajectories contrast two treatments of α. A prior-driven approach and a validation-selected approach lead to different cluster-count behavior. That comparison demonstrates that the probabilistic baseline’s practical behavior depends on its parameter treatment, rather than being a single fixed reference.

The trajectories also illustrate why the authors emphasize convergence. A sampler can temporarily produce a clustering with good NMI and later move elsewhere. DP-means instead settles at a local optimum of its hard objective. These are different computational outputs, and the experiment makes that distinction visible.

The comparison does not isolate every possible cause of the observed gap in iteration counts. The shared initialization is deliberately simple, and the authors do not exhaust alternatives for sampling, initialization, or approximate inference. The evidence is strongest as an illustration of the proposed hard procedure’s behavior under the stated setup.

#### What pooling and separation reveal

The hierarchical comparisons ask whether maintaining dataset boundaries while sharing centers helps. Pooled clustering permits common centers but treats the observations as one collection. Separate clustering respects dataset boundaries but lacks automatic sharing. The hard Gaussian HDP combines local memberships with a shared global inventory.

Its higher average NMI is consistent with the intended value of that combination on the synthetic construction. The data are designed so that datasets reuse a subset of common generating distributions, so there is a specific cross-dataset relationship available to exploit.

The comparison is not a clean removal of one line of the hierarchical algorithm. Pooling and separation change the organization of the clustering problem, and the procedures use their respective parameter-selection rules. The results therefore support the complete hierarchical approach relative to these baselines, rather than assigning the improvement to a single update.

#### What the timing analysis explains

The image-patch timing comparison provides an important control on an easy misinterpretation. Because the Gibbs sampler is faster per iteration, the observed practical advantage cannot be attributed to cheaper individual passes. It concerns the number and nature of the iterations needed to obtain the desired endpoint.

Likewise, the hierarchical timing makes the cost of richer organization explicit. Better agreement in the synthetic shared-data experiment accompanies a longer runtime than pooled k-means. Together, these measurements support a tradeoff-based reading: the new procedures offer useful structural flexibility with manageable computation in the reported settings, rather than a blanket speed advantage.

### Limitations

#### Limits explicitly recognized by the authors

The authors identify processing order as an unresolved issue for DP-means. A newly created center becomes available to subsequent observations, so changing the sequence can change the path through partitions. They suggest adaptive ordering as future work. This matters because starting from a single global mean does not remove dependence on procedural choices; it shifts part of that dependence from an initial partition to the order of updates.

Initialization is another acknowledged influence. In the synthetic comparison, all observations begin in one cluster, and the authors expect better starting configurations to benefit the methods. The reported convergence trajectories should therefore be read as outcomes of that setup, not intrinsic iteration requirements independent of initialization.

The optimization guarantees are local. The paper proves that its updates monotonically improve or preserve their objectives until local convergence. It does not prove that DP-means or the hard Gaussian HDP finds the globally best discrete partition. A stable output may still be worse than another partition under the same penalty.

The conclusions also describe a restricted starting point for further development. The authors propose improvements through local search, additional relaxations for the hierarchical objective, extensions to other non-parametric processes, and generalization beyond Gaussian mixtures to exponential-family settings. They also call for more comparisons with sampling-based and variational inference. These are directions, not completed results.

A further theoretical point is explicitly tentative. The authors conjecture that a limiting complete-data likelihood argument could recover the Dirichlet process objective independently of the particular sampler. They do not establish that conjecture. The proved construction concerns the sampler and asymptotic analysis actually developed.

#### Limits visible in parameter selection

A careful reader should distinguish a variable cluster count from fully automatic selection of a useful count. DP-means allows k to change during optimization, but the experiments obtain λ from an approximate desired k. The corresponding hierarchical heuristics also rely on desired structural guidance.

That does not invalidate the algorithm. Choosing a penalty is a legitimate way to express a complexity preference. It does limit a stronger interpretation in which the procedure discovers the appropriate number of clusters without any count-related input. The experiments do not test that claim.

The penalty is also expressed in the units of squared distance. Accordingly, the interpretation of a particular λ depends on the observation representation and its scale. The paper’s mathematical rule is clear, but it does not establish a representation-independent threshold or a universal parameter-selection procedure.

The hierarchical setting adds another selection problem. Local and global penalties determine different aspects of sharing. The synthetic experiment demonstrates one useful outcome, but it does not map their joint sensitivity across a broad range of data conditions. The separate meanings of the parameters improve interpretability without making their choice trivial.

#### Limits of the empirical comparisons

The UCI experiments evaluate agreement with class labels. That is a clear reference criterion, but it should not be confused with proof that the labels are the only meaningful grouping of the observations. The experiment measures one defined relationship between an output partition and a supplied reference.

The headline benchmark findings are counts of datasets on which DP-means scores higher. Those counts do not reveal the magnitude or variability of the differences. Without the individual numerical scores, they cannot justify claims about an overall average advantage or consistent practical superiority.

The large image-patch experiment supplies convergence and timing evidence without a reported quality comparison in the textual account. It shows that DP-means can reach its own optimization endpoint at that scale. It does not establish how that endpoint compares with a converged sampler in reference-label agreement.

The hierarchical evidence comes from synthetic datasets deliberately built around shared Gaussian centers. This is appropriate for testing whether the proposed structure can be useful. It does not establish how the same benefit changes when related datasets share less structure, when their centers shift, or when squared-distance grouping is poorly matched to the observations.

There is also a reporting inconsistency in the hierarchical experiment: the dataset-generation description and a later sentence about pooling do not use the same collection count. The reported construction, scores, and runtimes remain identifiable, but that inconsistency limits certainty about the wording of the pooled setup.

#### Limits of the theoretical extensions

The spectral theorem solves a relaxation. Its freedom to use general orthonormal columns makes the eigenvector solution tractable, but those columns need not be normalized hard-membership indicators. Converting their rows into discrete groups introduces another clustering step. Exact relaxed optimization therefore does not eliminate the original combinatorial difficulty.

The graph result likewise depends on a particular correspondence. The kernel must be constructed from the adjacency and degree matrices, its positive-semidefinite requirement must hold, and the graph penalty must be adjusted relative to the clustering penalty. The extension is not a claim that the same numerical threshold can be moved unchanged between arbitrary graph and vector settings.

Neither extension receives the kind of dedicated empirical study presented for DP-means and the hierarchical procedure. Their role in the paper is chiefly theoretical and constructive. They demonstrate that the penalized objective connects to broader clustering machinery, while leaving practical behavior in those settings for further investigation.

Finally, hard assignments discard uncertainty. The limiting procedure makes definite membership decisions and returns centers, instead of preserving alternative explanations with posterior weights. That is central to its simplicity. The results show that useful structural flexibility can survive this transition, but they do not show that every inferential benefit of the Bayesian starting point survives with it.

### What came after

The later citation identified here is [lmfaoooo at SemEval-2026 Task 1: Humor Is an Audience. Preference Modeling for Constrained Humor Generation](https://md.research.elamur.ai/free/en/papers/tikhonov-2026-lmfaoooo-semeval-2026-task-1/), dated 2026. Its title places it in audience preferences and constrained humor generation. Its citation establishes a later connection to the clustering paper, but the available account does not identify the method, experiment, or argument for which it invokes DP-means. A more specific description of its use would therefore go beyond the evidence.

For the clustering paper itself, the most concrete forward-looking directions are those the authors name. They suggest strengthening the basic search procedure with ideas from k-means, extending relaxation techniques to the hierarchical objective, and examining other Bayesian non-parametric processes. They also propose moving beyond Gaussian assumptions and expanding comparisons with alternative inference procedures. These proposals indicate how the construction could grow, while remaining distinct from verified later developments.

The enduring research question is the one made precise by the derivation: which useful structural decisions can be retained when a probabilistic inference procedure is reduced to hard optimization? DP-means gives a specific answer for creating clusters. The hard Gaussian HDP gives another for coordinating local groups and shared centers. The spectral and graph analyses show how the resulting penalty can carry meaning across representations. The later citation alone does not establish the full subsequent history of those ideas, but the paper leaves a clear technical object for later work to reuse: a distance-based objective in which expanding the representation has an explicit cost.

## Cite

Cite as Brian Kulis and Michael I. Jordan. 2011. Revisiting k-means: New Algorithms via Bayesian Nonparametrics. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.1111.0352](https://doi.org/10.48550/arxiv.1111.0352) · [arXiv 1111.0352](https://arxiv.org/abs/1111.0352)

```bibtex
@misc{kulis2011revisiting,
  title = {{Revisiting k-means: New Algorithms via Bayesian Nonparametrics}},
  author = {Brian Kulis and Michael I. Jordan},
  year = {2011},
  doi = {10.48550/arxiv.1111.0352},
  eprint = {1111.0352},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1111.0352}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
