Skip to main content
QUICK REVIEW

[论文解读] Learned Monotone Minimal Perfect Hashing

Paolo Ferragina, Hans‐Peter Lehmann|arXiv (Cornell University)|Jan 1, 2023
Advanced Image and Video Retrieval Techniques被引用 1
一句话总结

LeMonHash 是一种基于学习的单调最小完美哈希技术,采用分段线性模型(PGM-index)估算键的排名,并利用检索结构(BuRR)解决冲突,在整数数据集上实现了比顶级竞争对手低34%的内存占用和19倍的查询性能提升。此外,它还推出了 LeMonHash-VL 用于处理变长字符串,在内存占用上达到业界顶尖水平的同时,查询速度最高提升3倍。

ABSTRACT

A Monotone Minimal Perfect Hash Function (MMPHF) constructed on a set S of keys is a function that maps each key in S to its rank. On keys not in S, the function returns an arbitrary value. Applications range from databases, search engines, data encryption, to pattern-matching algorithms. In this paper, we describe LeMonHash, a new technique for constructing MMPHFs for integers. The core idea of LeMonHash is surprisingly simple and effective: we learn a monotone mapping from keys to their rank via an error-bounded piecewise linear model (the PGM-index), and then we solve the collisions that might arise among keys mapping to the same rank estimate by associating small integers with them in a retrieval data structure (BuRR). On synthetic random datasets, LeMonHash needs 34% less space than the next larger competitor, while achieving about 16 times faster queries. On real-world datasets, the space usage is very close to or much better than the best competitors, while achieving up to 19 times faster queries than the next larger competitor. As far as the construction of LeMonHash is concerned, we get an improvement by a factor of up to 2, compared to the competitor with the next best space usage. We also investigate the case of keys being variable-length strings, introducing the so-called LeMonHash-VL: it needs space within 13% of the best competitors while achieving up to 3 times faster queries than the next larger competitor.

研究动机与目标

  • 解决在整数和字符串键上实现单调最小完美哈希(MMPHF)时长期存在的低内存占用与高查询速度之间的挑战。
  • 探究基于学习的数据结构是否能在实际应用中超越传统的基于字典树的 MMPHF 设计。
  • 开发一种方法,利用数据的平滑性与局部均匀性,以最小化内存占用并加速构建与查询时间。
  • 将该方法扩展至变长字符串,实现极低的内存开销和高性能。

提出的方法

  • 利用 PGM-index 学习一种单调的、误差有界的分段线性近似,将键映射到估计排名。
  • 使用压缩数据结构存储每个桶中第一个键的全局排名,以实现快速排名查找。
  • 通过使用 BuRR 检索结构存储局部排名来解决桶内冲突,避免直接存储键本身。
  • 在 LeMonHash-VL 中应用字母表压缩和递归阈值,以高效处理变长字符串。
  • 通过固定误差边界(整数为 ε = 31,字符串为 ε = 63)优化 PGM 映射器,以平衡分段长度与冲突解决效率。
  • 在两级层次结构中集成 PGM 与 BuRR 组件:先进行全局桶排名索引,再进行局部冲突解决。

实验结果

研究问题

  • RQ1在整数数据集上,基于学习的方法是否能在内存占用和查询速度方面超越传统的基于字典树的 MMPHF 构造方法?
  • RQ2分段线性模型(PGM)与检索结构(BuRR)的结合在保持 O(1) 查询时间的同时,是否能有效最小化内存占用?
  • RQ3在键分布中,数据平滑性与局部均匀性在多大程度上可被利用以减少内存占用与构建时间?
  • RQ4所提出的学习方法能否在保持竞争力的内存占用与性能特征的前提下,有效扩展至变长字符串?
  • RQ5在实际应用中,使用误差有界的分段线性模型是否会打破理论上的超线性内存下限?

主要发现

  • 在合成的随机整数数据集上,LeMonHash 的内存占用比第二好的竞争对手低34%,查询吞吐量快16倍。
  • 在真实世界的整数数据集上,LeMonHash 的内存占用与最佳竞争对手相当或更优,同时查询性能最高提升19倍。
  • 在内存占用相近的前提下,LeMonHash 的构建吞吐量相比第二好的竞争对手最高提升2倍。
  • LeMonHash-VL 在字符串数据集上的内存占用与最佳竞争对手相比最多仅高出13%,同时查询吞吐量最高提升3倍。
  • 在大多数测试数据集上,该方法在内存、构建和查询性能方面均全面超越所有竞争对手。
  • 通过利用键分布中的局部均匀性,特别是结合误差有界的 PGM 建模,该方法在实际中打破了超线性内存下限。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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