e-means:以十分之一的轮数超越 k-means

·

研究论文 · 2026/11/11

本文提出e-means,一种基于指数移动平均优化和迷你批次更新的k-means聚类算法,利用现代深度学习机制和新见解,建立了衰减率和批次大小对最终性能影响的缩放定律,从而无需超参数扫描即可为不同问题规模和嵌入数据集固定参数。e-means比Lloyd k-means更快且收敛到更低损失,常优于k-means++。在多个嵌入数据集上,e-means在1.4至2.6个epoch内达到Lloyd k-means 25个epoch的损失,相比最先进k-means实现获得10-45倍GPU实际时间加速。例如,e-means仅用2.5个epoch就将100亿DINO嵌入数据集DINO10B划分为1600万个簇,损失低于Lloyd 25个epoch的结果。

e-means在保持聚类质量的同时大幅提升速度,且无需超参数调优,对大规模嵌入数据聚类具有重要实用价值。

Lloyd's k-means algorithm is a long-running standard for clustering, with applications in data analysis, retrieval, quantization and data curation. In this paper, we introduce an exponential moving average optimization procedure for k-means with mini-batch updates, powered by modern deep learning machinery and new insights. We also establish scaling laws on how decay rate and batch size impact final performance. This gives us a formulaic rule to fix them for multiple problem sizes and embedding datasets, without the need for any hyperparameter sweep. The resulting clustering algorithm, coined e-means, is much faster than Lloyd k-means and converges to lower losses, frequently even beating k-means++. On a wide array of embeddings datasets, it beats the loss of Lloyd k-means at 25 epochs in 1.4 to 2.6 epochs, which translates to 10-45x GPU wall-clock speedups compared to state-of-the-art k-means implementations. As an example, e-means partitions DINO10B, a dataset of 10 billion DINO embeddings, into 16 million clusters in only 2.5 epochs, reaching a loss below Lloyd's at 25 epochs.

阅读原文

参与讨论