arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.02244cs.LG
收藏

论简化大规模空间向量:快速、内存高效且成本可预测的 k-means

On Simplifying Large-Scale Spatial Vectors: Fast, Memory-Efficient, and Cost-Predictable k-means

School of Computer Science, Wuhan University(武汉大学计算机学院);Big Data Institute, Wuhan University(武汉大学大数据研究院);La Trobe Business School, La Trobe University(拉筹伯大学拉筹伯商学院)

Yushuai Ji, Zepeng Liu, Sheng Wang, Yuan Sun, Zhiyong Peng

AI总结:

针对资源受限设备上的大规模空间向量简化问题,提出 Dask-means,通过内存可调的批量最近邻加速和轻量级成本预测,实现低内存、快速运行及准确的资源估计。

摘要:

k-means 算法可以简化大规模空间向量,例如 2D 地理位置和 3D 点云,以支持快速分析和学习。然而,在处理大规模数据集时,现有 k-means 算法的开发目标是借助大量计算资源(如内存和 CPU 使用时间)实现高性能。这些算法虽然有效,但并不适合资源受限设备。本文提出一种快速、内存高效且成本可预测的 k-means,称为 Dask-means。我们首先通过设计一个内存高效的加速器来加速 k-means;该加速器利用在内存可调索引上的优化最近邻搜索,将空间向量批量分配到簇。随后,我们设计了一个轻量级成本估计器,用于预测 k-means 任务的内存成本和运行时间,使其能够向设备请求适当内存,或调整加速器所需空间以满足内存约束,并确保有足够的 CPU 时间运行 k-means。实验表明,在简化规模为 $10^6$ 的数据集时,Dask-means 使用不到 $30$MB 内存,并且与广泛使用的 Lloyd 算法相比实现超过 $168$ 倍的加速。我们还在移动设备上验证了 Dask-means:与其他最先进(SOTA)k-means 算法相比,它展现出显著加速和低内存成本。我们的成本估计器对内存成本的估计与实际值差异小于 $3\%$,并且其运行时间预测的 MSE 比 SOTA 方法低至多 $33.3\%$。

英文摘要:

The k-means algorithm can simplify large-scale spatial vectors, such as 2D geo-locations and 3D point clouds, to support fast analytics and learning. However, when processing large-scale datasets, existing k-means algorithms have been developed to achieve high performance with significant computational resources, such as memory and CPU usage time. These algorithms, though effective, are not well-suited for resource-constrained devices. In this paper, we propose a fast, memory-efficient, and cost-predictable k-means called Dask-means. We first accelerate k-means by designing a memory-efficient accelerator, which utilizes an optimized nearest neighbor search over a memory-tunable index to assign spatial vectors to clusters in batches. We then design a lightweight cost estimator to predict the memory cost and runtime of the k-means task, allowing it to request appropriate memory from devices or adjust the accelerator's required space to meet memory constraints, and ensure sufficient CPU time for running k-means. Experiments show that when simplifying datasets with scale such as $10^6$, Dask-means uses less than $30$MB of memory, achieves over $168$ times speedup compared to the widely-used Lloyd's algorithm. We also validate Dask-means on mobile devices, where it demonstrates significant speedup and low memory cost compared to other state-of-the-art (SOTA) k-means algorithms. Our cost estimator estimates the memory cost with a difference of less than $3\%$ from the actual ones and predicts runtime with an MSE up to $33.3\%$ lower than SOTA methods.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑