Skip to main content
QUICK REVIEW

[Paper Review] Consistent Weighted Sampling Made Fast, Small, and Easy

Bernhard Haeupler, Mark S. Manasse|arXiv (Cornell University)|Oct 16, 2014
Advanced Image and Video Retrieval TechniquesComputer Science22 references27 citations
TL;DR

This paper presents a fast, compact, and accurate method for weighted Jaccard similarity estimation by reducing weighted sets to tunable-size unweighted sets via randomized rounding. The approach enables one-shot computation of near-independent samples using only a constant number of hash evaluations per element, achieving up to two orders of magnitude speedup over prior methods with negligible bias and minimal accuracy loss.

ABSTRACT

Document sketching using Jaccard similarity has been a workable effective technique in reducing near-duplicates in Web page and image search results, and has also proven useful in file system synchronization, compression and learning applications. Min-wise sampling can be used to derive an unbiased estimator for Jaccard similarity and taking a few hundred independent consistent samples leads to compact sketches which provide good estimates of pairwise-similarity. Subsequent works extended this technique to weighted sets and show how to produce samples with only a constant number of hash evaluations for any element, independent of its weight. Another improvement by Li et al. shows how to speedup sketch computations by computing many (near-)independent samples in one shot. Unfortunately this latter improvement works only for the unweighted case. In this paper we give a simple, fast and accurate procedure which reduces weighted sets to unweighted sets with small impact on the Jaccard similarity. This leads to compact sketches consisting of many (near-)independent weighted samples which can be computed with just a small constant number of hash function evaluations per weighted element. The size of the produced unweighted set is furthermore a tunable parameter which enables us to run the unweighted scheme of Li et al. in the regime where it is most efficient. Even when the sets involved are unweighted, our approach gives a simple solution to the densification problem that other works attempted to address. Unlike previously known schemes, ours does not result in an unbiased estimator. However, we prove that the bias introduced by our reduction is negligible and that the standard deviation is comparable to the unweighted case. We also empirically evaluate our scheme and show that it gives significant gains in computational efficiency, without any measurable loss in accuracy.

Motivation & Objective

  • To address the computational inefficiency of existing weighted sampling methods that scale poorly with element weights.
  • To enable fast, one-shot computation of near-independent samples for weighted sets, matching the performance of unweighted schemes.
  • To reduce weighted sets to unweighted sets via randomized rounding while preserving Jaccard similarity with negligible bias.
  • To provide a tunable parameter controlling the size of the resulting unweighted set for optimal performance in downstream sketching.
  • To demonstrate that the proposed method achieves significant speedups without measurable loss in accuracy for high-similarity cases.

Proposed method

  • Reduce weighted sets to unweighted sets using randomized rounding with two or more scales, enabling efficient sampling.
  • Apply the one-permutation technique from Li et al. [17] to compute hundreds of near-independent samples in a single pass with constant hash evaluations per element.
  • Use a tunable parameter to control the size of the resulting unweighted set, optimizing for efficiency in subsequent sketching.
  • Introduce a thresholding mechanism that skips similarity estimation when similarity falls below a user-defined threshold α, improving practical efficiency.
  • Prove that the bias introduced by rounding is negligible and that tail bounds on estimation error are comparable to the unweighted case.
  • Empirically evaluate the method against Ioffe’s algorithm and randomized rounding, measuring absolute error and standard deviation across varying similarity levels.

Experimental results

Research questions

  • RQ1Can weighted Jaccard similarity estimation be accelerated significantly while maintaining high accuracy?
  • RQ2Does randomized rounding of weighted sets to unweighted sets introduce significant bias in Jaccard similarity estimation?
  • RQ3Can the one-permutation sampling technique from unweighted sketching be adapted to weighted sets via set reduction?
  • RQ4How does the tunable size of the reduced unweighted set affect computational efficiency and estimation quality?
  • RQ5What is the trade-off between computational speed and estimation accuracy in high-similarity scenarios?

Key findings

  • The proposed method achieves up to two orders of magnitude faster sketch computation compared to prior weighted sampling methods.
  • The average absolute error of the method is comparable to Ioffe’s algorithm at high similarity values (e.g., 0.96), with errors below 0.01.
  • For Jaccard similarities between 0.8 and 0.9, the method performs slightly better than Ioffe’s algorithm in terms of average absolute error.
  • The standard deviation of the estimation error is smaller than or comparable to Ioffe’s method across most similarity levels, indicating stable performance.
  • The bias introduced by randomized rounding is negligible, and the method maintains tail bounds similar to the unweighted case.
  • Even at low similarity values (e.g., 0.4), the absolute error remains below 0.035, corresponding to an average excess mismatch of about 4 bins.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.