Skip to main content
QUICK REVIEW

[Paper Review] A Model for Learned Bloom Filters, and Optimizing by Sandwiching

Michael Mitzenmacher|arXiv (Cornell University)|Jan 3, 2019
Caching and Content DeliveryComputer Science10 references63 citations
TL;DR

This paper formalizes learned Bloom filters, analyzes guarantees and false positives, introduces the sandwiching optimization, and extends to learned Bloomier filters.

ABSTRACT

Recent work has suggested enhancing Bloom filters by using a pre-filter, based on applying machine learning to determine a function that models the data set the Bloom filter is meant to represent. Here we model such learned Bloom filters,, with the following outcomes: (1) we clarify what guarantees can and cannot be associated with such a structure; (2) we show how to estimate what size the learning function must obtain in order to obtain improved performance; (3) we provide a simple method, sandwiching, for optimizing learned Bloom filters; and (4) we propose a design and analysis approach for a learned Bloomier filter, based on our modeling approach.

Motivation & Objective

  • Clarify guarantees and limitations of learned Bloom filters compared to standard Bloom filters.
  • Develop a formal model to estimate the required size of the learning function for improved performance.
  • Propose and analyze the sandwiching optimization (initial and backup Bloom filters around the learned function).
  • Extend the modeling approach to learned Bloomier filters and related structures.

Proposed method

  • Model the learned Bloom filter as a three-part structure: a learned function f, a threshold tau, and a backup Bloom filter B.
  • Derive a false positive rate model for learned Bloom filters with respect to a query distribution.
  • Show that sandwiching (a pre-filter Bloom filter before f and a backup filter after) can reduce false positives and analyze optimal bit allocations.
  • Provide formulae to compare learned Bloom filters against standard Bloom filters given budget constraints.
  • Discuss robustness and practical considerations, including insertions, deletions, and re-learning when the data set changes.

Experimental results

Research questions

  • RQ1What guarantees can be made about learned Bloom filters versus standard Bloom filters?
  • RQ2How should the learning function size be chosen to achieve improved performance under a given budget?
  • RQ3Does sandwiching improve false positive rates, and how should bits be allocated between the two Bloom filters?
  • RQ4How can the analysis extend to learned Bloomier filters and related data structures?
  • RQ5Under what conditions are learned Bloom filters robust to distribution changes in the query stream?

Key findings

  • A formal model shows learned Bloom filters have query-distribution-dependent false positives and can outperform standard Bloom filters under suitable data distributions.
  • An explicit false positive rate function Fp+(1−Fp)α^{b/Fn} is derived for a learned Bloom filter with a given backup filter size.
  • Sandwiching—with an initial Bloom filter before the learned function and a backup Bloom filter after—can reduce false positives and, in some regimes, keeps the optimal backup size constant independent of overall budget.
  • Optimal budgets for the sandwich configuration allocate a fixed amount of bits to the backup filter, with remaining bits to the initial filter, yielding improved performance.
  • The framework generalizes to learned Bloomier filters, allowing similar analysis and optimization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.