English

Fast Similarity Sketching

Data Structures and Algorithms 2024-05-07 v4

Abstract

We consider the Similarity Sketching\textit{Similarity Sketching} problem: Given a universe [u]={0,,u1}[u] = \{0,\ldots, u-1\} we want a random function SS mapping subsets A[u]A\subseteq [u] into vectors S(A)S(A) of size tt, such that the Jaccard similarity J(A,B)=AB/ABJ(A,B) = |A\cap B|/|A\cup B| between sets AA and BB is preserved. More precisely, define Xi=[S(A)[i]=S(B)[i]]X_i = [S(A)[i] = S(B)[i]] and X=i[t]XiX = \sum_{i\in [t]} X_i. We want E[Xi]=J(A,B)E[X_i]=J(A,B), and we want XX to be strongly concentrated around E[X]=tJ(A,B)E[X] = t \cdot J(A,B) (i.e. Chernoff-style bounds). This is a fundamental problem which has found numerous applications in data mining, large-scale classification, computer vision, similarity search, etc. via the classic MinHash algorithm. The vectors S(A)S(A) are also called sketches\textit{sketches}. Strong concentration is critical, for often we want to sketch many sets B1,,BnB_1,\ldots,B_n so that we later, for a query set AA, can find (one of) the most similar BiB_i. It is then critical that no BiB_i looks much more similar to AA due to errors in the sketch. The seminal t×MinHasht\times\textit{MinHash} algorithm uses tt random hash functions h1,,hth_1,\ldots, h_t, and stores (minaAh1(A),,minaAht(A))\left ( \min_{a\in A} h_1(A),\ldots, \min_{a\in A} h_t(A) \right ) as the sketch of AA. The main drawback of MinHash is, however, its O(tA)O(t\cdot |A|) running time, and finding a sketch with similar properties and faster running time has been the subject of several papers. (continued...)

Keywords

Cite

@article{arxiv.1704.04370,
  title  = {Fast Similarity Sketching},
  author = {Søren Dahlgaard and Mathias Bæk Tejs Langhede and Jakob Bæk Tejs Houen and Mikkel Thorup},
  journal= {arXiv preprint arXiv:1704.04370},
  year   = {2024}
}

Comments

The original version was directly based on a conference paper of the same title from FOCS'17. This new version is substantially revised with some cleaner and stronger theorems, particularly concerning the high probability domain. Moreover, there is one more author, Jakob Houen. In addition, one of the old authors, Mathias, has changed surname from Knudsen to Langhede

R2 v1 2026-06-22T19:17:22.053Z