[Paper Review] Ribbon filter: practically smaller than Bloom and Xor
The Ribbon filter is a new static filter data structure that achieves significantly lower space overhead than Bloom and Xor filters—down to under 1%—by solving a band-like linear system over Boolean variables using a novel on-the-fly incremental Boolean banding algorithm. It offers continuous configurability between space efficiency and query speed, outperforming Xor in space efficiency with competitive or better performance across a broad range of false positive rates.
Filter data structures over-approximate a set of hashable keys, i.e. set membership queries may incorrectly come out positive. A filter with false positive rate $f \in (0,1]$ is known to require $\ge \log_2(1/f)$ bits per key. At least for larger $f \ge 2^{-4}$, existing practical filters require a space overhead of at least 20% with respect to this information-theoretic bound. We introduce the Ribbon filter: a new filter for static sets with a broad range of configurable space overheads and false positive rates with competitive speed over that range, especially for larger $f \ge 2^{-7}$. In many cases, Ribbon is faster than existing filters for the same space overhead, or can achieve space overhead below 10% with some additional CPU time. An experimental Ribbon design with load balancing can even achieve space overheads below 1%. A Ribbon filter resembles an Xor filter modified to maximize locality and is constructed by solving a band-like linear system over Boolean variables. In previous work, Dietzfelbinger and Walzer describe this linear system and an efficient Gaussian solver. We present and analyze a faster, more adaptable solving process we call "Rapid Incremental Boolean Banding ON the fly," which resembles hash table construction. We also present and analyze an attractive Ribbon variant based on making the linear system homogeneous, and describe several more practical enhancements.
Motivation & Objective
- To design a filter data structure that achieves lower space overhead than existing practical filters like Bloom and Xor, especially for large false positive rates.
- To enable continuous configurability between space efficiency and query performance, avoiding the fixed alignment constraints of Xor and Cuckoo filters.
- To develop a construction algorithm that is both efficient and robust, supporting dynamic space adjustments and load balancing.
- To demonstrate that Gaussian elimination-based construction can outperform peeling-based methods in both speed and space efficiency.
Proposed method
- The Ribbon filter constructs a band-like linear system over Boolean variables using a set of hash functions applied to keys.
- It employs a novel on-the-fly, incremental Boolean banding algorithm—'Rapid Incremental Boolean Banding On the Fly'—to solve the system efficiently during construction.
- The Homogeneous Ribbon variant uses a fully homogeneous linear system, ensuring construction success and simplifying analysis.
- The Balanced Ribbon variant introduces load balancing via sharding and metadata management to further reduce space overhead.
- The filter uses a width parameter $ w $ and a column count $ r $, where $ r $ determines the number of hash functions and affects false positive rate.
- Querying involves retrieving $ w $-bit words from memory using hash-derived indices and performing bitwise operations to determine membership.
Experimental results
Research questions
- RQ1Can a filter construction based on Gaussian elimination achieve both faster construction and lower space overhead than existing peeling-based methods like Xor filters?
- RQ2How does the space efficiency of Ribbon compare to Bloom and Xor filters across a range of false positive rates and space overheads?
- RQ3To what extent can the space overhead of Ribbon be reduced below 1% while maintaining competitive query performance?
- RQ4How does the choice of $ w $ and $ r $ affect the trade-off between space efficiency and query time in Ribbon filters?
- RQ5Can incremental, on-the-fly construction of the linear system enable better performance and configurability than batched or fixed-size approaches?
Key findings
- Ribbon achieves space overheads below 1% in experimental configurations, significantly outperforming Bloom and Xor filters, which typically have overheads of 20% or more.
- For false positive rates $ f \geq 2^{-7} $, Ribbon maintains competitive or faster query times than Xor, especially when $ w = 32 $, despite higher construction times.
- The Homogeneous Ribbon variant ensures construction success with no retries and provides a clean theoretical foundation, though it may have higher variance in small-scale deployments.
- The Balanced Ribbon variant reduces space overhead through dynamic load balancing, though at the cost of increased construction time and complexity.
- The on-the-fly incremental Boolean banding algorithm enables faster and more adaptable construction than traditional Gaussian elimination, especially for large-scale static sets.
- Ribbon offers continuous configurability across integer values of $ r $, avoiding the alignment penalties of Xor and Cuckoo filters, which are constrained to friendly word sizes like 4, 8, 12, or 16 bits.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.