AI · Article or course
e-means
Mini-batch EMA clustering algorithm outperforming Lloyd's k-means in fewer epochs
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: 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
Practical architectural strategies to fix common failure modes in RAG systems
RAG framework using continuous latent reasoning and embedding-based context compression
RAG architecture for chatting with local Apple Notes via DeepSeek
Interactive 2D vector embedding map of over 36,000 movies.
Updated