mlsanityData to 14 Oct 2026

Log-Time K-Means Clustering for 1D Data: Novel Approaches with Proof and Implementation

arXiv 2412.15295 ↗First posted 19 Dec 2024cs.DS cs.LGcited by 2

Not on the map. Why?

Abstract (arXiv)

Clustering is a key task in machine learning, with k-means being widely used for its simplicity and effectiveness. While 1D clustering is common, existing methods often fail to exploit the structure of 1D data, leading to inefficiencies. This thesis introduces optimized algorithms for k-means++ initialization and Lloyd's algorithm, leveraging sorted data, prefix sums, and binary search for improved computational performance. The main contributions are: (1) an optimized k-cluster algorithm achieving O(l · k2 · log n) complexity for greedy k-means++ initialization and O(i · k · log n) for Lloyd's algorithm, where l is the number of greedy k-means++ local trials, and i is the number of Lloyd's algorithm iterations, and (2) a binary search-based two-cluster algorithm, achieving O(log n) runtime with deterministic convergence to a Lloyd's algorithm local minimum. Benchmarks demonstrate over a 4500x speedup compared to scikit-learn for large datasets while maintaining clustering quality measured by within-cluster sum of squares (WCSS). Additionally, the algorithms achieve a 300x speedup in an LLM quantization task, highlighting their utility in emerging applications. This thesis bridges theory and practice for 1D k-means clustering, delivering efficient and sound algorithms implemented in a JIT-optimized open-source Python library.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 5 of its 22 references that are in the map. First posted on arXiv 19 Dec 2024.

Builds on

5 of 22 references.

References · 5

  1. 2023SqueezeLLM: Dense-and-Sparse Quantizationcited by 294
  2. 2024Any-Precision LLM: Low-Cost Deployment of Multiple, Different-Sized LLMscited by 54
  3. 2017Fast Exact k-Means, k-Medians and Bregman Divergence Clustering in 1Dcited by 15
  4. 2019Noisy, Greedy and Not So Greedy k-means++cited by 4
  5. 2022Ego Network Structure in Online Social Networks and its Impact on Information Diffusioncited by 2

Built on by

Cited by year

Citing papers per year: 2025: 2.

2 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026The K-SCAN Clustering Algorithm
  2. 2026One-Bit Clustering for Two Component Sub-Gaussian Mixture Models
  3. 2025Transformer Circuits Can Realize Clustering Algorithms
  4. 2026Distributionally Robust K-Means Clustering
  5. 2024Robust Clustering on High-Dimensional Data with Stochastic Quantization
  6. 2026Gromov-Wasserstein Quantization and Clustering: Structure, Rates, and Algorithms
  7. 2021Communication-efficient k-Means for Edge-based Machine Learning
  8. 2026Multi-Domain Clustering via Measure Quantization