Can Learned Models Replace Hash Functions?

Author:

Sabek Ibrahim1,Vaidya Kapil1,Horn Dominik2,Kipf Andreas1,Mitzenmacher Michael3,Kraska Tim1

Affiliation:

1. MIT CSAIL

2. TUM

3. Harvard University

Abstract

Hashing is a fundamental operation in database management, playing a key role in the implementation of numerous core database data structures and algorithms. Traditional hash functions aim to mimic a function that maps a key to a random value, which can result in collisions, where multiple keys are mapped to the same value. There are many well-known schemes like chaining, probing, and cuckoo hashing to handle collisions. In this work, we aim to study if using learned models instead of traditional hash functions can reduce collisions and whether such a reduction translates to improved performance, particularly for indexing and joins. We show that learned models reduce collisions in some cases, which depend on how the data is distributed. To evaluate the effectiveness of learned models as hash function, we test them with bucket chaining, linear probing, and cuckoo hash tables. We find that learned models can (1) yield a 1.4x lower probe latency, and (2) reduce the non-partitioned hash join runtime with 28% over the next best baseline for certain datasets. On the other hand, if the data distribution is not suitable, we either do not see gains or see worse performance. In summary, we find that learned models can indeed outperform hash functions, but only for certain data distributions.

Publisher

Association for Computing Machinery (ACM)

Subject

General Earth and Planetary Sciences,Water Science and Technology,Geography, Planning and Development

Reference81 articles.

1. Mohammad Alahmad and Imad Fakhri Taha Alshaikhli . Broad View of Cryptographic Hash Functions . International Journal of Computer Science Issues , 2013 . Mohammad Alahmad and Imad Fakhri Taha Alshaikhli. Broad View of Cryptographic Hash Functions. International Journal of Computer Science Issues, 2013.

2. A comparison of adaptive radix trees and hash tables

3. Austin Appleby. Murmurhash3 64-bit finalizer. https://code.google.com/p/smhasher/wiki/MurmurHash3. Austin Appleby. Murmurhash3 64-bit finalizer. https://code.google.com/p/smhasher/wiki/MurmurHash3.

4. Austin Appleby . MurmurHash. https://sites.google.com/site/murmurhash/ , 2011 . Austin Appleby. MurmurHash. https://sites.google.com/site/murmurhash/, 2011.

5. Berk Atikoglu , Yuehai Xu , Eitan Frachtenberg , Song Jiang , and Mike Paleczny . Workload Analysis of a Large-Scale Key-Value Store . In Proceedings of the ACM SIGMETRICS/PERFORMANCE Joint International Conference on Measurement and Modeling of Computer Systems , 2012 . Berk Atikoglu, Yuehai Xu, Eitan Frachtenberg, Song Jiang, and Mike Paleczny. Workload Analysis of a Large-Scale Key-Value Store. In Proceedings of the ACM SIGMETRICS/PERFORMANCE Joint International Conference on Measurement and Modeling of Computer Systems, 2012.

Cited by 4 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. FairHash: A Fair and Memory/Time-efficient Hashmap;Proceedings of the ACM on Management of Data;2024-05-29

2. GLO: Towards Generalized Learned Query Optimization;2024 IEEE 40th International Conference on Data Engineering (ICDE);2024-05-13

3. DeepMapping: Learned Data Mapping for Lossless Compression and Efficient Lookup;2024 IEEE 40th International Conference on Data Engineering (ICDE);2024-05-13

4. Data Structures for Data-Intensive Applications: Tradeoffs and Design Guidelines;Foundations and Trends® in Databases;2023

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3