Meta FAIR Releases e-means: A New k-means Alternative That Converges 10x Faster

Meta FAIR replaces mini-batch k-means with e-means in FAISS 1.16.0, cutting iterations ~10x with 10-45x GPU speedup and no new hyperparameters.
Meta FAIR introduces e-means in FAISS 1.16.0 as a drop-in replacement for mini-batch k-means in vector retrieval and clustering preprocessing. It reaches Lloyd's 25-epoch loss in just 1.4-2.6 epochs—roughly 10x fewer iterations—with 10-45x GPU speedup and zero new hyperparameters. The article notes the comparison measures cost-to-quality rather than per-step speed, and that gains vary with data distribution, cluster count, and batch size. Since FAISS is core vector-search infrastructure, the change reaches existing users via version upgrade, but teams should benchmark and verify initialization stability before deploying.
Meta FAIR has introduced a new algorithm called e-means in FAISS 1.16.0 to replace the traditional mini-batch k-means. According to the official description, it needs only 1.4 to 2.6 epochs to reach the same loss level that Lloyd's algorithm achieves in 25 epochs, delivering a 10x to 45x speedup on GPU without introducing any new hyperparameters. For a fundamental operator that is repeatedly invoked in vector retrieval and clustering preprocessing, changes like this often have a broader impact than the surface numbers suggest.

What Exactly Does e-means Change
k-means is one of the oldest algorithms in machine learning, and Lloyd iteration remains the default choice for the vast majority of clustering pipelines to this day. Its bottleneck is clear: every iteration must assign all samples to their nearest cluster centers and then recompute the centers, with costs rising sharply when the sample volume is large and the number of clusters is high. Mini-batch k-means alleviates this problem by estimating gradients using only a small batch of samples each time, but convergence speed is still limited by batch size and the number of iterations.
e-means is positioned as a direct replacement for the mini-batch k-means implementation in FAISS. From publicly available information, it introduces no new hyperparameters that require tuning, which means existing pipelines can switch over without changing their configuration. For engineering teams, this is more appealing than raw speedup alone—tuning costs are often the hidden bulk of the expense.
Lloyd's algorithm is the classic k-means iterative procedure, consisting of two alternating steps: the E-step assigns each sample to its nearest cluster center in Euclidean distance, and the M-step updates each cluster center to the mean of all samples in that cluster. The algorithm guarantees that the objective function (the within-cluster sum of squares, or inertia) is monotonically non-increasing after each iteration, and therefore necessarily converges to a local optimum. The cost is that each round must traverse all N samples and compute distances to K centers, with complexity O(NKd), where d is the vector dimension; when N reaches tens of millions or more and K is in the thousands, both the per-round cost and the number of required rounds become bottlenecks. Lloyd's algorithm is sensitive to initialization and is typically paired with k-means++ initialization to improve results, which is also the source of the common issue mentioned later that "clustering results are sensitive to initialization."
The Order-of-Magnitude Difference in Convergence Speed
The official benchmark is the loss value that Lloyd's algorithm reaches at 25 epochs. e-means reaches the same loss level within 1.4 to 2.6 epochs. In other words, for the same clustering quality, the number of iterations is reduced by roughly an order of magnitude.
The significance of this comparison is that it measures "the cost required to achieve equivalent quality" rather than the absolute speed of any single round. In practical use of clustering algorithms, users typically care not about per-step latency but about how long the entire process takes and whether the results are good enough. Measured on this basis, the 10x to 45x GPU speedup is what has real reference value.
It should be noted that this speedup range is quite wide, indicating that actual gains depend on data distribution, number of clusters, batch size, and other conditions—not every scenario will achieve the upper bound.
Mini-batch k-means was proposed by Sculley in 2010. Its core idea is to perform stochastic-gradient-style updates to cluster centers using small batches of samples: each round draws only batch samples, assigns them to the nearest centers, and moves the centers toward the within-batch mean according to a learning rate (typically the reciprocal of the cumulative number of samples already assigned to that center). Compared with Lloyd's full scan each round, it significantly reduces per-round computation, but convergence speed is affected by batch size and learning rate scheduling, and results carry randomness. The term "epoch" here refers to the computational cost corresponding to one complete pass over the training set; using "the number of epochs needed to reach a given loss" as the comparison metric eliminates differences in per-step latency and provides a fairer measure of an algorithm's convergence efficiency under an equivalent computational budget.
Why This Matters
k-means appears extremely frequently in industry: index construction for vector databases, feature quantization for image retrieval, user segmentation in recommendation systems, and even deduplication of large-model training data may all have it running behind the scenes. FAISS itself is Meta's open-source high-performance similarity search library, used as infrastructure by a large number of vector retrieval systems. Putting e-means directly into FAISS 1.16.0 means delivering this optimization onto the upgrade path of existing users, rather than leaving it in a paper.
From the perspective of algorithm evolution, this is a typical case of "engineering-level improvement on an old problem": it does not change the problem framework but works on convergence efficiency. Such work rarely becomes a hot topic, but its impact on the throughput of real systems is direct.
FAISS (Facebook AI Similarity Search) is Meta's open-source high-performance vector similarity retrieval library, offering multiple index structures such as Flat, IVF, HNSW, and PQ, and is widely used for nearest-neighbor search over billions of vectors. IVF-type indexes require first performing k-means clustering on the base vectors during construction, partitioning vectors into a number of inverted lists (Voronoi cells); clustering quality and speed directly affect index construction time and retrieval recall. For this reason, k-means is a high-frequency hot operator in the construction phase of FAISS, and replacing its implementation can directly shorten the wall-clock time of index construction—which is why this change has a relatively large impact on existing users.
Several Points to Consider When Using It
e-means adds no hyperparameters, lowering the barrier to migration, but a few points still deserve attention. First, the speedup is a range rather than a fixed value; before deployment, you should benchmark against your own data scale rather than directly applying the promotional numbers. Second, it replaces the mini-batch implementation—if your scenario already uses full-batch Lloyd and the data volume is not large, the gains may be limited. Third, the sensitivity of clustering results to initialization is a common issue across the k-means family, and the public information does not state whether e-means has any targeted handling for this; stability needs to be verified in actual use.
Overall, e-means is a replacement option with low migration cost and high potential benefit. For teams that already use FAISS as infrastructure, running an A/B comparison after upgrading to 1.16.0 is a reasonable next step. For teams still using other k-means implementations, this signal is also worth noting: efficiency improvements to fundamental operators are happening continuously, and periodically re-evaluating your default choices pays off.
One-line Summary
Meta FAIR replaces mini-batch k-means with e-means in FAISS 1.16.0, reducing iterations by roughly an order of magnitude and delivering a 10x to 45x GPU speedup without adding hyperparameters.
Paragraph Summary
Meta FAIR introduces the e-means algorithm in FAISS 1.16.0 as a direct replacement for mini-batch k-means in k-means computations for vector retrieval and clustering preprocessing. Official data shows that to reach the same loss level as Lloyd's algorithm at 25 epochs, e-means needs only 1.4 to 2.6 epochs—roughly an order of magnitude fewer iterations—delivering a 10x to 45x GPU speedup without introducing any new hyperparameters, so existing pipelines can switch with zero configuration. The article notes that this comparison measures the cost of achieving equivalent clustering quality rather than per-step speed; the 10x to 45x range indicates that gains depend on data distribution, number of clusters, and batch size. Since FAISS is vector retrieval infrastructure, this change reaches existing users directly through version upgrades, with a direct impact on throughput in scenarios such as index construction—but you should still run your own benchmarks and verify initialization stability before deployment.
Related articles

AI Is Great at Writing Code, So Why Are Codebases Becoming More Fragile?
AI coding tools boost efficiency but may make codebases fragile. Based on a developer blog and Hacker News discussion, this article analyzes the hidden costs of AI-generated code, community divisions, and practical suggestions for reducing risks.

Can Deleting Weights Actually Improve LLM Post-Training?
Exploring the counterintuitive effects of deleting weights in LLM post-training, analyzing regularization and sparsity benefits, challenges, and new ideas for AI practitioners.

30 Million USD in Funding: The Ambition and Challenge of Redesigning the CPU
A startup has raised 30 million USD to redesign the CPU. This article analyzes its possible technical routes, funding challenges, and industry impact, exploring architectural innovation opportunities in the battle between specialization and generalization.