Maintaining $k$-MinHash Signatures over Fully-Dynamic Data Streams with Recovery
Andrea Clementi, Luciano Gualà, Luca Pepè Sciarria, Alessandro Straziota
TL;DR
This work tackles maintaining accurate Jaccard similarity sketches for fully dynamic data streams with recovery by introducing the ell-buffered $k$-MinHash (BMH). It proves memory and time guarantees: each subset requires $O(k \log |U|)$ space, updates cost $O(k \log |U|)$ amortized w.h.p., and a subset's $k$-MinHash can be retrieved in $O(k)$ time with the same quality as recomputing from scratch. The approach supports non-legal streams and uses recovery queries to bound costly rebuilds, achieving competitive performance against the prior global solution BSS20 across synthetic and real datasets. Experimental results show substantial speedups over Vanilla-MinHash, favorable query-time behavior, and improved SE accuracy, highlighting practical applicability for large-scale dynamic graphs and streaming data mining. Overall, the ell-buffered $k$-MinHash provides a practical, provably efficient way to maintain high-quality similarity sketches under arbitrary online updates with recovery.
Abstract
We consider the task of performing Jaccard similarity queries over a large collection of items that are dynamically updated according to a streaming input model. An item here is a subset of a large universe $U$ of elements. A well-studied approach to address this important problem in data mining is to design fast-similarity data sketches. In this paper, we focus on global solutions for this problem, i.e., a single data structure which is able to answer both Similarity Estimation and All-Candidate Pairs queries, while also dynamically managing an arbitrary, online sequence of element insertions and deletions received in input. We introduce and provide an in-depth analysis of a dynamic, buffered version of the well-known $k$-MinHash sketch. This buffered version better manages critical update operations thus significantly reducing the number of times the sketch needs to be rebuilt from scratch using expensive recovery queries. We prove that the buffered $k$-MinHash uses $O(k \log |U|)$ memory words per subset and that its amortized update time per insertion/deletion is $O(k \log |U|)$ with high probability. Moreover, our data structure can return the $k$-MinHash signature of any subset in $O(k)$ time, and this signature is exactly the same signature that would be computed from scratch (and thus the quality of the signature is the same as the one guaranteed by the static $k$-MinHash). Analytical and experimental comparisons with the other, state-of-the-art global solutions for this problem given in [Bury et al.,WSDM'18] show that the buffered $k$-MinHash turns out to be competitive in a wide and relevant range of the online input parameters.
