Bloom filter
A compact approximate-membership structure that can reject absent keys but may report a false positive, without false negatives for correctly inserted keys in an intact standard filter.
A positive answer requires checking the underlying data. The false-positive denominator is queries for keys absent from the represented set, not all queries. This is not an integrity checksum. The represented set may be whole keys or extracted prefixes; prefix membership and range emptiness are not interchangeable. The pinned RocksDB filter-policy API requires compatibility with comparator equality. [4]
For independent uniform hashes with replacement, a realized filter with x set bits out of m and k query addresses has conditional false-positive probability (x/m)^k. Averaging this power across random constructions differs from raising mean occupancy to k. [5] Blocked layouts also depend on the distribution of occupied bits and absent queries across blocks. [3]
Double hashing derives query positions from two base hashes. Kirsch and Mitzenmacher prove asymptotic agreement with standard Bloom filtering for independent fully random base hashes and fixed bits-per-key and probe count as the set grows. This is not finite-size equality or independence of the derived positions; the occupancy-only calculation above cannot simply be reused for that scheme. [6]
For fixed bits and hash functions, a repeated absent key repeats its answer: after a false positive, it is positive with probability 1 until the filter changes. Adaptive guarantees bound queries after earlier answers; a low initial FPR is insufficient. [7]
Support-optimal bounds for a predetermined sequence do not imply adversarial adaptivity. [8] Telescoping-filter block resets can lose earlier corrections; its local-space budget excludes remote state, and the described design does not support deletion. [9]
Relations
- related
- HyperLogLog, Log-structured merge-tree, Sorted string table, Ribbon filter, Partitioned filter, Prefix Bloom filter, Prefix extractor, Succinct range filter, Invertible Bloom lookup table, Cuckoo filter, XOR filter, Binary fuse filter, Stable Bloom filter, Counting Bloom filter, Blocked Bloom filter, LSM tombstone, Fragmented LSM tree, Monkey, Scalable Bloom filter, Learned Bloom filter, Quotient filter, LSM-trie, Daisy Bloom filter, SkimpyStash, Block Range Index (BRIN), BufferHash
Citations
- Hesela: Bloom filters and the cost of an absent LSM lookup
- RocksDB v9.7.3. FilterPolicy: custom comparator compatibility warning.
- Bose et al. On the false-positive rate of Bloom filters. Author-hosted manuscript, introduction and section 2.
- Kirsch and Mitzenmacher. Less Hashing, Same Performance: Building a Better Bloom Filter. RSA 33, 2008, sections 5-6 and 8. DOI: 10.1002/rsa.20208.
- Bender et al. Bloom Filters, Adaptivity, and the Dictionary Problem. arXiv:1711.01616v3 (2018), sections 1-4.
- Kopelowitz, McCauley and Porat. Support Optimality and Adaptive Cuckoo Filters. arXiv:2105.10622v1 (2021), sections 1, 3 and 5.
- Lee, McCauley, Singh and Stein. Telescoping Filter: A Practical Adaptive Filter. arXiv:2107.02866v1 (2021), sections 2.2, 4 and appendix B.1.