arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1303.5479cs.DS
收藏

Bottom-k和优先抽样、集合相似性与最小独立子集和

Bottom-k and Priority Sampling, Set Similarity and Subset Sums with Minimal Independence

Mikkel Thorup

摘要:

我们考虑对集合X进行底部k采样,根据给定的哈希函数h,挑选由k个最小元素组成的样本S_k(X)。利用该样本,我们可以估计任何子集Y的相对大小f= |Y| / |X|为|S_k(X)与Y相交|/k。一个标准的应用是估计Jaccard相似性f=| A互联B|/|A工会B|在A和B之间。给定来自A和B的底k个样本,我们构造它们的并集的底k个样本为S_k(A union B)=S_k(S_k(A)union S_k(B)),然后相似度估计为|S_k(A并B)相交S_k(A)相交S_k(B)|/k。我们在这里表明,即使散列函数仅是2-独立的,预期相对误差也是O(1/sqrt(fk))。对于fk=Omega(1),这在真正随机散列的预期相对误差的恒定因子内。为了比较,考虑kxmin方式的经典方法,其中我们使用k个散列独立函数h_1,.,h_k,存储每个散列函数的最小元素。对于kxmin,存在具有恒定独立性的至少恒定的偏差,并且它不会随着k的增大而减小。最近,Feigenblat等人表明,如果哈希函数是8-独立的并且k足够大,则bottom-k可以避免偏差。对于任意k,我们得到2-独立。我们的结果是基于一个简单的联合边界,将散列方案的通用浓度边界转移到底部k样本,例如,得到了具有较高独立性的较强概率误差界。对于加权集,我们考虑优先级采样,它有效地适应具体的输入权重,例如,从厚尾输入中获益匪浅。这一次,分析是更多的参与,但我们再次表明,通用的浓度范围可以应用。

英文摘要:

We consider bottom-k sampling for a set X, picking a sample S_k(X) consisting of the k elements that are smallest according to a given hash function h. With this sample we can estimate the relative size f=|Y|/|X| of any subset Y as |S_k(X) intersect Y|/k. A standard application is the estimation of the Jaccard similarity f=|A intersect B|/|A union B| between sets A and B. Given the bottom-k samples from A and B, we construct the bottom-k sample of their union as S_k(A union B)=S_k(S_k(A) union S_k(B)), and then the similarity is estimated as |S_k(A union B) intersect S_k(A) intersect S_k(B)|/k. We show here that even if the hash function is only 2-independent, the expected relative error is O(1/sqrt(fk)). For fk=Omega(1) this is within a constant factor of the expected relative error with truly random hashing. For comparison, consider the classic approach of kxmin-wise where we use k hash independent functions h_1,...,h_k, storing the smallest element with each hash function. For kxmin-wise there is an at least constant bias with constant independence, and it is not reduced with larger k. Recently Feigenblat et al. showed that bottom-k circumvents the bias if the hash function is 8-independent and k is sufficiently large. We get down to 2-independence for any k. Our result is based on a simply union bound, transferring generic concentration bounds for the hashing scheme to the bottom-k sample, e.g., getting stronger probability error bounds with higher independence. For weighted sets, we consider priority sampling which adapts efficiently to the concrete input weights, e.g., benefiting strongly from heavy-tailed input. This time, the analysis is much more involved, but again we show that generic concentration bounds can be applied.

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

↑