Bloom Filters A Tutorial Analysis and Survey
Bloom Filters A Tutorial Analysis and Survey
net/publication/238681522
CITATIONS READS
19 1,226
2 authors:
All content following this page was uploaded by James Blustein on 13 December 2014.
James Blustein
Amal El-Maazawi
Abstract
Bloom filters use superimposed hash transforms to provide a prob-
abilistic membership test. The only types of errors are false positives
(non-members being reported as members). Non-members are typically
detected quickly (requiring only two probes in the optimal case).
This article surveys modern applications of this technique (e.g., in
spell checking and Web caching software) and provides a detailed analysis
of their performance, in theory and practice. The article concludes with
practical advice about implementing this useful and intriguing technique.
∗ Corresponding author
CONTENTS CONTENTS
Contents
1 Introduction 1
1.1 Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 What Is An Error . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Novel Uses 3
2.1 Rule-based systems . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Spell Checkers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Estimating Join Sizes . . . . . . . . . . . . . . . . . . . . . . . . 5
2.4 Differential Files . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.5 Network Applications . . . . . . . . . . . . . . . . . . . . . . . . 6
2.6 Attenuated Bloom filters . . . . . . . . . . . . . . . . . . . . . . . 8
2.7 Text Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Implementation 11
3.1 Hashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Basic Implementation . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.1 Operations on Cells . . . . . . . . . . . . . . . . . . . . . 12
3.2.2 Operations on Bloom filters . . . . . . . . . . . . . . . . . 13
3.3 Compressed Bloom filters . . . . . . . . . . . . . . . . . . . . . . 13
4 Analysis 14
4.1 Time Complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 Relationship Between Parameters . . . . . . . . . . . . . . . . . . 14
4.2.1 The General Case . . . . . . . . . . . . . . . . . . . . . . 15
The Governing Equation . . . . . . . . . . . . . . . . . . . 15
Error Rate . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Rejection Time . . . . . . . . . . . . . . . . . . . . . . . . 16
Growing Sets . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.2 The Optimal Case . . . . . . . . . . . . . . . . . . . . . . 17
Error Rate . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Rejection Time . . . . . . . . . . . . . . . . . . . . . . . . 18
Governing Equation . . . . . . . . . . . . . . . . . . . . . 19
4.3 Performance issues . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.4 Variation on Standard Bloom Filters . . . . . . . . . . . . . . . . 20
5 Summary 21
5.1 Optimal Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.2 Trade-offs in Filter Performance . . . . . . . . . . . . . . . . . . . 21
References 23
A Miscellaneous Methods 27
ii
1 INTRODUCTION
1 Introduction
The Bloom filter a way of using hash transforms to determine set member-
ship [1]. Bloom filters find application wherever fast set membership tests on
large data sets are required. Such applications include spell checking, differ-
a summary in Section 5.
1.1 Definition
Bloom filters use hash transforms to compute a vector (the filter) that is rep-
resentative of the data set. Membership is tested by comparing the results of
hashing on the potential members to the vector. In its simplest form the vector
is composed of N elements, each a bit. An element is set if and only if some
hash transform hashes to that location for some key. Figure 2 shows such a
1 hURL:http://www.iee.org/Publish/INSPEC/i
2 hURL:http://citeseer.nj.nec.com/i
3 hURL:http://portal.acm.org/i
1
1 INTRODUCTION 1.1 Definition
Table
K h h(K)
Table[K ]
h (K) = 2
1
m hash h2 (K) = 5
transforms h3 (K) = 7
h4 (K) = 4
bit #
0 1 2 3 4 5 6 7
0 0 1 0 1 1 0 1
| {z }
The filter of N bits
Bloom filters can be combined with other methods, such as signatures [1, 2].
Figure 3 depicts a case in which the filter contains references to information
related to records rather than only the records. In that case the hash transforms
will hash to N/(b + 1) cells, where b is the size of the signature and the extra
bit is used to flag cells containing signatures [1]. The analysis of such a filter is
equivalent to that for the simple case, which this paper discusses.
2
2 NOVEL USES 1.2 What Is An Error
Legend
Signature
Cell in table
or Other Data
Nil Pointer
Non-nil pointer
Errors can occur when two or more transforms map to the same element. The
membership test for a key K works by checking the elements that would have
been updated if the key had been inserted into the vector. If all the appropriate
flag bits have been set by hashes then k will be reported as a member of the
set. If the elements have been updated by hashes on other keys — and not
K — then the membership test will incorrectly report K as a member. For
example, if the set Vegetables contains potato and cabbage but not tomato, then
the Bloom filter illustrated in Figure 4 would incorrectly identify tomato as a
Vegetable. Such an error could occur because all the bits that would be set if
tomato were hashed on would already be set in the filter.
2 Novel Uses
This section reviews some of the most interesting applications of Bloom filters.
It is perhaps surprising that what is essentially a set-membership test is of use
in so many important applications.
3
2 NOVEL USES 2.1 Rule-based systems
Key Meaning
P updated by potato
C updated by cabbage
T would be set by tomato
— unset
hyphenated by the application of simple rules from the minority that required
extensive analysis. He proposed using his filter method to separate the 10% of
difficult words from the rest [1].
Bloom filters have been successfully applied in spell checking programs such as
cspell [3–5]. They are employed to determine if candidate words are members
of the set of words in a dictionary. In the case of cspell, suggested corrections
are generated by making all single substitutions in rejected words and then
checking if the results are members of the set [3]. Bloom filters perform very
well in such cases [3]. The filter size was chosen to be large enough to allow the
inclusion of additional words added by the user.
4
2 NOVEL USES 2.3 Estimating Join Sizes
Mullin [6, 7] suggested using Bloom filters to estimate the size of joins in
databases. This is of particular advantage in the case of distributed databases
where communications costs are to be kept to a minimum. He presented a
method by which filters that are too large to fit in memory can be used [7]. The
method is essentially to use a representative sample of a filter for testing and
ignore all hashes outside the range of the sample. Since hash transforms are
pseudo-random, any significantly large portion of a filter can act as a sample.
A major area of interest in the application of Bloom filters has been their use
in differential file access [4, 5, 8]. A differential file is essentially a separate file
which contains records that are modified in the main file [4]. Differential files
are used as caches in large databases: when a change is made to a record in the
main database the differential file is updated; when all the changes have been
made to the database then the differential file is used to update the database.
When the differential file is much smaller than the database, changes to it can
be made without the overhead needed to search the main file. Of course, it
would be best to keep the entire set of records in memory at once, but this
is not feasible for large data sets and so the probabilistic approach offered by
Bloom filters is used. Bloom filters in core memory are used to predict if a
record will be found in the differential file.
5
2 NOVEL USES 2.5 Network Applications
suitable for this application. Another important consideration is how often the
differential file should reset. The differential file must not be allowed to grow
too large to fit in memory or much of the advantage is lost [5].
The benefits of using this technique includes improvements in performance,
greater database reliability and reduced backup and recovery costs. However the
technique is effective only within certain parameters. Implementors must decide
on trade-offs between on the one hand the size of the filter and the number of
hash transforms to use, and on the other hand the filter error rate. Those values
will depend in turn on the given transaction volume, the number of keys to be
accessed and updated, and the characteristics of the key set. We provide an
analysis of those trade-offs in Section 4.
Bloom filters have recently found many applications in networks [9]. Networks
rely on some form of routing to transfer messages between hosts. Routers are
special-purpose network devices that must operate with high efficiency in real-
time. Data can be delayed or lost when routers are overwhelmed with traffic.
An interesting solution to the problem of enforcing fairness in routing is by Feng
et al.’s Stochastic Fair Blue (SFB) algorithm [10]. When routers implementing
SFB get near their capacity they begin to drop packets from the various hosts
that are connecting to them. The routers use Bloom filters and labels to prob-
abilistically determine which hosts continue to send more than their share of
traffic even when some of their data are dropped by the router. Hosts which
continue to operate in this non-cooperative fashion have more of their packets
dropped. But traffic from hosts which reduce their demands on the router are
not dropped. Bloom filters are used as a space- and time-efficient method to
keep track of which hosts are sending too much traffic.
6
2 NOVEL USES 2.5 Network Applications
7
2 NOVEL USES 2.6 Attenuated Bloom filters
URLs) but instead to broadcast much smaller Bloom filters that represent the
contents of the cache. If a proxy wants to determine if another proxy has a page
in its cache, it checks the appropriate Bloom filter.
Bloom filters are also used in cache digests. A cache digest is essentially a
lossy compression of all cache keys with a lookup capability. Digests are made
available via HTTP (the main network protocol of the WWW), and a cache
The caches we have seen so far do not replicate data. Where cached data
might be replicated, attenuated Bloom filters (ABFs) may be useful. Rhea and
Kubiatowicz developed such ‘a lossy distributed index’ technique using Bloom
filters for networks with nodes that communicate network topology with each
other [13, p. 1248].
ABFs are composed of arrays of Bloom filters. Each node for the network
stores an ABF for each outgoing link. An ABF is an array of n Bloom filters
which together represent the contents of the data cached at neighbouring nodes
that can be reached within n network links.
An example will make the application clearer. Consider the outgoing link
8
2 NOVEL USES 2.7 Text Analysis
from node A to node B in the network depicted in Figure 5. The nth Bloom
filter in the ABF from A to B is the union of all the Bloom filters in all nodes
on a path of length n beginning with B.
A basic Bloom filter could represent the probability that a specific datum
is available from a node on a path beginning with B. Attenuated Bloom filters
(ABFs) provide that information and also information about how many links
away that datum is presumed to be. ABFs can be used to speed up searches in
peer-to-peer networks since the searches resemble depth first traversals of the
network as guided by the probabilistic information in the ABFs. Such searches
are biased in favour of nodes that are most likely to contain the data and are
closest to the current root node. The search algorithms apply penalties to Bloom
filters that are along longer paths (because there is a greater cost associated with
traversing more network links, and the longer the path the greater the possibility
of searching many nodes). The exact penalties applied and details of the search
algorithms are experimental. The methods are being used in conjunction with
OceanStore [14], an extremely large global persistent data store.
Bernstein [15, 16] produced an interactive program that uses Bloom filters to
find related passages in a monograph. It works by constructing a Bloom filter of
all the words in each passage of a monograph and then computing the normalized
dot product of all pairs of them. The result of every dot product is a similarity
measure — the higher the value the more likely the passages are to have related
content. This can be a valuable tool for scholars, if as Bernstein claims it
often finds connections that would otherwise go unnoticed [15]. Mylonas and
Bernstein [17] have adapted it to work with Latin as well as English texts. They
claim that this tool
9
2 NOVEL USES 2.7 Text Analysis
h0; 0; 0; 0; 1; 0; 1; 1i
A
h0; 1; 0; 1; 0; 1; 0; 0i
B - D K
6
h1; 0; 0; 0; 0; 1; 0; 1i
?
C I
h1; 0; 1; 0; 1; 0; 0; 0i
R
E
h1; 0; 1; 0; 1; 0; 0; 0i
bit # nodes
0 1 2 3 4 5 6 7
0 1 0 1 0 1 0 0 B
1 0 1 0 1 0 0 1 C, D
1 0 1 0 1 0 0 0 E
Bloom filters are used in many areas including updating databases, estimat-
ing the size of database joins, aiding scholarly research, and in spell checking
programs.
10
3 IMPLEMENTATION
3 Implementation
Having now shown some of what Bloom filters can do and where they are used
we will examine how they operate.
3.1 Hashing
must be searched to find the correct entry [18, pp. 507 – 508]. Bloom filters are a
fast method in which the hash transforms always have constant time complexity
— there is no attempt at collision resolution. Knuth [18] described Bloom filters
as a type of superimposed coding because all of the hash transforms map to the
same table.
Bloom filters have three operations: A membership test (Procedure 1), Initial-
ization (Procedure 5), and Update (Procedure 6). Procedures 2 – 6 are listed in
Appendix A. Initialize clears all the elements in the vector. Insert computes
the values of the m hash transforms for a key and updates the appropriate el-
ements. In the simplest case the update sets the element’s flag bit. It requires
time proportional to the number of hash transforms. In more complicated cases,
additional information would also be placed in the element. The time complex-
ities are summarized in Table 1.
In the example shown in Figure 2, hash transform h1 updates the value of
11
3 IMPLEMENTATION 3.2 Basic Implementation
element 2 for key K and transform h2 updates the value of element 5 using the
same key. IsMember computes the same hash values as Insert but instead
of updating the elements it checks if they have been set. By definition, only
members have their keys inserted into the vector. If any of the hash transforms,
hi (K), compute a vector element that has not been set, then the key K could
not have been inserted into the vector and therefore cannot be a member of the
set. Note that the worst time complexity for IsMember occurs for members
(and non-members that are erroneously reported as members). As we show in
the sections named ‘Rejection Time’ below, the complexity can be considerably
less for non-members.
For the purposes of the analysis, we are presenting only the essentials of Bloom
filters — the algorithms are for single bit elements. The analysis of filters with
more complicated cells is essentially the same as for the simple case [1].
Blustein has shown how to efficiently implement these operations using
C [20]. IsMember is presented immediately below. The other algorithms are
presented in Appendix A. Their essential characteristics are presented in Ta-
ble 1.
12
3 IMPLEMENTATION 3.3 Compressed Bloom filters
Procedure 1 (IsMember)
IsMember(T able,Key)→ Boolean
1. i ← 0
2. repeat
3. i←i+1
. hi is the ith hash transform, where 1 < i ≤ m
4. until ((i = m) ∨ ¬(IsSet(T able[hi(Key)])))
5. if i = m then
6. return(IsSet(T able[hi(Key)]))
7. else
8. return(False)
end.
Interestingly he found that ‘the number of hash functions that minimizes the
false positive [error] rate without compression in fact maximizes the false pos-
itive [error] rate with compression.’ [21, p. 146] The method has not yet been
implemented or tested.
13
4 ANALYSIS
4 Analysis
We now analyse the performance of Bloom filters. First we show the worst-
case times for the algorithms, then we determine the various trade-offs that are
necessary in any practical implementation.
14
4 ANALYSIS 4.2 Relationship Between Parameters
f The fraction of elements (or cells) that are set in the filter
Here we derive equations that describe the relationship between these factors
for the general and optimal cases. The general case is applicable to growing and
static sets but the optimal case occurs when the error rate is minimal. As we
show in Section 4.2.2 optimal performance is predicted for only static sets in
which half of the elements have been updated.
The governing equation provides a way to predict the amount of space a
particular filter will require. The expected fraction of false positive results
given the parameter values is the error rate. The rejection time is the expected
number of hashes that will be required to determine that a key is not a member
of the set. These analytic results are summarized in Table 2 (on page 19).
being updated by any of the m transforms, after all k keys have been entered
is Punset .
mk
Punset = (1 − 1/N ) (1)
15
4 ANALYSIS 4.2 Relationship Between Parameters
Equation 1 is based on the assumption that the hashes are equally likely to set
any bits.
The probability that an element is set is Pset .
Pset = 1 − Punset
Pallset = (Pset )m
m
mk
= 1 − (1 − 1/N ) (2)
Both of these computations are based on the standard assumption that the
hash transforms are independent.
Rejection Time If f is the fraction of the bits that are set in a Bloom fil-
16
4 ANALYSIS 4.2 Relationship Between Parameters
m
X 1
h × f h−1 × (1 − f ) ≤ (3)
1−f
h=1
Note that although non-members can be rejected with fewer than m hashes,
member keys will require all of the hashes to verify their status.
with an initial dictionary of 30 000 words and it is predicted that another 5000
will be added as the applications runs then the value of k should be 35 000.
where
d d mk ln(1−1/N )
(1 − 1/N )mk = e
dm dm
= k ln(1 − 1/N ) × emk ln(1−1/N )
17
4 ANALYSIS 4.2 Relationship Between Parameters
so that
mk
d Pallset ln(1 − (1 − 1/N ) ) −
= mk
× (1 − (1 − 1/N )mk )m
dm mk ln(1−1/N )×(1−1/N )
1−(1−1/N )mk
= 0
Error Rate Combining this with Equation 2 we find that the error rate, for
optimal Bloom filters, is Popt .
m
1
Popt = (4)
2
Rejection Time In the optimal case a good hash transform will exclude half
the elements of the vector for any key. One hash will eliminate half the elements;
all subsequent hashes will eliminate half the remaining elements. If one hash
1 1
eliminates half of the elements then two hashes will eliminate 2 + 4 elements,
etc. Since the pattern is a geometric series which converges to 2 as the number
of hashes grows, on average only 2 hashes are needed to reject candidates [3].
This prediction is consistent with the general case shown in Equation 3.
18
4 ANALYSIS 4.3 Performance issues
− ln 2 = mk ln (1 − 1/N ) (5)
x2 x3 x4
ln(1 + x) = x − + − ··· (6)
2 3 4
N ≈ mk/ ln 2 (7)
≈ mk/0.69
Of course, the choice of hash transforms will have a major impact on the perfor-
mance of the Bloom filter. To be useful Bloom filters require hashing transforms
19
4 ANALYSIS 4.4 Variation on Standard Bloom Filters
that will not hash to the same set of addresses. Gremillion [8] and Mullin [5]
found that, when applied to differential files, the error rate was much higher
than the analysis predicted.
To remedy that deficit Ramakrishna [4, 24] developed so-called perfect hash
transforms. Perfect hash transforms are a class of hash function that completely
avoid collisions for the specific key set for which they were generated.
His tests were simulations of Bloom filters on differential files of user IDs, the
TM
Unix word list (/usr/dict/words), and library call numbers. Simulations
studies of Bloom filters are accepted in the literature as an accurate method
for determining test performance [5]. Ramakrishna reported that all the results
were similar and gave details for the file of user IDs. The results were all within
a standard deviation of what the governing equation predicts. Czech et al. [25]
have since devised a fast algorithm generate minimal perfect hash transforms.
Perfect hash transforms can be used only when the entire membership set
is known a priori. They are therefore not suitable for applications that use
growing sets. For instance, perfect hash transforms are suitable for use with
differential files of bank accounts because all of the possible account numbers
are known in advance. However a spell checker that allowed users to include
arbitrary words could not expect optimal results from a Bloom filter built with
perfect hash transforms for the words in its list of correct spellings.
If the membership set is known in advance then better performance than with
a standard Bloom filter can be achieved using related techniques. For instance
we can establish an arbitrarily low false positive rate by using perfect hash
functions and limiting the size of the shared hash table. The important step is
to order the elements by their discriminating power and eliminate those with
20
5 SUMMARY
the lowest power until the desired tradeoff between the size of the table and the
predicted false positive rate is reached or exceeded.
5 Summary
This paper has described Bloom filters, some of their applications, and provided
an analysis of the general and optimal performance cases. Bloom filters used
purely for probabilistic membership tests accurately identify non-members.
In the optimal case, non-members are detected within two hashes. The optimal
case occurs only to sets in which all of the possible keys are known in advance
and in which half of the elements are set. In practice the optimal case requires
the use of perfect hash transforms (as described in Section 4.3).
The error rate can be decreased by increasing the number of hash transforms
and the space allocated to store the table. The analytic performance of Bloom
filters for growing and static sets is given in Equation 3. Formulae that can be
used to tune filters with respect to error rate, filter size, number of keys, and
hash function are summarized in Table 2.
Bloom filters should be considered for programs where an imperfect set mem-
bership test could be helpfully applied to a large data set of unknown compo-
sition. Such programs include spell checkers and those that use data stored in
differential files. The great advantage of Bloom filters over the use of single
hash transforms is their speed and set error rate. Although the method can be
applied to sets of any size, small sets are better dealt with by trees and heaps
21
5 SUMMARY 5.2 Trade-offs in Filter Performance
that can determine for certain if a key belongs to a set. Other methods are
generally more accurate for sets whose composition is known in advance but
they require more space than Bloom Filters.
an earlier draft and Ray Spiteri’s help with the derivation of Equation 3. Con-
versations with Jason Rouse were most helpful.
22
REFERENCES REFERENCES
References
[2] Christos Faloutsos. Access methods for text. ACM Computing Surveys,
[3] James K. Mullin and Daniel J. Margoliash. A tale of three spelling checkers.
Software — Practice and Experience, 20(6):625 – 630, June 1990.
23
REFERENCES REFERENCES
[10] Wu-Chang Feng, Dilip D. Kandlur, Debanjan Saha, and Kang G. Shin.
Stochastic fair blue: A queue management algorithm for enforcing fair-
ness. In INFOCOM 2001: Twentieth Annual Joint Conference of the
IEEE Computer and Communications Societies, volume 3, pages 1520
– 1529. IEEE, 2001. URL hhttp://ieeexplore.ieee.org/iel5/7321/
19795/00916648.pdfi.
[11] Jia Wang. A survey of web caching schemes for the internet. ACM SIG-
[13] Sean C. Rhea and John Kubiatowicz. Probabilistic location and routing.
In INFOCOM 2002: Twenty-First Annual Joint Conference of the IEEE
Computer and Communications Societies, volume 3, pages 1248 – 1257.
IEEE, 23 – 27 June 2002. URL hhttp://ieeexplore.ieee.org/iel5/
7943/21923/01019375.pdfi.
24
REFERENCES REFERENCES
[16] Mark Bernstein, Jay David Bolter, Michael Joyce, and Elli Mylonas. Ar-
chitectures for volatile hypertext. In Hypertext ’91 Proceedings, pages 243
– 260, San Antonio, Texas, December 1991. URL hhttp://doi.acm.org/
10.1145/122974.122999i.
[17] Elli Mylonas and Mark Bernstein. A literary apprentice. In The 19th Inter-
national Conference of the Association for Literary and Linguistic Comput-
ing; and the 12th International Conference on Computers and Humanities,
[18] Donald E. Knuth. Sorting and Searching, volume 3 of The Art of Computer
Programming. Addison-Wesley Publishing Company, 1973.
[19] Ronald L. Graham, Donald E. Knuth, and Oren Patashnik. Concrete Math-
ematics A Foundation for Computer Science, chapter 8.5 Hashing, pages
397 – 412. Addison-Wesley Publishing Company, 1989. ISBN 0-201-14236-
8.
csd.uwo.ca/~jamie/BitVectors/i.
[22] Thomas Chan, Dan Margoliash, and Howard Shidlowsky. A word legality
25
REFERENCES REFERENCES
module using a Bloom filter and suffix simulation. Unpublished work ob-
tained from James K. Mullin (Dept. of Computer Science, Univ. of Western
Ontario, London, Ontario N6A 5B7), 1983.
[24] M. V. Ramakrishna. Perfect hashing for external files. Technical Report CS-
86-25, University of Waterloo Computer Science Department, June 1986.
26
A MISCELLANEOUS METHODS
A Miscellaneous Methods
Procedure 2 (Set)
Set(cell)
. essentially a logical or
cell ← 1
end.
Procedure 3 (Clear)
Clear(cell)
cell ← 0
end.
Procedure 4 (IsSet)
IsSet(cell)→Boolean
return(cell = 1)
end.
Procedure 5 (Initialize)
Initialize(T able)
1. for i ← 1 . . . i = N do
2. Clear(T able[i])
3. endfor
end.
27
B DERIVATION OF REJECTION TIME INEQUALITY
Procedure 6 (Insert)
Insert(T able,Key)
1. for i ← 1 . . . i = m do
m
X m
X
h × f h−1 × (1 − f ) = (1 − f ) h × f h−1
h=1 h=1
X∞
≤ (1 − f ) h × f h−1
h=1
X∞
d h
= (1 − f ) f
df
h=1
∞
d X h
= (1 − f ) f , where |f | < 1
df
h=1
d 1
= (1 − f ) , where |f | < 1
df 1 − f
1
= (1 − f ) , where |f | < 1
(1 − f )2
1
= , where |f | < 1
1−f
P∞
Note that h=1 f h is the sum of a geometric series.
28