Clustering is one of the most important tools for analysis of large datasets, and perhaps the most popular clustering algorithm is Lloyd's iteration for $k$-means. This iteration takes $N$ vectors $v_1,\dots,v_N\in\mathbb{R}^d$ and outputs $k$ centroids $c_1,\dots,c_k\in\mathbb{R}^d$; these partition the vectors into clusters based on which centroid is closest to a particular vector. We present an overall improved version of the "$q$-means" algorithm, the quantum algorithm originally proposed by Kerenidis, Landman, Luongo, and Prakash (2019) which performs $\varepsilon$-$k$-means, an approximate version of $k$-means clustering. This algorithm does not rely on the quantum linear algebra primitives of prior work, instead only using its QRAM to prepare and measure simple states based on the current iteration's clusters. The time complexity is $O\big(\frac{k^{2}}{\varepsilon^2}(\sqrt{k}d + \log(Nd))\big)$ and maintains the polylogarithmic dependence on $N$ while improving the dependence on most of the other parameters. We also present a "dequantized" algorithm for $\varepsilon$-$k$-means which runs in $O\big(\frac{k^{2}}{\varepsilon^2}(kd + \log(Nd))\big)$ time. Notably, this classical algorithm matches the polylogarithmic dependence on $N$ attained by the quantum algorithms.
翻译:聚类是大数据分析中最重要的工具之一,而最流行的聚类算法或许是用于$k$-means的Lloyd迭代。该迭代接收$N$个向量$v_1,\dots,v_N\in\mathbb{R}^d$,并输出$k$个质心$c_1,\dots,c_k\in\mathbb{R}^d$;这些质心根据每个向量最近的质心将向量划分为聚类。我们提出了一种整体改进版的“$q$-means”算法,该量子算法最初由Kerenidis、Landman、Luongo和Prakash(2019)提出,用于执行$\varepsilon$-$k$-means,即$k$-means聚类的近似版本。该算法不依赖先前工作中的量子线性代数基元,而仅使用其QRAM来基于当前迭代的聚类准备和测量简单状态。时间复杂度为$O\big(\frac{k^{2}}{\varepsilon^2}(\sqrt{k}d + \log(Nd))\big)$,保持了对$N$的多对数依赖性,同时改进了对其他大多数参数的依赖性。我们还提出了一种用于$\varepsilon$-$k$-means的“解量子化”算法,其运行时间为$O\big(\frac{k^{2}}{\varepsilon^2}(kd + \log(Nd))\big)$。值得注意的是,这种经典算法达到了与量子算法相同的对$N$的多对数依赖性。