arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.09275cs.DScs.DBcs.DCcs.PF
收藏

支持批量更新的并行 $k$d-tree

Parallel $k$d-tree with Batch Updates

Ziyang Men, Zheqi Shen, Yan Gu, Yihan Sun

AI总结:

本文提出兼具理论界与工程优化的并行 Pkd-tree,支持并行构建、批量更新及多种查询,并在多类数据集上显著优于现有并行基线。

摘要:

$k$d-tree 是管理多维数据最广泛使用的数据结构之一。由于数据量持续增长,在 $k$d-tree 中考虑并行性势在必行。然而,我们观察到现有并行 kd-tree 实现在构建和更新两方面都存在挑战。本文的目标是通过支持高并行性和缓存效率,开发高效的内存中 $k$d-tree。我们提出 Pkd-tree(Parallel $k$d-tree,并行 $k$d-tree),这是一种在理论和实践中都高效的并行 $k$d-tree。Pkd-tree 支持并行树构建、批量更新(插入和删除),以及多种查询,包括 k 近邻搜索、范围查询和范围计数。我们证明了我们的算法在 work(顺序时间复杂度)、span(并行度)和缓存复杂度方面具有很强的理论界。我们的关键技术包括:1)一种同时优化 work、span 和缓存复杂度的高效构建算法;2)基于重建的更新算法,可保证树是权重平衡的。借助新的算法洞见和精心的工程实现,我们获得了高度优化的 Pkd-tree 实现。我们使用多种合成数据集和真实世界数据集测试了 Pkd-tree,包括均匀数据和高度倾斜的数据。我们将 Pkd-tree 与最先进的并行 $k$d-tree 实现进行比较。在所有测试中,在查询性能更优或具有竞争力的情况下,Pkd-tree 在构建和更新方面始终比所有基线快得多。我们公开了代码。

英文摘要:

The $k$d-tree is one of the most widely used data structures to manage multi-dimensional data. Due to the ever-growing data volume, it is imperative to consider parallelism in $k$d-trees. However, we observed challenges in existing parallel kd-tree implementations, for both constructions and updates. The goal of this paper is to develop efficient in-memory $k$d-trees by supporting high parallelism and cache-efficiency. We propose the Pkd-tree (Parallel $k$d-tree), a parallel $k$d-tree that is efficient both in theory and in practice. The Pkd-tree supports parallel tree construction, batch update (insertion and deletion), and various queries including k-nearest neighbor search, range query, and range count. We proved that our algorithms have strong theoretical bounds in work (sequential time complexity), span (parallelism), and cache complexity. Our key techniques include 1) an efficient construction algorithm that optimizes work, span, and cache complexity simultaneously, and 2) reconstruction-based update algorithms that guarantee the tree to be weight-balanced. With the new algorithmic insights and careful engineering effort, we achieved a highly optimized implementation of the Pkd-tree. We tested Pkd-tree with various synthetic and real-world datasets, including both uniform and highly skewed data. We compare the Pkd-tree with state-of-the-art parallel $k$d-tree implementations. In all tests, with better or competitive query performance, Pkd-tree is much faster in construction and updates consistently than all baselines. We released our code.

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

↑