# Small Is Not Dead: Distance-Aware Cluster Revival for e-means

Eyal Weiss · arXiv · 2026-11-13

- **Problem** Count-based revival in e-means removes small clusters by size alone, so it also removes centres that cover isolated groups of points, and those removals are costly.
- **Method** Not stated in the paper.

![Figure 1: Two-dimensional example: 20 Gaussian blobs of 2,000 points and three far groups of 80 points (dotted circles),k = 23centres initialized by k-means++…](https://refivu.com/papers/f2b6f05d-7401-4871-be99-b749f117115c/figures/figure-22e3504c454f295d3f695df4e3fb3f3d.png?thumb=512)

**Figure 1** : Two-dimensional example: 20 Gaussian blobs of 2,000 points and three far groups of 80 points (dotted circles),k = 23centres initialized by k-means++ (orange circles), and 5 epochs of e-means. Left: count-based revival removes the centres of the three far groups and reuses them inside the main mass of points. Right: with the distance test, all three are kept. Seed 0 is shown; the outcome (0 of 3 and 3 of 3 far groups kept) is the same in all 10 seeds. The size threshold is the e-means paper’sτ count = 0.1; since version 1.16, the library disables revival by default ford≤2.

[Original paper](https://arxiv.org/abs/2611.18238v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Eyal Weiss · Small Is Not Dead: Distance-Aware Cluster Revival for e-means · Original paper figure · Extracted the figure area from page 5 of the original PDF.

## Why size alone misjudges small clusters

e-means represents each centre as the ratio of two exponential moving averages, one of counts and one of sums, and it also relocates the centres of small clusters while training runs. That relocation step, count-based revival, runs every five batches and marks a cluster as a candidate when its moving-average count falls below a tenth of the average count.

The test looks only at cluster size, so it cannot tell a redundant small cluster from a small cluster that covers a rare, isolated group of points. On data with such groups, the same rule keeps removing the centres whose removal raises the error most.

The Covertype example makes the cost concrete. With standardized features and k = 256, default e-means ends 58% above the test error of Lloyd@25 after two epochs, while disabling revival ends 24% below it.

## A second test based on centre distance

The rule keeps the size test and adds a condition that looks at how far a candidate's centre lies from the other centres. A candidate \\(j\\) is removed when \\(\\delta\_j=\\min\_{i\\ne j}\\lVert c\_j-c\_i\\rVert^2\\) is at most \\(\\tau\_{\\mathrm{near}}\\) times \\(\\widehat{\\mathrm{MSE}}\\), with \\(\\tau\_{\\mathrm{near}}=4\\), or when it has received no point for \\(WL\\) batches with \\(W=2\\).

The running estimate \\(\\widehat{\\mathrm{MSE}}\\) is the sum of the per-cluster distortion averages \\(D\_i\\) divided by the sum of the counts \\(N\_i\\), both updated with the same step size. Each \\(D\_j\\) is an exponential moving average of the squared distances from the batch points assigned to \\(j\\) to \\(c\_j\\), taken from the assignment step that e-means already performs.

The extra cost is one moving average per cluster and one nearest-centre search for the candidates at each check.

Take a cluster whose centre equals the mean \\(\\mu\_j\\) of its points, and let removing the centre move those points to the nearest remaining centre. Under these conditions the increase in the sum of squared errors, \\(U\_j\\), is at most \\(\|P\_j\|\\,\\delta\_j\\), where \\(P\_j\\) is the set of points assigned to \\(j\\). Dividing by \\(\\widehat{\\mathrm{MSE}}\\) turns the test into a comparison that does not depend on the scale of the data.

The bound holds only when one centre is removed while the others stay fixed and the centre equals the mean of its points, and individual points can lose up to \\(\\delta\_j+2r\\sqrt{\\delta\_j}\\) for a cluster of radius \\(r\\). The authors state that the proposition motivates the test without making the rule exact.

In e-means the centre is a weighted average of past batch points, so it can lag behind the points that are nearest to it now. When the centre lags, the bound underestimates the cost on the side facing away from the other centre, so the test errs towards removal, which matches the library's behaviour.

## The abandonment clause and the waiting period

The abandonment clause releases such a centre once the number of batches since its last update reaches \\(WL\\), with \\(W=2\\) in every run.

Proposition 2 explains the choice of two epochs: if a centre receives at least one point in every epoch, the gap since its last update stays at most \\(2L-2\\) batches at every check, so the clause with \\(W=2\\) never applies to it. The gap is long for a point only because one of its visits can fall at the start of an epoch and the next at the end of the following one.

For a uniformly random order and \\(W\\) between 1 and 2, the gap between two visits exceeds \\(W\\) epochs with probability \\((2-W)^2/2\\) in the limit of many batches. With \\(W=1\\), the clause would remove the centre of a single point between two consecutive visits with probability approaching 1/2 when an epoch has many batches.

## Why isolated groups are costly to remove

Take a cluster whose centre covers \\(n\_{far}\\) points lying at distance about \\(\\rho\\) from every other centre, with \\(\\rho\\) large against the spread of the group. Each batch gives the group about \\(n\_{far}B/n\\) points, while the average count is about \\(B/k\\), so the cluster stays a candidate at almost every check when \\(n\_{far}\<\\tau\_{count}n/k\\).

Removing the cluster sends all \\(n\_{far}\\) points to a centre about \\(\\rho^2\\) away, which adds about \\(n\_{far}\\rho^2\\) to the sum of squared errors. Two features of e-means make this worse: its count is a moving average over a few batches, and the removal rule keeps applying until training ends.

Figure 1 shows this in two dimensions with 20 Gaussian blobs of 2,000 points each, three far groups of 80 points, k = 23 and k-means++ initialization. After 5 epochs, count-based revival removed all three far-group centres in all 10 seeds, while the distance test kept all three in all 10 seeds. The caption reports 0 of 3 far groups kept for count-based revival and 3 of 3 for the distance test, for seed 0.

On standardized Covertype the same pattern appears: with k = 256 the rarest soil types form small, isolated groups, and default e-means ends 58% above Lloyd@25 after two epochs. The authors read the gap as caused by the removal rule rather than by the moving-average optimization.

## Identity on the embedding benchmarks

On the embedding benchmarks of the e-means paper, the distance test never prevented a removal, so its runs match those of the library. All 103 runs had train and test MSE equal to those of the library, and unit tests confirmed bit-identical centres when no candidate is kept. At three epochs on DEEP 1M, count-based revival and the distance test both reached a test MSE ratio of 0.9968 to Lloyd@25, while disabling revival reached 1.0180.

The reason is the margin between the size of the observed ratios and the threshold: on DEEP and SIFT the largest ratio of \\(\\delta\_j\\) to the running MSE among candidates is about 2.5. The threshold of 4 was set above the values seen on embedding data, so the test keeps no candidate there.

## Gains on held-out data with isolated groups

Table 2 reports test MSE after two epochs from random initialization, as ratios to the median Lloyd@25 test MSE. The authors report reductions of roughly 25–80% on KDD Cup 99, 20–75% on Shuttle and 10–25% on GeoNames relative to count-based revival, depending on k.

Against disabled revival, the median change in test error stays below 1.5% in every held-out configuration of Table 2.

With more epochs count-based revival does not catch up: in 9 held-out configurations it never reaches the Lloyd@25 error up to ten epochs. On GeoNames the test keeps almost every candidate, so the distance test behaves like disabled revival there.

## k-means++ initialization and the utility estimate

k-means++ places centres on rare groups, and count-based revival then removes them. After two epochs with k = 1024, count-based revival ended at more than 25 times the test error of Lloyd@25 on KDD Cup 99, and 76% above it on GeoNames. The distance test kept those centres and ended within 1% of Lloyd@25 on both datasets, as disabled revival does.

The online utility estimate is an alternative that averages a per-point utility over past batches and needs the two nearest centres of every point. On KDD Cup 99 after two epochs with k of at least 1024, the training error of the distance test was roughly 30–40% lower than that of the estimate, and its test error was slightly lower, by less than 2%.

The estimate was better on YearPredictionMSD, where its test MSE was up to about 2% lower than that of the distance test. The authors keep the bound as the default, because it adds no measurable running time and needs only the centres.

## Threshold and abandonment clause

Larger thresholds keep fewer candidates and lose part of the gain; at 32 on KDD Cup 99 after 10 epochs the loss reached several percentage points. On DEEP 1M a threshold of 1 kept redundant candidates and raised the test MSE by about 2%, while thresholds of 4 and above gave runs identical to the library.

The authors keep it as a safeguard, since it adds no measurable cost.

Setting the waiting period to one epoch hurt: on KDD Cup 99 with k = 1024 after 5 epochs, the reduction in training error relative to count-based revival fell from about 80% to about 65%.

## Running time

The timings used one AMD Ryzen Threadripper 3990X server with 16 threads, for two epochs from random initialization. Per repetition, the ratio of the distance test's running time to the library's ranged from 0.98 to 1.04. The estimate's search for the two nearest centres of every point makes it more than twice as slow with FAISS's exact CPU search.

## Where the rule fails

The test ignores the error reduction that a split of a large cluster brings. On YearPredictionMSD the largest test-error increase of the distance test relative to count-based revival was below 3%, with k-means++ initialization, k = 4096 and 10 epochs. On this dataset the kept candidates also made cluster sizes less uniform: the imbalance rose by almost half for k = 256.

The second failure is the single, global error scale, which matters when cluster scales differ widely. With k-means++ initialization the same mixture gave a decrease of about 13%, because count-based revival removes the centres that k-means++ places in sparse regions.

## Limitations

All reported results come from CPU runs of the library's NumPy implementation. The GPU and multi-GPU implementations were not run, and the running time of the GPU version with CUDA-graph replay is unmeasured. The threshold of 4 was chosen on development data, and a principled way to choose it remains open. For inverted-file indexes, where cluster sizes matter, the authors note that balanced clusters may matter more than squared error.

## Related work

Fritzke's utility, the increase in squared error when a centre is removed with the others kept fixed, underlies several earlier methods. LBG-U, k-means-u\* and breathing k-means move or remove centres of low utility, and breathing k-means uses freezing so that adjacent centres are not removed together. The revival rules found for mini-batch k-means and vector-quantized networks decide by count or by time since last use alone.

## Paper info

- **Authors**: Eyal Weiss
- **Venue**: arXiv · Preprint
- **First published**: 2026-11-13
- **Added**: 2026-11-16
- **Updated**: 2026-11-13
- **Version**: v1
- **arXiv**: 2611.18238
- **Category**: cs.LG · stat.ML
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2611.18238v1) · [PDF ↗](https://arxiv.org/pdf/2611.18238v1)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

e-means (Bessa et al., 2026) is a recent mini-batch k-means algorithm, now part of the FAISS library, that reaches the error of Lloyd's algorithm about an order of magnitude faster on large embedding datasets. Every five mini-batches, it removes every cluster whose running point count falls below a tenth of the average and reuses its centre to split a large cluster. In the authors' ablation, removing this mechanism, called dead-cluster revival, raises the error more than removing any other component added to the moving-average update. The rule, however, considers only cluster size: it cannot distinguish a cluster that is small because it is redundant from one that covers a rare, isolated group of points, and on data with such groups it repeatedly removes centres whose removal is costly. We add a second condition, based on the distance between centres: a small cluster is removed only if its centre is close to another centre, relative to a running estimate of the mean squared error. When a centre equals the mean of its points, this squared distance is an upper bound on the average increase in squared error, per point of the cluster, caused by removing the centre. The condition costs one nearest-centre search for the small clusters every five mini-batches and adds no measurable running time. On the e-means paper's embedding benchmarks, it never prevents a removal, so the results are identical to those of FAISS. On datasets with small isolated groups not used during development, it reduces the test error after two epochs by roughly 10% to 80% relative to count-based revival, and it preserves the advantage of k-means++ initialization; on the other evaluation datasets, it stays within about 1% of the better of revival enabled and disabled. We also report two failure modes that the analysis predicts. This is a CPU proof of concept; GPU implementations are left to future work.

## Quote from the paper

Eyal Weiss (2026). Small Is Not Dead: Distance-Aware Cluster Revival for e-means. arXiv:2611.18238v1. https://arxiv.org/abs/2611.18238v1

**BibTeX**

```
@misc{weiss2026small,
  title = {{Small Is Not Dead: Distance-Aware Cluster Revival for e-means}},
  author = {Eyal Weiss},
  year = {2026},
  eprint = {2611.18238},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.18238v1}
}
```

## Related papers

- [A Tutorial on Principal Component Analysis](https://refivu.com/en/papers/6c1b9168-7aa0-40d4-97a5-859e8217739b-a-tutorial-on-principal-component-analysis.md)
- [When Can a Rewiring Control Test LLM Weight Readers? C2 and an Eligibility Protocol](https://refivu.com/en/papers/ca62c1dd-9cda-4db6-95ba-f9a745d44a5a-when-can-a-rewiring-control-test-llm-weight.md)
- [Quantum agents in the Gym: a variational quantum algorithm for deep Q-learning](https://refivu.com/en/papers/61131563-04fb-4585-b080-efba1e8d4a85-quantum-agents-in-the-gym-a-variational-quantum.md)

## Other paper commentary

- [Tracing Uncertainties of Extreme El Niño Prediction to Mesoscale Ocean Currents](https://refivu.com/en/papers/e50737f2-d670-42f4-9b3c-5a4a5eaf3da4-tracing-uncertainties-of-extreme-el-nino-prediction-to.md)
- [Causally Constrained and Uncertainty-Aware Cardiopulmonary Risk Prediction](https://refivu.com/en/papers/2c2b5714-498e-4c41-a2bc-142d04049204-causally-constrained-and-uncertainty-aware-cardiopulmonary.md)
- [Differentially Private Federated Learning: A Client Level Perspective](https://refivu.com/en/papers/8eaa4c01-7257-42c2-9d51-9996980ee41d-differentially-private-federated-learning-a-client-level.md)
- [Metrics for Multi-Class Classification: an Overview](https://refivu.com/en/papers/78ca6b47-f74d-4a51-a805-f5f83bb18a77-metrics-for-multi-class-classification-an-overview.md)
- [Exploiting Unintended Feature Leakage in Collaborative Learning](https://refivu.com/en/papers/422f8c4a-b03f-4b77-a90a-48be0d614527-exploiting-unintended-feature-leakage-in-collaborative.md)
- [Continual Learning Through Synaptic Intelligence](https://refivu.com/en/papers/443ed68e-4775-416a-b80f-35ef15c63f40-continual-learning-through-synaptic-intelligence.md)
- [PerfArena: Ranking LLMs by Code Performance](https://refivu.com/en/papers/c040cebb-8cde-4fb3-b12d-79a3fe746bfa-perfarena-ranking-llms-by-code-performance.md)
- [FEND: Far-End Detection in Outbound Voice AI Calls](https://refivu.com/en/papers/8f9be405-cbfb-49aa-8c22-204722d38a37-fend-far-end-detection-in-outbound-voice-ai.md)
- [Who Counts as Exposed? Measurement Choices in an Open, Re-estimable Index of Occupational AI Exposure](https://refivu.com/en/papers/bc2cfc93-d47d-40b5-b11c-31874b253264-who-counts-as-exposed-measurement-choices-in-an.md)
- [Cracks in Embeddings: Robustness and Stability of JEPA-Based Chest X-Ray Representations](https://refivu.com/en/papers/daee5a77-a7ae-4a85-aa91-3c0350658e14-cracks-in-embeddings-robustness-and-stability-of-jepa.md)
- [Fuse-All MoE Inference Kernel with Load Balancing on TPUs](https://refivu.com/en/papers/9cb74dcd-e120-4e43-b2b0-37dad7ccf356-fuse-all-moe-inference-kernel-with-load-balancing.md)
- [Dynamic bigraphical Matérn--Whittle processes: learning dependence graphs among spatial-temporal fields](https://refivu.com/en/papers/cbf27e8a-2ba6-4a1f-8c53-279da5a1a60f-dynamic-bigraphical-matern-whittle-processes-learning.md)

## Terms in this paper

- [mean squared error](https://refivu.com/en/terms/e8df98e6d7b7-mean-squared-error)
- [cosine annealing](https://refivu.com/en/terms/16263f20429f-cosine-annealing)
- [epoch](https://refivu.com/en/terms/3ea960c05448-epoch)
- [exponential moving averages](https://refivu.com/en/terms/494cc9e56529-exponential-moving-averages)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/f2b6f05d-7401-4871-be99-b749f117115c-small-is-not-dead-distance-aware-cluster-revival)
