Breaking 2-Cores
for Invertible Bloom Lookup Tables
by Structure Prediction
Abstract
Invertible Bloom Lookup Tables (IBLTs) provide a highly space-efficient way to reconstruct small sets resulting from a large number of insertions and deletions of elements, such as in streaming or distributed computation of the symmetric difference of similar sets. The set recovery process succeeds if the IBLT size is at least 1.22 times the size of the encoded set; otherwise, a 2-core occurs with high probability in the corresponding random hypergraph. However, the sets in practice often exhibit structure that allows for performance beyond worst-case bounds.
Here, we demonstrate that structured sets – such as the -mers in the symmetric difference of two closely related genomes – can be recovered with an IBLT of significantly smaller size. We achieve this by employing structure-aware predictors to break the 2-core whenever the recovery process gets stuck. Importantly, this approach modifies only the decoding procedure, leaving the IBLT data structure unchanged. We prove that even a weak matching-based predictor enables the recovery of 27% more elements than the nominal IBLT size. Equipped with simple predictors for -mers of genomic datasets, we demonstrate that recovering a symmetric difference with high probability can be done with an IBLT of size only 66% of the encoded set size for , improving the space efficiency by almost a factor of two.
Moreover, we design an improved method for -mers with large that combines subsampling with nearly perfect prediction via fingerprinting and achieves a scaling property, requiring only bits for recovering -mers, instead of bits of the standard IBLT.
Overall, our results highlight the possibility of significant space-efficiency improvements for IBLTs on datasets with predictable structure.
Keywords and phrases:
Invertible Bloom Lookup Table, symmetric difference, -mer setsCopyright and License:
2012 ACM Subject Classification:
Theory of computation Bloom filters and hashing ; Applied computing Bioinformatics ; Theory of computation Data structures design and analysisSupplementary Material:
Acknowledgements:
The authors thank anonymous reviewers for their comments and suggestions.Funding:
Supported by the ERC-CZ project LL2406 of the Ministry of Education, Youth and Sports of the Czech Republic and by Center for Foundations of Modern Computer Science (Charles University project UNCE 24/SCI/008).Editors:
Martin Aumüller and Irene FinocchiSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The Invertible Bloom Lookup Table (IBLT), developed by Goodrich and Mitzenmacher [19], is a compact hash table with a fixed number of cells, each storing the sum of all keys mapped to the bucket, instead of resolving collisions. By hashing each key three or more times using independent hash functions and maintaining counters in the cells, it is surprisingly still possible to recover all the encoded keys with high probability, provided that there are at least times more table cells than keys. IBLTs are especially useful in scenarios where many items are first inserted, exceeding the table size even by orders of magnitude, and then, most of them are deleted.
IBLTs have found a range of applications in networks for synchronization and traffic monitoring [23, 24], in genomics for Jaccard similarity estimation [33], in fast error-correcting codes [27], distributed computing [26, 36, 22], blockchain networks [30], or cryptography [1, 15, 16]. For instance, consider the set reconciliation problem [25, 12, 19], where two servers maintain copies of one database undergoing updates, which may result in differences between the two copies. From time to time, the servers synchronize their databases but sending the whole database would be too costly. Instead, assuming the difference between the databases is bounded by , one server encodes its database into an IBLT of size and sends it to the other, which then removes its records from the IBLT. The resulting IBLT encodes the symmetric difference and if it indeed has size at most , it is possible to recover it.
In many of these applications, optimizing space or communication requirements is crucial, and IBLTs play a significant role in improving efficiency. Optimizing the space usage can be expressed by minimizing the ratio of the number of cells in the IBLT to the encoded set size so that its recovery succeeds with high probability. With three hash functions, one needs of at least , and this is in general tight for a fixed number of hash functions. While it is possible to get using a fractional number of hash functions [32] and get very close to 1 using the random hypergraphs from [35], one cannot hope for in the worst case, due to information-theoretic lower bounds.
However, many datasets in practice are far from worst-case scenarios or even purely random distributions. As a primary example, we take -mer sets of genomic data, i.e., all distinct -long substrings of given DNA sequences. The -mer sets in practice typically satisfy the spectrum-like property (SLP) [5], which states that they are generated by a small number of long strings. Thus, instead of storing many -mers naïvely using bits, the strings generating the -mers need just, say, bits.
Technically, the main barrier for improving the space efficiency is that for an IBLT substantially smaller than times the set size, the recovery process gets “stuck” with high probability. More precisely, consider the hypergraph , with IBLT cells as vertices and one hyperedge for each distinct data element , formed by the cells to which is hashed. The IBLT recovery process, when translated to hypergraph terms, in each step peels a vertex of degree one by removing the single hyperedge containing the vertex, which decreases the degrees of two other vertices. This process gets stuck if and only if there is a 2-core in the underlying hypergraph, i.e., a sub-hypergraph consisting of vertices of degree at least two. The ratios stated above, such as for three hash functions (i.e., a 3-uniform hypergraph), are precisely the sharp thresholds for the high-probability occurrence of a 2-core in a random hypergraph. Since the hypergraph corresponding to an IBLT is random, due to the assumed use of fully random hash functions, the thresholds apply, and any improvement of the space efficiency beyond the thresholds must somehow “break the 2-cores”.
Here, we demonstrate, both theoretically and experimentally, that under realistic structural assumptions, the space efficiency of IBLTs can be significantly improved, far beyond the thresholds for the occurrence of 2-cores. We achieve this by breaking 2-cores using appropriate guessing of elements that may also be in the encoded set, based on the recovered elements so far. We formalize the process of guessing not-yet-recovered elements using predictors and design algorithms for recovery with predictors that deal with wrong guesses, while the IBLT data structure itself remains unchanged, yielding our first proposed method. We prove that even with a weak predictor, one can achieve , meaning that we can encode about 27% more elements than the number of IBLT cells, which beats the worst-case lower bound of 1. Using a prototype implementation, we show that our method for recovery with predictors achieves a ratio of only on the symmetric difference of C. elegans genomes’ -mer sets. Next, in the so-called method of “three tables”, we provide a significantly more space-efficient encoding scheme under the additional assumption that the elements’ universe is orders of magnitude larger than the encoded set , that is, when for -mers in a symmetric difference of closely related genomes. To this end, we employ subsampling together with an approximate membership filter to obtain nearly perfect predictions, and a small IBLT to correct final errors. For the “three tables” method, we show that it needs only bits for recovering -mers, instead of bits for the standard IBLT, even if equipped with predictors.
1.1 Related Work
The problem of recovering a relatively small set defined by many insertions and deletions of elements received a lot of attention. Classical sketches, such as CountSketch [4] or Count-Min sketch [6], can be tweaked to solve the set recovery problem, but with suboptimal space and time bounds. After a sequence of improved randomized algorithms [17, 18, 11], Goodrich and Mitzenmacher [19] designed the Invertible Bloom Lookup Table (IBLT), which achieved the asymptotically optimal -factor space overhead with update time and high-probability recovery in linear time. Interestingly, Eppstein and Goodrich [11] proposed a deterministic sketch, based on Newton’s identities for symmetric polynomials, which requires only memory words to recover elements at the cost of update time and quadratic recovery time.
Many improvements to the original IBLT have been proposed, and we only list those most relevant to our work. Rink [32] mentions the possibility of using a fractional number of hash functions, such as hashing 88% of elements with three functions and the rest with 21 hash functions, which allows to decrease the ratio of the IBLT size to the set size from to . Pontarelli, Reviriego, and Mitzenmacher [31] improve the probability of success for the get operation, which retrieves a given key without reconstructing the whole set. When one does not need to work with multisets (frequencies), storing the counts is not necessary and in fact, Houen, Pagh, and Walzer [21] show that the IBLT can be simplified so that each cell stores only the XOR of all keys hashed there without increasing the required ratio of the number of cells to the encoded set size. We experimentally evaluate this IBLT variant, denoted IBLT-xor. Belazzougui, Kucherov, and Walzer [3] improve the analysis of IBLT-xor and also equip it with a small “stash” IBLT to achieve only a negligible probability of unsuccessful decoding, instead of for an IBLT of size .
Recently, Fleischhacker, Larsen, Obremski and Simkin [14] designed a “stacked IBLT” which only requires hash functions with limited independence and uses less space when the probability of failure is extremely small, namely . Mizrahi, Bar-Lev, Yaakobi and Rottenstreich [28, 2] focused on adjusting the IBLT using various coding techniques so that the recovery process is successful for every input set of a certain size.
Another possible approach for improving the IBLT is using random hypergraphs with peelability threshold closer to 1 instead of the hypergraph defined by (fully random) hash functions. Recently, Walzer [35] (see also [8]) has designed random -uniform hypergraphs which do not contain a 2-core with high probability even if the number of hyperedges (i.e., encoded elements) is almost the number of vertices (i.e., IBLT cells), depending on ; for instance, for , the construction achieves , while for , is already below . The construction and its refinements have led to improvements in space efficiency or speed of approximate membership or retrieval data structures [20, 9].
In computational genomics, IBLTs in combination with MinHash-based sketching using syncmers [10] have been used for Jaccard similarity estimation of -mer sets of genomic data [33]; unlike our work, their algorithm only estimates the Jaccard index but does not recover the symmetric difference itself.
2 Preliminaries
Let be a universe of items, with integer encoding. In our work, we primarily focus on the universe of all -mers for a fixed , which are all length- strings over the {A, C, G, T} alphabet; -mers are typically generated from DNA sequences, which means that we take the set of all length- substrings of the sequences. We use standard notation for strings (similar to Python): denotes the length of string and for , is the substring of length starting at position ; by default, and . To deal with double strandedness, a -mer is considered equivalent to its reverse complement (RC), formed by reversing the -mer’s sequence and replacing each nucleotide with its complement (A with T, C with G, and vice versa). We present examples without considering RCs for simplicity, but the experiments take this equivalence into account. A canonical -mer is a consistently selected -mer from the pair of a given -mer and its RC. A -mer set is typically associated with its (node-centric) de Bruijn graph, where -mers are vertices and there is a directed edge from -mer to -mer if their overlap is of length , i.e., .
In this paper, by a “high probability” event, we mean that it occurs with probability at least , where is with respect to the IBLT size . For simplicity, we focus on recovering sets and assume no element appears more than once in the final dataset.
IBLT.
The Invertible Bloom Lookup Table (IBLT) [19] is an array of cells, each consisting of a counter and the sum of items hashed into the cell. It is equipped with hash functions that we assume are fully random111Using fully random hash functions is indeed impossible in practice but needed for most theoretical analyses of IBLTs, with the exception of [14]. Nevertheless, common fast hash functions, such as Tabulation or Murmur3, seem sufficient in practice. ; typically, . Each element is thus hashed into cells. When inserting (deleting) element , in each of the corresponding cells, we increment (decrement) the counter and increase (decrease) the sum by the element. Assuming the IBLT encodes a set (and not a multiset), the recovery process iteratively searches for pure cells, i.e., only a single element is hashed there, which are those with counter set to 1 (or -1). The recovery process succeeds with high probability if there are at least times more table cells than encoded items. As outlined in Section 1.1, there are multiple variants of the IBLT, and we only describe those required in our work.
IBLT-xor.
The variant analyzed in [21, 3], denoted IBLT-xor, only stores the XOR of (binary representations of) all items hashed into each cell; thus, one cannot store multisets, since a repeated insertion leads to deleting the element. That is, insertions and deletions are both just toggling the element’s presence in the encoded set. While storing just the XOR of items requires just one memory word per cell, compared to two memory words of the original variant [19], it leads to more “anomalies”, such as buckets with multiple items that look “pure” (i.e., as if a single element was hashed there). Nevertheless, the same bounds on the number of cells for successful recovery apply also to IBLT-xor. As we focus on recovering sets, we will use IBLT-xor in this paper.
IBLT with checksums.
To reduce the effect of anomalies, and also deal with deleting items that were not inserted, one may also store the sum of checksums of items hashed into the cell [19]. Here, we assume that the checksums are computed by an additional hash function and have enough bits so that the probability that any sum of checksums of items in one cell collides with the checksum of another encoded element is negligible, i.e., no collision in checksums occurs over the whole recovery process with high probability.
Hypergraph and Cores.
A hypergraph is a pair , where is a set and is a set of hyperedges, which are subsets of . The hypergraph is -uniform if all edges have exactly vertices. An -core in is the largest sub-hypergraph of (possibly empty) where all vertices have degree at least (the degree of a vertex is the number of hyperedges containing ). The -core can be found by a process called peeling which iteratively removes vertices of degree below together with edges containing these vertices, until no vertex remains or we get the -core. Note that an IBLT with hash functions corresponds to a random -uniform hypergraph by taking cells as vertices and for each encoded element, there is a hyperedge with all cells containing the element. Then peeling this hypergraph to find a 2-core is the same process as recovering the encoded set, provided that we can find a pure cell if there is any. The IBLT recovery thus succeeds only if there is no 2-core in the hypergraph.
Structured sets.
Since we study a beyond worst-case setting, we consider sets encoded into an IBLT that have some internal structure. Informally, we assume that the set consists of a relatively small number of “components” consisting of “related” elements, where the relation gives predictions. For example, if recovering a set of integers, we may assume that the set consists of intervals of average length at least a parameter , while two different intervals may be completely unrelated. In the case of -mers, the components are exactly the weakly-connected components of the de Bruijn graph of the -mer set. In general, the notion of components needs to be specified for each application of our framework.
3 Algorithms for Breaking 2-Cores by Structure-Aware Predictors
In this section, we describe our approach to recovering structured sets from IBLTs. We start with a simple example with recovering integer sequences, motivated by an efficient detection of lost packets in round-trip data streams. Namely, suppose that a server sends a long sequence of packets to a client, with packet IDs 1, 2, 3, …, . After the transmission is done, the client needs to quickly determine the indexes of missing packets so that it can ask for their retransmission. However, if some packet with ID is lost, then we are likely to also lose packets with IDs close to , such as all packets in interval for some .
For efficiency reasons, we use an IBLT (see e.g. [23] for a similar problem where IBLTs are applied). If we expect at most packets to be lost, we use IBLT-xor with cells, toggling each received packet ID to the sketch and after the transfer finishes, toggling all IDs to the sketch. The resulting IBLT encodes exactly the missing packets and if their number is indeed at most , their recovery from the IBLT succeeds with high probability.
Algorithm 1: recovering standard IBLT with predictors.
Although is a fairly small multiplicative constant, close to the information-theoretic bound of 1, our estimate for the number of lost packets can be off, and the algorithm may fail. Failing means that there exists a -core in the underlying hypergraph. We would like to overcome such a situation, even though in general, the factor of is tight for IBLTs as the recovery process for items fails with high probability with a smaller factor. Nevertheless, considering the example and its specific assumptions, namely, whether packets and are missing is correlated, we attempt to make progress in the recovery process. The main idea is to use already recovered packet IDs to guess the packet IDs still encoded in the sketch.
Specifically, suppose that we recovered but not . We make a guess that is also in the sketch and remove from the sketch, even though there is no pure cell with . If it was indeed in the sketch, then we decrease the degrees of three vertices in the underlying hypergraph (i.e., the number of items hashed into three cells of the IBLT). Then either some degree gets to one and we may continue with the standard IBLT recovery, or we need to make another guess as we have not broken the -core yet. We continue until the sketch gets empty or we make too many guesses.
However, some of our guesses may be wrong. Suppose that we guessed and removed it from the sketch, although it is not in the encoded set. If the recovery process successfully continues, at some point we recover and find out that our guess was incorrect, allowing us to remove from the resulting set. However, wrong guesses do not help and, in fact, make the table more full. Thus, after a predefined number of steps, we revert the guesses by adding them back to the table and make other guesses.
The packet recovery problem serves only as an illustrative example, since this approach has wide applicability for improving space efficiency of IBLTs over structured data. Our main application is recovering -mers from a symmetric difference of closely-related genomes. Specifically, our assumption is that the symmetric difference consists of paths of length at least in the de Bruijn graph, corresponding to a string of length . Note that if there is a mutation of a single base, two paths of length occur in the symmetric difference (assuming no -mer repeats).
We provide two predictors for -mers: First, the next-in-sequence predictor, which given a single recovered -mer, extends it either to the left or to the right by one base and removes one base at the other end. For example, if we recovered a -mer ACTG, then we predict CTGA, CTGC, CTGG, CTGT, AACT, CACT, GACT, and TACT (here, we do not consider reverse complements for simplicity), expecting that for most recovered -mers, at least one predicted -mer would also be encoded in the sketch. Thus, for -mers, there is an additional challenge of a much higher chance of guessing wrong elements.
Second, a stronger prediction may be achieved by considering more recovered elements at once. For instance, suppose that we recovered 8-mers AAAACCCC and ACCCCTTT. Then it is likely that 8-mers AAACCCCT and AACCCCTT are also part of the symmetric difference, since we assume that the symmetric difference consists of long sequences and that one of the sequences contains AAAACCCCTTT. In other words, we use that the de Bruijn graph of the encoded set likely contains the whole path from AAACCCCT to AACCCCTT. Thus, such a path predictor takes two -mers with an overlap of for and predicts all -mers on the shortest path from to in the complete de Bruijn graph (i.e., the graph containing all possible -mers); when choosing the input -mers , the preference is given to -mers with larger overlap. The path predictor makes potentially less wrong guesses (at least when the overlap is close to ), but suffers from worse time complexity to produce all predictions for recovered -mers. Specifically, given a set of recovered -mers, we run the following to produce predictions of -mers: We list pairs of -mers sorted by their overlap such that for every -mer , we only take a -mer that has the largest overlap with , and for each such pair, we use the path predictor. This can be implemented in time; see Appendix B for details.
We outline the algorithm for recovery with the next-in-sequence predictor. Given a parameter , it runs in iterations of “core breaking steps”, and in each iteration, it takes all already recovered elements and applies the predictor on each of them, which yields a set of predicted elements; for efficiency reasons, we only take a subset of predicted elements and toggle the selected elements in the IBLT-xor (we assume that we use IBLT-xor). We continue with the standard recovery algorithm for at most steps, for a parameter , and then toggle the elements in in the IBLT, reverting the guesses. Then we again run the standard recovery algorithm until the IBLT is empty or there is no pure cell. Note that bounding the number of core-breaking steps by a parameter prevents infinite cycles in the recovery, which may happen for IBLT-xor [21].
We describe this method for recovery with predictors in an abstract setting in more detail in Section 4.1, and prove that even a weak matching-based predictor already achieves a ratio in Section 4.2. We also analyze it experimentally in Section 5 where we show that it achieves even better improvement in practice for -mers of real-world data.
Although recovery with (potentially wrong) predictors already achieves our main goal, it has certain drawbacks: First, as reported in Section 5, recovery with predictors can be quite time consuming due to trying many guesses that may often be wrong or due to the time complexity of the predictor itself (such as the path predictor). Note, however, that more time for recovery is only needed when the original IBLT without predictions does not succeed, as there are no overheads if full recovery is possible without the predictors.
Second, we do not fully utilize the structure. Suppose that we are recovering a de Bruijn graph of a -mer set encoded in an IBLT. Thus, if the average size of a component is , it seems plausible to use an IBLT of size enhanced with an appropriate recovery procedure and small supporting data structures. However, the algorithm with predictors outlined above does not achieve such a scaling property, neither in theory (see Section 4), nor in practice (see Section 5). On the other hand, the primary advantages of Algorithm 1 are simplicity and the fact that the IBLT and its update procedures require no changes, as we only enhance the recovery.
Algorithm 2: The “three tables” method combining subsampling and implementing a nearly perfect predictor.
We address the drawbacks of the previous algorithm, under the assumption that the universe size is substantially larger than the encoded set size , specifically that . As a primary example, we take -mers with not-too-small , and the assumption on translates to ; here, we solely focus on -mers for simplicity but the techniques can be used in other applications. We again suppose that the -mer set consists of de Bruijn graph components of size at least . The goal is to achieve scaling with , namely that space per -mer needed for successful recovery should not increase with increasing .
The first idea is to subsample the encoded set so that at least one -mer is selected from most components of the underlying de Bruijn graph. A general way to do it is using a hash function , and only insert -mers that hash below a specified threshold ; for example, for recovering symmetric differences of -mers that resulted from a set of mutations, a reasonable choice is as it ensures selecting one -mer from each path of length with high probability and as this choice does not affect the final asymptotic space complexity of our approach. There are better subsampling techniques for -mers, such as selecting all syncmers [10] as they guarantee selecting one -mer from each component and have subsampling rate approaching for large . The subsampled set may be encoded into a common IBLT that does not (and cannot) use predictors as sampling destroys the structure but has size substantially smaller than the (non-subsampled) set . With IBLT-xor for the subsampled elements, we need bits for in expectation, which is bits for the subsampling rate with syncmers for large .
However, even if we can get one or more elements from each component of from , it is not sufficient to recover all of the components of by using predictors as they would often provide wrong guesses for elements in . We thus add a low-space approximate membership data structure, called hash filter, that will approximately represent the encoded set in smaller space, with sufficiently low false positive and false negative probabilities. To implement the hash filter, we again employ an IBLT-xor but, to save space, on fingerprints, computed by a universal hash function, instead of on the original elements222Alternatively, one may use a variant of Counting Bloom Filter (CBF) [13] in which the -bit counters do not freeze when they reach the highest value but instead, we count modulo . Note that such a variant of CBF has false negatives. We leave an analysis of this variant to future work. . These fingerprints are of size bits so that the probability of a hash collision is small enough, namely at most . thus stores fingerprints but since we assume , these fingerprints are much smaller than the original elements. The total required size of is thus bits; note that the multiplicative constant may be improved by employing predictions for recovering fingerprints.
The nearly perfect predictor uses a (potentially wrong) predictor as a black box, such as the next-in-sequence. We assume that generates at most predicted elements. Then works as follows: To guess the next element, asks for prediction of elements, given what is already recovered, which yields a set , and then queries the hash filter for each element of . The predicted -mers whose fingerprints are in are added to the set of recovered elements. Let be the set of recovered elements using and .
Note that may still give incorrect predictions due to false positives and false negatives of the hash filter, and we analyze their probabilities. First, a false positive may occur if there is a hash collision in the fingerprints between a -mer from and a predicted -mer; due to the setup of fingerprints, such a collision happens with probability and thus, over all steps, only false positives occur with high probability. Second, a false negative may occur if the recovery of fails or if there is a hash collision in the fingerprints among an even number of -mers from , which then cancel out in IBLT-xor; overall, there are again false negatives with high probability. Furthermore, the subsampling step may, in general, miss some components, unless we use syncmers for -mers or a similar method that guarantees a sample from each component.
Thus, may not contain all -mers of and may have some additional elements not in . We thus use IBLT-xor of a small size, sublinear in , to correct such errors, given that the analysis above shows that the number of additional or missing -mers, that is, -mers in the symmetric difference , is with high probability. Despite that this IBLT is small, it encodes all elements of but we toggle after running the recovery of and nearly-perfect predictor . Then only -mers in remain in . Thus, even with of constant size, we can recover and get .
Algorithm 2 summary.
Concluding the discussion above, our second proposed algorithm for recovery with predictors contains three IBLT tables:
-
IBLT-xor containing subsampled elements from the set that we aim to recover.
-
IBLT-xor containing fingerprints of all elements in , where the fingerprints may be given by a universal hash function.
-
IBLT-xor for correcting errors.
Then, given a predictor and the three tables, the recovery process goes as follows:
-
1.
Recover the subsampled set from .
-
2.
Recover the set of fingerprints from .
-
3.
Expand by using the nearly-perfect predictor that gets elements from but only adding those with their fingerprint in .
-
4.
Correct errors as follows: Let be the set obtained from the first three steps. Toggle in (i.e., toggle the presence/absence of each element from ). Then call the recovery on , which, if it succeeds, provides exactly the elements in .
The recovery of any of the three tables may fail, but we set up the parameters so that all recovery steps succeed with high probability. Overall, the memory consumption of this approach, up to asymptotically smaller terms, is bits, compared to bits with IBLT-xor using no predictors.
4 Theoretical Analysis of Recovery with Predictors
4.1 Meta-Algorithm for Recovery with a Predictor
We describe the algorithm in more detail in an abstract setting. Given IBLT-xor encoding a set over universe and a predictor for , in Algorithm 1 we describe the recovery procedure with predictor that uses standard IBLT recovery as a subroutine. We assume that the predictor takes recovered -mers and outputs at most predicted elements (disjoint from the input elements), that is, . For instance, the next-in-sequence predictor for -mers takes one -mer and outputs at most 8 -mers. For simplicity, we present the procedure for recovering sets, without multiplicities of elements; as we discuss in Section 6, an extension to multisets is possible provided that the predictor also provides its multiplicity.
Our approach deals with wrong guesses by first making a number of guesses, removing the guessed elements from the IBLT, and then adding them back after performing a bounded number of steps of the standard IBLT recovery procedure. That is, the guessed elements will need to be recovered later from the IBLT using standard recovery. The choice of at most subsets on which we base our guesses, and the guessed elements from each that we temporarily add to the recovered elements depend on the particular implementation, e.g., it could be chosen randomly or according to an order of subsets and elements. For instance, in our implementation for -mers with the next-in-sequence predictor, we feed all the already recovered elements one by one into the predictor, and then we take the predicted elements and add each into with probability 1/2.
One of the main advantages of this approach is that we make guesses at once, which may be necessary for breaking the 2-core; see the proof of Theorem 4 in Appendix A. However, a too large may in fact make breaking the -core harder as we need to deal with more incorrect guesses. Other parameters are , the number of core-breaking steps, and , the number of recovery steps after toggling guessed elements into the IBLT.
4.2 A Weak Matching Predictor Already Improves Space Efficiency
We now show that even with a relatively weak predictor for a class of sets over , one can achieve a significant space-efficiency improvement over the standard IBLT. Informally, we assume that the predictor “uses a matching”, i.e., a set of disjoint unordered pairs covering most of such that for any pair , can be predicted from and vice versa, i.e., and . Such an assumption is satisfied, for instance, when the underlying structure consists of relatively long paths, such as for a collection of integer sequences or for -mers in the symmetric difference of two related genomes (i.e., we split each path into pairs by removing every other edge). We note that for both integer sequences and -mers, it is possible to construct better predictors that try to follow the paths by guessing.
The key idea is that such a “matching” predictor allows us to break the 2-core of a 3-uniform hypergraph . Effectively, if for all we merge the hyperedges of and , then we obtain an (almost) 6-uniform hypergraph with (almost) 50% hyperedges (most of them of size 6) and the recovery with the predictor succeeds if and only if there is no 2-core in . This implies a high-probability recovery using an IBLT of size only of the encoded set, using that the threshold for the occurrence of a 2-core in a 6-uniform hypergraph is [29] and . However, we do not quite obtain a 6-uniform hypergraph as the matching may leave a sublinear number of elements unmatched and moreover, by merging the hyperedges of and for , we may obtain a hyperedge with less than six vertices as the hyperedges of and may share one or more vertices.
Another technical challenge is that we do not know the almost 6-uniform hypergraph as we only have access to the 3-uniform hypergraph and predictor which may provide incorrect guesses. To deal with it, we use the approach outlined above (and fully described in Algorithm 1) instantiated with the matching predictor ; specifically, we remove the guesses after a predetermined number of recovery steps. We now formalize our setting by defining the necessary predictor that takes a single element as input and outputs at most elements.
Definition 1.
Given a class of sets, we call a predictor a matching predictor for if for any , there is a matching containing an -fraction of elements of such that for any edge of , we have that and . Furthermore, for any , can be computed in polynomial time with respect to .
We recall the thresholds of the appearance of 2-cores in random mixed -uniform hypergraphs, proved in [7, 32]. In the statement, denotes a Poisson random variable with mean . For an integer vector of possible hyperedge sizes and a real vector determining the distribution of sizes, let be a random mixed hypergraph with hyperedges where for each , a fraction of of the hyperedges are fully randomly chosen from the set of all possible hyperedges of size ; the random choices are done with replacement. Note that in [32], the theorem is stated for random hypergraphs without a prescribed number of edges, but as discussed in Section 1.2 of [32], these results also hold for random hypergraphs with predetermined number of edges. We first define the edge density thresholds for high-probability occurrence of a 2-core.
Definition 2 (Sharp thresholds for high-probability occurrence of a 2-core).
Given , and vectors of length such that for each , is an integer and such that , we define
| (1) |
In particular, we let be the value of for the single-value vectors and with and .
Note that if has a single “non-negligible” value ; specifically, if there is an index such that and .
Theorem 3 (Theorem 2 and Section 1.2 in [32], implied by [7]).
Let be constant. For each , let be a constant and let be such that . Then the following holds with probability for :
-
i)
if then has an empty -core,
-
ii)
if then has a non-empty -core.
The following result gives a bound on the size of sets that can be recovered from an IBLT with hash functions using a matching predictor. For simplicity, we show it for IBLT-xor with checksums.
Theorem 4.
Suppose that for a class of sets , there is a matching predictor with . Consider encoding a set into IBLT-xor with checksums using hash functions, and let be the number of IBLT cells. Let . Then there is an algorithm that recovers with high probability if .
The proof is in Appendix A (we omit a polynomial time bound in this version). In particular, for , we have , improving upon ratio for standard IBLT recovery, while for , the value of is larger than . This implies that using three hash functions is still the best, while using a fractional number of hash functions may give further improvements.
4.3 Theoretical Limits of Recovery with Predictors
Theorem 4 implies that even a relatively weak predictor for structured data yields a constant-factor space improvement over not using any prediction, even without modifying the IBLT data structure. We now take the opposite view: What is the highest possible ratio of that one can achieve with a “perfect” predictor for a given structure?
To make the question more precise, consider an integer input consisting of disjoint arithmetic progressions, all with common difference 1 but with unknown and irregular gaps between these progressions. Thus, while a single number from a progression may be sufficient to recover the whole progression (if we could determine its beginning and end), it is not possible to guess an element in another progression even after recovering all other progressions. More generally, we consider inputs consisting of “components” such that predictor cannot predict an element outside of the components of elements given as input; in particular, from a single element one can possibly obtain its component in full, but no other element. We call such a predictor component-restricted. For simplicity, we assume that the components are of the same size , and we focus on .
The following result implies that when the number of components is too large compared to the IBLT size , we cannot recover from the IBLT given any component-restricted predictor . For instance, setting and , we get that no predictor may achieve a ratio better than , since must be larger than .
Theorem 5.
Consider any predictor and a set encoded in an IBLT of size and with hash functions. Suppose that can be partitioned into parts of size , called components, i.e., , and intersects only the components of the elements in , i.e., for any , only if . Suppose that . Then no instantiation of Algorithm 1 succeeds to recover with high probability.
Proof sketch..
Consider the hypergraph obtained from the IBLT hypergraph by merging all hyperedges corresponding to the elements of each component. Note that is a random hypergraph with new hyperedges of size up to . Since by our assumptions , there are only hyperedges with less than vertices with high probability; indeed, uniformly randomly selected cells are distinct with probability at least , using that .
Using the assumed lower bound on and Theorem 3 similarly as in Theorem 4 (see Appendix A), we get that there is a 2-core in with high probability (note that the induced sub-hypergraph on the vertices of is also a 2-core in ). Thus the IBLT recovery process does not recover elements corresponding to the hyperedges in . Moreover, since for each component, we merge all of its hyperedges in , predictor does not return an element whose hyperedge is in during the recovery process, Algorithm 1 never recovers an element from .
5 Experimental Evaluation
Implementation.
We have implemented IBLTs and the recovery procedures in several C# libraries, which are available at GitHub (links provided on the title page). The experiments with Algorithm 1 were conducted using Yak, a console wrapper for the main library SymmetricDifferenceFinder that provides the IBLT-xor (denoted HPW there) and IBLT with checksum data structures and implements Algorithm 1 for recovery with predictors. The method of three tables is provided in Halina. We implemented several common hash function families (tabulation, linear congruence, polynomial, multiply-shift) in library FlashHash; the experiments below use tabulation hash functions. Finally, processing -mer sets is done via their masked superstrings [34] in library KMerUtils.
Our implementation requires .NET version 9.0 or higher. We used advanced features to gain performance, most notably runtime compilation using expression trees to recompile the code for the parameters given, such as the randomly selected parameters of hash functions. To achieve a certain level of type safety with expression trees and to make coding with them less error-prone, we provide a wrapper around expression trees called LittleSharp. These features allowed us to encode 31-mers of the human genome in less than 100 s with an IBLT of size 134M. The experiments were run on Intel Xeon E5-1620 (4 cores, 3.8 GHz) and 62 GB RAM.
5.1 Results for Recovering -Mers with Predictors
We sought to evaluate the space efficiency of recovery with predictors (Algorithm 1) in practice. We focus on -mer sets as recovering integer sequences should provide even better results due to a smaller number of wrong guesses. Furthermore, we first discuss only the next-in-sequence predictor and only later focus on using the path predictor as well. We use the 31-mer sets of two C. elegans assemblies (GenBank GCA_000002985.3 and NCBI RefSeq GCF_000002985.6; their symmetric difference consists of 214 670 distinct 31-mers). We also create synthetic data consisting of 31-mers generated by many random strings of length so that the encoded set is of size . In both cases, we executed IBLT recovery with varying IBLT size compared to the number of encoded -mers, and measured the number of successful runs (which recovered exactly all of the encoded elements), the number of incorrectly recovered -mers, and recovery time (even for unsuccessful recovery); see Figure 1.
Specifically, we use Algorithm 1 with the next-in-sequence predictor, applying the predictor to all recovered elements and selecting each predicted element with probability , i.e., setting to about a half of the number of recovered elements. For intuition, consider the first vertex in the 2-core whose degree gets to 1 in the recovery with predictors; then the degree of is small in the 2-core. We use core-breaking steps and recovery steps. We set as it seems that more steps do not yield substantial improvement. Generally, any should be sufficient as peeling takes at most core-breaking steps with high probability.
For both C. elegans and synthetic data, the results show that there is a sharp transition at ratio ; for lower ratios, almost no -mers are recovered, whereas for larger ratios, all of the -mers were successfully recovered. As for time complexity of recovery (even if unsuccessful), there is a sharp peak around ratio , when predictors are heavily used (one can limit the time by decreasing ). However, for ratios , the recovery took less than 18 s, and for , less than 2 s. Since we did not observe differences in results between real-world and synthetic data with similar properties, we will subsequently work only with synthetic data.
In Fig. 2(a), we examined the dependency of space efficiency of our approach on parameter , the number of core-breaking steps in Algorithm 1. This shows that in case of 31-mers, already tens of core-breaking steps (i.e., uses of the predictor on the recovered elements) are sufficient to beat ratio 1, and more than steps do not yield further improvement. Also note that the fewer steps, the faster the recovery around the ratio required for successful recovery. We also remark that core-breaking steps at the end of recovery are generally more expensive than those at the beginning as more -mers are decoded and fed into the predictor.
Next, in Fig. 2(b), we show the space efficiency of Algorithm 1 in terms of the length of strings generating the 31-mers. The results show that with as few as 15 31-mers in each component of the de Bruijn graph, it is possible to achieve a ratio using only the simple next-in-sequence predictor.
Using the path predictor.
The path predictor takes two -mers with an overlap for small enough and predicts that all -mers on the de Bruijn path between the input -mers are also encoded. Such a prediction may seem as a natural candidate for further improvements. However, we found several limitations of the path predictor: When the number of recovered elements is large (in the order of millions), then it becomes infeasible to run the path predictor in a fast way, although there is an time algorithm. Moreover, with increasing number of recovered -mers, there is a larger chance of making wrong guesses, i.e., taking two -mers such that the path predictor produces -mers that are not in the encoded set (in other words, the encoded set does not contain the shortest path between the two -mers). Finally, the predictor cannot find the endpoints of de Bruijn graph paths. Thus, we only use the path predictor at the beginning of the recovery process when we accept its predictions and not revert them later.
We provide an experimental insight into using the path predictor on synthetic data, when using two and three hash functions in the IBLT in Figures 3(a) and 3(b), respectively. The results show that while the path predictor provides almost no improvement with three hash functions, with hash functions, we can surprisingly recover the IBLT with constant probability already for ratio (note that without using the path predictor, gives better results). We note that for , the average fraction of -mers that are not successfully recovered is very small, less than of the encoded set size, so an additional small IBLT would be able to recover the rest while increasing the space usage only by a negligible fraction.
The method of three tables.
Lastly, we sought to verify the scaling property with increasing of the three tables method. For a given , we created a synthetic dataset with 101 strings of length , so that . For simplicity, we subsampled -mers using a hash function and optimized the subsampling rate and the size of to correct errors. The experimental results in Table 1 in Appendix C generally confirm the logarithmic increasing trend with increasing size of the encoded set .
6 Discussion and Conclusions
We have proposed new recovery algorithms for IBLTs that take advantage of the structure naturally present in many datasets, such as genomic data, and go far beyond worst-case lower bounds. Our methods can be applied when the standard IBLT recovery fails, thus potentially saving a costly rerun of encoding the IBLT with a larger size and sending it over the network again. We have shown that under mild structural assumptions, one can already achieve more than 1.5 times better space efficiency. Further, we have demonstrated on symmetric differences of -mer sets that in practice, our method for recovery with predictors leads to almost two times better space efficiency. Importantly, this is achieved without changing the underlying IBLT data structure at all. In fact, the IBLT enhanced with our predictor-based recovery is never worse than the standard IBLT. Moreover, we have developed the “three tables” method that achieves the scaling property for -mers with increasing , namely, it uses bits per encoded -mer instead of , where is the number of -mers.
The main limitation of our approach with predictors is the large recovery time when predictors are applied. Nevertheless, the recovery time remains the same as for the standard IBLT when predictors are not needed. Our implementation in C#, while optimized for encoding speed by runtime compilation, is a prototype, requires parameter tuning, and the recovery procedures are not well optimized, especially with the path predictor and in experiments for large .
Our work opens up several directions for future research. First, we have experimented only with three hash functions (with the exception in Fig. 3(a)), which is in general the best fixed number of hash functions. Nevertheless, our approach with predictors combined with a fractional number of hash functions (e.g., hashing a random subset of elements with more than three hash functions) or with the recent construction of random -uniform hypergraphs with the peelability threshold arbitrarily close to 1 [8, 35] may lead to further space efficiency gains. Next, we only focused on recovering sets, leaving multisets (i.e., recovering items with multiplicities) to future work. Furthermore, our predictors only use natural structural assumptions on the data, such as the spectrum-like property (SLP) [5]; it would be interesting to investigate the use of ML-based predictors, i.e., a “learning-augmented IBLT”. Another direction is a combination of our techniques with recent progress on recovery with only a negligible probability of failure if the IBLT has sufficient size, as proposed in [28, 14, 3].
Finally, for -mers with large , we ask whether it is possible to improve upon our results for -mer sets which form paths of length in their de Bruijn graph. Here, we note that, by information-theoretic arguments, we need at least bits per distinct -mer, while a single table cell has (at least) bits per -mer and the method of three tables achieves bits for recovering many -mers. Thus, we ask if it is possible to achieve bits per recovered -mer for large and sufficiently structured sets.
References
- [1] Giuseppe Ateniese, Michael T. Goodrich, Vassilios Lekakis, Charalampos Papamanthou, Evripidis Paraskevas, and Roberto Tamassia. Accountable storage. In Dieter Gollmann, Atsuko Miyaji, and Hiroaki Kikuchi, editors, Applied Cryptography and Network Security - 15th International Conference, ACNS 2017, Kanazawa, Japan, July 10-12, 2017, Proceedings, volume 10355 of Lecture Notes in Computer Science, pages 623–644. Springer, 2017. doi:10.1007/978-3-319-61204-1_31.
- [2] Daniella Bar-Lev, Avi Mizrahi, Tuvi Etzion, Ori Rottenstreich, and Eitan Yaakobi. Coding for iblts with listing guarantees. In IEEE International Symposium on Information Theory, ISIT 2023, Taipei, Taiwan, June 25-30, 2023, pages 1657–1662. IEEE, 2023. doi:10.1109/ISIT54713.2023.10206563.
- [3] Djamal Belazzougui, Gregory Kucherov, and Stefan Walzer. Better space-time-robustness trade-offs for set reconciliation. In Karl Bringmann, Martin Grohe, Gabriele Puppis, and Ola Svensson, editors, 51st International Colloquium on Automata, Languages, and Programming, ICALP 2024, Tallinn, Estonia, July 8-12, 2024, volume 297 of LIPIcs, pages 20:1–20:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ICALP.2024.20.
- [4] Moses Charikar, Kevin C. Chen, and Martin Farach-Colton. Finding frequent items in data streams. Theor. Comput. Sci., 312(1):3–15, 2004. doi:10.1016/S0304-3975(03)00400-6.
- [5] Rayan Chikhi, Jan Holub, and Paul Medvedev. Data structures to represent a set of k-long DNA sequences. ACM Computing Surveys, 54(1):17:1–17:22, 2022. doi:10.1145/3445967.
- [6] Graham Cormode and S. Muthukrishnan. An improved data stream summary: the count-min sketch and its applications. J. Algorithms, 55(1):58–75, 2005. doi:10.1016/J.JALGOR.2003.12.001.
- [7] Martin Dietzfelbinger, Andreas Goerdt, Michael Mitzenmacher, Andrea Montanari, Rasmus Pagh, and Michael Rink. Tight thresholds for cuckoo hashing via XORSAT. In Samson Abramsky, Cyril Gavoille, Claude Kirchner, Friedhelm Meyer auf der Heide, and Paul G. Spirakis, editors, Automata, Languages and Programming, 37th International Colloquium, ICALP 2010, Bordeaux, France, July 6-10, 2010, Proceedings, Part I, volume 6198 of Lecture Notes in Computer Science, pages 213–225. Springer, 2010. doi:10.1007/978-3-642-14165-2_19.
- [8] Martin Dietzfelbinger and Stefan Walzer. Dense peelable random uniform hypergraphs. In Michael A. Bender, Ola Svensson, and Grzegorz Herman, editors, 27th Annual European Symposium on Algorithms, ESA 2019, Munich/Garching, Germany, September 9-11, 2019, LIPIcs, pages 38:1–38:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.ESA.2019.38.
- [9] Peter C. Dillinger, Lorenz Hübschle-Schneider, Peter Sanders, and Stefan Walzer. Fast succinct retrieval and approximate membership using ribbon. In Christian Schulz and Bora Uçar, editors, 20th International Symposium on Experimental Algorithms, SEA 2022, Heidelberg, Germany, July 25-27, 2022, LIPIcs, pages 4:1–4:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.SEA.2022.4.
- [10] Robert Edgar. Syncmers are more sensitive than minimizers for selecting conserved k-mers in biological sequences. PeerJ, 9:e10805, 2021.
- [11] David Eppstein and Michael T. Goodrich. Straggler identification in round-trip data streams via newton’s identities and invertible bloom filters. IEEE Trans. Knowl. Data Eng., 23(2):297–306, 2011. doi:10.1109/TKDE.2010.132.
- [12] David Eppstein, Michael T. Goodrich, Frank C. Uyeda, and George Varghese. What’s the difference?: efficient set reconciliation without prior context. In Srinivasan Keshav, Jörg Liebeherr, John W. Byers, and Jeffrey C. Mogul, editors, Proceedings of the ACM SIGCOMM 2011 Conference on Applications, Technologies, Architectures, and Protocols for Computer Communications, Toronto, ON, Canada, August 15-19, 2011, pages 218–229. ACM, 2011. doi:10.1145/2018436.2018462.
- [13] Li Fan, Pei Cao, Jussara M. Almeida, and Andrei Z. Broder. Summary cache: a scalable wide-area web cache sharing protocol. IEEE/ACM Trans. Netw., 8(3):281–293, 2000. doi:10.1109/90.851975.
- [14] Nils Fleischhacker, Kasper Green Larsen, Maciej Obremski, and Mark Simkin. Invertible bloom lookup tables with less memory and randomness. In Timothy M. Chan, Johannes Fischer, John Iacono, and Grzegorz Herman, editors, 32nd Annual European Symposium on Algorithms, ESA 2024, September 2-4, 2024, Royal Holloway, London, United Kingdom, volume 308 of LIPIcs, pages 54:1–54:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ESA.2024.54.
- [15] Nils Fleischhacker, Kasper Green Larsen, and Mark Simkin. Property-preserving hash functions for hamming distance from standard assumptions. In Orr Dunkelman and Stefan Dziembowski, editors, Advances in Cryptology - EUROCRYPT 2022 - 41st Annual International Conference on the Theory and Applications of Cryptographic Techniques, Trondheim, Norway, May 30 - June 3, 2022, Proceedings, Part II, volume 13276 of Lecture Notes in Computer Science, pages 764–781. Springer, 2022. doi:10.1007/978-3-031-07085-3_26.
- [16] Nils Fleischhacker, Kasper Green Larsen, and Mark Simkin. How to compress encrypted data. In Carmit Hazay and Martijn Stam, editors, Advances in Cryptology - EUROCRYPT 2023 - 42nd Annual International Conference on the Theory and Applications of Cryptographic Techniques, Lyon, France, April 23-27, 2023, Proceedings, Part I, volume 14004 of Lecture Notes in Computer Science, pages 551–577. Springer, 2023. doi:10.1007/978-3-031-30545-0_19.
- [17] Sumit Ganguly. Counting distinct items over update streams. Theor. Comput. Sci., 378(3):211–222, 2007. doi:10.1016/J.TCS.2007.02.031.
- [18] Sumit Ganguly and Anirban Majumder. Deterministic k-set structure. Inf. Process. Lett., 109(1):27–31, 2008. doi:10.1016/J.IPL.2008.08.010.
- [19] Michael T. Goodrich and Michael Mitzenmacher. Invertible bloom lookup tables. In 2011 49th Annual Allerton Conference on Communication, Control, and Computing (Allerton), pages 792–799, 2011. doi:10.1109/Allerton.2011.6120248.
- [20] Thomas Mueller Graf and Daniel Lemire. Binary fuse filters: Fast and smaller than xor filters. ACM J. Exp. Algorithmics, 27:1.5:1–1.5:15, 2022. doi:10.1145/3510449.
- [21] Jakob Bæk Tejs Houen, Rasmus Pagh, and Stefan Walzer. Simple Set Sketching, pages 228–241. SIAM, 2023. doi:10.1137/1.9781611977585.ch21.
- [22] Tomer Keniagin, Eitan Yaakobi, and Ori Rottenstreich. Certainsync: Rateless set reconciliation with certainty. Proc. ACM Meas. Anal. Comput. Syst., 9(2):1–33, 2025. doi:10.1145/3727110.
- [23] Yuliang Li, Rui Miao, Changhoon Kim, and Minlan Yu. Flowradar: A better netflow for data centers. In Katerina J. Argyraki and Rebecca Isaacs, editors, 13th USENIX Symposium on Networked Systems Design and Implementation, NSDI 2016, Santa Clara, CA, USA, March 16-18, 2016, pages 311–324. USENIX Association, 2016. URL: https://www.usenix.org/conference/nsdi16/technical-sessions/presentation/li-yuliang.
- [24] Yuliang Li, Rui Miao, Changhoon Kim, and Minlan Yu. Lossradar: Fast detection of lost packets in data center networks. In Athina Markopoulou, Michalis Faloutsos, Vyas Sekar, and Dejan Kostic, editors, Proceedings of the 12th International on Conference on emerging Networking EXperiments and Technologies, CoNEXT 2016, Irvine, California, USA, December 12-15, 2016, pages 481–495. ACM, 2016. doi:10.1145/2999572.2999609.
- [25] Yaron Minsky, Ari Trachtenberg, and Richard Zippel. Set reconciliation with nearly optimal communication complexity. IEEE Trans. Inf. Theory, 49(9):2213–2218, 2003. doi:10.1109/TIT.2003.815784.
- [26] Michael Mitzenmacher and Rasmus Pagh. Simple multi-party set reconciliation. Distributed Comput., 31(6):441–453, 2018. doi:10.1007/S00446-017-0316-0.
- [27] Michael Mitzenmacher and George Varghese. Biff (bloom filter) codes: Fast error correction for large data sets. In Proceedings of the 2012 IEEE International Symposium on Information Theory, ISIT 2012, Cambridge, MA, USA, July 1-6, 2012, pages 483–487. IEEE, 2012. doi:10.1109/ISIT.2012.6284236.
- [28] Avi Mizrahi, Daniella Bar-Lev, Eitan Yaakobi, and Ori Rottenstreich. Invertible bloom lookup tables with listing guarantees. Proc. ACM Meas. Anal. Comput. Syst., 7(3):61:1–61:29, 2023. doi:10.1145/3626792.
- [29] Michael Molloy. Cores in random hypergraphs and boolean formulas. Random Structures & Algorithms, 27(1):124–135, 2005. doi:10.1002/rsa.20061.
- [30] A. Pinar Ozisik, Gavin Andresen, Brian Neil Levine, Darren Tapp, George Bissias, and Sunny Katkuri. Graphene: efficient interactive set reconciliation applied to blockchain propagation. In Jianping Wu and Wendy Hall, editors, Proceedings of the ACM Special Interest Group on Data Communication, SIGCOMM 2019, Beijing, China, August 19-23, 2019, pages 303–317. ACM, 2019. doi:10.1145/3341302.3342082.
- [31] Salvatore Pontarelli, Pedro Reviriego, and Michael Mitzenmacher. Improving the performance of invertible bloom lookup tables. Inf. Process. Lett., 114(4):185–191, 2014. doi:10.1016/J.IPL.2013.11.015.
- [32] Michael Rink. On thresholds for the appearance of 2-cores in mixed hypergraphs. CoRR, abs/1204.2131, 2012. arXiv:1204.2131.
- [33] Yoshihiro Shibuya, Djamal Belazzougui, and Gregory Kucherov. Efficient reconciliation of genomic datasets of high similarity. In Christina Boucher and Sven Rahmann, editors, 22nd International Workshop on Algorithms in Bioinformatics, WABI 2022, September 5-7, 2022, Potsdam, Germany, volume 242 of LIPIcs, pages 14:1–14:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.WABI.2022.14.
- [34] Ondřej Sladkỳ, Pavel Veselỳ, and Karel Břinda. Masked superstrings as a unified framework for textual k-mer set representations. bioRxiv, pages 2023–02, 2023.
- [35] Stefan Walzer. Peeling close to the orientability threshold spatial coupling in hashing-based data structures. ACM Trans. Algorithms, 21(3):33:1–33:23, 2025. doi:10.1145/3711822.
- [36] Lei Yang, Yossi Gilad, and Mohammad Alizadeh. Practical rateless set reconciliation. In Proceedings of the ACM SIGCOMM 2024 Conference, ACM SIGCOMM 2024, Sydney, NSW, Australia, August 4-8, 2024, pages 595–612. ACM, 2024. doi:10.1145/3651890.3672219.
Appendix A Proofs from Section 4
Theorem 4. [Restated, see original statement.]
Suppose that for a class of sets , there is a matching predictor with . Consider encoding a set into IBLT-xor with checksums using hash functions, and let be the number of IBLT cells. Let . Then there is an algorithm that recovers with high probability if .
Proof.
Let be IBLT-xor with checksums encoding . We use Algorithm 1 with sufficiently large , , and (parameters and are given by the predictor).
We condition on the event that no anomaly ever occurs, i.e., during the recovery process no sum of checksums of elements hashed into one cell would collide with a checksum of another element in the encoded set or a guessed element. To show that , we note that Algorithm 1 with , , , and runs in time. Thus, table will be in at most that many states. If the hash checksums have bits, the probability of a single collision is , by the universality of the hash function. By union bound over all states of , for sufficiently large, we have that . Conditioned on , every cell that “looks pure” to IBLT-xor is in fact pure, i.e., there is a single element hashed into the cell.
Consider the random hypergraph where vertices correspond to cells of and there is a hyperedge for every element encoded in the IBLT (thus, most hyperedges are of size with high probability). Suppose that the recovery process encounters a 2-core in ; in other words, there is no pure cell in and is non-empty. We aim to show that Algorithm 1 “breaks” this 2-core with high probability.
Consider hypergraph obtained from by joining the hyperedges of the two elements in each pair of matching that is contained in . By Definition 1, has hyperedges with high probability. Note that as , a fraction of at least hyperedges of are of size 6. Thus, applying Theorem 3 with , and for and using , we get that has no 2-core with high probability; we condition on this event in the following.
Thus, there exists a vertex , corresponding to an IBLT cell, and a set of hyperedges in such that (i) after removing , the degree of becomes 1, (ii) any hyperedge is formed by joining hyperedges and such that is in the 2-core , edge corresponds to a recovered element and . Let be the set of the recovered elements whose hyperedges of are in . Note that has size at most with probability at least by the classical balls-and-bins bound.
Therefore, if Algorithm 1 would feed in the predictor and select the elements of among the predicted elements, removing them from the IBLT, we would break the 2-core by decreasing the degree of to at most 1. We instantiate Algorithm 1 so that, given a state of the IBLT after partial recovery, it enumerates all subsets of at most recovered elements to feed into the predictor and also for each such subset and each of its elements, it enumerates all guessed elements one by one, trying all of these combinations. Note that if the standard recovery during a core-breaking step does not make progress, we get to the same state after adding back the guessed elements , and we will try another subset or other guessed elements for the same subset. Therefore, conditioned , Algorithm 1 eventually recovers an element from the 2-core, by using or another subset of recovered elements. Thus, Algorithm 1 “breaks the 2-core” with probability at least . Repeating this at most times, the algorithm recovers the whole set .
Remark 6.
This proof does not show a polynomial time bound, only that the recovery runs in quasi-polynomial time. A more sophisticated analysis of the peeling process yields polynomial time but due to space constraints, it is omitted from this version of the paper.
Appendix B Predictors for -Mers and Recovery process
We now describe the predictors for -mers in detail together with the associated recovery algorithms. We start by describing the simplest possible predictor.
Next-in-Sequence Predictor.
The next-in-sequence predictor is very simple: When given some element in the sequence, we guess an element before and after it. We provide its instance for -mers in Algorithm 3. Still, as we demonstrate in Section 5, it provides a space-efficiency improvement, significantly surpassing the result of Theorem 4. This idea could easily be generalized beyond -mers by having some polynomial-time computable function returning a set of possible predecessors and successors.
Path Predictor.
We may improve upon the next-in-sequence predictor by using more information than just one -mer. Suppose that we recovered and , then and are very likely to be contained in the encoded set as they lie “in between” two recovered -mers. More generally, we take two overlapping -mers and following their shortest path in the de Bruijn graph that corresponds to their overlap.
We describe the predictor in Algorithm 4, where we also handle reverse complements. Note that a path with many -mers can be described by a -mer; thus, we obtain the -mers as -long substrings of merging two -mers. We remark that swapping -mers and leads to different outcomes.
The predictor gets two -mers as input, and we briefly outline an -time algorithm that uses this predictor to make predictions for a set of recovered -mers. This algorithm lists pairs of -mers in the order of their overlap (from the largest) such that every -mer is in one pair as the left -mer; the listing is done using a similar algorithm as the greedy algorithm for the approximately shortest superstrings for -mers from [34].
Appendix C Results for the Method of Three Tables
|
rel. size of |
|
|
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 31 | 1/14 | 1/21 | 0.1548 | 4.798 | 33.2 | ||||||||
| 33 | 1/21 | 1/13 | 0.1484 | 4.896 | 33.5 | ||||||||
| 35 | 1/16 | 1/21 | 0.1414 | 4.948 | 33.8 | ||||||||
| 41 | 1/16 | 1/28 | 0.1295 | 5.308 | 34.7 | ||||||||
| 43 | 1/19 | 1/23 | 0.1224 | 5.264 | 34.8 | ||||||||
| 45 | 1/17 | 1/31 | 0.1205 | 5.422 | 35.1 | ||||||||
| 47 | 1/20 | 1/24 | 0.1167 | 5.483 | 35.3 | ||||||||
| 49 | 1/22 | 1/24 | 0.1098 | 5.383 | 35.4 | ||||||||
| 51 | 1/20 | 1/29 | 0.1095 | 5.584 | 35.7 | ||||||||
| 55 | 1/20 | 1/29 | 0.1095 | 6.022 | 36.4 | ||||||||
| 57 | 1/22 | 1/29 | 0.1027 | 5.852 | 36.4 | ||||||||
| 59 | 1/24 | 1/27 | 0.0995 | 5.873 | 36.5 | ||||||||
| 61 | 1/24 | 1/29 | 0.0970 | 5.916 | 36.7 | ||||||||
| 63 | 1/24 | 1/32 | 0.0938 | 5.906 | 36.8 | ||||||||
| 65 | 1/20 | 1/57 | 0.0925 | 6.015 | 37.0 | ||||||||
| 67 | 1/27 | 1/29 | 0.0900 | 6.033 | 37.1 | ||||||||
| 73 | 1/27 | 1/35 | 0.0841 | 6.141 | 37.5 | ||||||||
| 75 | 1/27 | 1/39 | 0.0812 | 6.090 | 37.6 | ||||||||
| 77 | 1/24 | 1/47 | 0.0838 | 6.451 | 38.0 | ||||||||
| 79 | 1/27 | 1/43 | 0.0788 | 6.226 | 37.9 | ||||||||
| 81 | 1/27 | 1/43 | 0.0788 | 6.384 | 38.2 | ||||||||
| 83 | 1/29 | 1/39 | 0.0774 | 6.421 | 38.3 | ||||||||
| 85 | 1/32 | 1/35 | 0.0754 | 6.413 | 38.4 | ||||||||
| 87 | 1/27 | 1/52 | 0.0748 | 6.506 | 38.5 | ||||||||
| 89 | 1/32 | 1/35 | 0.0754 | 6.715 | 38.8 | ||||||||
| 91 | 1/35 | 1/35 | 0.0714 | 6.500 | 38.7 | ||||||||
| 93 | 1/35 | 1/35 | 0.0714 | 6.643 | 38.9 | ||||||||
| 95 | 1/35 | 1/35 | 0.0714 | 6.786 | 39.1 | ||||||||
| 97 | 1/29 | 1/52 | 0.0710 | 6.883 | 39.3 | ||||||||
| 99 | 1/29 | 1/57 | 0.0693 | 6.858 | 39.3 | ||||||||
| 101 | 1/35 | 1/39 | 0.0685 | 6.918 | 39.5 | ||||||||
| 103 | 1/29 | 1/63 | 0.0676 | 6.963 | 39.6 | ||||||||
| 105 | 1/35 | 1/43 | 0.0661 | 6.942 | 39.6 | ||||||||
| 107 | 1/35 | 1/47 | 0.0641 | 6.862 | 39.6 | ||||||||
| 109 | 1/35 | 1/52 | 0.0621 | 6.768 | 39.6 | ||||||||
| 111 | 1/29 | 1/84 | 0.0636 | 7.063 | 39.9 | ||||||||
| 113 | 1/35 | 1/52 | 0.0621 | 7.016 | 40.0 | ||||||||
| 115 | 1/39 | 1/47 | 0.0597 | 6.870 | 39.9 | ||||||||
| 117 | 1/35 | 1/57 | 0.0604 | 7.067 | 40.1 | ||||||||
| 119 | 1/32 | 1/84 | 0.0588 | 6.995 | 40.1 | ||||||||
| 121 | 1/35 | 1/63 | 0.0587 | 7.106 | 40.3 | ||||||||
| 123 | 1/35 | 1/69 | 0.0573 | 7.054 | 40.3 | ||||||||
| 125 | 1/32 | 1/92 | 0.0577 | 7.218 | 40.5 | ||||||||
| 127 | 1/35 | 1/63 | 0.0587 | 7.459 | 40.8 | ||||||||
| 129 | 1/35 | 1/84 | 0.0548 | 7.064 | 40.5 | ||||||||
| 131 | 1/35 | 1/76 | 0.0560 | 7.338 | 40.8 | ||||||||
| 133 | 1/39 | 1/63 | 0.0543 | 7.226 | 40.7 | ||||||||
| 135 | 1/43 | 1/52 | 0.0541 | 7.305 | 40.9 | ||||||||
| 137 | 1/43 | 1/57 | 0.0524 | 7.183 | 40.8 | ||||||||
| 139 | 1/43 | 1/57 | 0.0524 | 7.287 | 41.0 | ||||||||
| 141 | 1/39 | 1/76 | 0.0516 | 7.278 | 41.0 | ||||||||
| 143 | 1/39 | 1/69 | 0.0530 | 7.572 | 41.3 | ||||||||
| 145 | 1/39 | 1/84 | 0.0504 | 7.303 | 41.1 | ||||||||
| 147 | 1/39 | 1/84 | 0.0504 | 7.404 | 41.3 | ||||||||
| 151 | 1/52 | 1/47 | 0.0501 | 7.569 | 41.5 | ||||||||
| 153 | 1/39 | 1/84 | 0.0504 | 7.706 | 41.7 | ||||||||
| 155 | 1/39 | 1/92 | 0.0493 | 7.646 | 41.7 | ||||||||
| 157 | 1/47 | 1/63 | 0.0478 | 7.503 | 41.6 | ||||||||
| 159 | 1/47 | 1/63 | 0.0478 | 7.598 | 41.7 | ||||||||
| 161 | 1/43 | 1/76 | 0.0480 | 7.735 | 41.9 | ||||||||
| 163 | 1/47 | 1/63 | 0.0478 | 7.789 | 42.0 | ||||||||
| 165 | 1/47 | 1/63 | 0.0478 | 7.885 | 42.2 | ||||||||
| 167 | 1/43 | 1/92 | 0.0458 | 7.641 | 42.0 | ||||||||
| 169 | 1/52 | 1/57 | 0.0464 | 7.840 | 42.2 | ||||||||
| 171 | 1/43 | 1/101 | 0.0448 | 7.658 | 42.1 | ||||||||
| 173 | 1/57 | 1/52 | 0.0455 | 7.880 | 42.3 | ||||||||
| 175 | 1/47 | 1/76 | 0.0451 | 7.888 | 42.4 | ||||||||
| 177 | 1/52 | 1/69 | 0.0433 | 7.671 | 42.2 | ||||||||
| 179 | 1/52 | 1/69 | 0.0433 | 7.758 | 42.3 | ||||||||
| 181 | 1/47 | 1/84 | 0.0438 | 7.931 | 42.5 | ||||||||
| 183 | 1/52 | 1/69 | 0.0433 | 7.931 | 42.6 | ||||||||
| 185 | 1/47 | 1/92 | 0.0428 | 7.915 | 42.6 | ||||||||
| 187 | 1/47 | 1/92 | 0.0428 | 8.001 | 42.7 | ||||||||
| 189 | 1/52 | 1/76 | 0.0420 | 7.939 | 42.7 | ||||||||
| 193 | 1/47 | 1/101 | 0.0418 | 8.070 | 42.9 | ||||||||
| 195 | 1/47 | 1/101 | 0.0418 | 8.154 | 43.0 | ||||||||
| 197 | 1/63 | 1/57 | 0.0414 | 8.147 | 43.0 | ||||||||
| 199 | 1/47 | 1/101 | 0.0418 | 8.321 | 43.3 | ||||||||
| 201 | 1/52 | 1/92 | 0.0397 | 7.983 | 43.0 | ||||||||
| 203 | 1/57 | 1/76 | 0.0395 | 8.013 | 43.0 | ||||||||
| 205 | 1/57 | 1/76 | 0.0395 | 8.092 | 43.1 | ||||||||
| 207 | 1/47 | 1/101 | 0.0418 | 8.656 | 43.7 | ||||||||
| 209 | 1/57 | 1/76 | 0.0395 | 8.250 | 43.4 | ||||||||
| 211 | 1/47 | 1/135 | 0.0393 | 8.297 | 43.4 | ||||||||
| 213 | 1/47 | 1/148 | 0.0387 | 8.237 | 43.4 | ||||||||
| 215 | 1/47 | 1/148 | 0.0387 | 8.314 | 43.5 | ||||||||
| 217 | 1/57 | 1/92 | 0.0372 | 8.069 | 43.3 | ||||||||
| 219 | 1/47 | 1/148 | 0.0387 | 8.469 | 43.7 | ||||||||
| 221 | 1/63 | 1/76 | 0.0370 | 8.170 | 43.5 | ||||||||
| 223 | 1/52 | 1/111 | 0.0379 | 8.442 | 43.8 | ||||||||
| 225 | 1/52 | 1/111 | 0.0379 | 8.517 | 43.9 | ||||||||
| 227 | 1/57 | 1/84 | 0.0382 | 8.676 | 44.1 | ||||||||
| 229 | 1/52 | 1/122 | 0.0370 | 8.483 | 43.9 | ||||||||
| 231 | 1/57 | 1/101 | 0.0362 | 8.366 | 43.8 | ||||||||
| 233 | 1/57 | 1/111 | 0.0353 | 8.231 | 43.7 | ||||||||
| 235 | 1/57 | 1/101 | 0.0362 | 8.511 | 44.0 | ||||||||
| 237 | 1/63 | 1/76 | 0.0370 | 8.761 | 44.3 | ||||||||
| 239 | 1/52 | 1/148 | 0.0356 | 8.509 | 44.1 | ||||||||
| 241 | 1/52 | 1/148 | 0.0356 | 8.580 | 44.2 | ||||||||
| 243 | 1/69 | 1/76 | 0.0349 | 8.480 | 44.1 | ||||||||
| 245 | 1/57 | 1/122 | 0.0345 | 8.456 | 44.1 | ||||||||
| 247 | 1/57 | 1/122 | 0.0345 | 8.525 | 44.2 | ||||||||
| 249 | 1/57 | 1/122 | 0.0345 | 8.594 | 44.3 | ||||||||
| 253 | 1/57 | 1/135 | 0.0337 | 8.532 | 44.3 | ||||||||
| 257 | 1/63 | 1/101 | 0.0337 | 8.664 | 44.5 | ||||||||
| 261 | 1/57 | 1/148 | 0.0331 | 8.632 | 44.5 | ||||||||
| 265 | 1/69 | 1/92 | 0.0326 | 8.641 | 44.6 | ||||||||
| 269 | 1/63 | 1/101 | 0.0337 | 9.068 | 45.1 | ||||||||
| 273 | 1/57 | 1/163 | 0.0325 | 8.859 | 44.9 | ||||||||
| 277 | 1/69 | 1/111 | 0.0307 | 8.517 | 44.6 | ||||||||
| 281 | 1/76 | 1/76 | 0.0329 | 9.243 | 45.4 | ||||||||
| 285 | 1/76 | 1/84 | 0.0316 | 9.018 | 45.2 | ||||||||
| 289 | 1/57 | 1/197 | 0.0314 | 9.072 | 45.3 | ||||||||
| 293 | 1/63 | 1/163 | 0.0299 | 8.774 | 45.1 | ||||||||
| 297 | 1/69 | 1/122 | 0.0299 | 8.891 | 45.2 | ||||||||
| 303 | 1/69 | 1/148 | 0.0285 | 8.634 | 45.0 | ||||||||
| 307 | 1/63 | 1/179 | 0.0294 | 9.025 | 45.5 | ||||||||
| 311 | 1/63 | 1/197 | 0.0289 | 8.983 | 45.5 | ||||||||
| 315 | 1/69 | 1/135 | 0.0291 | 9.181 | 45.7 | ||||||||
| 319 | 1/69 | 1/148 | 0.0285 | 9.090 | 45.7 | ||||||||
| 323 | 1/69 | 1/148 | 0.0285 | 9.204 | 45.8 | ||||||||
| 327 | 1/76 | 1/122 | 0.0279 | 9.134 | 45.8 | ||||||||
| 331 | 1/84 | 1/101 | 0.0278 | 9.188 | 45.9 | ||||||||
| 335 | 1/69 | 1/179 | 0.0273 | 9.154 | 45.9 | ||||||||
| 339 | 1/84 | 1/101 | 0.0278 | 9.410 | 46.2 | ||||||||
| 343 | 1/76 | 1/148 | 0.0265 | 9.087 | 45.9 | ||||||||
| 347 | 1/76 | 1/148 | 0.0265 | 9.193 | 46.1 |
