Papers
Topics
Authors
Recent
Search
2000 character limit reached

SizeFilter: Size-Adaptive Data Structures

Updated 4 July 2026
  • SizeFilter is a size-adaptive approximate membership data structure that adjusts its space usage based on the current set size, ensuring no false negatives.
  • It employs stage-dependent prefix lengths and limited-independence hashing to achieve optimal space with an unavoidable n log log n overhead while maintaining a false positive rate at most ε.
  • The structure supports dynamic growth via deamortized capacity doubling and extends to an exact dictionary variant using (1+o(1)) n log(u/n) bits for efficient key-value storage.

Searching arXiv for recent and canonical papers on “SizeFilter” and closely related size-adaptive filter structures. SizeFilter is a size-adaptive approximate membership data structure for a dynamic set S[u]S \subseteq [u], where the space usage depends on the current set size n=Sn = |S| rather than on a fixed upper bound NN. In the formulation developed by Liu, Yin, and Yu, a SizeFilter supports insert(x) and lookup(x) with no false negatives and false positive rate at most ϵ\epsilon, while matching the information-theoretically optimal leading constant in the unavoidable nloglognn \log\log n overhead incurred by size adaptivity. The same framework also yields an exact dictionary whose space tracks the current size as (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n) bits, with constant worst-case update and query time with high probability (Liu et al., 2020).

1. Model and semantic scope

The underlying problem is the dynamic membership problem on the universe [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}. A dictionary answers membership exactly. A filter is an approximate membership structure: if xSx \in S, lookup(x) must always return YES; if xSx \notin S, it may return YES with probability at most ϵ\epsilon (Liu et al., 2020).

The defining feature of SizeFilter is size adaptivity. Classical dictionaries and filters are usually dimensioned against an upper bound n=Sn = |S|0, so their space is tied to capacity rather than occupancy. A size-adaptive structure instead makes space depend on the current n=Sn = |S|1. In this model, worst-case n=Sn = |S|2 time “with high probability” means that, for any sequence of operations of polynomial length in n=Sn = |S|3, the probability that any operation exceeds the stated time is at most n=Sn = |S|4 for some constant n=Sn = |S|5. The paper strengthens this further: there is a global failure probability n=Sn = |S|6, for some constant n=Sn = |S|7, over the precomputed random bits; conditioned on no failure, every operation runs in worst-case n=Sn = |S|8 time and the query error guarantee holds (Liu et al., 2020).

This formulation separates two notions that are often conflated. One is dynamic growth, where a filter can expand without immediate failure. The other is occupancy-sensitive succinctness, where the bit complexity continuously tracks the current n=Sn = |S|9. SizeFilter addresses the second problem directly.

2. Lower bounds and the cost of adaptivity

The central lower bound, originating in prior work summarized by Liu, Yin, and Yu, states that any dynamic filter whose space depends on the current size NN0 must use at least

NN1

This establishes an unavoidable additive NN2 term when the structure is required to track the current set size (Liu et al., 2020).

That lower bound contrasts with the classical fixed-capacity bound

NN3

which is optimal when a capacity bound NN4 is known in advance. The gap is not an artifact of construction quality; it is the price of size adaptivity itself. A common misconception is that one should be able to match the fixed-capacity bound merely by growing a conventional filter as needed. The lower bound shows that this is impossible in the size-adaptive regime (Liu et al., 2020).

The paper resolves two specific open issues left by earlier work: the leading constant in the NN5 term, and the possibility of worst-case NN6 insertion time with high probability while retaining succinct space tied to the current NN7. For all NN8 and NN9, the filter uses

ϵ\epsilon0

thereby matching the lower bound up to the ϵ\epsilon1 term and attaining the optimal leading constant in both terms (Liu et al., 2020).

3. Structural design of the filter

At the highest level, the construction applies a global ϵ\epsilon2-wise independent hash function

ϵ\epsilon3

with ϵ\epsilon4, and organizes updates into stages indexed by ϵ\epsilon5, where stage ϵ\epsilon6 is active when

ϵ\epsilon7

When a key ϵ\epsilon8 is inserted during stage ϵ\epsilon9, the structure stores an nloglognn \log\log n0-bit prefix of nloglognn \log\log n1. Queries compute nloglognn \log\log n2 and return YES iff some stored prefix is a prefix of nloglognn \log\log n3, which guarantees zero false negatives (Liu et al., 2020).

The stage-dependent prefix length is

nloglognn \log\log n4

The extra nloglognn \log\log n5 term is the mechanism by which the global false positive rate is balanced across stages. For nloglognn \log\log n6, the analysis uses the bound

nloglognn \log\log n7

so the overall false positive rate is at most nloglognn \log\log n8 (Liu et al., 2020).

The construction splits prefix handling into two regimes. Very short prefixes are represented by truth tables: for prefixes of length nloglognn \log\log n9, a bitmap over all (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)0-bit strings indicates whether any stored prefix matches them. This costs (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)1 bits in stage (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)2 and yields (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)3 query time. Longer prefixes are handled by a novel exact membership structure for long strings, described as “subtables + adaptive fingerprints + data blocks” (Liu et al., 2020).

Within a stage of capacity (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)4, the longer-string structure randomly partitions the universe into (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)5 buckets using limited independence. Each bucket contains (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)6 items with high probability. Inside each bucket, the structure maintains adaptive fingerprints, navigators, and data blocks. Adaptive fingerprints store, for each item, a shortest distinguishing prefix of length at least (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)7; navigators form a compact pointer array indexed by fingerprint rank; data blocks group (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)8 items and encode them in almost-static succinct form, while a dynamic block absorbs fresh insertions before background reorganization (Liu et al., 2020).

Growth is handled by capacity doubling with deamortization. As (1+o(1))nlog(u/n)(1+o(1))\,n\log(u/n)9 approaches the current capacity [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}0, a new structure of capacity [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}1 is built in the background. The transfer from old to new proceeds in [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}2 work per insertion, the structure remains queryable throughout, and there is no need to keep multiple full copies. The model includes extendable arrays supporting [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}3-time grow and shrink, which makes this continuous rebuilding compatible with space tracking by the current [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}4 (Liu et al., 2020).

4. Space and time guarantees

The principal asymptotic guarantees are compactly summarized below.

Structure Space Time
Filter [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}5 bits worst-case [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}6 insertion and lookup w.h.p.
Dictionary [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}7 bits worst-case [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}8 insertion and lookup w.h.p.

These guarantees hold for [u]={0,1,,u1}[u] = \{0,1,\dots,u-1\}9, and the dictionary can additionally store xSx \in S0-bit values with an extra xSx \in S1 bits per key-value pair (Liu et al., 2020).

The filter’s space bound can be read elementwise: summing the stage costs yields an effective per-key budget of approximately

xSx \in S2

plus lower-order terms xSx \in S3. The exact-membership component for long strings contributes, per key,

xSx \in S4

bits inside a stage of capacity xSx \in S5, which is the local ingredient behind the current-size dictionary bound (Liu et al., 2020).

The failure analysis depends on xSx \in S6-wise independence with xSx \in S7. That level of independence suffices for Chernoff-style concentration in the load-balancing arguments for subtables, in the adaptive fingerprint uniqueness argument, and in the compact encodings of headers and identities. These local concentration events combine into a global failure probability at most xSx \in S8 for some constant xSx \in S9 (Liu et al., 2020).

A second misconception concerns the meaning of “constant time.” The guarantee is not merely expected amortized. Conditioned on the preprocessing randomness not failing, every insertion and lookup runs in worst-case xSx \notin S0 time.

5. Exact dictionary variant

The same paper presents a size-adaptive exact dictionary using

xSx \notin S1

which matches the optimal space dependence on the current size xSx \notin S2 and supports worst-case xSx \notin S3 insertions and lookups with high probability (Liu et al., 2020).

The dictionary construction uses the same subtable and data-block machinery as the filter, but the key technical obstacle is implementing the required randomization without assuming a fully random permutation of xSx \notin S4 with small description and constant evaluation time. The paper bypasses that obstacle with a Feistel-style permutation combined with three xSx \notin S5-wise independent hash functions:

  • xSx \notin S6,
  • xSx \notin S7,
  • xSx \notin S8.

The Feistel permutation is

xSx \notin S9

where ϵ\epsilon0 is split into left and right parts with ϵ\epsilon1 and ϵ\epsilon2. This ensures that subtable loads and adaptive fingerprints behave like the random case needed for worst-case ϵ\epsilon3 performance with high probability, without requiring a fully random succinct permutation (Liu et al., 2020).

This dictionary result is significant because it shows that the size-adaptive phenomenon is not limited to approximate membership. Exact dictionaries can also be made occupancy-sensitive and succinct, provided one is willing to adopt the same deamortized staged architecture and limited-independence analysis.

6. Constraints, comparisons, and open questions

The results are established in the regime ϵ\epsilon4. The paper gives two reasons for this restriction: truth-table overhead for short prefixes remains ϵ\epsilon5 there, and the subtable sizes and bucket loads concentrate tightly enough under limited independence to sustain the deamortized worst-case guarantees. For smaller ϵ\epsilon6, the text suggests simpler baseline filters, such as a single small Bloom-like filter sized to a conservative ϵ\epsilon7 or a two-level scheme, albeit with either higher space per element or weaker guarantees (Liu et al., 2020).

This restriction matters for interpretation. SizeFilter is not a uniformly optimal construction across all parameter regimes; it is a sharp optimality result for the large-ϵ\epsilon8 regime. The open problems listed in the paper therefore remain structurally important: removing the condition ϵ\epsilon9, reducing the lower-order n=Sn = |S|00 redundancy in the dictionary, and weakening the randomness assumptions while preserving worst-case n=Sn = |S|01 time with high probability (Liu et al., 2020).

In the broader literature, related dynamic filters pursue adjacent objectives rather than identical ones. “Taffy filters” grow without inserts failing and without meaningfully increasing the false positive probability, and achieve n=Sn = |S|02 bits per element, with a Taffy Cuckoo Filter providing n=Sn = |S|03 lookup and a layered Taffy Block Filter providing n=Sn = |S|04 lookup (Apple, 2021). “Smaller and More Flexible Cuckoo Filters” reduces space for online-insertion filters to approximately n=Sn = |S|05 bits for target false positive rate n=Sn = |S|06 using overlapping windows (Schmitz et al., 9 May 2025). These results are closely related in purpose, but they address growability and fixed-target approximate membership rather than the specific information-theoretic problem of making space follow the current n=Sn = |S|07 with the optimal leading constant. This suggests that SizeFilter occupies a distinct point in the design space: it is not merely dynamic, but dynamically succinct in the strong current-size sense.

The lasting contribution of SizeFilter is therefore twofold. It identifies the exact asymptotic surcharge imposed by size adaptivity—an unavoidable n=Sn = |S|08 term per key—and it gives a concrete dynamic construction meeting that barrier while preserving worst-case constant-time operations with high probability (Liu et al., 2020).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (3)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to SizeFilter.