arXiv:2502.02085cs.DScs.LG2025-02

改进k-means++采样速度,保持理论优势且更高效

A New Rejection Sampling Approach to $k$-$\mathtt{means}$++ With Improved Trade-Offs

  • 用拒绝采样加速k-means++,降低时间复杂度
  • 新方法在真实数据集上显著提升运行效率
  • 适合大规模数据的聚类初始化场景

k-means++种子选择算法广泛应用于聚类任务,具有期望下O(log k)的近似保证。但其时间复杂度为O(|X|kd),在大数据集上开销大。本文提出基于拒绝采样的新方法,第一种方法时间复杂度为~O(nnz(X) + βk²d),仍保持O(log k)的竞争比。其中β为数据方差与最优k-means代价之比。第二种方法在计算成本与解质量间提供新权衡,额外引入尺度不变因子k^(-Ω(m/β))Var(X),优于Bachem等人(2016a)的m^(-1)Var(X)结果,且运行时间仍为~O(nnz(X) + mk²d)。通过大量实证评估验证了理论效果。

原文摘要 · Abstract (English)

The $k$-$\mathtt{means}$++ seeding algorithm (Arthur & Vassilvitskii, 2007) is widely used in practice for the $k$-means clustering problem where the goal is to cluster a dataset $\mathcal{X} \subset \mathbb{R} ^d$ into $k$ clusters. The popularity of this algorithm is due to its simplicity and provable guarantee of being $O(\log k)$ competitive with the optimal solution in expectation. However, its running time is $O(|\mathcal{X}|kd)$, making it expensive for large datasets. In this work, we present a simple and effective rejection sampling based approach for speeding up $k$-$\mathtt{means}$++. Our first method runs in time $\tilde{O}(\mathtt{nnz} (\mathcal{X}) + βk^2d)$ while still being $O(\log k )$ competitive in expectation. Here, $β$ is a parameter which is the ratio of the variance of the dataset to the optimal $k$-$\mathtt{means}$ cost in expectation and $\tilde{O}$ hides logarithmic factors in $k$ and $|\mathcal{X}|$. Our second method presents a new trade-off between computational cost and solution quality. It incurs an additional scale-invariant factor of $ k^{-Ω( m/β)} \operatorname{Var} (\mathcal{X})$ in addition to the $O(\log k)$ guarantee of $k$-$\mathtt{means}$++ improving upon a result of (Bachem et al, 2016a) who get an additional factor of $m^{-1}\operatorname{Var}(\mathcal{X})$ while still running in time $\tilde{O}(\mathtt{nnz}(\mathcal{X}) + mk^2d)$. We perform extensive empirical evaluations to validate our theoretical results and to show the effectiveness of our approach on real datasets.

聚类采样优化算法改进

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。