AI · Article or course

e-means

Mini-batch EMA clustering algorithm outperforming Lloyd's k-means in fewer epochs

Visit arxiv.org

e-means is a clustering algorithm developed by Meta FAIR that applies exponential moving average (EMA) mini-batch updates to classical vector quantization. It reaches lower mean squared error than standard Lloyd k-means in roughly 1.4 to 2.6 epochs instead of 25, yielding 10x to 45x wall-clock GPU speedups without manual hyperparameter sweeps.

What it's for

  • Cluster massive embedding datasets for retrieval and vector search indexing
  • Quantize vector databases and build inverted file (IVF) indexes in Faiss
  • Compress and sparsify key-value attention caches in large language models
  • Curate and deduplicate web-scale image or text feature datasets

Features

  • Exponential moving average centroid updates using mini-batches
  • Automatic hyperparameter selection via empirically fitted scaling laws
  • Dead cluster revival mechanism to prevent unassigned centroids
  • Decaying cosine learning rate schedule tailored for fixed dataset clustering
  • Finalization pass optimizing for either training MSE or out-of-sample test error
  • Integration into the open-source Faiss library

Pricing

Open source

Details

Type
Article or course
Category
AI
Topic
Vector Search
Open source
Yes
Platforms
Code library, Linux
For
Machine learning engineers and researchers working with large-scale vector embeddings and indexing
Alternative to
scikit-learn MiniBatchKMeans, Lloyd's k-means (Faiss-GPU), Flash-KMeans
Tags
clustering, k means, faiss, embeddings, vector database, meta fair

Why it was saved

  • @betterstackhq, 14 November 2026: It achieves better clustering quality in as few as 1.4 to 2.5 passes compared to 25 passes for traditional k-means, speeding up clustering by 10x to 45x on GPUs.

Related

Updated