Skip to main content
AI RADARGitHub
30•11/12/2026, 15:00•3 min read

Meta FAIR introduces e-means: a clustering algorithm that outperforms k-means

GitHubGotBurnout Radar

Meta FAIR introduces e-means: a clustering algorithm that outperforms k-means

AI Daily Digest•Verified Tech Release
Executive TL;DR30s read

Meta FAIR's e-means reaches classic k-means quality in 1.4–2.6 epochs and accelerates large-scale vector clustering, reducing GPU costs for RAG and vector search.

Meta FAIR has introduced e-means, a clustering algorithm that reaches the quality of classic k-means in just 1.4–2.6 epochs and significantly speeds up work with large vector databases.

k-means remains one of the most widely used ML algorithms: vector search, RAG, embedding clustering, dataset cleaning and balancing, weight and KV-cache quantization, codebook creation for image and audio tokens, data analysis, and anomaly detection. However, on billions of vectors, each full k-means pass is very expensive.

The authors propose updating cluster centers with an exponential moving average over batches. For each cluster, the algorithm stores the number of points and their sum; with each new batch, these values are updated so that recent data has more weight while older data is gradually forgotten. The cluster center remains the ordinary mean — the sum divided by the number of points.

As a result, centers start moving after the first batches instead of after a full pass over the data. Batch size and update step are computed using ready-made formulas, so no hyperparameters need to be tuned manually.

In the end, e-means reaches classic k-means quality much faster and even with slightly lower loss. In the largest test — 10 billion embeddings and 16 million clusters — it used almost 9 times fewer GPU-hours.

This is especially important for RAG systems on huge databases, where index construction can require thousands of GPU hours.

Article | Code | Project

Why it matters

Analysis

Faster clustering can reduce the cost of building indexes for large RAG systems and other AI workloads that rely on embedding clusters.

Discuss in community

Share your questions and insights with developers

Join Telegram
+5 Points
← Back to news feed

Related in Ecosystem

Practical guides, core terminology, and agent skills