Skip to main content
QUICK REVIEW

[论文解读] On Weighted k-mer Dictionaries

Giulio Ermanno Pibiri|arXiv (Cornell University)|Jun 4, 2021
Algorithms and Data Compression被引用 5
一句话总结

本文提出了一种新型的多线程与外部内存构造算法,用于 PTHash——一种以快速查找性能著称的最小完美哈希方案。通过避免分区的开销,该方法在保持 PTHash 相较于其他技术 2–6× 更快查找速度的同时,能够高效扩展至大规模数据集,即使在并行构建或使用外部存储时亦是如此。

ABSTRACT

A function $f : U o \{0,\ldots,n-1\}$ is a minimal perfect hash function for a set $S \subseteq U$ of size $n$, if $f$ bijectively maps $S$ into the first $n$ natural numbers. These functions are important for many practical applications in computing, such as search engines, computer networks, and databases. Several algorithms have been proposed to build minimal perfect hash functions that: scale well to large sets, retain fast evaluation time, and take very little space, e.g., 2 - 3 bits/key. PTHash is one such algorithm, achieving very fast evaluation in compressed space, typically several times faster than other techniques. In this work, we propose a new construction algorithm for PTHash enabling: (1) multi-threading, to either build functions more quickly or more space-efficiently, and (2) external-memory processing to scale to inputs much larger than the available internal memory. Only few other algorithms in the literature share these features, despite of their big practical impact. We conduct an extensive experimental assessment on large real-world string collections and show that, with respect to other techniques, PTHash is competitive in construction time and space consumption, but retains 2 - 6$ imes$ better lookup time.

研究动机与目标

  • 支持大规模键集合的 PTHash 并行与外部内存构造。
  • 克服传统分区方法在 MPH 构造中带来的性能与空间开销。
  • 在扩展至数十亿个键时,仍保持 PTHash 优越的查找速度。
  • 提供一种统一算法,可无缝适应顺序/内部、并行/内部、顺序/外部与并行/外部内存环境。

提出的方法

  • 提出一种 PTHash 的新型通用构造算法,通过避免分区,使键的处理方式兼容多线程与外部内存。
  • 采用两阶段分桶策略,使用阈值 p1 = 0.6n 和 p2 = 0.3m,将键逻辑划分为高负载与低负载桶。
  • 应用 McDiarmid 不等式,证明负载因子 α≥t 紧密集中在其期望值附近,确保性能可预测。
  • 利用泊松近似推导构造过程中预期尝试次数的边界。
  • 通过允许多线程独立处理键段并实现线程间负载均衡,实现多线程支持。
  • 通过流式输入数据并分块处理,最小化内存占用,实现外部内存支持。

实验结果

研究问题

  • RQ1是否可以在不牺牲空间效率或查找速度的前提下,高效并行化 PTHash 的构造?
  • RQ2是否可以使用外部存储将 PTHash 扩展至超过主内存大小的输入数据?
  • RQ3与基于分区的方法相比,新构造方法在构造时间、空间占用与查找性能方面表现如何?
  • RQ4在并行与外部内存执行环境下,新算法是否仍保持 PTHash 2–6× 的查找速度优势?
  • RQ5在新方法下,构造过程中每桶预期尝试次数的理论保证是什么?

主要发现

  • 新 PTHash 构造方法即使在并行构建或使用外部内存时,其查找时间仍比竞争技术快 2–6×。
  • 构造时间与空间使用量与支持并行与外部内存的最先进方法相当。
  • 该方法避免了传统分区 MPHF 中常见的 30–50% 查找延迟增加与 20% 空间增长。
  • 理论分析表明,对于大桶,每桶预期尝试次数被有界于常数;对于小桶,其增长缓慢。
  • 该算法在所有四种场景下均表现出高效扩展性:顺序/内部、并行/内部、顺序/外部与并行/外部内存。
  • 在真实世界字符串集合(数千万至数十亿个字符串)上的实证评估证实了其高性能与可扩展性。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。