arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1711.08797stat.MLcs.DScs.LG
收藏

用于相似性估计和简化的实用哈希函数

Practical Hash Functions for Similarity Estimation and Dimensionality Reduction

University of Copenhagen(哥本哈根大学);SupWiz(SupWiz公司)

Søren Dahlgaard, Mathias Bæk Tejs Knudsen, Mikkel Thorup

摘要:

散列是机器学习的几个方面中采用的降维的基本工具。然而,性能分析通常是在使用真正随机的单位代价散列函数的抽象假设下进行的,而不关心使用哪种具体的散列函数。具体的散列函数可以在足够随机输入上工作良好。问题是,当面对更结构化的输入时,它在现实世界中是否值得信任。在本文中,我们专注于散列的两个突出应用,即Li等人的单排列散列(OPH)方案的相似性估计。[NIPS'12]和Weinberger等人的特征散列(FH)。[ICML'09],这两个都有许多应用,即LSH的近似近邻搜索和SVM的大规模分类。我们认为混合制表哈希Dahlgaard等人。[FOCS'15],它被证明在许多应用中,包括OPH,表现得像一个真正的随机散列函数。在这里,我们首先展示了使用真正随机散列的FH的改进的浓度范围,然后认为混合制表对稀疏输入的表现类似。然而,我们的主要贡献是在FH,OPH和LSH中使用不同哈希方案的实验比较。我们发现,混合制表散列几乎一样快的multiply-mod-prime方案ax+b mod p. multiply-mod-prime保证工作在足够随机的数据,但我们证明,在上述应用程序中,它可能会导致偏见和现实世界和合成数据的浓度差。我们还比较了流行的MurmurHash 3,它没有经过验证的保证。在我们的实验中,混合制表和MurmurHash 3的表现都类似于真正的随机哈希。然而,混合制表比MurmurHash 3快40%,并且它在所有可能的输入上都有良好的性能保证。

英文摘要:

Hashing is a basic tool for dimensionality reduction employed in several aspects of machine learning. However, the perfomance analysis is often carried out under the abstract assumption that a truly random unit cost hash function is used, without concern for which concrete hash function is employed. The concrete hash function may work fine on sufficiently random input. The question is if it can be trusted in the real world when faced with more structured input. In this paper we focus on two prominent applications of hashing, namely similarity estimation with the one permutation hashing (OPH) scheme of Li et al. [NIPS'12] and feature hashing (FH) of Weinberger et al. [ICML'09], both of which have found numerous applications, i.e. in approximate near-neighbour search with LSH and large-scale classification with SVM. We consider mixed tabulation hashing of Dahlgaard et al.[FOCS'15] which was proved to perform like a truly random hash function in many applications, including OPH. Here we first show improved concentration bounds for FH with truly random hashing and then argue that mixed tabulation performs similar for sparse input. Our main contribution, however, is an experimental comparison of different hashing schemes when used inside FH, OPH, and LSH. We find that mixed tabulation hashing is almost as fast as the multiply-mod-prime scheme ax+b mod p. Mutiply-mod-prime is guaranteed to work well on sufficiently random data, but we demonstrate that in the above applications, it can lead to bias and poor concentration on both real-world and synthetic data. We also compare with the popular MurmurHash3, which has no proven guarantees. Mixed tabulation and MurmurHash3 both perform similar to truly random hashing in our experiments. However, mixed tabulation is 40% faster than MurmurHash3, and it has the proven guarantee of good performance on all possible input.

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

↑