[Paper Review] Nested Mini-Batch K-Means
This paper proposes nmbatch, a nested mini-batch k-means algorithm that accelerates convergence by reusing previously processed data through hierarchical mini-batch nesting, while maintaining centroid accuracy via single-assignment updates and using triangle inequality-based distance bounds. The method achieves solutions within 1% of the empirical minimum energy up to 100× faster than standard mini-batch k-means on dense datasets, especially during the first epoch.
A new algorithm is proposed which accelerates the mini-batch k-means algorithm of Sculley (2010) by using the distance bounding approach of Elkan (2003). We argue that, when incorporating distance bounds into a mini-batch algorithm, already used data should preferentially be reused. To this end we propose using nested mini-batches, whereby data in a mini-batch at iteration t is automatically reused at iteration t+1. Using nested mini-batches presents two difficulties. The first is that unbalanced use of data can bias estimates, which we resolve by ensuring that each data sample contributes exactly once to centroids. The second is in choosing mini-batch sizes, which we address by balancing premature fine-tuning of centroids with redundancy induced slow-down. Experiments show that the resulting nmbatch algorithm is very effective, often arriving within 1% of the empirical minimum 100 times earlier than the standard mini-batch algorithm.
Motivation & Objective
- To accelerate the mini-batch k-means algorithm by integrating triangle inequality-based distance bounds.
- To address the inefficiency of standard mini-batch k-means in early iterations, where most samples are visited only once and thus cannot benefit from bounds.
- To prevent bias in centroid estimation caused by unequal reuse of data in nested sampling schemes.
- To balance premature fine-tuning and redundancy in mini-batch size growth during optimization.
- To develop a scalable, efficient k-means variant suitable for large-scale and high-dimensional data.
Proposed method
- Introduces nested mini-batches where each iteration's batch is a superset of the previous, ensuring already-visited samples are reused.
- Enforces that each data sample contributes to centroid updates exactly once, even upon re-assignment, to prevent bias from repeated influence.
- Uses distance bounds based on the triangle inequality to skip unnecessary distance computations during assignment.
- Employs a dynamic batch size strategy where the mini-batch size doubles when the ratio of estimated cluster variance to sampling probability exceeds a threshold ρ.
- Applies bound tests only to samples that have been previously visited, maximizing acceleration during early, high-redundancy phases.
- Uses running averages for centroids, but removes old assignments before reassigning a sample to maintain unbiased updates.
Experimental results
Research questions
- RQ1Can integrating distance bounds into mini-batch k-means significantly accelerate convergence without degrading solution quality?
- RQ2How can nested mini-batches be designed to prioritize reuse of already-visited data while avoiding bias in centroid estimation?
- RQ3What is the optimal strategy for controlling mini-batch size growth to balance premature fine-tuning and redundancy?
- RQ4Does the use of distance bounds in nested mini-batches lead to faster convergence to near-optimal solutions, especially in the first epoch?
- RQ5How does the performance of nmbatch compare to standard mini-batch k-means and exact algorithms in terms of speed and solution quality?
Key findings
- nmbatch achieves solutions within 1% of the empirical minimum energy up to 100× faster than standard mini-batch k-means on dense datasets like INFMNIST and RCV1.
- On the dense INFMNIST dataset, nmbatch reaches within 2% of the optimal energy between 10× and 100× faster than mbatch.
- On the sparse RCV1 dataset, nmbatch achieves a 0.5% error threshold in less than half the time of mbatch.
- The final energy of nmbatch is consistently within one standard deviation of the initialisation variability of exact algorithms, indicating robustness.
- The choice of ρ (threshold for batch size doubling) has minimal impact on performance when bounds are active, with ρ=100 yielding strong results.
- Deactivating bound tests makes ρ more sensitive, with ρ=10 outperforming larger values due to increased cost of premature fine-tuning.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.