Meta FAIR Open-Sources e-means Clustering with Up to 45x Speedup

By ▲ Marktechpost AI (@Marktechpost)Original title: ▲ Meta FAIR just open-sourced e-means, a drop-in replacement for k-means that reaches the same loss ...
78AI Score

Meta FAIR has open-sourced e-means, a drop-in replacement for k-means that reads small mini-batches and maintains exponential moving averages of cluster sums and counts, with two fitted scaling laws auto-selecting batch and step size. It reaches Lloyd's 25-epoch loss in just 1.4 to 2.6 epochs, delivering 10-45x GPU speedup over Flash-KMeans and 8-15x CPU speedup over Faiss, and clustered 10 billion DINO embeddings into 16.7M clusters in 2.5 epochs. The trade-off is stochastic runs and 64 GiB of float32 accumulators requiring sharding at that scale.

Full Report

▲ Marktechpost AI · 2026-11-10 23

▲ Meta FAIR just open-sourced e-means, a drop-in replacement for k-means that reaches the same loss in about one-tenth the epochs.

The key idea is simple. Lloyd's k-means recomputes every centroid from the full dataset each pass. e-means reads small mini-batches and keeps an exponential moving average of each cluster's sum and count. Two fitted scaling laws pick the batch size and step size from n, k and epochs, so there is nothing to tune beyond k.

The numbers: e-means beats Lloyd's 25-epoch loss in 1.4 to 2.6 epochs. That is a 10-45x GPU speedup vs Flash-KMeans and 8-15x on CPU vs Faiss. It also clustered 10 billion DINO embeddings into 16.7M clusters in 2.5 epochs. It is a trade-off though: runs are stochastic, and 16.7M centroids need 64 GiB of float32 accumulators, so they must be sharded. All results are self-reported.

Full analysis:

推文配图