arXiv:2609.17487cs.DSSep 2026

Manuscript Offprint

arXiv:2609.17487

Stuffed IBLTs: Optimal Linear Multiset Sketches

Jonas Klausen, Rasmus Pagh, Stefan Walzer

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

A linear sketch is a randomized linear mapping of a vector vv to a lower dimensional sketch vector, designed to preserve relevant information about vv. We consider sketches of vectors v∈Zuv \in \mathbb{Z}^u (for u∈Nu \in \mathbb{N}), designed for exact recovery of vv from its sketch. Concretely, our Stuffed IBLT is a linear sketch configured with a capacity n∈Nn \in \mathbb{N} and a multiplicity limit L∈NL \in \mathbb{N} and will recover vv with high probability whenever ∥v∥0≤n\|v\|_0 \leq n and ∥v∥∞≤L\|v\|_\infty \leq L. The sketch can be maintained efficiently under unrestricted updates to vv, i.e., vv is not subject to any constraints in between decoding requests. This makes the sketch useful for streaming algorithms and for solving the (multi)set reconciliation problem.

For any positive constants cc, ε\varepsilon, and for large enough nn and u≥n1+Ω(1)u \geq n^{1+\Omega(1)}, the space usage of a Stuffed IBLT is within a factor 1+ε1 + \varepsilon from the information-theoretic optimum while allowing updates in constant time, and decoding in time O(n)\mathcal{O}(n) with failure probability n−cn^{-c}. This improves the space/time/error probability trade-off over all prior constructions with similar functionality, including the Invertible Bloom Lookup Table (IBLT). The performance of the Stuffed IBLT is essentially the best we could hope for, up to the dependence on cc and ε\varepsilon. We make the dependence on these parameters explicit, and further show a lower bound demonstrating that the dependence on cc is optimal within the class of peeling-based approaches. Our improvement comes from a careful combination of Walzer's spatial coupling technique (SODA '21), the purity heuristic of Houen, Pagh, and Walzer (SOSA '23), and backyarding (Belazzougui, Kucherov, and Walzer, ESA '24; Fleischhacker, Green Larsen, Obremski, and Simkin, ICALP '24), allowing us to eliminate bottlenecks of past approaches. Unlike most prior work we do not assume access to fully random hash functions.

1 Introduction

Let U\mathcal{U} be a universe of elements, which are called keys. Consider the space ZU\mathbb{Z}^{\mathcal{U}} of all functions from U\mathcal{U} to Z\mathbb{Z}, or equivalently, the set of all signed multisets of keys from U\mathcal{U}, where each x∈Ux \in \mathcal{U} has a possibly negative multiplicity.

A linear signed multiset sketch, just sketch from now on, stores a lossy representation S(v)S(v) of v∈ZUv \in \mathbb{Z}^U that supports updates to vv and a decoding operation. Decoding is meant to recover vv, but may fail. The function SS is a linear function, typically of the form S:ZU→GmS : \mathbb{Z}^U \to G^m where GG is a finite group and mm is much smaller than ∣U∣|\mathcal{U}|. It may be chosen at random and involve hash functions.

For a given capacity nn and a given multiplicity limit LL, this paper shows how to construct a sketch from which vv can be recovered with high probability whenever ∥v∥0≤n\|v\|_0 \leq n (i.e. vv contains at most nn non-zeroes) and ∥v∥∞≤L\|v\|_\infty \leq L. Linearity of SS allows for the sketches S(v1)S(v_1) and S(v2)S(v_2) of v1,v2∈ZUv_1, v_2 \in \mathbb{Z}^U to be added to obtain a sketch S(v1)+S(v2)=S(v1+v2)S(v_1) + S(v_2) = S(v_1 + v_2) of v1+v2v_1 + v_2. To update a sketch S(v)S(v) when f∈Zf \in \mathbb{Z} (signed) copies of x∈Ux \in \mathcal{U} are added to vv we compute S(v+f⋅ex)=S(v)+f⋅S(ex)S(v + f \cdot e_x) = S(v) + f \cdot S(e_x) where exe_x is the unit vector for xx. Note that the update is fast if S(ex)S(e_x) is sparse. The restrictions nn and LL on capacity and multiplicity do not apply in between decoding requests.

For a fixed prime pp we consider computation on a word RAM with word size w≥log⁡2pw \geq \log_2 p that can perform Fp\mathbb{F}_p field operations (arithmetic modulo pp) in O(1)\mathcal{O}(1) time. Our main result is a sketch for multisets with almost optimal time, space usage, and error probability:

Theorem 1. Let c≥1c \geq 1 be arbitrary. Then for any n,L∈Nn, L \in \mathbb{N} and prime pp with max⁡{2L+1,n}≤p\max\{2L + 1, n\} \leq p and n≥n0(c)n \geq n_0(c) large enough there exists a linear signed multiset sketch for keys from U=Fp\mathcal{U} = \mathbb{F}_p with the following properties:

  • Decoding recovers v∈ZUv \in \mathbb{Z}^U with probability 1−O(n−c)1 - \mathcal{O}(n^{-c}) when ∥v∥0≤n\|v\|_0 \leq n and ∥v∥∞≤L\|v\|_\infty \leq L.

• Update time O(c)\mathcal{O}(c) and expected decoding time O(cn)\mathcal{O}(cn).

• Space usage (1+e−Ω(c))n⌈log⁡2∣U∣+log⁡2(2L+1)⌉(1 + e^{-\Omega(c)})n\lceil\log_2|\mathcal{U}| + \log_2(2L + 1)\rceil bits.

If n≤∣U∣1−Ω(1)n \leq |\mathcal{U}|^{1-\Omega(1)} then, for any fixed ε<1\varepsilon < 1, the space usage can be reduced to (1+O(ε))(1 + \mathcal{O}(\varepsilon))OPT bits, where OPT refers to the information-theoretical minimum, increasing the update time to O(c/ε3)\mathcal{O}(c/\varepsilon^3) and the decoding time to O(cn/ε3)\mathcal{O}(cn/\varepsilon^3).

Note that working with keys in Fp\mathbb{F}_p is mainly a convenience; any set of keys that we can efficiently map bijectively to/from a subset of Fp\mathbb{F}_p can be handled. Theorem 1 shows that it is possible to approach information-theoretical barriers for storing multisets in a linear sketch while having very efficient update and decoding operations.

Is Theorem 1 optimal? There are ways in which our construction is clearly best possible: We can get O(1)\mathcal{O}(1) update time and O(n)\mathcal{O}(n) expected decoding time paired with error probability O(n−c)\mathcal{O}(n^{-c}) and space (1+ε)(1+\varepsilon)OPT for any c=O(1)c = \mathcal{O}(1) and any ε=Ω(1)\varepsilon = \Omega(1). Looking more closely, we also have reason to believe that the dependence on cc (when it is not O(1)\mathcal{O}(1)) is optimal. (Note that we make no such claim regarding ε\varepsilon.) Our evidence is that no peeling-based approach can be better, where peeling is the main mechanism powering all known linear multiset sketches with decoding time O~(n)\tilde{\mathcal{O}}(n). We will postpone a precise definition of peeling-based sketches to Section 5. The following is an informal version of what we have proven.

Theorem 2 (Informal Version of Theorem 22). Every peeling-based multiset sketch has a parameter c such that, under some reasonable assumptions

  • expected update times are Ω(c)\Omega(c) and expected decoding times Ω(cn)\Omega(cn)

  • failure probability is n−O(c)n^{-\mathcal{O}(c)}

  • the sketch requires (1+e−O(c))n(1+e^{-\mathcal{O}(c)})n cells, where each cell stores an element of U\mathcal{U} and a multiplicity.

We remark that some reasonable approaches are “mostly” peeling-based but side-step our definition in minor ways. In this sense Theorem 2 is not particularly robust. We still suspect that it points to a barrier that cannot be surpassed without fundamentally new ideas.

Applications. Sketches of sparse signed multisets have several applications, we mention a few. In straggler identification [EG10], a gatekeeper can maintain a sketch of employee entries and exits and recover the small set of employees remaining at closing time; sketches from multiple gates can be combined by linearity. In set reconciliation, two parties holding similar vectors a,b∈ZUa, b \in \mathbb{Z}^{\mathcal{U}} can exchange sketches, compute S(a−b)S(a-b), and recover the differences with communication proportional to the number of discrepancies rather than proportional to ∣U∣|\mathcal{U}| [MTZ03, GM11, EGUV11, YGA24]. Similar ideas enable efficient comparison of large but highly similar genomic datasets represented as multisets of kk-mers [SBK22]. Multiset sketches also arise in cryptography, where they have been used as building blocks for advanced cryptographic primitives and encrypted compression schemes that exploit sparsity while preserving confidentiality [DRS04, FLOS24]. Building on a cryptographic secure aggregation primitive, multiset sketches have been used in distributed and federated analytics with secure aggregation; for example, Google used sketches to collect information about new vocabulary in its GBoard keyboard while preserving privacy1^{1}.