arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:1809.00458v1 [cs.IR] 03 Sep 2018

GB-KMV: An Augmented KMV Sketch for Approximate Containment Similarity Search

Yang Yang    Ying Zhang Affiliation: University of New South Wales, University of Technology Sydney{yang.yang, zhangw}@cse.unsw.edu.au, ying.zhang@uts.edu.au    Wenjie Zhang    Zengfeng Huang
Abstract

In this paper, we study the problem of approximate containment similarity search. Given two records QQ and XX, the containment similarity between QQ and XX with respect to QQ is |QX||Q|\frac{|Q\cap X|}{|Q|}. Given a query record QQ and a set of records 𝒮\mathcal{S}, the containment similarity search finds a set of records from 𝒮\mathcal{S} whose containment similarity regarding QQ is not less than the given threshold. This problem has many important applications in commercial and scientific fields such as record matching and domain search. Existing solution relies on the asymmetric LSH method by transforming the containment similarity to well-studied Jaccard similarity. In this paper, we use a inherently different framework by transforming the containment similarity to set intersection. We propose a novel augmented KMV sketch technique, namely GB-KMV, which is data-dependent and can achieve a much better trade-off between the sketch size and the accuracy. We provide a set of theoretical analysis to underpin the proposed augmented KMV sketch technique, and show that it outperforms the state-of-the-art technique LSH-E in terms of estimation accuracy under practical assumption. Our comprehensive experiments on real-life datasets verify that GB-KMV is superior to LSH-E in terms of the space-accuracy trade-off, time-accuracy trade-off, and the sketch construction time. For instance, with similar estimation accuracy (F-11 score), GB-KMV is over 100 times faster than LSH-E on several real-life datasets.

I Introduction

In many applications such as information retrieval, data cleaning, machine learning and user recommendation, an object (e.g., document, image, web page and user) is described by a set of elements (e.g., words, qq-grams, and items). One of the most critical components in these applications is to define the set similarity between two objects and develop corresponding similarity query processing techniques. Given two records (objects) XX and YY, a variety of similarity functions/metrics have been identified in the literature for different scenarios (e.g., [28][15]). Many indexing techniques have been developed to support efficient exact and approximate lookups and joins based on these similarity functions.

Many of the set similarity functions studied are symmetric functions, i.e., f(X,Y)f(X,Y) =f(Y,X)=f(Y,X), including widely used Jaccard similarity and Cosine similarity. In recent years, much research attention has been given to the asymmetric set similarity functions, which are more appropriate in some applications. Containment similarity (a.k.a, Jaccard containment similarity) is one of the representative asymmetric set similarity functions, where the similarity between two records XX and YY is defined as f(X,Y)=f(X,Y)= |XY||X|\frac{|X\cap Y|}{|X|} in which |XY||X\cap Y| and |X||X| are intersection size of XX and YY and the size of XX, respectively.

Compared with symmetric similarity such as Jaccard similarity, containment similarity gives special consideration on the query size, which makes it more suitable in some applications. As shown in [35], containment similarity is useful in record matching application. Given two text descriptions of two restaurants XX and YY which are represented by two “set of words” records: {\{five, guys, burgers, and, fries, downtown, brooklyn, new, york}\} and {\{five, kitchen, berkeley}\} respectively. Suppose query QQ is {five, guys}, we have that the Jaccard similarity of QQ and XX (resp. YY) is 29=0.22\frac{2}{9}=0.22 (14=0.25\frac{1}{4}=0.25). Note the Jaccard similarity is f(Q,X)=|QX||QX|f(Q,X)=\frac{|Q\cap X|}{|Q\cup X|}. Based on the Jaccard similarity, record YY matches better to query QQ, but intuitively XX should be a better choice. This is because the Jaccard similarity unnessesarily favors the short records. On the other hand, the containment similarity will lead to the desired order with f(Q,X)=22f(Q,X)=\frac{2}{2} =1.0=1.0 and f(Q,Y)=12f(Q,Y)=\frac{1}{2} =0.5=0.5. Containment similarity search can also support online error-tolerant search for matching user queries against addresses (map service) and products (product search). This is because the regular keyword search is usually based on the containment search, and containment similarity search provides a natural error-tolerant alternative [5]. In [44], Zhu et al. show that containment similarity search is essential in domain search which enables users to effectively search Open Data.

The containment similarity is also of interest to applications of computing the fraction of values of one column that are contained in another column. In a dataset, the discovery of all inclusion dependencies is a crucial part of data profiling efforts. It has many applications such as foreign-key detection and data integration(e.g.,  [22, 31, 8, 33, 30]).

Challenges. The problem of containment similarity search has been intensively studied in the literature in recent years (e.g., [5, 35, 44]). The key challenges of this problem come from the following three aspects: (ii) The number of elements (i.e., vocabulary size) may be very large. For instance, the vocabulary will blow up quickly when the higher-order shingles are used [35]. Moreover, query and record may contain many elements. To deal with the sheer volume of the data, it is desirable to use sketch technique to provide effectively and efficiently approximate solutions. (iiii) The data distribution (e.g., record size and element frequency) in real-life application may be highly skewed. This may lead to poor performance in practice for data independent sketch methods. (iiiiii) A subtle difficulty of the approximate solution comes from the asymmetric property of the containment similarity. It is shown in [34] that there cannot exist any locality sensitive hashing (LSH) function family for containment similarity search.

To handle the large scale data and provide quick response, most existing solutions for containment similarity search seek to the approximate solutions. Although the use of LSH is restricted, the novel asymmetric LSH method has been designed in [34] to address the issue by padding techniques. Some enhancements of asymmetric LSH techniques are proposed in the following works by introducing different functions (e.g., [35]). Observe that the performance of the existing solutions are sensitive to the skewness of the record size, Zhu et. al propose a partition-based method based on Minhash LSH function. By using optimal partition strategy based on the size distribution of the records, the new approach can achieve much better time-accuracy trade-off.

We notice that all existing approximate solutions rely on the LSH functions by transforming the containment similarity to well-studied Jaccard similarity. That is,

|QX||Q|=|QX||QX|×|QX|×1|Q|\frac{|Q\cap X|}{|Q|}=\frac{|Q\cap X|}{|Q\cup X|}\times|Q\cup X|\times\frac{1}{|Q|}

As the size of query is usually readily available, the estimation error come from the computation of Jaccard similarity and union size of QQ and XX. Note that although the union size can be derived from jaccard similarity [44], the large variance caused by the combination of two estimations remains. This motivates we to use a different framework by transforming the containment similarity to set intersection size estimation, and the error is only contributed by the estimation of |QX||Q\cap X|. The well-known KMV sketch [11] has been widely used to estimate the set intersection size, which can be immediately applied to our problem. However, this method is data-independent and hence cannot well handle the skewed distributions of records size and element frequency, which is common in real-life applications. Intuitively, the record with larger size and the element with high-frequency should be allocated more resources. In this paper, we theoretically show that the existing KMV-sketch technique cannot consider these two perspectives by simple heuristics, e.g., explictly allocating more resource to record with large size. Consequently, we develop an augmented KMV sketch to exploit both record size distribution and the element frequency distribution for better space-accuracy and time-accuracy trade-offs. Two technique are proposed: (ii) we impose a global threshold to KMV sketch, namely G-KMV sketch, to achieve better estimate accuracy. As disscussed in Section IV-A(2), this technique cannot be extended to the Minhash LSH. (iiii) we introduce an extra buffer for each record to take advantage of the skewness of the element frequency. A cost model is proposed to carefully choose the buffer size to optimize the accuracy for the given total space budget and data distribution.

Contributions. Our principle contributions are summarized as follows.

  • We propose a new augmented KMV sketch technique, namely GB-KMV, for the problem of approximate containment similarity search. By imposing a global threshold and an extra buffer for KMV sketches of the records, we significanlty enhance the performance as the new method can better exploit the data distributions.

  • We provide theoretical underpinnings to justify the design of GB-KMV method. We also theoretically show that GB-KMV outperforms the state-of-the-art technique LSH-E in terms of accuracy under realistic assumption on data distributions.

  • Our comprehensive experiments on real-life set-valued data from various applications demonstrate the effectiveness and efficiency of our proposed method.

Road Map. The rest of the paper is organized as follows. Section II presents the preliminaries. Section III introduces the existing solutions. Our approach, GB-KMV sketch, is devised in Section IV. Extensive experiments are reported in Section V, followed by the related work in Section VI. Section VII concludes the paper.

II Preliminaries

In this section, we first formally present the problem of containment similarity search, then introduce some preliminary knowledge. In Table I, we summarize the important mathematical notations appearing throughout this paper.

Notation Definition
𝒮\mathcal{S} a collection of records
X,QX,Q record, query record
x,qx,q record size of XX, query size of QQ
J(Q,X),sJ(Q,X),s Jaccard similarity between query QQ and set XX
C(Q,X),tC(Q,X),t Containment similarity of query QQ in set XX
ss^{*} Jaccard similarity threshold
X\mathcal{L}_{X} the KMV signature (i.e., hash values) of record X
h(X)h(X) all hash values of the elements in record X
X\mathcal{H}_{X} the buffer of record X
tt^{*} containment similarity threshold
bb sketch space budget, measured by the number of
signatures (i.e., hash values or elements)
τ\tau the global threshold for hash values
rr the buffer size(with bit unit) of GB-KMV sketch
mm number of records in dataset 𝒮\mathcal{S}
nn number of distinct elements in dataset 𝒮\mathcal{S}
TABLE I: The summary of notations

II-A Problem Definition

In this paper, the element universe is ={e1,e2,,en}\mathcal{E}=\{e_{1},e_{2},...,e_{n}\}. Let 𝒮\mathcal{S} be a collection of records (sets) {X1,X2,,Xm}\{X_{1},X_{2},...,X_{m}\}’ where XiX_{i} ( 1im1\leq i\leq m) is a set of elements from \mathcal{E}.

Before giving the definition of containment similarity, we first introduce the Jaccard similarity.

Definition 1 (Jaccard Similarity).

Given two records XX and YY from 𝒮\mathcal{S}, the Jaccard similarity between XX and YY is defined as the size of the intersection divided by the size of the union, which is expressed as

J(X,Y)=|XY||XY|J(X,Y)=\frac{|X\cap Y|}{|X\cup Y|} (1)

Similar to the Jaccard similarity, the containment similarity (a.k.a Jaccard containment similarity) is defined as follows.

Definition 2 (Containment Similarity).

Given two records XX and YY from 𝒮\mathcal{S}, the containment similarity of XX in YY, denoted by C(X,Y)C(X,Y) is the size of the intersection divided by record size |X||X|, which is formally defined as

C(X,Y)=|XY||X|C(X,Y)=\frac{|X\cap Y|}{|X|} (2)

Note that by replacing the union size |XY||X\cup Y| in Equation 1 with size |X||X|, we get the containment similarity. It is easy to see that Jaccard similarity is symmetric while containment similarity is asymmetric.

In this paper, we focus on the problem of containment similarity search which is to look up a set of records whose containment similarity towards a given query record is not smaller than a given threshold. The formal definition is as follows.

Definition 3 (Containment Similarity Search).

Given a query QQ, and a threshold t[0,1]t^{*}\in[0,1] on the containment similarity, search for records {X:X𝒮}\{X:X\in\mathcal{S}\} from a dataset 𝒮\mathcal{S} such that:

C(Q,X)tC(Q,X)\geq t^{*} (3)

Next, we give an example to show the problem of containment similarity search.

Example 1.

Fig. 1 shows a dataset with four records {X1\{X_{1}, X2X_{2}, X3X_{3}, X4}X_{4}\}, and the element universe is ={e1,e2,,e10}\mathcal{E}=\{e_{1},e_{2},...,e_{10}\}. Given a query Q={e1,e2,e3,e5,e7,e9}Q=\{e_{1},e_{2},e_{3},e_{5},e_{7},e_{9}\} and a containment similarity threshold t=0.5t^{*}=0.5, the records satisfying C(Q,Xi)0.5C(Q,X_{i})\geq 0.5 are X1X_{1}, X2X_{2}.

id record C(Q,Xi)C(Q,X_{i})
X1X_{1} {e1,e2,e3,e4,e7}\{e_{1},e_{2},e_{3},e_{4},e_{7}\} 0.670.67
X2X_{2} {e2,e3,e5}\{e_{2},e_{3},e_{5}\} 0.50.5
X3X_{3} {e2,e4,e5}\{e_{2},e_{4},e_{5}\} 0.330.33
X4X_{4} {e1,e2,e6,e10}\{e_{1},e_{2},e_{6},e_{10}\} 0.330.33
QQ {e1,e2,e3,e5,e7,e9}\{e_{1},e_{2},e_{3},e_{5},e_{7},e_{9}\}
Fig. 1: A four-record dataset and a query QQ; C(Q,Xi)C(Q,X_{i}) is the containment similarity of QQ in XiX_{i}

Problem Statement. In this paper, we investigate the problem of approximate containment similarity search. For the dataset 𝒮\mathcal{S} with a large number of records, we aim to build a synopses of the dataset such that it (ii) can efficiently support containment similarity search with high accuracy, (iiii) can handle large size records, and (iiiiii) has a compact index size.

II-B Minwise Hashing

Minwise Hashing is proposed by Broder in [13, 14] for estimating the Jaccard similarity of two records XX and YY. Let hh be a hash function that maps the elements of XX and YY to distinct integers, and define hmin(X)h_{min}(X) and hmin(Y)h_{min}(Y) to be the minimum hash value of a record XX and YY, respectively. Assuming no hash collision, Broder[13] showed that the Jaccard similarity of XX and YY is the probability of two minimum hash values being equal: Pr[hmin(X)=hmin(Y)]=J(X,Y)Pr[h_{min}(X)=h_{min}(Y)]=J(X,Y). Applying such kk different independent hash functions h1,h2,,hkh_{1},h_{2},...,h_{k} to a record XX(YY, resp.), the MinHash signature of XX(YY, resp.) is to keep kk values of hmini(X)h^{i}_{min}(X)( hmin(Y)h_{min}(Y), resp.) for kk functions. Let 𝐧i,i=1,2,,k\mathbf{n}_{i},i=1,2,...,k be the indicator function such that

𝐧i:={1if hmini(X)=hmini(Y),0otherwise.\mathbf{n}_{i}:=\begin{cases}1&\text{if }h^{i}_{min}(X)=h^{i}_{min}(Y),\\ 0&\text{otherwise}.\end{cases} (4)

then the Jaccard similarity between record XX and YY can be estimated as

s^=J^(X,Y)=1ki=1k𝐧i\hat{s}=\hat{J}(X,Y)=\frac{1}{k}\sum\limits_{i=1}^{k}\mathbf{n}_{i} (5)

Let s=J(X,Y)s=J(X,Y) be the Jaccard similarity of set XX and YY, then the expectation of J^\hat{J} is

E(s^)=sE(\hat{s})=s (6)

and the variance of s^\hat{s} is

Var(s^)=s(1s)kVar(\hat{s})=\frac{s(1-s)}{k} (7)

II-C KMV Sketch

The kk minimum values(KMV) technique introduced by Bayer et. al in [11] is to estimate the number of distinct elements in a large dataset. Given a no-collision hash function hh which maps elements to range [0,1][0,1], a KMV synopses of a record XX, denoted by X\mathcal{L}_{X}, is to keep kk minimum hash values of XX. Then the number of distinct elements |X||X| can be estimated by |X|^=k1U(k)\widehat{|X|}=\frac{k-1}{U_{(k)}} where U(k)U_{(k)} is kk-th smallest hash value. By h(X)h(X), we denote hash values of all elements in the record XX.

In [11], Bayer et. al also methodically analyse the problem of distinct element estimation under multi-set operation. As for union operation, consider two records XX and YY with corresponding KMV synopses X\mathcal{L}_{X} and Y\mathcal{L}_{Y} of size kXk_{X} and kYk_{Y}, respectively. In [11], XY\mathcal{L}_{X}\oplus\mathcal{L}_{Y} represents the set consisting of the kk smallest hash values in XY\mathcal{L}_{X}\cup\mathcal{L}_{Y} where

k=min(kX,kY)k=min(k_{X},k_{Y}) (8)

Then the KMV synopses of XYX\cup Y is =XY\mathcal{L}=\mathcal{L}_{X}\oplus\mathcal{L}_{Y}. An unbiased estimator for the number of distinct elements in XYX\cup Y, denoted by D=|XY|D_{\cup}=|X\cup Y| is as follows.

D^=k1U(k)\hat{D}_{\cup}=\frac{k-1}{U_{(k)}} (9)

For intersection operation, the KMV synopses is =XY\mathcal{L}=\mathcal{L}_{X}\oplus\mathcal{L}_{Y} where k=min(kX,kY)k=min(k_{X},k_{Y}). Let K=|{v:vXY}|K_{\cap}=|\{v\in\mathcal{L}:v\in\mathcal{L}_{X}\cap\mathcal{L}_{Y}\}|, i.e., KK_{\cap} is the number of common distinct hash values of X\mathcal{L}_{X} and Y\mathcal{L}_{Y} within \mathcal{L}. Then the number of distinct elements in XYX\cap Y, denoted by DD_{\cap}, can be estimated as follows.

D^=Kk×k1U(k)\hat{D}_{\cap}=\frac{K_{\cap}}{k}\times\frac{k-1}{U_{(k)}} (10)

The variance of D^\hat{D}_{\cap}, as shown in[11], is

Var[D^]=D(kDk2D+k+D)k(k2)Var[\hat{D}_{\cap}]=\frac{D_{\cap}(kD_{\cup}-k^{2}-D_{\cup}+k+D_{\cap})}{k(k-2)} (11)

III Existing Solutions

In this section, we present the state-of-the-art technique for the approximate containment similarity search, followed by theoretical analysis on the limits of the existing solution.

III-A LSH Ensemble Method

LSH Ensemble technique, LSH-E for short, is proposed by Zhu et. al in [44] to tackle the problem of approximate containment similarity search. The key idea is : (1) transform the containment similarity search to the well-studied Jaccard similarity search; and (2) partition the data by length and then apply the LSH forest [9] technique for each individual partition.

Similarity Transformation. Given a record XX with size x=|X|x=|X|, a query QQ with size q=|Q|q=|Q|, containment similarity t=C(Q,X)t=C(Q,X) and Jaccard similarity s=J(Q,X)s=J(Q,X). The transformation back and forth are as follows.

s=txq+1t,t=(xq+1)s1+ss=\frac{t}{\frac{x}{q}+1-t},\ t=\frac{(\frac{x}{q}+1)s}{1+s} (12)

Given the containment similarity search threshold as tt^{*} for the query qq, we may come up with its corresponding Jaccard similarity threshold ss^{*} by Equation 12. A straightforward solution is to apply the existing approximate Jaccard similarity search technique for each individual record X𝒟X\in\mathcal{D} with the Jaccard similarity threshold ss^{*} (e.g., compute Jaccard similarity between the query QQ and a set XX based on their MinHash signatures). In order to take advantages of the efficient indexing techniques (e.g., LSH forest [9]), LSH-E will partition the dataset 𝒮\mathcal{S}.

Data Partition. By partitioning the dataset 𝒮\mathcal{S} according to the record size, LSH-E can replace xx in Equation 12 with its upper bound uu (i.e., the largest record size in the partition) as an approximation. That is, for the given containment similarity tt^{*} we have

s=tuq+1ts^{*}=\frac{t^{*}}{\frac{u}{q}+1-t^{*}} (13)

The use of upper bound uu will lead to false positives. In [44], an optimal partition method is designed to minimize the total number of false positives brought by the use of upper bound in each partition. By assuming that the record size distribution follows the power-law distribution and similarity values are uniformly distributed, it is shown that the optimal partition can be achieved by ensuring each partition has the equal number of records (i.e., equal-depth partition).

Containment Similarity Search. For each partition 𝒮i\mathcal{S}_{i} of the data, LSH-E applies the dynamic LSH technique (e.g., LSH forest [9]). Particularly, the records in 𝒮i\mathcal{S}_{i} are indexed by a MinHash LSH with parameter (bb, rr) where bb is the number of bands used by the LSH index and rr is the number of hash values in each band. For the given query QQ, the bb and rr values are carefully chosen by considering their corresponding number of false positives and false negatives regarding the existing records. Then the candidate records in each partition can be retrieved from the MinHash index according to the corresponding Jaccard similarity thresholds obtained by Equation 13. The union of the candidate records from all partitions will be returned as the result of the containment similarity search.

III-B Analysis

One of the LSH-E’s advantages is that it converts the containment similarity problem to Jaccard similarity search problem which can be solved by the mature and efficient MinHash LSH method. Also, LSH-E carefully considers the record size distribution and partitions the records by record size. In this sense, we say LSH-E is a data-dependent method and it is reported that LSH-E significantly outperforms existing asymmetric LSH based solutions [34, 35] (i.e., data-independent methods) as LSH-E can exploit the information of data distribution by partitioning the dataset. However, this benefit is offset by the fact that the the upper bound will bring extra false positives, in addition to the error from the MinHash technique.

Below we theoretically analyse the performance of LSH-E by studying the expectation and variance of its estimator.

Using the notations same as above, let s=J(Q,X)s=J(Q,X) be the Jaccard similarity between query QQ and set XX and t=C(Q,X)t=C(Q,X) be the containment similarity of QQ in XX. By Equation 5, given the MinHash signature of query QQ and XX respectively, an unbiased estimator s^\hat{s} of Jaccard similarity s=J(Q,X)s=J(Q,X) is the ratio of collisions in the signature, and the variance of s^\hat{s} is Var[s^]=s(1s)kVar[\hat{s}]=\frac{s(1-s)}{k} where kk is signature size of each record. Then by transformation Equation 12, the estimator t^\hat{t} of containment similarity t=C(Q,X)t=C(Q,X) by MinHash LSH is

t^=(xq+1)s^1+s^\hat{t}=\frac{(\frac{x}{q}+1)\hat{s}}{1+\hat{s}} (14)

where q=|Q|q=|Q| and x=|X|x=|X|. The estimator t^\hat{t}^{\prime} of containment similarity t=C(Q,X)t=C(Q,X) by LSH-E is

t^=(uq+1)s^1+s^\hat{t}^{\prime}=\frac{(\frac{u}{q}+1)\hat{s}}{1+\hat{s}} (15)

where q=|Q|q=|Q| and uu is the upper bound of |X||X|.

Next, we use Taylor expansions to approximate the expectation and variance of a function with one random variable [26]. We first give a lemma.

Lemma 1.

Given a random variable XX with expectation E[X]E[X] and variance Var[X]Var[X], the expectation of f(X)f(X) can be approximated as

E[f(X)]=f(E[X]+f′′(E[X])2Var[X]CLOSEE[f(X)]=f(E[X]+\frac{f^{\prime\prime}(E[X])}{2}Var[X] (16)

and the variance of f(X)f(X) can be approximated as

Var[f(X)]=[f(E[X])]2Var[X][f′′(E[X])]24Var2[X]Var[f(X)]=[f^{\prime}(E[X])]^{2}Var[X]-\frac{[f^{\prime\prime}(E[X])]^{2}}{4}Var^{2}[X] (17)

According to Equation 14, let t^=f(s^)=αs^1+s^\hat{t}=f(\hat{s})=\alpha\frac{\hat{s}}{1+\hat{s}} where α=xq+1\alpha=\frac{x}{q}+1. We can see that the estimator t^\hat{t} is a function of s^\hat{s}, and f(s^)=α1(1+s^)f^{\prime}(\hat{s})=\alpha\frac{1}{(1+\hat{s})} and f′′(s^)=2α1(1+s^)f^{\prime\prime}(\hat{s})=-2\alpha\frac{1}{(1+\hat{s})}. Then based on Lemma 1, the expectation and variance of t^\hat{t} are approximated as

E[t^]t(11sk(1+s)2)E[\hat{t}]\approx t(1-\frac{1-s}{k(1+s)^{2}}) (18)
Var[t^]D2(1s)[k(1+s)2s(1s)]q2k2s(1+s)4Var[\hat{t}]\approx\frac{D_{\cap}^{2}(1-s)[k(1+s)^{2}-s(1-s)]}{q^{2}k^{2}s(1+s)^{4}} (19)

Similarly, the expectation and variance of LSH-E estimator t^\hat{t}^{\prime} can be approximated as

E[t^]t(u+qx+q)(11sk(1+s)2)E[\hat{t}^{\prime}]\approx t(\frac{u+q}{x+q})(1-\frac{1-s}{k(1+s)^{2}}) (20)
Var[t^](u+qx+q)2D2(1s)[k(1+s)2s(1s)]q2k2s(1+s)4Var[\hat{t}^{\prime}]\approx(\frac{u+q}{x+q})^{2}\frac{D_{\cap}^{2}(1-s)[k(1+s)^{2}-s(1-s)]}{q^{2}k^{2}s(1+s)^{4}} (21)

The computation details are in technique report [41]. Since uu is the upper bound of xx, the variance of LSH-E estimator Var[t^]Var[\hat{t}^{\prime}] is larger than that of MinHash LSH estimator. Also, by Equation 18 and Equation 20, we can see that both estimators are biased and LSH-E method is quite sensitive to the setting of the upper bound uu by Equation 20. Because the presence of upper bound uu will enlarge the estimator off true value, LSH-E method favours recall while the precision will be deteriorated. The larger the upper bound uu is, the worse the precision will be. Our empirical study shows that LSH-E cannot achieve a good trade-off between accuracy and space, compared with our proposed method.

IV Our Approach

In this section, we introduce an augmented KMV sketch technique to achieve better space-accuracy trade-off for approximate containment similarity search. Section IV-A briefly introduces the motivation and main technique of our method, namely GB-KMV. The detailed implementation is presented in Section IV-B, followed by extensive theoretical analysis in Section IV-C.

IV-A Motivation and Techniques

The key idea of our method is to propose a data-dependent indexing technique such that we can exploit the distribution of the data (i.e., record size distribution and element frequency distribution) for better performance of containment similarity search. We augment the existing KMV technique by introducing a global threshold for sample size allocation and a buffer for frequent elements, namely GB-KMV, to achieve better trade-off between synopses size and accuracy. Then we apply the existing set similarity join/search indexing technique to speed up the containment similarity search.

Below we outline the motivation of the key techniques used in this paper. Detailed algorithms and theoretical analysis will be introduced in Section IV-B and IV-C, respectively.

(1) Directly Apply KMV Sketch

Given a query QQ and a threshold tt^{*} on containment similarity, the goal is to find record XX from dataset 𝒮\mathcal{S} such that

|QX||Q|t,\frac{|Q\cap X|}{|Q|}\geq t^{*}, (22)

Applying some simple transformation to Equation 22, we get

|QX|t|Q|,|Q\cap X|\geq t^{*}|Q|, (23)

Let θ=t|Q|\theta=t^{*}|Q|, then the containment similarity search problem is converted into finding record XX whose intersection size with the query QQ is not smaller than θ\theta, i.e., |QX|θ|Q\cap X|\geq\theta.

Therefore, we can directly apply the KMV method introduced in Section II-C. Given KMV signatures of a record XX and a query QQ, we can estimate their intersection size (|QX||Q\cap X|) according to Equation 10. Then the containment similarity of QQ in XX is immediately available given the query size |Q||Q|. Below, we show an example on how to apply KMV method to containment similarity search.

KMV\mathcal{L}_{KMV} kik_{i}
X1\mathcal{L}_{X_{1}} {(e2,0.24),(e7,0.33),(e4,0.47)}\{(e_{2},0.24),(e_{7},0.33),(e_{4},0.47)\} 33
X2\mathcal{L}_{X_{2}} {(e5,0.10),(e2,0.24),(e3,0.85)}\{(e_{5},0.10),(e_{2},0.24),(e_{3},0.85)\} 33
X3\mathcal{L}_{X_{3}} {(e5,0.10),(e2,0.24)}\{(e_{5},0.10),(e_{2},0.24)\} 22
X4\mathcal{L}_{X_{4}} {(e10,0.18),(e2,0.24)}\{(e_{10},0.18),(e_{2},0.24)\} 22
Q\mathcal{L}_{Q} {(e5,0.10),(e2,0.24),(e7,0.33),(e9,0.56)}\{(e_{5},0.10),(e_{2},0.24),(e_{7},0.33),(e_{9},0.56)\} 44
Fig. 2: The KMV sketch of the dataset in Example 1, each signature consists of element-hash value pairs. kik_{i} is the signature size of XiX_{i}
Example 2.

Fig. 2 shows the KMV sketch on dataset in Example 1. Given KMV signature of QQ (Q={(e5,0.10),(e2,0.24),(e7,0.33),e9,0.56)}\mathcal{L}_{Q}=\{(e_{5},0.10),(e_{2},0.24),(e_{7},0.33),e_{9},0.56)\}) and X1X_{1} (X1={(e2,0.24),(e7,0.33),(e4,0.47)}\mathcal{L}_{X_{1}}=\{(e_{2},0.24),(e_{7},0.33),(e_{4},0.47)\}), we have k=min{kQ,k1}=3k=\min\{k_{Q},k_{1}\}=3, then the size-kk KMV synopses of QX1Q\cup X_{1} is =QX1={(e5,0.10),(e2,0.24),(e7,0.33)}\mathcal{L}=\mathcal{L}_{Q}\oplus\mathcal{L}_{X_{1}}=\{(e_{5},0.10),(e_{2},0.24),(e_{7},0.33)\}, the kk-th smallest hash value U(k)U_{(k)} is 0.33 and the size of intersection of Q\mathcal{L}_{Q} and X1\mathcal{L}_{X_{1}} within \mathcal{L} is K=|{v:vQX1,v}|=2K_{\cap}=|\{v:v\in\mathcal{L}_{Q}\cap\mathcal{L}_{X_{1}},v\in\mathcal{L}\}|=2. Then the intersection size of QQ and X1X_{1} is estimated as D^=Kk×k1U(k)=2320.33=4.04\hat{D}_{\cap}=\frac{K_{\cap}}{k}\times\frac{k-1}{U_{(k)}}=\frac{2}{3}*\frac{2}{0.33}=4.04, and the containment similarity is t^=D^|Q|=0.67\hat{t}=\frac{\hat{D}_{\cap}}{|Q|}=0.67. Then X1X_{1} is returned if the given containment similarity threshold tt^{*} is 0.50.5.

Remark 1.

In [44], the size of the query is approximated by MinHash signature of QQ, where KMV sketch can also serve for the same purpose. But the exact query size is used their implementation for performance evaluation. In practice, the query size is readily available, we assume query size is given throughout the paper.

Optimization of KMV Sketch. Given a space budget bb, we can keep size-kik_{i} KMV signatures (i.e., kik_{i} minimal hash values) for each record XiX_{i} with i=1nki=b\sum_{i=1}^{n}k_{i}=b. A natural question is how to allocate the resource (e.g., setting of kik_{i} values) to achieve the best overall estimation accuracy. Intuitively, more resources should be allocated to records with more frequent elements or larger record size, i.e., larger kik_{i} for record with larger size. However, Theorem 1 (Section IV-C2) suggests that, the optimal resource allocation strategy in terms of estimation variance is to use the same size of signature for each record. This is because the minimal of two k-values is used in Equation 8, and hence the best solution is to evenly allocate the resource. Thus, we have the KMV sketch based method for approximate containment similarity search. For the given budget bb, we keep ki=k_{i}= bm\lfloor\frac{b}{m}\rfloor minimal hash values for each record XiX_{i}.

(2) Impose a Global Threshold to KMV Sketch (G-KMV)

The above analysis on optimal KMV sketch suggests an equal size allocation strategy, that is, each record is associated with the same size signature. Intuitively we should assign more resources (i.e., signature size) to the records with large size because they are more likely to appear in the results. However, the estimate accuracy of KMV for two sets size intersection is determined by the sketch with smaller size since we choose k=min(k1,k2)k=\min(k_{1},k_{2}) for KMV signatures of X1X_{1} and X2X_{2} for DD_{\cup} and DD_{\cap} in Equation 9, thus it is useless to give more resource to one of the records. We further explain the reason behind with the following example.

Before we introduce the global threshold to KMV sketch, consider the KMV sketch shown in the Fig. 2.

Example 3.

Suppose we have Q=\mathcal{L}_{Q}= {(e5,0.10),(e2,0.24),(e7,0.33),(e9,0.56)}\{(e_{5},0.10),(e_{2},0.24),(e_{7},0.33),(e_{9},0.56)\} and X3=\mathcal{L}_{X_{3}}= {(e5,0.10),(e2,0.24)}\{(e_{5},0.10),(e_{2},0.24)\} . Although there are four hash values in QX3={(e5,0.10),(e2,0.24),(e7,0.33),(e9,0.56)}\mathcal{L}_{Q}\cup\mathcal{L}_{X_{3}}=\{(e_{5},0.10),(e_{2},0.24),(e_{7},0.33),(e_{9},0.56)\}, we can only consider k=min{kQ,kX3}=2k=\min\{k_{Q},k_{X_{3}}\}=2 smallest hash values of QX3\mathcal{L}_{Q}\cup\mathcal{L}_{X_{3}} by Equation 8, which is {(e5,0.10),(e2,0.24)}\{(e_{5},0.10),(e_{2},0.24)\}, and the kk-th (k=2k=2) minimum hash value used in Equation 9 is 0.240.24. We cannot use k=4k=4 (i.e., U(k)U_{(k)}=0.560.56) to estimate |QX3||Q\cup X_{3}| because the 44-th smallest hash value in QX3\mathcal{L}_{Q}\cup\mathcal{L}_{X_{3}} may not be the 44-th smallest hash values in h(QX3)h(Q\cup X_{3}), because the unseen 33-rd smallest hash value of X3X_{3} might be (e4,0.47)(e_{4},0.47) for example, which is smaller than 0.560.56. Recall that h(QX3)h(Q\cup X_{3}) denote the hash values of all elements in QX3Q\cup X_{3}.

Nevertheless, if we know that all the hash values smaller than a global threshold, say 0.60.6, are kept for every record, we can safely use the 44-th hash value of QX3\mathcal{L}_{Q}\cup\mathcal{L}_{X_{3}} (i.e., 0.560.56) for the estimation. This is because we can ensure the 44-th smallest hash value in QX3\mathcal{L}_{Q}\cup\mathcal{L}_{X_{3}} must be the 44-th smallest hash values in h(QX3)h(Q\cup X_{3}).

Inspired by the above observation, we can carefully choose a global threshold τ\tau (e.g., 0.60.6 in the above example) for a given space budget bb, and ensure all hash values smaller than τ\tau will be kept for KMV sketch of the records. By imposing a global threshold, we can identify a better (i.e., larger) kk value used for estimation, compared with Equation 8.

Given a record XX and a global threshold τ\tau, the sketch of a record XX is obtained as X={h(e):h(e)τ,eX}\mathcal{L}_{X}=\{h(e):h(e)\leq\tau,e\in X\} where hh is the hash function. The sketch of QQ (Q\mathcal{L}_{Q}) is defined in the same way. In this paper, we say a KMV sketch is a G-KMV sketch if we impose a global threshold to generate KMV sketch. Then we set kk value of the KMV estimation as follows.

k=|QX|k=|\mathcal{L}_{Q}\cup\mathcal{L}_{X}| (24)

Meanwhile, we have K=|QX|K_{\cap}=|\mathcal{L}_{Q}\cap\mathcal{L}_{X}|. Let U(k)U_{(k)} be the kk-th minimal hash value in QX\mathcal{L}_{Q}\cup\mathcal{L}_{X}, then the overlap size of QQ and XX can be estimated as

D^GKMV=Kkk1U(k)\hat{D}_{\cap}^{GKMV}=\frac{K_{\cap}}{k}\frac{k-1}{U_{(k)}} (25)

Then the containment similarity of QQ in XX is

C^=D^GKMVq\hat{C}=\frac{\hat{D}_{\cap}^{GKMV}}{q} (26)

where qq is the query size. We remark that, as a by-product, the global threshold favours the record with large size because all elements with hash value smaller than τ\tau are kept for each record.

GKMV\mathcal{L}_{GKMV}
X1\mathcal{L}_{X_{1}} {(e2,0.24),(e7,0.33),(e4,0.47)}\{(e_{2},0.24),(e_{7},0.33),(e_{4},0.47)\}
X2\mathcal{L}_{X_{2}} {(e5,0.10),(e2,0.24)}\{(e_{5},0.10),(e_{2},0.24)\}
X3\mathcal{L}_{X_{3}} {(e5,0.10),(e2,0.24),(e4,0.47)}\{(e_{5},0.10),(e_{2},0.24),(e_{4},0.47)\}
X4\mathcal{L}_{X_{4}} {(e10,0.18),(e2,0.24)}\{(e_{10},0.18),(e_{2},0.24)\}
Q\mathcal{L}_{Q} {(e5,0.10),(e2,0.24),(e7,0.33)}\{(e_{5},0.10),(e_{2},0.24),(e_{7},0.33)\}
Fig. 3: The G-KMV sketch of the dataset in Example 1 with hash value threshold τ=0.5\tau=0.5

Below is an example on how to compute the containment similarity based on G-KMV sketch.

Example 4.

Fig.  3 shows the KMV sketch of dataset in Example 1 with a global threshold τ=0.5\tau=0.5. Given the signature of QQ(Q={(e5,0.10),(e2,0.24),(e7,0.33)}\mathcal{L}_{Q}=\{(e_{5},0.10),(e_{2},0.24),(e_{7},0.33)\}) and X1X_{1}(X1={(e2,0.24),(e7,0.33),(e4,0.47)}\mathcal{L}_{X_{1}}=\{(e_{2},0.24),(e_{7},0.33),(e_{4},0.47)\}), the KMV sketch of QX1Q\cup X_{1} is =QX1={(e5,0.10),(e2,0.24),(e7,0.33),(e4,0.47)}\mathcal{L}=\mathcal{L}_{Q}\cup\mathcal{L}_{X_{1}}=\{(e_{5},0.10),(e_{2},0.24),(e_{7},0.33),(e_{4},0.47)\}, the kk-th(k=4k=4) smallest hash value is U(k)=0.47U_{(k)}=0.47, and the size of intersection of Q\mathcal{L}_{Q} and X1\mathcal{L}_{X_{1}} within \mathcal{L} is K=|{v:vQX1,v}|=2K_{\cap}=|\{v:v\in\mathcal{L}_{Q}\cap\mathcal{L}_{X_{1}},v\in\mathcal{L}\}|=2. Then the intersection size of QQ and X1X_{1} is estimated as D^=Kk×k1U(k)=2430.47=3.19\hat{D}_{\cap}=\frac{K_{\cap}}{k}\times\frac{k-1}{U_{(k)}}=\frac{2}{4}*\frac{3}{0.47}=3.19, and the containment similarity is t^=D^|Q|=0.53\hat{t}=\frac{\hat{D}_{\cap}}{|Q|}=0.53. Then X1X_{1} is returned if the given containment similarity threshold tt^{*} is 0.50.5.

Correctness of G-KMV sketch. Theorem 2 in Section IV-C3 shows the correctness of the G-KMV sketch.

Comparison with KMV. In Theorem 3 (Section IV-C4), we theoretically show that G-KMV can achieve better accuracy compared with KMV.

Remark 2.

Note that the global threshold technique cannot be applied to MinHash based techniques. In minHash LSH, the kk minimum hash values are corresponding to kk different independent hash functions, while in KMV sketch, the kk-value sketch is obtained under one hash function. Thus we can only impose this global threshold on the same hash function for the KMV sketch based method.

(3) Use Buffer for KMV Sketch (GB-KMV)

In addition to the skewness of the record size, it is also worthwhile to exploit the skewness of the element frequency. Intuitively, more resource should be assigned to high-frequency elements because they are more likely to appear in the records. However, due to the nature of the hash function used by KMV sketch, the hash value of an element is independent to its frequency; that is, all elements have the same opportunity contributing to the KMV sketch.

One possible solution is to divide the elements into multiple disjoint groups according to their frequency (e.g., low-frequency and high-frequency ones), and then apply KMV sketch for each individual group. The intersection size between two records QQ and XX can be computed within each group and then sum up together. However, our initial experiments suggest that this will lead to poor accuracy because of the summation of the intersection size estimations. In Theorem 4 (Section IV-C5), our theoretical analysis suggests that the combination of estimated results are very likely to make the overall accuracy worse.

To avoid combining multiple estimation results, we use a bitmap buffer with size rr for each record to exactly keep track of the rr most frequent elements, denoted by H\mathcal{E}_{H}. Then we apply G-KMV technique to the remaining elements, resulting in a new augmented sketch, namely GB-KMV. Now we can estimate |QX||Q\cap X| by combining the intersection of their bitmap buffers (exact solution) and KMV sketches (estimated solution).

As shown in Fig. 4, suppose we have H={e1,e2}\mathcal{E}_{H}=\{e_{1},e_{2}\} and the global threshold for hash value is τ=0.5\tau=0.5, then the sketch of each record consists of two parts H\mathcal{L}_{H} and GKMV\mathcal{L}_{GKMV}; that is, for each record we use bitmap to keep the elements corresponding to high-frequency elements H={e1,e2}\mathcal{E}_{H}=\{e_{1},e_{2}\}, then we store the left elements with hash value less than τ=0.5\tau=0.5.

H\mathcal{L}_{H} GKMV\mathcal{L}_{GKMV}
X1X_{1} {e1,e2}\{e_{1},e_{2}\} {(e7,0.33),(e4,0.47)}\{(e_{7},0.33),(e_{4},0.47)\}
X2X_{2} {e2}\{e_{2}\} {(e5,0.10)}\{(e_{5},0.10)\}
X3X_{3} {e2}\{e_{2}\} {(e5,0.10)}\{(e_{5},0.10)\}
X4X_{4} {e1,e2}\{e_{1},e_{2}\} {e10,0.18)}\{e_{10},0.18)\}
QQ {e1,e2}\{e_{1},e_{2}\} {(e5,0.10),(e7,0.33)}\{(e_{5},0.10),(e_{7},0.33)\}
Fig. 4: The GB-KMV sketch of dataset in Example 1
Example 5.

Given the signature of QQ(Q={e1,e2}{(e5,0.10),(e7,0.33)}\mathcal{L}_{Q}=\{e_{1},e_{2}\}\cup\{(e_{5},0.10),(e_{7},0.33)\}) and X1X_{1}(X1={e1,e2}{(e7,0.33),(e4,0.47)}\mathcal{L}_{X_{1}}=\{e_{1},e_{2}\}\cup\{(e_{7},0.33),(e_{4},0.47)\}), the intersection of High-frequency part is QHX1H={e1,e2}\mathcal{L}_{Q}^{H}\cap\mathcal{L}_{X_{1}}^{H}=\{e_{1},e_{2}\} with intersection size as 22; next we consider the G-KMV part. Similar to Example  4, we compute the intersection of GKMV\mathcal{L}_{GKMV} part. The KMV sketch is =QX1={(e5,0.10),(e7,0.33),(e4,0.47)}\mathcal{L}^{\prime}=\mathcal{L}^{\prime}_{Q}\cup\mathcal{L}^{\prime}_{X_{1}}=\{(e_{5},0.10),(e_{7},0.33),(e_{4},0.47)\}. According to Equation 24, the kk-th(k=3k=3) smallest hash value is U(k)=0.47U_{(k)}=0.47, and the size of intersection of Q\mathcal{L}_{Q} and X3\mathcal{L}_{X_{3}} within \mathcal{L} is K=|{v:vQX3,v}|=1K_{\cap}=|\{v:v\in\mathcal{L}_{Q}\cap\mathcal{L}_{X_{3}},v\in\mathcal{L}\}|=1. Then the intersection size of QQ and X1X_{1} in GKMV\mathcal{L}_{GKMV} part is estimated as D^=Kk×k1U(k)=1320.47=1.4\hat{D}_{\cap}=\frac{K_{\cap}}{k}\times\frac{k-1}{U_{(k)}}=\frac{1}{3}*\frac{2}{0.47}=1.4; together with the High-frequency part, the intersection size of QQ and X1X_{1} is estimated as 2+1.4=3.42+1.4=3.4 and the containment similarity is t^=D^|Q|=0.53\hat{t}=\frac{\hat{D}_{\cap}}{|Q|}=0.53. Then X1X_{1} is returned if the given containment similarity threshold tt^{*} is 0.50.5.

Optimal Buffer Size. The key challenge is how to set the size of bitmap buffer for the best expected performance of GB-KMV sketch. In Section IV-C6, we provide a theoretical analysis, which is verified in our performance evaluation.

Comparison with G-KMV. As the G-KMV is a special case of GB-KMV with buffer size 00 and we carefully choose the buffer size with our cost model, the accuracy of GB-KMV is not worse than G-KMV.

Comparison with LSH-E. Through theoretical analysis, we show that the performance (i.e., the variance of the estimator) of GB-KMV can always outperform that of LSH-E in Theorem 5 (Section IV-C7).

IV-B Implementation of GB-KMV

In this section, we introduce the technique details of our proposed GB-KMV method. We first show how to build GB-KMV sketch on the dataset 𝒮\mathcal{S} and then present the containment similarity search algorithm.

GB-KMV Sketch Construction. For each record X𝒮X\in\mathcal{S}, its GB-KMV sketch consists of two components: (1) a buffer which exactly keeps high-frequency elements, denoted by X\mathcal{H}_{X}; and (2) a G-KMV sketch, which is a KMV sketch with a global threshold value, denoted by X\mathcal{L}_{X}.

Input : 𝒮\mathcal{S}: dataset; bb: space budget;
hh: a hash function; rr: buffer size
Output : 𝒮\mathcal{L}_{\mathcal{S}}, the GB-KMV index of dataset 𝒮\mathcal{S}
Compute buffer size rr based on distribution statistics of 𝒮\mathcal{S} and the space budget bb;
H\mathcal{E}_{H} \leftarrow Top rr most frequent elements; K\mathcal{E}_{K}\leftarrow H\mathcal{E}\setminus\mathcal{E}_{H} ;
τ\tau\leftarrow compute the global threshold for hash values;
for each record X𝒮X\in\mathcal{S} do  X\mathcal{H}_{X}\leftarrow elements of XX in H\mathcal{E}_{H} ;
X\mathcal{L}_{X}\leftarrow hash values of elements {e}\{e\} of XX with h(e)τh(e)\leq\tau;
5     5     5     5     5      
Algorithm 1 GB-KMV Index Construction

Algorithm 1 illustrates the construction of GB-KMV sketch. Let the element universe be ={e1,e2,,en}\mathcal{E}=\{e_{1},e_{2},...,e_{n}\} and each element is associated with its frequency in dataset 𝒮\mathcal{S}. Line 1 calculates a buffer size rr for all records based on the skewness of record size and elements as well as the space budget bb in terms of elements. Details will be introduced in Section IV-C6. We use H\mathcal{E}_{H} to denote the set of top-rr most frequent elements (Line 1), and they will be kept in the buffer of each record. Let K\mathcal{E}_{K} denote the remaining elements. Line 1 identifies maximal possible global threshold τ\tau for elements in K\mathcal{E}_{K} such that the total size of GB-KMV sketch meets the space budget bb. For each record XX, let nXn_{X} denote the number of elements in K\mathcal{E}_{K} with hash values less than τ\tau, we have X𝒮(r32+nX)b\sum_{X\in\mathcal{S}}(\frac{r}{32}+n_{X})\leq b. Then Lines 1-1 build the buffer X\mathcal{H}_{X} and G-KMV sketch X\mathcal{L}_{X} for every record X𝒮X\in\mathcal{S}. In section 2, we will show the correctness of our sketch in Theorem 2.

Containment Similarity Search. Given the GB-KMV sketch of the query record QQ and the dataset 𝒮\mathcal{S}, we can conduct approximate similarity search as illustrated in Algorithm 2. Given a query QQ with size qq and the similarity threshold tt^{*}, let θ=tq\theta=t^{*}*q(Lines 1-2). With GB-KMV sketch {Q,Q}\{\mathcal{H}_{Q},\mathcal{L}_{Q}\}, we can calculate the containment similarity based on

|QX|^=|QX|+D^GKMV\widehat{|Q\cap X|}=|\mathcal{H}_{Q}\cap\mathcal{H}_{X}|+\hat{D}_{\cap}^{GKMV} (27)

where D^GKMV\hat{D}_{\cap}^{GKMV} is the estimation of overlap size of QQ and XX which is calculated by Equation 25 in Section IV-A.

Note that |QX||\mathcal{H}_{Q}\cap\mathcal{H}_{X}| is the number of common elements of QQ and XX in H\mathcal{E}_{H}.

Input : QQ, a query set
tt^{*}, containment similarity threshold
Output : R:R: records {X}\{X\} with C(Q,X)tC(Q,X)\geq t^{*}
qq \leftarrow |Q||Q|;
θ\theta \leftarrow tqt^{*}*q;
for each record XX \in 𝒮\mathcal{S} do  |QX|^\widehat{|Q\cap X|} \leftarrow |HQHX|+D^GKMV|\mathcal{L}^{Q}_{H}\cap\mathcal{L}^{X}_{H}|+\hat{D}_{\cap}^{GKMV};
if |QX|^θ\widehat{|Q\cap X|}\geq\theta then  𝒮candidate=𝒮candidateX\mathcal{S}_{candidate}=\mathcal{S}_{candidate}\cup X;
4 4 4 4   return 𝒮candidate\mathcal{S}_{candidate}
Algorithm 2 Containment Similarity Search

Implementation of Containment Similarity Search. In our implementation, we use a bitmap with size rr to keep the elements in buffer where each bit is reserved for one frequent element. We can use bitwise intersection operator to efficiently compute |QX||\mathcal{H}_{Q}\cap\mathcal{H}_{X}| in Line 2 of Algorithm 2. Note that the estimator of overlap size by G-KMV method in Equation 25 is D^GKMV=Kkk1U(k)\hat{D}_{\cap}^{GKMV}=\frac{K_{\cap}}{k}\frac{k-1}{U_{(k)}}. As to the computation of |QX|^\widehat{|Q\cap X|}, we apply some transformation to |HQHX|+D^GKMVθ|\mathcal{L}^{Q}_{H}\cap\mathcal{L}^{X}_{H}|+\hat{D}_{\cap}^{GKMV}\geq\theta. Then we get KoK_{\cap}\geq o where o=U(k)(θo1)o=U_{(k)}(\theta-o_{1}) and o1=|QX|o_{1}=|\mathcal{H}_{Q}\cap\mathcal{H}_{X}|. Since KK_{\cap} is the overlap size, then we make use of the PPjoin* [40] to speed up the search. Note that in order to make the PPjoin* which is designed for similarity join problem to be applicable to the similarity search problem, we partition the dataset 𝒮\mathcal{S} by record size, and in each partition we search for the records which satisfy KoK_{\cap}\geq o, where overlap size is modified by the lower bound in corresponding partition.

Remark 3.

Note that the size-aware overlap set similarity joins algorithm in [25] can not be applied to our GB-KMV method, because we need to online construct cc-subset inverted list for each incoming query, which results in very inefficient performance.

Processing Dynamic Data. Note that our algorithm can be modified to process dynamic data. Particularly, when new records come, we compute the new global threshold τ\tau under the fixed space budget by Line  1 of Algorithm  1, and with the new global threshold, we maintain the sketch of each record as shown in Line  1 of Algorithm  1.

IV-C Theoretical Analysis

In this section, we provide theoretical underpinnings of the claims and observations in this paper.

IV-C1 Background

We need some reasonable assumptions on the record size distribution, element frequency distribution and query work-load for a comprehensive analysis. Following are three popular assumptions widely used in the literature (e.g., [6, 29, 27, 18, 16, 44, 34]):

  • The element frequency in the dataset follows the power-law distribution, with p1(x)=c1xα1p_{1}(x)=c_{1}x^{-\alpha_{1}}.

  • The record size in the dataset follows the power-law distribution, with p2(x)=c2xα2p_{2}(x)=c_{2}x^{-\alpha_{2}}.

  • The query QQ is randomly chosen from the records.

Throughout the paper, we use the variance to evaluate the goodness of an estimator. Regarding the KMV based sketch techniques (KMV, G-KMV and GB-KMV), we have

Lemma 2.

In KMV sketch based methods, the larger the kk value used in Equation 8 and Equation 24 is, the smaller the variance will be.

It is easy to verify the above lemma by calculating the derivative of Equation 11 with respect to the variable kk. Thus, in the following analysis of KMV based sketch techniques. We use the kk value (i.e., the sketch size used for estimation) to evaluate the goodness of the estimation, the larger the better.

IV-C2 Optimal KMV Signature Scheme

In this part, we give an optimal resource allocation strategy for KMV sketch method in similarity search.

Theorem 1.

Given a space budget bb, each set is associated with a size-kik_{i} KMV signature and i=1mki=b\sum_{i=1}^{m}k_{i}=b. For KMV sketch based containment similarity search, the optimal signature scheme is to keep the bm\lfloor\frac{b}{m}\rfloor minimal hash values for each set XiX_{i}.

Proof.

Given a query QQ and dataset 𝒮={X1,,Xm}\mathcal{S}=\{X_{1},...,X_{m}\}, an optimal signature scheme for containment similarity search is to minimize the average variance between QQ and Xi,i=1,,mX_{i},i=1,...,m. Considering the query QQ and set XiX_{i} with size-kqk_{q} KMV sketch Q\mathcal{L}_{Q} and size-kik_{i} sketch Xi\mathcal{L}_{X_{i}} respectively, the sketch size is k=min{kq,ki}k=\min\{k_{q},k_{i}\} according to Equation 8. By Lemma 2, an optimal signature scheme is to maximize the total kk value(say TT), then we have the following optimization goal,

maxT=i=1mmin{kq,ki}\max\ T=\sum_{i=1}^{m}\min\{k_{q},k_{i}\}
s.t.b=i=1mki,ki>0,i=1,2,,ms.t.\ \ b=\sum_{i=1}^{m}k_{i},\ \ k_{i}>0,i=1,2,...,m

Rank the kik_{i} by increasing order, w.l.o.g., let k1,k2,,kmk_{1},k_{2},...,k_{m} be the sketch size sequence after reorder. Let klk_{l} be the first in the sequence such that kl=kqk_{l}=k_{q}, then we have T=k1++kl+(ml)kq=bi=l+1m(kikq)T=k_{1}+...+k_{l}+(m-l)k_{q}=b-\sum_{i=l+1}^{m}(k_{i}-k_{q}). In order to maximize TT, we set ki=kq,i=l+1,,mk_{i}=k_{q},i=l+1,...,m. Then by b=i=1mkib=\sum_{i=1}^{m}k_{i}, we have k1++kl+kq(ml)=bk_{1}+...+k_{l}+k_{q}(m-l)=b. Note that kikq,i=1,,lk_{i}\leq k_{q},i=1,...,l, we must have ki=kq,i=1,,lk_{i}=k_{q},i=1,...,l. Since QQ is randomly selected from dataset 𝒮\mathcal{S}, we can get that all the ki,i=1,mk_{i},i=1,...m are equal and ki=bmk_{i}=\lfloor\frac{b}{m}\rfloor. ∎

IV-C3 Correctness of GKMV Sketch

In this section, we show that the G-KMV sketch is a valid KMV sketch.

Theorem 2.

Given two records XX and YY, let X\mathcal{L}_{X} and Y\mathcal{L}_{Y} be the G-KMV sketch of XX and YY, respectively. Let k=|XY|k=|\mathcal{L}_{X}\cup\mathcal{L}_{Y}|, then the size-kk KMV synopses of XYX\cup Y is =XY\mathcal{L}=\mathcal{L}_{X}\cup\mathcal{L}_{Y}.

Proof.

We show that the above =XY\mathcal{L}=\mathcal{L}_{X}\cup\mathcal{L}_{Y} is a valid KMV sketch of XYX\cup Y. Let k=|XY|k=|\mathcal{L}_{X}\cup\mathcal{L}_{Y}| and vkv_{k} is the kk-th smallest hash value in XY\mathcal{L}_{X}\cup\mathcal{L}_{Y}. In order to prove that XY\mathcal{L}_{X}\cup\mathcal{L}_{Y} is valid, we show that vkv_{k} corresponds the element with the kk-th minimal hash value in XYX\cup Y. If not, there should exist an element ee such that h(e)<vk,eXYh(e^{\prime})<v_{k},e^{\prime}\in X\cup Y and h(e)XYh(e^{\prime})\notin\mathcal{L}_{X}\cup\mathcal{L}_{Y}. Note that vkτv_{k}\leq\tau, then h(e)τh(e^{\prime})\leq\tau, thus h(e)h(e^{\prime}) is included in XY\mathcal{L}_{X}\cup\mathcal{L}_{Y}, which contradicts to the above statement. ∎

IV-C4 G-KMV: A Better KMV Sketch

In this part, we show that by imposing a global threshold to KMV sketch, we can achieve better accuracy. Let XKMV\mathcal{L}_{X}^{KMV} and YKMV\mathcal{L}_{Y}^{KMV} be the KMV sketch of XX and YY respectively. Let k1=|XKMV|k_{1}=|\mathcal{L}_{X}^{KMV}| and k2=|YKMV|k_{2}=|\mathcal{L}_{Y}^{KMV}|, then the sketch size kk value can be set by Equation 8. Similarly, let XGKMV\mathcal{L}_{X}^{GKMV} and YGKMV\mathcal{L}_{Y}^{GKMV} be the G-KMV sketch of XX and YY respectively, and the sketch size kk value can be set by Equation 24.

Theorem 3.

With the fixed index space budget, for containment similarity search the G-KMV sketch method is better than KMV method in terms of accuracy when the power-law exponent of element frequency α13.4\alpha_{1}\leq 3.4.

Proof.

Let xj=|Xj|,j=1,2,,mx_{j}=|X_{j}|,j=1,2,...,m be the set size and kjk_{j} be the signature size of record XjX_{j}. The frequency of element eie_{i} is set to be fif_{i}. The index space budget is bb.

For KMV sketch based method, by Theorem 1, the optimal signature scheme is k=min(kj,kl)=bmk=min(k_{j},k_{l})=\lfloor\frac{b}{m}\rfloor given the index space budget bb, then the average kk value for all pairs of sets is

k¯KMV=1m2j=1ml=1mmin(kj,kl)=bm\bar{k}_{KMV}=\frac{1}{m^{2}}\sum_{j=1}^{m}\sum_{l=1}^{m}min(k_{j},k_{l})=\lfloor\frac{b}{m}\rfloor (28)

For G-KMV sketch based method, let τ\tau be the hash value threshold. The probability that hash value h(ei)h(e_{i}) is included in signature XjGKMV\mathcal{L}^{GKMV}_{X_{j}} is Pr[h(ei)XjGKMV]=τfiNxjPr[h(e_{i})\in\mathcal{L}^{GKMV}_{X_{j}}]=\tau\frac{f_{i}}{N}x_{j} where fif_{i} is the frequency of element eie_{i}, and N=i=1nfiN=\sum_{i=1}^{n}f_{i} is the total number of elements. The size of XjGKMV\mathcal{L}^{GKMV}_{X_{j}} can be computed by lj=i=1nPr[h(ei)XjGKMV]=τxjl_{j}=\sum_{i=1}^{n}Pr[h(e_{i})\in\mathcal{L}^{GKMV}_{X_{j}}]=\tau x_{j} then the total index space is b=j=1mlj=j=1mτxj=τNb=\sum_{j=1}^{m}l_{j}=\sum_{j=1}^{m}\tau x_{j}=\tau N. and the hash value threshold τ=bN\tau=\frac{b}{N}. Next we compute average sketch size kk value of G-KMV method. The intersection size of Xj\mathcal{L}_{X_{j}} and Xl\mathcal{L}_{X_{l}}

|XjXl|=i=1nτfiNxjτfiNxl=τ2xjxlfn2|\mathcal{L}_{X_{j}}\cap\mathcal{L}_{X_{l}}|=\sum_{i=1}^{n}\tau\frac{f_{i}}{N}x_{j}*\tau\frac{f_{i}}{N}x_{l}=\tau^{2}x_{j}x_{l}f_{n^{2}} (29)

where fn2=i=1nfi2N2f_{n^{2}}=\frac{\sum_{i=1}^{n}f_{i}^{2}}{N^{2}}. The kk value of G-KMV method according to Equation 24 is

|XjXl|=τxj+τxlτ2xjxlfn2|\mathcal{L}_{X_{j}}\cup\mathcal{L}_{X_{l}}|=\tau x_{j}+\tau x_{l}-\tau^{2}x_{j}x_{l}f_{n^{2}} (30)

Then the average kk value for all pairs of sets is

k¯GKMV=1m2j=1ml=1m|XjXl|=2bmb2m2fn2\bar{k}_{GKMV}=\frac{1}{m^{2}}\sum_{j=1}^{m}\sum_{l=1}^{m}|\mathcal{L}_{X_{j}}\cup\mathcal{L}_{X_{l}}|=\frac{2b}{m}-\frac{b^{2}}{m^{2}}f_{n^{2}} (31)

Let k¯GKMVk¯KMV\bar{k}_{GKMV}\geq\bar{k}_{KMV}, we get α1(0,0.5][(1+mb)(1+mb)mb,(1+mb)+(1+mb)mb]\alpha_{1}\in(0,0.5]\cup[(1+\frac{m}{b})-\sqrt{(1+\frac{m}{b})\frac{m}{b}},(1+\frac{m}{b})+\sqrt{(1+\frac{m}{b})\frac{m}{b}}]. Note that for the common setting mb1\frac{m}{b}\leq 1, we can get α13.4\alpha_{1}\leq 3.4. The result makes sense since the power-law(Zipf’s law) exponent of element frequency is usually less than 3.4 for real datasets. ∎

IV-C5 Partition of KMV Sketch Is Not Promising

In this part, we show that it is difficult to improve the performance of KMV by dividing elements to multiple groups according to their frequency and apply KMV estimation individually. W.l.o.g., we consider dividing elements into two groups.

We divide the sorted element universe \mathcal{E} into two disjoint parts H1\mathcal{E}_{H_{1}} and H2\mathcal{E}_{H_{2}}. Let XX and YY be two sets from dataset 𝒮\mathcal{S} with KMV sketch X\mathcal{L}_{X} and Y\mathcal{L}_{Y} respectively. Let kX=|X|k_{X}=|\mathcal{L}_{X}| and kY=|Y|k_{Y}=|\mathcal{L}_{Y}|. The estimator of containment similarity is C^=D^q\hat{C}=\frac{\hat{D}_{\cap}}{q}, where D^\hat{D}_{\cap} is the estimator of intersection size DD_{\cap} and qq is the query size(xx or yy).

Corresponding to H1\mathcal{E}_{H_{1}} and H2\mathcal{E}_{H_{2}}, we divide XX(YY, resp.) to two parts X1X_{1} and X2X_{2}(Y1Y_{1} and Y2Y_{2}, resp.). We know that X1X2=ΦX_{1}\cap X_{2}=\Phi and Y1Y2=ΦY_{1}\cap Y_{2}=\Phi. Also, let D=|XY|D_{\cap}=|X\cap Y|,D=|XY|D_{\cup}=|X\cup Y|, we have D=|X1Y1|+|X2Y2|D_{\cap}=|X_{1}\cap Y_{1}|+|X_{2}\cap Y_{2}| and D=|X1Y1|+|X2Y2|D_{\cup}=|X_{1}\cup Y_{1}|+|X_{2}\cup Y_{2}| since H1\mathcal{E}_{H_{1}} and H2\mathcal{E}_{H_{2}} are disjoint. For simplicity, let D1=|X1Y1|D_{\cap 1}=|X_{1}\cap Y_{1}|, D1=|X1Y1|D_{\cup 1}=|X_{1}\cup Y_{1}|, D2=|X2Y2|D_{\cap 2}=|X_{2}\cap Y_{2}| and D2=|X2Y2|D_{\cup 2}=|X_{2}\cup Y_{2}|. For X1X_{1}, X2X_{2}, Y1Y_{1} and Y2Y_{2}, the KMV sketches are X1\mathcal{L}_{X_{1}}, X2\mathcal{L}_{X_{2}}, Y1\mathcal{L}_{Y_{1}} and Y2\mathcal{L}_{Y_{2}} with size kX1k_{X_{1}}, kX2k_{X_{2}}, kY1k_{Y_{1}} and kY2k_{Y_{2}}, respectively. Based on this, we give another estimator as C^=D^1+D^2q\hat{C}^{\prime}=\frac{\hat{D}_{\cap 1}+\hat{D}_{\cap 2}}{q}, where D^1\hat{D}_{\cap 1}(D^2\hat{D}_{\cap 2}, resp.) is the estimator of intersection size D1D_{\cap 1}(D2D_{\cap 2}, resp.). Next, we compare the variance of C^\hat{C} and C^\hat{C}^{\prime}.

Theorem 4.

After dividing the element universe into two groups and applying KMV sketch in each group, with the same index space budget, the variance of C^\hat{C}^{\prime} is larger than that of C^\hat{C}.

Proof.

Recall the KMV sketch, we have E(C^)=E(D^1)+E(D^2)=D1+D2=DE(\hat{C}^{\prime})=E(\hat{D}_{\cap 1})+E(\hat{D}_{\cap 2})=D_{\cap 1}+D_{\cap 2}=D_{\cap}. Because of the two disjoint element groups, D^1\hat{D}_{\cap 1} and D^2\hat{D}_{\cap 2} are independent. Thus the variance Var[C^]=Var[D^1]+Var[D^2]q2Var[\hat{C}^{\prime}]=\frac{Var[\hat{D}_{\cap 1}]+Var[\hat{D}_{\cap 2}]}{q^{2}}. Next, we will show

Var[D^1]+Var[D^2]Var[C^].Var[\hat{D}_{\cap 1}]+Var[\hat{D}_{\cap 2}]\geq Var[\hat{C}].

Consider the KMV sketch for set XX and YY, the sketch size according to Equation 8 is k=min{kX,kY}k=\min\{k_{X},k_{Y}\}. Similarly, for X1X_{1} and Y1Y_{1}, we have the sketch size k1=min{kX1,kY1}k_{1}=\min\{k_{X_{1}},k_{Y_{1}}\}; for X2X_{2} and Y2Y_{2}, we have the sketch size k2=min{kX2,kY2}k_{2}=\min\{k_{X_{2}},k_{Y_{2}}\}. Since the index is fixed, we have kX=kX1+kX2k_{X}=k_{X_{1}}+k_{X_{2}} and kY=kY1+kY2k_{Y}=k_{Y_{1}}+k_{Y_{2}}. Then, k1+k2=min{kX1,kY1}+min{kX2,kY2}min{kX,kY}=kk_{1}+k_{2}=\min\{k_{X_{1}},k_{Y_{1}}\}+\min\{k_{X_{2}},k_{Y_{2}}\}\leq\min\{k_{X},k_{Y}\}=k.

Let Δ=Var[D^1]+Var[D^2]Var[C^]\Delta=Var[\hat{D}_{\cap 1}]+Var[\hat{D}_{\cap 2}]-Var[\hat{C}], after some calculation, we have Δ=D12k12+D22k22D2k2+D1D1k1+D2D2k2DDk\Delta=\frac{D_{\cap 1}^{2}}{k_{1}^{2}}+\frac{D_{\cap 2}^{2}}{k_{2}^{2}}-\frac{D_{\cap}^{2}}{k^{2}}+\frac{D_{\cap 1}D_{\cup 1}}{k_{1}}+\frac{D_{\cap 2}D_{\cup 2}}{k_{2}}-\frac{D_{\cap}D_{\cup}}{k}. Next we show that D12k12+D22k22D2k20\frac{D_{\cap 1}^{2}}{k_{1}^{2}}+\frac{D_{\cap 2}^{2}}{k_{2}^{2}}-\frac{D_{\cap}^{2}}{k^{2}}\geq 0. Let k1=1αkk_{1}=\frac{1}{\alpha}k and k2=1βk_{2}=\frac{1}{\beta} where 1α+1β=1\frac{1}{\alpha}+\frac{1}{\beta}=1 and α,β>1\alpha,\ \beta>1. Then we have D12k12+D22k22D2k2=α2D12+β2D22D2k2=(α21)D12+(β21)D222D1D2k2\frac{D_{\cap 1}^{2}}{k_{1}^{2}}+\frac{D_{\cap 2}^{2}}{k_{2}^{2}}-\frac{D_{\cap}^{2}}{k^{2}}=\frac{\alpha^{2}D_{\cap 1}^{2}+\beta^{2}D_{\cap 2}^{2}-D_{\cap}^{2}}{k^{2}}=\frac{(\alpha^{2}-1)D_{\cap 1}^{2}+(\beta^{2}-1)D_{\cap 2}^{2}-2D_{\cap 1}D_{\cap 2}}{k^{2}}. As for the upper part in the above equation, by inequality of arithmetic and geometric means, we get (α21)D12+(β21)D222D1D22((α1)(α+1)(β1)(β+1)1)D1D2(\alpha^{2}-1)D_{\cap 1}^{2}+(\beta^{2}-1)D_{\cap 2}^{2}-2D_{\cap 1}D_{\cap 2}\geq 2(\sqrt{(\alpha-1)(\alpha+1)(\beta-1)(\beta+1)}-1)D_{\cap 1}D_{\cap 2}. Since (α1)(β1)=1(\alpha-1)(\beta-1)=1, we get (α1)(α+1)(β1)(β+1)1=(α+1)(β+1)10\sqrt{(\alpha-1)(\alpha+1)(\beta-1)(\beta+1)}-1=\sqrt{(\alpha+1)(\beta+1)}-1\geq 0, thus D12k12+D22k22D2k20\frac{D_{\cap 1}^{2}}{k_{1}^{2}}+\frac{D_{\cap 2}^{2}}{k_{2}^{2}}-\frac{D_{\cap}^{2}}{k^{2}}\geq 0.

Let Δ1=D1D1k1+D2D2k2DDk\Delta_{1}=\frac{D_{\cap 1}D_{\cup 1}}{k_{1}}+\frac{D_{\cap 2}D_{\cup 2}}{k_{2}}-\frac{D_{\cap}D_{\cup}}{k}, after some computation, we have Δ1=(k1D2k2D1)(k1D2k2D1)kk1k2\Delta_{1}=\frac{(k_{1}D_{\cup 2}-k_{2}D_{\cup 1})(k_{1}D_{\cap 2}-k_{2}D_{\cap 1})}{kk_{1}k_{2}}. As for the numerator(upper) of Δ1\Delta_{1}, consider the two parts after dividing the element universe, if the union size in one part, say D2D_{\cup 2}, is larger, meanwhile the corresponding intersection size D2D_{\cap 2} is larger, we have Δ10\Delta_{1}\geq 0. This case can be realized since one of the two groups divided from element universe is made of high-frequency elements, which will result in large intersection size and large union size under the proper choice of k,k1,k2k,k_{1},k_{2}. ∎

IV-C6 Optimal Buffer Size rr

In this part, we show how to find optimal buffer size rr by analysing the variance for GB-KMV method. Given the space budget bb, we first show that the variance for GB-KMV sketch is a function of f(r,α1,α2,b)f(r,\alpha_{1},\alpha_{2},b) and then we give a method to appropriately choose rr. Below are some notations first.

Given two sets XX and YY with G-KMV sketch X\mathcal{L}_{X} and Y\mathcal{L}_{Y} respectively, the containment similarity of QQ in XX is computed by Equation 26 as C^GKMV=D^GKMVq\hat{C}^{GKMV}=\frac{\hat{D}_{\cap}^{GKMV}}{q}, where D^GKMV=Kk×k1U(k)\hat{D}_{\cap}^{GKMV}=\frac{K_{\cap}}{k}\times\frac{k-1}{U_{(k)}} is the overlap size.

As for the GB-KMV method of set XX an YY with sketch XX\mathcal{H}_{X}\cup\mathcal{L}_{X} and YY\mathcal{H}_{Y}\cup\mathcal{L}_{Y} respectively, the containment similarity of QQ in XX is computed by Equation 27 as C^GBKMV=|QX|+D^GKMVq\hat{C}^{GBKMV}=\frac{|\mathcal{H}_{Q}\cap\mathcal{H}_{X}|+\hat{D}_{\cap}^{GKMV}}{q}, where |QX||\mathcal{H}_{Q}\cap\mathcal{H}_{X}| is the number of common elements in H\mathcal{E}_{H} part. It is easy to verify that C^GBKMV\hat{C}_{GBKMV} is an unbiased estimator. Also, the variance of GB-KMV method estimator is Var[C^GBKMV]=Var[D^GKMV]q2Var[\hat{C}_{GBKMV}]=\frac{Var[\hat{D}_{\cap}^{GKMV}]}{q^{2}}, where Var[D^GKMV]Var[\hat{D}_{\cap}^{GKMV}] corresponds to the variance of the G-KMV sketch in the GB-KMV sketch.

Next, with the same space budget bb, we compute the average variance of GB-KMV method.

Consider the GB-KMV index construction which is introduced in Section IV-B by Algorithm 1. Let NN be the total number of elements and bb the space budget in terms of elements for index construction. Assume that we keep rr high-frequency elements by bitmap in the buffer, which have N1=j=1m|Xj|=i=1rfiN_{1}=\sum_{j=1}^{m}|\mathcal{H}_{X_{j}}|=\sum_{i=1}^{r}f_{i} elements and occupy T1=mr/32T_{1}=m*r/32 index space. Then the total number of elements left for G-KMV sketch is N2=NN1N_{2}=N-N_{1} and the index space for G-KMV sketch is T2=bT1T_{2}=b-T_{1}.

Given two sets XjX_{j} and XlX_{l}, the variance of overlap size estimator in Equation 11 is as follows

Var[D^]=D(kDk2D+k+D)k(k2)Var[\hat{D}_{\cap}]=\frac{D_{\cap}(kD_{\cup}-k^{2}-D_{\cup}+k+D_{\cap})}{k(k-2)} (32)

where D=|XjXl|D_{\cup}=|X_{j}\cup X_{l}|, D=|XjXl|D_{\cap}=|X_{j}\cap X_{l}| and kk is the sketch size. Since the variance is concerned with the union size DD_{\cup}, the intersection size DD_{\cap} and the signature size kk, we first calculate these three formulas, then compute the variance.

Consider the two sets XjX_{j}, XlX_{l} from dataset 𝒮\mathcal{S} with GB-KMV sketch XjXj\mathcal{H}_{X_{j}}\cup\mathcal{L}_{X_{j}} and XjXj\mathcal{H}_{X_{j}}\cup\mathcal{L}_{X_{j}} respectively. The element eie_{i} is associated with frequency fif_{i}, and the probability of element eie_{i} appearing in record XjX_{j} is Pr[h(ei)Xj]=fiNxjPr[h(e_{i})\in\mathcal{L}_{X_{j}}]=\frac{f_{i}}{N}x_{j}. Given a hash value threshold τ\tau, the G-KMV signature size of set XjX_{j} is computed as kj=τ(xj|Xj|)k_{j}=\tau(x_{j}-|\mathcal{H}_{X_{j}}|). The total index space in G-KMV sketch is j=1mkj=T2=bT1=br32m\sum_{j=1}^{m}k_{j}=T_{2}=b-T_{1}=b-\frac{r}{32}*m, then we get τ=br/32mNN1\tau=\frac{b-r/32*m}{N-N_{1}}.

Similar to Equation 2930, the sketch size kk value for GB-KMV sketch is k=τ(xj+xl)τ2x1x2(fn2fr2)k=\tau(x_{j}+x_{l})-\tau^{2}x_{1}x_{2}(f_{n^{2}}-f_{r^{2}}) where fn2=i+1nfi2N2f_{n^{2}}=\frac{\sum_{i+1}^{n}f_{i}^{2}}{N^{2}}, fr2=i+1rfi2N2f_{r^{2}}=\frac{\sum_{i+1}^{r}f_{i}^{2}}{N^{2}}. The intersection size and union size of XjX_{j} and XlX_{l} are D=xjxl(fn2fr2)D_{\cap}=x_{j}x_{l}(f_{n^{2}}-f_{r^{2}}) and D=(xj+xl)(1fr)xjxl(fn2fr2)D_{\cup}=(x_{j}+x_{l})(1-f_{r})-x_{j}x_{l}(f_{n^{2}}-f_{r^{2}}) where fr=i=1rfiNf_{r}=\frac{\sum_{i=1}^{r}f_{i}}{N}, then the variance of GB-KMV method by Equation 32 is

Var[C^GBKMV]=(xj+xl)xlkxjF1+xl2kF2+xlxjF3Var[\hat{C}_{GBKMV}]=\frac{(x_{j}+x_{l})x_{l}}{kx_{j}}F_{1}+\frac{x_{l}^{2}}{k}F_{2}+\frac{x_{l}}{x_{j}}F_{3}

where F1=fn2fr2F_{1}=f_{n^{2}}-f_{r^{2}}, F2=(fn2fr2)2F_{2}=-(f_{n^{2}}-f_{r^{2}})^{2} and F3=(fn2fr2)F_{3}=-(f_{n^{2}}-f_{r^{2}}), and the average variance of GB-KMV method VarGBKMV=1m2j=1ml=1mVar[C^GBKMV]Var_{GBKMV}=\frac{1}{m^{2}}\sum_{j=1}^{m}\sum_{l=1}^{m}Var[\hat{C}_{GBKMV}] is

VarGBKMV=L1F1+L2F2+L3F3Var_{GBKMV}=L_{1}F_{1}+L_{2}F_{2}+L_{3}F_{3}

where L1=1m2j=1ml=1m(xj+xl)xjxlkxj2L_{1}=\frac{1}{m^{2}}\sum_{j=1}^{m}\sum_{l=1}^{m}\frac{(x_{j}+x_{l})x_{j}x_{l}}{kx_{j}^{2}}, L2=1m2j=1ml=1m(xjxl)2kxj2L_{2}=\frac{1}{m^{2}}\sum_{j=1}^{m}\sum_{l=1}^{m}\frac{(x_{j}x_{l})^{2}}{kx_{j}^{2}} and L3=1m2j=1ml=1mxlxjL_{3}=\frac{1}{m^{2}}\sum_{j=1}^{m}\sum_{l=1}^{m}\frac{x_{l}}{x_{j}}.

Note that F1,F2,F3F_{1},F_{2},F_{3} is concerned with the element frequency which can be computed by using the distribution p1(x)=c1xα1p_{1}(x)=c_{1}x^{-\alpha_{1}}; L1,L2,L3L_{1},L_{2},L_{3} is related to the record size which can be computed by using p2(x)=c2xα2p_{2}(x)=c_{2}x^{-\alpha_{2}} and kk is related to the index budget size bb and buffer size rr, then VarGBKMVVar_{GBKMV} can be restated as VarGBKMV=L1F1+L2F2+L3F3=1m2[A(d1α1r1α1)(d12α1r12α1)bm32rB(d1α1r1α1)(d12α1r12α1)2bm32r]C(d12α1r12α1)Var_{GBKMV}=L_{1}F_{1}+L_{2}F_{2}+L_{3}F_{3}=\frac{1}{m^{2}}[A\frac{(d^{1-\alpha_{1}}-r^{1-\alpha_{1}})(d^{1-2\alpha_{1}}-r^{1-2\alpha_{1}})}{b-\frac{m}{32}r}-B\frac{(d^{1-\alpha_{1}}-r^{1-\alpha_{1}})(d^{1-2\alpha_{1}}-r^{1-2\alpha_{1}})^{2}}{b-\frac{m}{32}r}]-C(d^{1-2\alpha_{1}}-r^{1-2\alpha_{1}}) where A=N(α11)2(12α1)d1α1(d1α11)2(α21)2α2(2α2)(xt2α2x12α2)(xtα2x1α2)(xtα2+1x1α2+1)2A=\frac{N(\alpha_{1}-1)^{2}}{(1-2\alpha_{1})d^{1-\alpha_{1}}(d^{1-\alpha_{1}}-1)^{2}}\frac{(\alpha_{2}-1)^{2}}{-\alpha_{2}(2-\alpha_{2})}\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})(x_{t}^{-\alpha_{2}}-x_{1}^{-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{2}}, B=N(α11)4(12α1)2d1α1(d1α11)4(α21)2α2(3α2)(xt3α2x13α2)(xtα2x1α2)(xtα2+1x1α2+1)2B=\frac{N(\alpha_{1}-1)^{4}}{(1-2\alpha_{1})^{2}d^{1-\alpha_{1}}(d^{1-\alpha_{1}}-1)^{4}}\frac{(\alpha_{2}-1)^{2}}{-\alpha_{2}(3-\alpha_{2})}\frac{(x_{t}^{3-\alpha_{2}}-x_{1}^{3-\alpha_{2}})(x_{t}^{-\alpha_{2}}-x_{1}^{-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{2}} and C=(α11)2(12α1)(d1α11)2(α21)2α2(2α2)(xt2α2x12α2)(xtα2x1α2)(xtα2+1x1α2+1)2C=\frac{(\alpha_{1}-1)^{2}}{(1-2\alpha_{1})(d^{1-\alpha_{1}}-1)^{2}}\frac{(\alpha_{2}-1)^{2}}{-\alpha_{2}(2-\alpha_{2})}\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})(x_{t}^{-\alpha_{2}}-x_{1}^{-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{2}} Moreover, we have VarGBKMV=a1r5α1+1+a2r5α1+a3r4α1+1+a4r3α1+2+a5r3α1+1+a6r2α1+2+a7rα1+2+a8r3(bm32r)r5α1Var_{GBKMV}=\frac{a_{1}r^{5\alpha_{1}+1}+a_{2}r^{5\alpha_{1}}+a_{3}r^{4\alpha_{1}+1}+a_{4}r^{3\alpha_{1}+2}+a_{5}r^{3\alpha_{1}+1}+a_{6}r^{2\alpha_{1}+2}+a_{7}r^{\alpha_{1}+2}+a_{8}r^{3}}{(b-\frac{m}{32}r)r^{5\alpha_{1}}} where a1=Cm32d12α1a_{1}=C\frac{m}{32}d^{1-2\alpha_{1}}, a2=Ad22α1Bd35α1bCd12α1a_{2}=Ad^{2-2\alpha_{1}}-Bd^{3-5\alpha_{1}}-bCd^{1-2\alpha_{1}}, a3=Ad1α1+Bd24α1a_{3}=-Ad^{1-\alpha_{1}}+Bd^{2-4\alpha_{1}}, a4=Cm32a_{4}=-C\frac{m}{32}, a5=Ad1α1+2Bd22α1+bCa_{5}=-Ad^{1-\alpha_{1}}+2Bd^{2-2\alpha_{1}}+bC, a6=A2Bd12α1a_{6}=A-2Bd^{1-2\alpha_{1}}, a7=Bd1α1a_{7}=-Bd^{1-\alpha_{1}} and a8=Ba_{8}=B.

We can see that the variance VarGBKMVVar_{GBKMV} can be regarded as a function of f(r,α1,α2,b)f(r,\alpha_{1},\alpha_{2},b), i.e.,

VarGBKMV=f(r,α1,α2,b)Var_{GBKMV}=f(r,\alpha_{1},\alpha_{2},b) (33)

Similarly, for the G-KMV sketch based method, the variance can be calculated as

Var[C^GKMV]=(xj+xl)xjxlkxj2F1+(xjxl)2kxj2F2+xjxlxj2F3Var[\hat{C}_{GKMV}]=\frac{(x_{j}+x_{l})x_{j}x_{l}}{kx_{j}^{2}}F^{\prime}_{1}+\frac{(x_{j}x_{l})^{2}}{kx_{j}^{2}}F^{\prime}_{2}+\frac{x_{j}x_{l}}{x_{j}^{2}}F^{\prime}_{3}

where F1=fn2F^{\prime}_{1}=f_{n^{2}}, F2=fn22F^{\prime}_{2}=-f_{n^{2}}^{2}, F3=fn2F^{\prime}_{3}=-f_{n^{2}} and k=bN(xj+xl)(bN)2xjxlfn2k=\frac{b}{N}(x_{j}+x_{l})-(\frac{b}{N})^{2}x_{j}x_{l}f_{n^{2}}. Let ΔVar=Var[C^GBKMV]Var[C^GKMV]\Delta Var=Var[\hat{C}_{GBKMV}]-Var[\hat{C}_{GKMV}], then for all pairs of XjX_{j}, XlX_{l}, the average of ΔVar\Delta Var is VΔ=1m2j=1ml=1mΔVarV_{\Delta}=\frac{1}{m^{2}}\sum_{j=1}^{m}\sum_{l=1}^{m}\Delta Var. Moreover, we can rewrite VΔV_{\Delta} as VΔ=L1(F1F1)+L2(F2F2)+L3(F3F3)V_{\Delta}=L_{1}(F^{\prime}_{1}-F_{1})+L_{2}(F^{\prime}_{2}-F_{2})+L_{3}(F^{\prime}_{3}-F_{3}).

Eventually, in order to find the optimal rr, i.e., the number of high-frequency elements in GB-KMV method, we give the optimization goal as maxrVGBKMV=f(r,α1,α2,b)\max_{r}\ \ V_{GBKMV}=f(r,\alpha_{1},\alpha_{2},b), s.t.VΔ<0s.t.\ \ V_{\Delta}<0.

In order to compute the above optimization problem, we try to extract the roots of the first derivative function of Equation 33( i.e., f(r,α1,α2,b)f(r,\alpha_{1},\alpha_{2},b)) with respect to rr. However, the derivative function is a polynomial function with degree of rr larger than four. According to Abel’s impossibility theorem [39], there is no algebraic solution, thus we try to give the numerical solution.

Recall that we use bitmap to keep the rr high-frequency elements, given the space budget bb, the element frequency and record size distribution with power-law exponent α1\alpha_{1} and α2\alpha_{2} respectively, the optimization goal maxrVGBKMV\max_{r}\ V_{GBKMV} can be considered as a function maxrf(r,b,α1,α2)\max_{r}\ f(r,b,\alpha_{1},\alpha_{2}). Given a dataset 𝒮\mathcal{S} and the space budget bb, we can get the power-law exponent α1,α2\alpha_{1},\alpha_{2}. Then we assign 8,16,24,8,16,24,... to rr and calculate the f(r,b,α1,α2)f(r,b,\alpha_{1},\alpha_{2}). In this way, we can give a good guide to the choice of rr.

IV-C7 GB-KMV Sketch provides Better Accuracy than LSH-E Method

In Section III-B, we have shown that the variance of LSH-E estimator(Equation 21) is larger than that of MinHash LSH estimator(Equation 19). Note that G-KMV sketch is a special case of GB-KMV sketch when the buffer size r=0r=0. By choosing an optimal buffer size rr in IV-C6, it can guarantee that the performance of GB-KMV is not worse than G-KMV. Below, we show that G-KMV outperforms MinHash LSH in terms of estimate accuracy.

Theorem 5.

The variance of G-KMV method is smaller than that of minHash LSH method given the same sketch size.

Proof.

Suppose that the minHash LSH method uses kk^{\prime} hash functions to the dataset, then the total sketch size is T=mkT=mk^{\prime}. Let τ\tau be the global threshold of G-KMV method, we have τ=mkN\tau=\frac{mk^{\prime}}{N} where NN is the total number of elements in dataset.

We first consider the G-KMV method. Similar to Equation 2930, the intersection size of XjX_{j} and XlX_{l} is D=xjxli=1nfi2N2D_{\cap}=x_{j}x_{l}\sum_{i=1}^{n}\frac{f_{i}^{2}}{N^{2}}, and the union size is D=xj+xlxjxli=1nfi2N2D_{\cup}=x_{j}+x_{l}-x_{j}x_{l}\sum_{i=1}^{n}\frac{f_{i}^{2}}{N^{2}}. Then by Equation 11 the variance of the G-KMV method to estimate the containment similarity of XjX_{j} in XlX_{l} can be rewritten as

VG-KMV=(xj+xl)xjxlkxj2F1+(xjxl)2kxj2F2+xjxlxj2F3V_{\textit{G-KMV}}=\frac{(x_{j}+x_{l})x_{j}x_{l}}{kx_{j}^{2}}F_{1}+\frac{(x_{j}x_{l})^{2}}{kx_{j}^{2}}F_{2}+\frac{x_{j}x_{l}}{x_{j}^{2}}F_{3} (34)

where F1=fn2F_{1}=f_{n^{2}}, F2=(fn2)2F_{2}=-(f_{n^{2}})^{2}, F3=fn2F_{3}=-f_{n^{2}} and fn2=i=1nfi2N2f_{n^{2}}=\sum_{i=1}^{n}\frac{f_{i}^{2}}{N^{2}}.

Next we compute the kk value of the sketch. Note that τ\tau is the global threshold of G-KMV method. The kk value corresponding the intersection size of XjX_{j} and XlX_{l} by Equation 24 is k=τ(xj+xl)τ2xjxlfn2k=\tau(x_{j}+x_{l})-\tau^{2}x_{j}x_{l}f_{n^{2}}. Then the average variance V1=1m2j=1ml=1mVG-KMVV_{1}=\frac{1}{m^{2}}\sum_{j=1}^{m}\sum_{l=1}^{m}V_{\textit{G-KMV}} is

V1=1m2(L1F1+L2F2+L3F3)V_{1}=\frac{1}{m^{2}}(L_{1}F_{1}+L_{2}F_{2}+L_{3}F_{3})

where L1=j=1ml=1m(xj+xl)xjxlxj2kL_{1}=\sum_{j=1}^{m}\sum_{l=1}^{m}\frac{(x_{j}+x_{l})x_{j}x_{l}}{x_{j}^{2}k}, L2=j=1ml=1m(xjxl)2kxj2L_{2}=\sum_{j=1}^{m}\sum_{l=1}^{m}\frac{(x_{j}x_{l})^{2}}{kx_{j}^{2}} and L3=j=1ml=1mxjxlxj2L_{3}=\sum_{j=1}^{m}\sum_{l=1}^{m}\frac{x_{j}x_{l}}{x_{j}^{2}}. After some computation, V1=1k[(α21)3α2(2α2)W1fn2+(α21)3α2(2α2)(3α2)W2(fn2)2+k(α21)2α2(2α2)W3fn2]V_{1}=\frac{1}{k^{\prime}}[\frac{(\alpha_{2}-1)^{3}}{-\alpha_{2}(2-\alpha_{2})}W_{1}f_{n^{2}}+\frac{(\alpha_{2}-1)^{3}}{\alpha_{2}(2-\alpha_{2})(3-\alpha_{2})}W_{2}(f_{n^{2}})^{2}+k^{\prime}\frac{(\alpha_{2}-1)^{2}}{\alpha_{2}(2-\alpha_{2})}W_{3}f_{n^{2}}] where W1=(xt2α2x12α2)2(xtα2x1α2)(xtα2+1x1α2+1)3W_{1}=\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})^{2}(x_{t}^{-\alpha_{2}}-x_{1}^{-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{3}}, W2=(xt2α2x12α2)(xtα2x1α2)(xt3α2x13α2)(xtα2+1x1α2+1)3W_{2}=\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})(x_{t}^{-\alpha_{2}}-x_{1}^{-\alpha_{2}})(x_{t}^{3-\alpha_{2}}-x_{1}^{3-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{3}}, W3=(xt2α2x12α2)(xtα2x1α2)(xtα2+1x1α2+1)2W_{3}=\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})(x_{t}^{-\alpha_{2}}-x_{1}^{-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{2}} and fn2=(1α1)212α1d12α11(d1α11)2f_{n^{2}}=\frac{(1-\alpha_{1})^{2}}{1-2\alpha_{1}}\frac{d^{1-2\alpha_{1}}-1}{(d^{1-\alpha_{1}}-1)^{2}}. Note that xtx_{t}(x1x_{1}, resp.) is the largest(smallest, resp.) set size and dd is the distinct number of elements.

Next we take into account the minHash LSH method.

Given two sets XjX_{j} and XlX_{l}, by Equation 19, the variance of minHash LSH method to estimate the containment similarity of XjX_{j} in XlX_{l} is VminH=1k[a1fn2+a2(fn2)2+a3(fn2)3+a4(fn2)4]V_{minH}=\frac{1}{k^{\prime}}[a_{1}f_{n^{2}}+a_{2}(f_{n^{2}})^{2}+a_{3}(f_{n^{2}})^{3}+a_{4}(f_{n^{2}})^{4}] where a1=xl+xl2xja_{1}=x_{l}+\frac{x_{l}^{2}}{x_{j}}, a2=4xl2a_{2}=-4x_{l}^{2}, a3=5xjxl3xj+xla_{3}=5\frac{x_{j}x_{l}^{3}}{x_{j}+x_{l}} and a4=2xj2xl4(xj+xl)2a_{4}=-2\frac{x_{j}^{2}x_{l}^{4}}{(x_{j}+x_{l})^{2}}. Then the average variance V2=1m2j=1ml=1mVminHV_{2}=\frac{1}{m^{2}}\sum_{j=1}^{m}\sum_{l=1}^{m}V_{minH} is

V2=1km2[A1fn2+A2(fn2)2+A3(fn2)3+A4(fn2)4]V_{2}=\frac{1}{k^{\prime}m^{2}}[A_{1}f_{n^{2}}+A_{2}(f_{n^{2}})^{2}+A_{3}(f_{n^{2}})^{3}+A_{4}(f_{n^{2}})^{4}]

where A1=α212α2xt2α2x12α2xtα2+1x1α2+1+(α21)2α2(3α2)(xt3α2x13α2)(xtα2x1α2)(xtα2+1x1α2+1)2A_{1}=\frac{\alpha_{2}-1}{2-\alpha_{2}}\frac{x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}}+\frac{(\alpha_{2}-1)^{2}}{-\alpha_{2}(3-\alpha_{2})}\frac{(x_{t}^{3-\alpha_{2}}-x_{1}^{3-\alpha_{2}})(x_{t}^{-\alpha_{2}}-x_{1}^{-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{2}}, A2=4α213α2xt3α2x13α2xtα2+1x1α2+1A_{2}=-4\frac{\alpha_{2}-1}{3-\alpha_{2}}\frac{x_{t}^{3-\alpha_{2}}-x_{1}^{3-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}}, A3=5α214α2xt4α2x14α2xtα2+1x1α2+1A_{3}=5\frac{\alpha_{2}-1}{4-\alpha_{2}}\frac{x_{t}^{4-\alpha_{2}}-x_{1}^{4-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}} and A4=2[(α213α2xt3α2x13α2xtα2+1x1α2+1)22(α21)2(4α2)(2α2)(xt2α2x12α2)(xt4α2x14α2)(xtα2+1x1α2+1)2+3α215α2xt5α2x15α2xtα2+1x1α2+1]A_{4}=-2[(\frac{\alpha_{2}-1}{3-\alpha_{2}}\frac{x_{t}^{3-\alpha_{2}}-x_{1}^{3-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}})^{2}-2\frac{(\alpha_{2}-1)^{2}}{(4-\alpha_{2})(2-\alpha_{2})}\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})(x_{t}^{4-\alpha_{2}}-x_{1}^{4-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{2}}+3\frac{\alpha_{2}-1}{5-\alpha_{2}}\frac{x_{t}^{5-\alpha_{2}}-x_{1}^{5-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}}]

Note that fn2f_{n^{2}} is computed by the distribution p1(x)=c1xα1p_{1}(x)=c_{1}x^{-\alpha_{1}} and the sum over set size is computed by the set size distribution p2(x)=c2xα2p_{2}(x)=c_{2}x^{-\alpha_{2}}, and the variance V1V_{1} and V2V_{2} is dependent on α1\alpha_{1} and α2\alpha_{2}. Compare the variance V1V_{1} and V2V_{2}, we get that V1<V2V_{1}<V_{2} for all α1>0\alpha_{1}>0 and α2>0\alpha_{2}>0.

Next, we analyse the performance of the two methods with the dataset following uniform distribution(i.e., α1=0\alpha_{1}=0, α2=0\alpha_{2}=0).

For G-KMV method, the average variance is

V1=1m2(L1F1+L2F2+L3F3)V^{\prime}_{1}=\frac{1}{m^{2}}(L_{1}F_{1}+L_{2}F_{2}+L_{3}F_{3})

where L1=j=1ml=1m(xj+xl)xjxlxj2kL_{1}=\sum_{j=1}^{m}\sum_{l=1}^{m}\frac{(x_{j}+x_{l})x_{j}x_{l}}{x_{j}^{2}k}, L2=j=1ml=1m(xjxl)2kxj2L_{2}=\sum_{j=1}^{m}\sum_{l=1}^{m}\frac{(x_{j}x_{l})^{2}}{kx_{j}^{2}} and L3=j=1ml=1mxjxlxj2L_{3}=\sum_{j=1}^{m}\sum_{l=1}^{m}\frac{x_{j}x_{l}}{x_{j}^{2}}. After some computation, V1=1k[(α21)32α2W1fn2(α21)3(2α2)(3α2)W2(fn2)2k(α21)22α2W3fn2]V^{\prime}_{1}=\frac{1}{k^{\prime}}[\frac{(\alpha_{2}-1)^{3}}{2-\alpha_{2}}W_{1}f_{n^{2}}-\frac{(\alpha_{2}-1)^{3}}{(2-\alpha_{2})(3-\alpha_{2})}W_{2}(f_{n^{2}})^{2}-k^{\prime}\frac{(\alpha_{2}-1)^{2}}{2-\alpha_{2}}W_{3}f_{n^{2}}] where W1=(xt2α2x12α2)2(lnxtlnx1)(xtα2+1x1α2+1)3W_{1}=\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})^{2}(\ln{x_{t}}-\ln{x_{1}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{3}}, W2=(xt2α2x12α2)(lnxtlnx1)(xt3α2x13α2)(xtα2+1x1α2+1)3W_{2}=\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})(\ln{x_{t}}-\ln{x_{1}})(x_{t}^{3-\alpha_{2}}-x_{1}^{3-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{3}}, W3=(xt2α2x12α2)(lnxtlnx1)(xtα2+1x1α2+1)2W_{3}=\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})(\ln{x_{t}}-\ln{x_{1}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{2}} and fn2=(1α1)212α1d12α11(d1α11)2f_{n^{2}}=\frac{(1-\alpha_{1})^{2}}{1-2\alpha_{1}}\frac{d^{1-2\alpha_{1}}-1}{(d^{1-\alpha_{1}}-1)^{2}}. Note that xtx_{t}(x1x_{1}, resp.) is the largest(smallest, resp.) set size and dd is the distinct number of elements.

For LSH-E method, the average variance is

V2=1km2[A1fn2+A2(fn2)2+A3(fn2)3+A4(fn2)4]V^{\prime}_{2}=\frac{1}{k^{\prime}m^{2}}[A_{1}f_{n^{2}}+A_{2}(f_{n^{2}})^{2}+A_{3}(f_{n^{2}})^{3}+A_{4}(f_{n^{2}})^{4}]

where A1=α212α2xt2α2x12α2xtα2+1x1α2+1+(α21)23α2(xt3α2x13α2)(lnxtlnx1)(xtα2+1x1α2+1)2A_{1}=\frac{\alpha_{2}-1}{2-\alpha_{2}}\frac{x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}}+\frac{(\alpha_{2}-1)^{2}}{3-\alpha_{2}}\frac{(x_{t}^{3-\alpha_{2}}-x_{1}^{3-\alpha_{2}})(\ln{x_{t}}-\ln{x_{1}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{2}}, A2=4α213α2xt3α2x13α2xtα2+1x1α2+1A_{2}=-4\frac{\alpha_{2}-1}{3-\alpha_{2}}\frac{x_{t}^{3-\alpha_{2}}-x_{1}^{3-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}}, A3=5α214α2xt4α2x14α2xtα2+1x1α2+1A_{3}=5\frac{\alpha_{2}-1}{4-\alpha_{2}}\frac{x_{t}^{4-\alpha_{2}}-x_{1}^{4-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}} and A4=2[(α213α2xt3α2x13α2xtα2+1x1α2+1)22(α21)2(4α2)(2α2)(xt2α2x12α2)(xt4α2x14α2)(xtα2+1x1α2+1)2+3α215α2xt5α2x15α2xtα2+1x1α2+1]A_{4}=-2[(\frac{\alpha_{2}-1}{3-\alpha_{2}}\frac{x_{t}^{3-\alpha_{2}}-x_{1}^{3-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}})^{2}-2\frac{(\alpha_{2}-1)^{2}}{(4-\alpha_{2})(2-\alpha_{2})}\frac{(x_{t}^{2-\alpha_{2}}-x_{1}^{2-\alpha_{2}})(x_{t}^{4-\alpha_{2}}-x_{1}^{4-\alpha_{2}})}{(x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1})^{2}}+3\frac{\alpha_{2}-1}{5-\alpha_{2}}\frac{x_{t}^{5-\alpha_{2}}-x_{1}^{5-\alpha_{2}}}{x_{t}^{-\alpha_{2}+1}-x_{1}^{-\alpha_{2}+1}}].

Similarly, we can get that V1<V2V^{\prime}_{1}<V^{\prime}_{2}.

Remark 4.

We have illustrated that the variance of GB-KMV is smaller than that of LSH-E. Then by Chebyshev’s inequality, i.e., Pr(|Xμ|ϵσ)1ϵ2\Pr(|X-\mu|\geq\epsilon\sigma)\leq\frac{1}{\epsilon^{2}} where μ\mu is the expectation, δ\delta is the standard deviation and ϵ>1\epsilon>1 is a constant, we consider the probability that values lie outside the interval [μϵδ,μ+ϵδ][\mu-\epsilon\delta,\mu+\epsilon\delta], that is, values deviating from the expectation. By Theorem 5, we get that the standard deviation δ1\delta_{1} of GB-KMV is smaller than δ2\delta_{2} of LSH-E, then with the same interval [μϵδ,μ+ϵδ][\mu-\epsilon\delta,\mu+\epsilon\delta], the constant ϵ1\epsilon_{1} for GB-KMV is larger than ϵ2\epsilon_{2} for LSH-E, thus the probability that values lie outside the interval for GB-KMV is smaller than that for LSH-E, which means that the result of GB-KMV is more concentrated around the expected value than that of LSH-E.

V Performance Studies

In this section, we empirically evaluate the performance of our proposed GB-KMV method and compare LSH Ensemble [44] as baseline. We also compare our approximate GB-KMV method with the exact containment similarity search method. All experiments are conducted on PCs with Intel Xeon 2×2.3GHz2\times 2.3GHz CPU and 128GB128GB RAM running Debian Linux, and the source code of GB-KMV is made available  [1].

Dataset Abbrev Type Record #Records AvgLength #DistinctEle α1\alpha_{1}-eleFreq α2\alpha_{2}-recSize
Netflix [12] NETFLIX Rating Movie 480,189 209.25 17,770 1.14 4.95
Delicious [2] DELIC Folksonomy User 833,081 98.42 4,512,099 1.14 3.05
CaOpenData [44] COD Folksonomy User 65,553 6284 111,011,807 1.09 1.81
Enron [3] ENRON Text Email 517,431 133.57 1,113,219 1.16 3.10
Reuters [4] REUTERS Folksonomy User 833,081 77.6 283,906 1.32 6.61
Webspam [38] WEBSPAM Text Text 350,000 3728 16,609,143 1.33 9.34
WDC Web Table [44] WDC Text Text 262,893,406 29.2 111,562,175 1.08 2.4
TABLE II: Characteristics of datasets

V-A Experimental Setup

Refer to caption
(a) NETFLIX
Refer to caption
(b) ENRON
Fig. 5: Effect of Buffer Size
Refer to caption
(a) NETFLIX
Refer to caption
(b) DELIC
Refer to caption
(c) COD
Refer to caption
(d) ENRON
Refer to caption
(e) REUTERS
Refer to caption
(f) WEBSPAM
Refer to caption
(g) WDC
Fig. 6: GB-KMV, G-KMV, KMV comparison
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Fig. 7: Accuracy versus Space on COD
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Fig. 8: Accuracy versus Space on DELIC
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Fig. 9: Accuracy versus Space on ENRON
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Fig. 10: Accuracy versus Space on NETFLIX
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Fig. 11: Accuracy versus Space on REUTERS
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Fig. 12: Accuracy versus Space on WEBSPAM
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Fig. 13: Accuracy versus Space on WDC
Refer to caption
(a) NETFLIX
Refer to caption
(b) DELIC
Refer to caption
(c) COD
Refer to caption
(d) ENRON
Refer to caption
(e) REUTERS
Refer to caption
(f) WEBSPAM
Refer to caption
(g) WDC
Fig. 14: The distribution of Accuracy
Refer to caption
(a) NETFLIX
Refer to caption
(b) DELIC
Refer to caption
(c) COD
Refer to caption
(d) ENRON
Refer to caption
(e) REUTERS
Refer to caption
(f) WEBSPAM
Refer to caption
(g) WDC
Fig. 15: Accuracy versus Similarity threshold
Refer to caption
Refer to caption
Fig. 16: EleFreq zz-value varying from 0.4 to 1.2 with recSize zz-value 1.0; recSize zz-value varying from 0.8 to 1.4 with eleFreq zz-value 0.8
Refer to caption
(a) COD
Refer to caption
(b) DELIC
Refer to caption
(c) ENRON
Refer to caption
(d) NETFLIX
Refer to caption
(e) REUTERS
Refer to caption
(f) WEBSPAM
Refer to caption
(g) WDC
Fig. 17: Time versus Accuracy
Fig. 18: Sketch Construction Time
Refer to caption

Approximate Algorithms. In the experiments, the approximate algorithms evaluated are as follows.

  • GB-KMV. Our approach proposed in Section IV-B.

  • LSH-E. The state-of-the-art approxiamte containment similarity search method proposed in [44].

The above two algorithms are implemented in Go programming language. We get the source code of LSH-E from [44]. For LSH-E, we follow the parameter setting from [44].

Exact Algorithms. To better evaluate the proposed methods, we also compare our approximate method GB-KMV with the following two exact containment similarity search methods.

  • PPjoin *. We extend the prefix-filtering based method from [40] to tackle the containment similarity search problem.

  • FrequentSet. The state-of-the-art exact containment similarity search method proposed in [5].

Remark 5.

A novel size-aware overlap set similarity join algorithm has been recently proposed in [25]. Although the containment similarity search relies on the set overlap, their technique cannot be trivially applied because we need to construct cc-subset inverted lists for each possible query size. In particular, in the size-aware overlap set similarity join algorithm, it is required to build the cc-subset inverted list for the given overlap threshold cc. In our GB-KMV method, the threshold cc corresponds to |Q|t|Q|*t^{*} , where |Q||Q| is the query size and tt^{*} is the similarity threshold, thus with different query size |Q||Q|, we need to build different |Q|t|Q|*t^{*}-subset inverted lists, which is very inefficient.

Datasets. We deployed 77 real-life datasets with different data properties. Note that the records with size less than 10 are discarded from dataset. We also remove the stop words (e.g., ”the”) from the dataset. Table II shows the detailed characteristics of the 77 datasets. Each dataset is illustrated with the dataset type, the representations of record, the number of records in the dataset, the average record length, and the number of distinct elements in the dataset. We also report the power-law exponent α1\alpha_{1} and α2\alpha_{2} (skewness) of the record size and element frequency of the dataset respectively. Note that we make use of the framework in [18] to quantify the power-law exponent. The dataset Canadian Open Data appears in the state-of-the-art algorithm LSH-E [44] .

Settings. We borrow the idea from the evaluation of LSH-E in  [44] to use FαF_{\alpha} score (α\alpha=1,0.51,0.5) to evaluate the accuracy of the containment similarity search. Given a query QQ randomly selected from the dataset 𝒮\mathcal{S} and a containment similarity threshold tt^{*}, we define T={X:t(Q,X)t,X𝒮}T=\{X:t(Q,X)\geq t^{*},X\in\mathcal{S}\} as the ground truth set and AA as the collection of records returned by some search algorithms. The precision and recall to evaluate the experiment accuracy are Precision=|TA||A|Precision=\frac{|T\cap A|}{|A|} and Recall=|TA||T|Recall=\frac{|T\cap A|}{|T|} respectively. The FαF_{\alpha} score is defined as follows.

Fα=(1+α2)PrecisionRecallα2Precision+RecallF_{\alpha}=\frac{(1+\alpha^{2})*Precision*Recall}{\alpha^{2}*Precision+Recall} (35)

Note that we use F0.5F_{0.5} score because LSH-E favours recall in [44]. We use the datasets from Table II to evaluate the performance of our algorithm, and we randomly choose 200 queries from the dataset.

As to the default values, the similarity threshold is set as t=0.5t^{*}=0.5. In the experiments, we use the ratio of space budget to the total dataset size to measure the space used. For our GB-KMV method, it is set to 10%10\%. For LSH-E method, we use the same default values in [44] where the signature size of each record is 256256 and the number of partition is 3232. By varying the number of hash functions, we change the space used in LSH-E.

V-B Performance Tuning

As shown in Section IV-C6, we can use the variance estimation function to identify a good buffer size rr for GB-KMV method based on the skewness of record size and element frequency, as well as the space budget. In Fig. 5, we use NETFLIX and ENRON to evaluate the goodness of the function by comparing the trend of the variance and the estimation accuracy. By varying the buffer size rr, Fig. 5 reports the estimated variance (right side y axis) based on the variance function in Section IV-C6 as well as the F1F_{1} score (left side y axis) of the corresponding GB-KMV sketch with buffer size rr. Fig. 5(a) shows that the best buffer size for variance estimation (prefer small value) is around 400400, while the GB-KMV method achieves the best F1F_{1} score (prefer large value) with buffer size around 380380. They respectively become 220 and 230 in Fig. 5(b). This suggests that our variance estimation function is quite reliable to identify a good buffer size. In the following experiments, GB-KMV method will use buffer size suggested by this system, instead of manually tuning.

We also compare the performance of KMV, G-KMV, and GB-KMV methods in Fig. 6 to evaluate the effectiveness of using global threshold and the buffer on 77 datasets. It is shown that the use of new KMV estimator with global threshold (i.e., Equation 26) can significantly improve the search accuracy. By using a buffer whose size is suggested by the system, we can further enhance the performance under the same space budget. In the following experiments, we use GB-KMV for the performance comparison with the state-of-the-art technique LSH-E.

V-C Space v.s. Accuracy

An important measurement for sketch technique is the trade-off between the space and accuracy. We evaluate the space-accuracy trade-offs of GB-KMV method and LSH-E method in Figs. 7-13 by varying the space usage on five datasets NETFLIX, DELIC, COD, ENRON, REUTERS, WEBSPAM and WDC. We use F1F_{1} score, F0.5F_{0.5} score, precision and recall to measure the accuracy. By changing the number of hash functions, we tune the space used in LSH-E. It is reported that our GB-KMV can beat the LSH-E in terms of space-accuracy trade-off with a big margin under all settings.

We also plot the distribution of accuracy (i.e., min, max and avgerage value) to compare our GB-KMV method with LSH-E in Fig. 14.

Meanwhile, by changing the similarity threshold, F1F_{1} score is reported in Fig. 15 on dataset NETFLIX and COD. We can see that with various similarity thresholds, our GB-KMV always outperforms LSH-E.

We also evaluate the space-accuracy trade-offs on synthetic datasets with 100K records in Fig. 16 where the record size and the element frequency follow the zipf distribution. We can see that on datasets with different record size and element frequency skewness, GB-KMV consistently outperforms LSH-E in terms of space-accuracy trade-off.

V-D Time v.s. Accuracy

Another important measurement for the sketch technique is the trade-off between time and accuracy. Hopefully, the sketch should be able to quickly complete the search with a good accuracy. We tune the index size of GB-KMV to show the trade-off. As to the LSH-E, we tune the number of hash functions. The time is reported as the average search time per query. In Fig. 17, we evaluate the time-accuracy trade-offs for GB-KMV and LSH-E on four datasets COD, NETFLIX, DELIC and ENRON where the accuracy is measured by F1F_{1} score. It is shown that with the similar accuracy (F1F_{1} score), GB-KMV is significantly faster than LSH-E. For datasets COD, DELIC and ENRON, GB-KMV can be 100 times faster than LSH-E with the same F1F_{1} score. It is observed that the accuracy (F1F_{1} score) improvement of LSH-E algorithm is very slow compared with GB-KMV method. This is because the LSH-E method favours recall and the precision performance is quite poor even for a large number of hash functions, resulting in a poor F1F_{1} score which considers both precision and recall.

V-E Sketch Construction Time

In this part, we compare the sketch construction time of GB-KMV and LSH-E on different datasets under default settings. As expected, GB-KMV uses much less sketch construction time than that of LSH-E since GB-KMV sketch need only one hash function, while LSH-E needs multiple for a decent accuracy. Note that, for the internet scale dataset WDC, the index construction time for GB-KMV is around 1010 minutes, while for LSH-E it is above 6060 minutes. We also give the space usage of the two methods on each dataset in Table III. The space usage of GB-KMV is 10%10{\%} as mentioned in Settings. For LSH-E in some dataset, the space is over 100%100{\%} because there are many records with size less than the number of hash functions 256256.

Dataset GB-KMV LSH-E
NETFLIX 10 118
DELIC 10 211
COD 10 4
ENRON 10 185
REUTERS 10 329
WEBSPAM 10 7
WDC 10 109
TABLE III: The space usage(%\%)

V-F Supplementary Experiment

Evaluation on Uniform Distribution. In Theorem 5, we have theoretically shown that when the dataset follows uniform distribution (i.e., α1=0\alpha_{1}=0 and α2=0\alpha_{2}=0), our GB-KMV method can outperform the LSH-E method. In this part, we experimentally illustrate the performance on dataset with uniform distribution. We generate 100100k records where the record size is uniformly distributed between 1010 and 50005000, and each element is randomly chosen from 100,000100,000 distinct elements. Fig. 19(a) illustrates the time-accuracy trade-off of GB-KMV and LSH-E on the synthetic dataset with 100K100K records. It is reported that, to achieve the same accuracy (F1F_{1} score), GB-KMV consumes much less time than LSH-E.

Refer to caption
(a) Time versus Accuracy
Refer to caption
(b) Running Time
Fig. 19: Supplementary experiments

Comparison with Exact Algorithms. We also compare the running time of our proposed method GB-KMV with two exact containment similarity search methods PPjoin* [40] and FreqSet [5]. Experiments are conducted on the dataset WebSpam, which consists of 350,000350,000 records and has the average length around 3,7003,700. We partition the data into 55 groups based on their record size with boundaries increasing from 1,0001,000 to 5,0005,000. As expected, Fig. 19(b) shows that the running time of our approximate algorithm is not sensitive to the growth of the record size because a fixed number of samples are used for a given budget. GB-KMV outperforms two exact algorithm by a big margin, especially when the record size is large, with a decent accuracy (i.e., with F1F_{1} score and recall always larger than 0.8 and 0.9 under all settings).

V-G Discussion Summary

In the accuracy comparison between GB-KMV and LSH-E, it is remarkable to see that the accuracy (i.e., F1F_{1} score) is very low on some datasets. We give some discussions as follows.

First we should point out that in  [44], the accuracy of LSH-E is only evaluated on only one dataset COD, in which both our GB-KMV method and LSH-E can achieve decent accuracy performance with F1F_{1} score above 0.50.5.

As mentioned in  III-A, the LSH-E method first transforms the containment similarity to Jaccard similarity, then in order to make use of the efficient index techniques, LSH-E partitions the dataset and uses the upper bound to approximate the record size in each partition. which can favour recall but result in extra false positives as analysed in section  III-B. However, the LSH-E method does not provide a partition scheme associated with different data distribution, and the algorithm setting (e.g., 256 hash functions and 32 partitions) can not perform well in some dataset.

VI Related Work

In this Section, we review two closely related categories of work on set containment similarity search.

Exact Set Similarity Queries. Exact set similarity query has been widely studied in the literature. Existing solutions are mainly based on the filtering-verification framework which can be divided into two categories, prefix-filter based method and partition-filter based method. Prefix-filter based method is first introduced by Bayardo et al. in [10]. Xiao et al. [40] further improve the prefix-filter method by exploring positional filter and suffix filter techniques. In [32], Mann et al. introduce an efficient candidate verification algorithm which significantly improves the efficiency compared with the other prefix filter algorithms. Wang et al. [36] consider the relations among records in query processing to improve the performance. Deng et al. in  [23] present an efficient similarity search method where each object is a collection of sets. For partition-based method, in [7], Arasu et al. devise a two-level algorithm which uses partition and enumeration techniques to search for exact similar records. Deng et al. in [24] develop a partition-based method which can effectively prune the candidate size at the cost higher filtering cost. In [43], Zhang et al. propose an efficient framework for exact set similarity search based on tree index structure. In [25], Deng et al. present a size-aware algorithm which divides all the sets into small and large ones by size and processes them separately. Regarding exact containment similarity search, Agrawal et al. in [5] build the inverted lists on the token-sets and considered the string transformation.

Approximate Set Similarity Queries. The approximate set similarity queries mostly adopt the Locality Sensitive Hashing(LSH[28] techniques. For Jaccard similarity, MinHash [14] is used for approximate similarity search. Asymmetric minwise hashing is a technique for approximate containment similarity search [35]. This method makes use of vector transformation by padding some values into sets, which makes all sets in the index have same cardinality as the largest set. After the transformation, the near neighbours with respect to Jaccard similarity of the transformed sets are the same as near neighbours in containment similarity of the original sets. Thus, MinHash LSH can be used to index the transformed sets, such that the sets with larger containment similarity scores can be returned with higher probability. In [35], they show that asymmetric minwise hashing is advantageous in containment similarity search over datasets such as news articles and emails, while Zhu et. al in [44] finds that for datasets which are very skewed in set size distribution, asymmetric minwise hashing will reduce the recall.

The KMV sketch technique has been widely used to estimate the cardinality of record size [42, 20, 37]. The idea of imposing a global threshold on KMV sketch is first proposed in [37] in the context of term pattern size estimation. However, there is no theoretical analysis for the estimation performance. In [17], Christiani et al. give a data structure for approximate similarity search under Braun-Blanquet similarity which has a 1-1 mapping to Jaccard similarity if all the sizes of records are fixed. In [19], Cohen et al. introduce a new estimator for set intersection size, but it is still based on the MinHash technique. In [21], Dahlgaard et al. develop a new sketch method which has the alignment property and same concentration bounds as MinHash.

VII Conclusion

In this paper, we study the problem of approximate containment similarity search. The existing solutions to this problem are based on the MinHash LSH technique. We develop an augmented KMV sketch technique, namely GB-KMV, which is data-dependent and can effectively exploit the distributions of record size and element frequency. We provide thorough theoretical analysis to justify the design of GB-KMV, and show that the proposed method can outperform the state-of-the-art technique in terms of space-accuracy trade-off. Extensive experiments on real-life set-valued datasets from a variety of applications demonstrate the superior performance of GB-KMV method compared with the state-of-the-art technique.

References

  • [1] https://www.dropbox.com/s/wu9342zoaiejs1x/ContainmentSimilaritySearch.zip?dl=0.
  • [2] http://dai-labor.de/IRML/datasets.
  • [3] http://www.cs.cmu.edu/~enron.
  • [4] http://trec.nist.gov/data/reuters/reuters.html.
  • [5] P. Agrawal, A. Arasu, and R. Kaushik. On indexing error-tolerant set containment. In SIGMOD, pages 927–938. ACM, 2010.
  • [6] R. Albert. R. albert, h. jeong, and a.-l. barabási, nature (london) 401, 130 (1999). Nature (London), 401:130, 1999.
  • [7] A. Arasu, V. Ganti, and R. Kaushik. Efficient exact set-similarity joins. In Proceedings of the VLDB Endowment, pages 918–929. VLDB Endowment, 2006.
  • [8] J. Bauckmann, U. Leser, and F. Naumann. Efficiently computing inclusion dependencies for schema discovery. In Data Engineering Workshops, 2006. Proceedings. 22nd International Conference on, pages 2–2. IEEE, 2006.
  • [9] M. Bawa, T. Condie, and P. Ganesan. Lsh forest: self-tuning indexes for similarity search. In WWW, pages 651–660. ACM, 2005.
  • [10] R. J. Bayardo, Y. Ma, and R. Srikant. Scaling up all pairs similarity search. In WWW, pages 131–140. ACM, 2007.
  • [11] K. Beyer, P. J. Haas, B. Reinwald, Y. Sismanis, and R. Gemulla. On synopses for distinct-value estimation under multiset operations. In SIGMOD, pages 199–210, 2007.
  • [12] P. Bouros, N. Mamoulis, S. Ge, and M. Terrovitis. Set containment join revisited. Knowledge and Information Systems, 49(1):375–402, 2016.
  • [13] A. Z. Broder. On the resemblance and containment of documents. In Compression and Complexity of Sequences 1997. Proceedings, pages 21–29. IEEE, 1997.
  • [14] A. Z. Broder, M. Charikar, A. M. Frieze, and M. Mitzenmacher. Min-wise independent permutations. In STOC, pages 327–336. ACM, 1998.
  • [15] M. S. Charikar. Similarity estimation techniques from rounding algorithms. In STOC, 2002.
  • [16] E. Cho, S. A. Myers, and J. Leskovec. Friendship and mobility: user movement in location-based social networks. In SIGKDD, pages 1082–1090. ACM, 2011.
  • [17] T. Christiani and R. Pagh. Set similarity search beyond minhash. arXiv preprint arXiv:1612.07710, 2016.
  • [18] A. Clauset, C. R. Shalizi, and M. E. Newman. Power-law distributions in empirical data. SIAM review, 51(4):661–703, 2009.
  • [19] R. Cohen, L. Katzir, and A. Yehezkel. A minimal variance estimator for the cardinality of big data set intersection. In SIGKDD, 2017.
  • [20] G. Cormode, M. Garofalakis, P. J. Haas, and C. Jermaine. Synopses for massive data: Samples, histograms, wavelets, sketches. Foundations and Trends in Databases, 4(1–3):1–294, 2012.
  • [21] S. Dahlgaard, M. B. T. Knudsen, and M. Thorup. Fast similarity sketching. arXiv preprint arXiv:1704.04370, 2017.
  • [22] F. De Marchi and J.-M. Petit. Zigzag: a new algorithm for mining large inclusion dependencies in databases. In Data Mining, 2003. ICDM 2003. Third IEEE International Conference on, pages 27–34. IEEE, 2003.
  • [23] D. Deng, A. Kim, S. Madden, and M. Stonebraker. Silkmoth: An efficient method for finding related sets with maximum matching constraints. arXiv preprint arXiv:1704.04738, 2017.
  • [24] D. Deng, G. Li, H. Wen, and J. Feng. An efficient partition based method for exact set similarity joins. Proceedings of the VLDB Endowment, 9(4):360–371, 2015.
  • [25] D. Deng, Y. Tao, and G. Li. Overlap set similarity joins with theoretical guarantees. 2018.
  • [26] A. Esmaili. Probability models in engineering and science, 2006.
  • [27] M. L. Goldstein, S. A. Morris, and G. G. Yen. Problems with fitting to the power-law distribution. The European Physical Journal B-Condensed Matter and Complex Systems, 41(2):255–258, 2004.
  • [28] P. Indyk and R. Motwani. Approximate nearest neighbors: towards removing the curse of dimensionality. In STOC, 1998.
  • [29] H. Jeong, B. Tombor, R. Albert, Z. N. Oltvai, and A.-L. Barabási. The large-scale organization of metabolic networks. Nature, 407(6804):651, 2000.
  • [30] S. Kruse, T. Papenbrock, C. Dullweber, M. Finke, M. Hegner, M. Zabel, C. Zo?llner, and F. Naumann. Fast approximate discovery of inclusion dependencies. Datenbanksysteme für Business, Technologie und Web (BTW 2017), 2017.
  • [31] S. Lopes, J.-M. Petit, and F. Toumani. Discovering interesting inclusion dependencies: application to logical database tuning. Information Systems, 27(1):1–19, 2002.
  • [32] W. Mann, N. Augsten, and P. Bouros. An empirical evaluation of set similarity join techniques. Proceedings of the VLDB Endowment, 9(9):636–647, 2016.
  • [33] T. Papenbrock, S. Kruse, J.-A. Quiané-Ruiz, and F. Naumann. Divide & conquer-based inclusion dependency discovery. Proceedings of the VLDB Endowment, 8(7):774–785, 2015.
  • [34] A. Shrivastava and P. Li. Asymmetric lsh (alsh) for sublinear time maximum inner product search (mips). In NIPS, pages 2321–2329, 2014.
  • [35] A. Shrivastava and P. Li. Asymmetric minwise hashing for indexing binary inner products and set containment. In WWW, 2015.
  • [36] X. Wang, L. Qin, X. Lin, Y. Zhang, and L. Chang. Leveraging set relations in exact set similarity join. Proceedings of the VLDB Endowment, 10(9):925–936, 2017.
  • [37] X. Wang, Y. Zhang, W. Zhang, X. Lin, and W. Wang. Selectivity estimation on streaming spatio-textual data using local correlations. Proceedings of the VLDB Endowment, 8(2):101–112, 2014.
  • [38] S. Webb, J. Caverlee, and C. Pu. Introducing the webb spam corpus: Using email spam to identify web spam automatically. In CEAS, 2006.
  • [39] E. W. Weisstein. Abel’s impossibility theorem. From MathWorld–A Wolfram Web Resource. http://mathworld. wolfram. com/AbelsImpossibilityTheorem. html.
  • [40] C. Xiao, W. Wang, X. Lin, J. X. Yu, and G. Wang. Efficient similarity joins for near-duplicate detection. TODS, 36(3):15, 2011.
  • [41] Y. Yang, Y. Zhang, W. Zhang, and Z. Huang. Gb-kmv: An augmented kmv sketch for approximate containment similarity search. http://www.cse.unsw.edu.au/~yingz/GBKMV.pdf, 2018.
  • [42] M. Zhang, M. Hadjieleftheriou, B. C. Ooi, C. M. Procopiuc, and D. Srivastava. On multi-column foreign key discovery. Proceedings of the VLDB Endowment, 3(1-2):805–814, 2010.
  • [43] Y. Zhang, X. Li, J. Wang, Y. Zhang, C. Xing, and X. Yuan. An efficient framework for exact set similarity search using tree structure indexes. In ICDE, pages 759–770. IEEE, 2017.
  • [44] E. Zhu, F. Nargesian, K. Q. Pu, and R. J. Miller. Lsh ensemble: internet-scale domain search. Proceedings of the VLDB Endowment, 9(12):1185–1196, 2016.