SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\begin{array}{l} \inf  _ {0 <   x, 0 <   y, \frac {x}{y} \geq \frac {u _ {1}}{v _ {1}}} D (x, y) \geq \inf  _ {0 <   x, 0 <   y, \frac {x}{y} = \frac {u _ {1}}{v _ {1}}} D (x, y) (31) \\ = \inf  _ {z > 0} D \left(z u _ {1}, z v _ {1}\right) (32) \\ = \inf  _ {z > 0} \left\{z u _ {1} \log_ {2} \left(\frac {z u _ {1}}{z v _ {1}}\right) + u _ {2} \log_ {2} \left(\frac {u _ {2}}{v _ {2}}\right) - \left(z u _ {1} + u _ {2}\right) \log_ {2} \left(\frac {z u _ {1} + u _ {1}}{z v _ {1} + v _ {1}}\right) \right\} (33) \\ \geq 0. (34) \\ \end{array}
$$
The transformation to Equation (34) is due to Jensen's inequality [27]. This shows that if  $\frac{x}{y} \geq \frac{u_1}{v_1}$ , then  $D(x, y) \geq 0$ .
Proof. We prove Theorem 4.3 by contradiction.
Assume that the  $(N - 1)\times (N - 1)$  matrix  $A$  is not a monotone matrix. That is, we assume that there exists  $p$ $(1\leq p\leq N - 2)$  such that  $J(p) > J(p + 1)$ . Let  $J(i)$  be the smallest  $j$  such that  $A_{ij}$  equals the maximum of the  $i$ -th row of  $A$ . We define  $a\coloneqq J(p)$  and  $a^\prime \coloneqq J(p + 1)$ $(a > a^{\prime}$  from the assumption for contradiction).
From the definitions of  $A$  and  $J(i)$ , we obtain the following:
$$
\mathrm {D P} _ {\mathrm {K L}} [ p ] [ q ] = \mathrm {D P} _ {\mathrm {K L}} [ a - 1 ] [ q - 1 ] + d _ {\mathrm {K L}} (a, p) \tag {35}
$$
$$
\mathrm {D P} _ {\mathrm {K L}} [ p + 1 ] [ q ] = \mathrm {D P} _ {\mathrm {K L}} \left[ a ^ {\prime} - 1 \right] [ q - 1 ] + d _ {\mathrm {K L}} \left(a ^ {\prime}, p + 1\right) \tag {36}
$$
$$
\mathrm {D P} _ {\mathrm {K L}} [ p ] [ q ] > \mathrm {D P} _ {\mathrm {K L}} \left[ a ^ {\prime} - 1 \right] [ q - 1 ] + d _ {\mathrm {K L}} \left(a ^ {\prime}, p\right) \tag {37}
$$
$$
\mathrm {D P} _ {\mathrm {K L}} [ p + 1 ] [ q ] \geq \mathrm {D P} _ {\mathrm {K L}} [ a - 1 ] [ q - 1 ] + d _ {\mathrm {K L}} (a, p + 1). \tag {38}
$$
Using Equations (35, 36, 38), we evaluate the right side of Equation (37) minus the left side of Equation (37).
$$
\begin{array}{l} \mathrm {D P} _ {\mathrm {K L}} \left[ a ^ {\prime} - 1 \right] [ q - 1 ] + d _ {\mathrm {K L}} \left(a ^ {\prime}, p\right) - \mathrm {D P} _ {\mathrm {K L}} [ p ] [ q ] (39) \\ = \left\{\mathrm {D P} _ {\mathrm {K L}} [ p + 1 ] [ q ] - d _ {\mathrm {K L}} \left(a ^ {\prime}, p + 1\right) \right\} + d _ {\mathrm {K L}} \left(a ^ {\prime}, p\right) - \left\{\mathrm {D P} _ {\mathrm {K L}} [ a - 1 ] [ q - 1 ] + d _ {\mathrm {K L}} (a, p) \right\} (40) \\ = \left\{\mathrm {D P} _ {\mathrm {K L}} [ p + 1 ] [ q ] - \mathrm {D P} _ {\mathrm {K L}} [ a - 1 ] [ q - 1 ] \right\} + d _ {\mathrm {K L}} \left(a ^ {\prime}, p\right) - d _ {\mathrm {K L}} \left(a ^ {\prime}, p + 1\right) - d _ {\mathrm {K L}} (a, p) (41) \\ \geq d _ {\mathrm {K L}} (a, p + 1) + d _ {\mathrm {K L}} \left(a ^ {\prime}, p\right) - d _ {\mathrm {K L}} \left(a ^ {\prime}, p + 1\right) - d _ {\mathrm {K L}} (a, p) (42) \\ = \left\{d _ {\mathrm {K L}} (a, p + 1) - d _ {\mathrm {K L}} (a, p) \right\} - \left\{d _ {\mathrm {K L}} \left(a ^ {\prime}, p + 1\right) - d _ {\mathrm {K L}} \left(a ^ {\prime}, p\right) \right\}. (43) \\ \end{array}
$$
Equations (35, 36) are used for the transformation to Equation (40), and Equation (42) is used for the transformation to Equation (38).
We define  $u_{1}, u_{2}, v_{1}, v_{2}, x,$  and  $y$  as follows:
$$
u _ {1} := \sum_ {i = a} ^ {p} g _ {i}, u _ {2} := \sum_ {i = a ^ {\prime}} ^ {p} g _ {i}, x := g _ {p + 1}, \tag {44}
$$
$$
v _ {1} := \sum_ {i = a} ^ {p} h _ {i}, v _ {2} := \sum_ {i = a ^ {\prime}} ^ {p} h _ {i}, y := h _ {p + 1}.
$$
From the conditions of ideal score distribution and  $a' < a$ , the followings hold:
$$
0 <   u _ {1} <   u _ {2} \tag {45}
$$
$$
0 <   v _ {1} <   v _ {2} \tag {46}
$$
$$
\frac {x}{y} \geq \frac {u _ {1}}{v _ {1}} \geq \frac {u _ {2}}{v _ {2}} \tag {47}
$$
$$
0 <   x, y. \tag {48}
$$
Therefore, from Lemma C.1,
$$
\begin{array}{l} \left\{\left(u _ {1} + x\right) \log_ {2} \left(\frac {u _ {1} + x}{v _ {1} + y}\right) - u _ {1} \log_ {2} \left(\frac {u _ {1}}{v _ {1}}\right) \right\} - \left\{\left(u _ {2} + x\right) \log_ {2} \left(\frac {u _ {2} + x}{v _ {2} + y}\right) - u _ {2} \log_ {2} \left(\frac {u _ {2}}{v _ {2}}\right) \right\} (49) \\ = \left\{d _ {\mathrm {K L}} (a, p + 1) - d _ {\mathrm {K L}} (a, p) \right\} - \left\{d _ {\mathrm {K L}} \left(a ^ {\prime}, p + 1\right) - d _ {\mathrm {K L}} \left(a ^ {\prime}, p\right) \right\} (50) \\ \geq 0. (51) \\ \end{array}
$$
Algorithm 3 OptimalFPR_F (Algorithm 1 in [14])
Input:  $G\in \mathbb{R}^N$  : probabilities that the keys are contained in each region   
 $H\in \mathbb{R}^{N}$  : probabilities that the non-keys are contained in each region   
 $F\in (0,1)$  : target overall FPR   
 $k\in \mathbb{N}$  : number of regions   
Output:   
 $f\in \mathbb{R}^k$  : FPRs of each region   
for  $i = 1\dots k$ $f_{i}\gets \frac{G_{i}\cdot F}{H_{i}}$    
while  $\exists i:f_i > 1$    
for  $i = 1\dots k$  if  $f_{i} > 1$  then   
 $f_{i}\gets 1$ $G_{\mathrm{sum}}\gets 0$ $H_{\mathrm{sum}}\gets 0$    
for  $i = 1\dots k$  if  $f_{i} = 1$  then   
 $G_{\mathrm{sum}}\gets G_{\mathrm{sum}} + G_{i}$ $H_{\mathrm{sum}}\gets H_{\mathrm{sum}} + H_{i}$    
for  $i = 1\dots k$  if  $f_{i} <   1$  then   
 $f_{i}\gets \frac{G_{i}\cdot(F - H_{\mathrm{sum}})}{H_{i}\cdot(1 - G_{\mathrm{sum}})}$    
return f
Then, from Equations (39...43), we obtain
$$
\mathrm {D P} _ {\mathrm {K L}} \left[ a ^ {\prime} - 1 \right] \left[ q - 1 \right] + d _ {\mathrm {K L}} \left(a ^ {\prime}, p\right) - \mathrm {D P} _ {\mathrm {K L}} [ p ] [ q ] \geq 0. \tag {52}
$$
However, this contradicts Equation (37). Hence, Theorem 4.3 is proved.
Appendix D Modification of the PLBF framework
In this appendix, we describe the framework modifications we made to PLBF in our experiments. In the original PLBF paper [14], the optimization problem was designed to minimize the amount of memory usage under a given target false positive rate (Equation (7)). However, this framework makes it difficult to compare the results of different methods and hyperparameters. Therefore, we designed the following optimization problem, which minimizes the expected false positive rate under a given memory usage condition:
$$
\underset {\boldsymbol {f}, \boldsymbol {t}} {\text {m i n i m i z e}} \quad \sum_ {i = 1} ^ {k} H _ {i} f _ {i}
$$
$$
\text {s u b j e c t} \quad \sum_ {i = 1} ^ {k} c | \mathcal {S} | G _ {i} \log_ {2} \left(\frac {1}{f _ {i}}\right) \leq M \tag {53}
$$
$$
f _ {i} \leq 1 \quad (i = 1 \dots k),
$$
where  $M$  is a parameter that is set by the user to determine the upper bound of memory usage and is set by the user.
Analyzing as in Appendix A, we find that in order to find the optimal thresholds  $\pmb{t}$ , we need to find a way to cluster the 1st to  $(j - 1)$ -th segments into  $k - 1$  regions that maximizes  $\sum_{i = 1}^{k - 1} G_i \log_2\left(\frac{G_i}{H_i}\right)$  for each  $j = k \dots N$ . We can compute this using the same DP algorithm as in the original framework.
Algorithm 4 OptimalFPR_M
Input:  $G\in \mathbb{R}^N$  : probabilities that the keys are contained in each region   
 $H\in \mathbb{R}^{N}$  : probabilities that the non-keys are contained in each region   
 $M\in \mathbb{R}$  : upper bound of the total memory usage of backup Bloom filters   
 $k\in \mathbb{N}$  : number of regions   
Output:   
 $f\in \mathbb{R}^k$  : FPRs of each region   
 $K_{\mathrm{sum}}\gets 0$    
for  $i = 1\dots k$ $K_{\mathrm{sum}}\gets K_{\mathrm{sum}} + G_i\log_2\left(\frac{G_i}{H_i}\right)$ $\beta \leftarrow \frac{M + c|S|K_{\mathrm{sum}}}{c|S|}$    
for  $i = 1\dots k$ $f_{i}\gets 2^{-\beta}\frac{G_{i}}{H_{i}}$    
while  $\exists i:f_i > 1$    
for  $i = 1\dots k$  if  $f_{i} > 1$  then  
 $f_{i}\gets 1$ $G_{\mathrm{sum}}\gets 0$ $H_{\mathrm{sum}}\gets 0$ $K_{\mathrm{sum}}\gets 0$    
for  $i = 1\dots k$  if  $f_{i} = 1$  then  
 $G_{\mathrm{sum}}\gets G_{\mathrm{sum}} + G_{i}$ $H_{\mathrm{sum}}\gets H_{\mathrm{sum}} + H_{i}$    
else  
 $K_{\mathrm{sum}}\gets K_{\mathrm{sum}} + G_i\log_2\left(\frac{G_i}{H_i}\right)$ $\beta \leftarrow \frac{M + c|S|K_{\mathrm{sum}}}{c|S|(1 - G_{\mathrm{sum}})}$    
for  $i = 1\dots k$    
if  $f_{i} <   1$  then  
 $f_{i}\gets 2^{-\beta}\frac{G_{i}}{H_{i}}$    
return f
Also similar to Appendix A, introducing  $\mathcal{I}_{f=1}$  and  $\mathcal{I}_{f<1}$  for analysis, it follows that the optimal false positive rates  $\bar{f}$  is
$$
\bar {f} _ {i} = 2 ^ {- \beta} \frac {G _ {i}}{H _ {i}} \quad (i \in \mathcal {I} _ {f <   1}), \tag {54}
$$
$$
\beta = \frac {M + c | \mathcal {S} | \sum_ {i \in \mathcal {I} _ {f <   1}} G _ {i} \log_ {2} \left(\frac {G _ {i}}{H _ {i}}\right)}{c | \mathcal {S} | (1 - G _ {f = 1})}. \tag {55}
$$
In the original framework, the sets  $\mathcal{I}_{f=1}$  and  $\mathcal{I}_{f<1}$  are obtained by repeatedly solving the relaxed problem and setting  $f_{i}$  to 1 for regions where  $f_{i} > 1$  (for details of this algorithm, please refer to the Section 3.3.3 in the original PLBF paper [14]). In our framework, we can find the sets  $\mathcal{I}_{f=1}$  and  $\mathcal{I}_{f<1}$  in the same way.
The pseudo-code for OPTIMALFPR_F in the original PLBF paper [14] and OPTIMALFPR_M, which is conditioned on the memory usage  $M$ , is shown in Algorithm 3 and Algorithm 4. For both functions, the best-case complexity is  $\mathcal{O}(k)$ , and the worst-case complexity is  $\mathcal{O}(k^2)$ .
Also, the fast PLBF algorithm for the case conditioned by memory usage is shown in Algorithm 5. It is basically the same as the original PLBF Algorithm 2, but instead of using the SPACEUsed function, the EXPECTEDFPR function is used here. Then, the algorithm selects the case when the expected overall false positive rate calculated using the training data is minimized.
Algorithm 5 Fast PLBF conditioned by memory usage
Algorithm: MAXDIVDP  $(g,h,N,k)$  constructs  $\mathrm{DP}_{\mathrm{KL}}^N$  THRESMAXDIV(DP,  $j,k$  ) calculates the optimal thresholds by tracing the transitions backward from  $\mathrm{DP}_{\mathrm{KL}}^{N}[j - 1][k - 1]$  OPTIMALFPR_M  $(g,h,t,M,k)$  : returns the optimal FPRs for each region under the given thresholds and the memory usage EXPECTEDFPR  $(g,h,t,f)$  : returns the expected overall false positive rate for the given thresholds and FPRs   
MinExpectedFPR  $\leftarrow \infty$ $t_\mathrm{best}\gets \mathrm{None}$ $f_{\mathrm{best}}\gets \mathrm{None}$ $\mathrm{DP}_{\mathrm{KL}}^{N}\gets \mathrm{MAXDIVDP}(\mathbf{g},\mathbf{h},N,k)$    
for  $j = k\dots N$ $t\gets \mathrm{THRESMAXDIV}(\mathrm{DP}_{\mathrm{KL}}^{N},j,k)$ $f\gets \mathrm{OPTIMALFPR\_M}(g,h,t,M,k)$    
if MinExpectedFPR  $>$  EXPECTEDFPR  $(g,h,t,f)$  then MinExpectedFPR  $\leftarrow$  EXPECTEDFPR  $(g,h,t,f)$ $t_\mathrm{best}\gets t$ $f_{\mathrm{best}}\gets f$    
return  $t_\mathrm{best},f_\mathrm{best}$
Appendix E Additional ablation study for hyperparameters
This appendix details the ablation studies for the hyperparameters  $N$  and  $k$ . In this appendix, we discuss the results of the ablation studies that were not presented in Section 5.3. The results confirm that the expected false positive rate decreases monotonically as the hyperparameters  $N$  and  $k$  increase. We also confirm that the proposed methods are superior to PLBF in terms of hyperparameter determination.
First, we confirm that the expected false positive rate decreases monotonically as  $N$  or  $k$  increases. The expected false positive rate is computed using training data (objective function in Equation (53)). Figure 14 shows the expected false positive rate at various  $N$  and  $k$ . The ablation study for  $N$  is done with  $k$  fixed to 5. The ablation study for  $k$  is done with  $N$  fixed to 1,000.
The expected false positive rate decreases monotonically as  $N$  or  $k$  increases for all datasets and methods. However, as observed in Section 5.3, the false positive rate at test time does not necessarily decrease monotonically as  $N$  or  $k$  increases. Also, the construction time increases as  $N$  or  $k$  increases. Therefore, it is necessary to set appropriate  $N$  and  $k$  when practically using PLBFs.
Therefore, we next performed a comprehensive experiment at various  $N$  and  $k$ . Figure 15 shows the construction time and false positive rate for each method when the memory usage of the backup bloom filter is fixed at  $500\mathrm{Kb}$ ,  $N$  is set to 8, 16, ..., 1024, and  $k$  is set to 3, 5, 10, and 20. The curves connect the same  $k$  and different  $N$  results.
The results show that the proposed methods are superior to PLBF because it is easier to set hyperparameters to construct accurate data structures in a shorter time. PLBF can achieve the same level of accuracy with the same construction time as fast PLBF and fast  $\mathrm{PLBF}++$  if the hyperparameters  $N$  and  $k$  are set well. However, it is not apparent how  $N$  and  $k$  should be set when applying the algorithm to unseen data. If  $N$  or  $k$  is set too large, the construction time will be very long, and if  $N$  or  $k$  is set too small, the false positive rate will be large. The proposed methods can construct the data structure quickly even if the hyperparameters  $N$  and  $k$  are too large. Therefore, by using the proposed methods instead of PLBF and setting  $N$  and  $k$  relatively large, it is possible to quickly and reliably construct a data structure with reasonable accuracy.
Furthermore, we performed an ablation study using fast PLBF to obtain guidelines for setting the hyperparameters  $N$  and  $k$  (Figure 16). We observed false positive rates for  $N =$
PLBF Fast PLBF (Proposed) -Fast PLBF++ (Proposed)
(a) Malicious URLs Dataset.
(b) EMBER Dataset.
Figure 14: Expected false positive rate computed with training data at various  $N$  or  $k$ . The memory usage of the backup bloom filter is  $500\mathrm{Kb}$ . The ablation studies for  $N$  are done with  $k$  fixed to 5 (left figures). The ablation studies for  $k$  are done with  $N$  fixed to 1,000 (right figures).
20, 50, 100, 200, 300, ..., 1500 and  $k = 50, 100, 200, 300, \ldots, 1400$  with  $k < N$ . For the Malicious URLs Dataset, the false positive rate was lowest when  $N = 1300$  and  $k = 700$  (in this case, the fast PLBF construction is 333 times faster than PLBF). And for the Ember dataset, the false positive rate was lowest when  $N = 500$  and  $k = 50$  (in this case, the fast PLBF construction is 45 times faster than PLBF). The Malicious URLs Dataset showed an almost monotonous decrease in the false positive rate as  $N$  and  $k$  increased, while the Ember Dataset showed almost no such trend. This is thought to be due to a kind of overlearning that occurs as  $N$  and  $k$  are increased in the Ember Dataset. Although a method for determining the appropriate  $N$  and  $k$  has not yet been established, we suggest setting  $N \sim 1000$  and  $k \sim 100$ . This is because the false positive rate is considered to be small enough at this level, and the proposed method can be constructed in a few tens of seconds. In any case, the proposed method is useful because it is faster than the original PLBF for any hyperparameters  $N$  and  $k$ .
Appendix F Experiments on PLBF solution to relaxed problem
The PLBF paper [14] proposes two methods: a simple method and a complete method. In this appendix, we conducted experiments on the simple method and evaluated the difference in accuracy compared to the complete method. The results revealed that, in certain cases, this method exhibited significantly lower accuracy than the complete method. It was then confirmed that fast PLBF and fast  $\mathrm{PLBF}++$  are superior to the simple method in terms of the trade-off between construction time and accuracy.
The simpler method, described in section 3.3.3 of [14], does not consider the condition that  $f_{i} \leq 1 (i = 1 \dots k)$  when finding the optimal  $t$ . In other words, this method solves the relaxed problem
PLBF Fast PLBF (Proposed) -Fast PLBF++ (Proposed)
(a) Malicious URLs Dataset
(b) EMBER Dataset
Figure 15: Construction time and FPR for various  $N$  and  $k$ . The curves connect the same  $k$  and different  $N$  results. The memory usage of the backup bloom filter is  $500\mathrm{Kb}$ .
that does not consider the condition  $f_{i} \leq 1 (i = 1 \dots k)$ . The complete method uses the first method repeatedly as a subroutine to solve the general problem and find the optimal  $t$ . Here, the time complexity of the method for the relaxed problem is  $\mathcal{O}(N^2 k)$ , and that of the method for the general problem is  $\mathcal{O}(N^3 k)$ .
We experimented with the simpler method. Figure 17 shows the construction time (the hyperparameters for PLBFs were set to  $N = 1,000$  and  $k = 5$ ). The PLBF for the relaxed problem has about the same construction time as our proposed fast PLBF. This is because the time complexity for constructing the two methods is  $\mathcal{O}(N^2 k)$  for both. Figure 18 shows the trade-off between memory usage and FPR. On the URL dataset, the method for the relaxed problem is almost as accurate as the method for the general problem. At most, it has a false positive rate of only 1.06 times greater. On the other hand, on the EMBER dataset, the method for the relaxed problem is significantly less accurate than the method for the general problem, especially when memory usage is small. It has up to 1.48 times higher false positive rate than the complete method.
In summary, the method for the relaxed problem can construct the data structure faster than the method for the general problem, but the accuracy can be significantly worse, especially when memory usage is small. Our proposed fast PLBF has the same accuracy as the complete PLBF in almost the same construction time as the method for the relaxed problem. Our fast PLBF++ can construct the data structure in even less time than the method for the relaxed problem, and the accuracy degradation is relatively small.
(b) EMBER Dataset
Figure 16: FPR for  $N = 50, 100, 200, 300, \ldots, 1400$  and  $k = 20, 50, 100, 200, 300, \ldots, 1500$  with  $k < N$ .
Appendix G Experiments with artificial datasets
We experimented with artificial datasets. Fast PLBF++ is faster to construct than fast PLBF. However, fast PLBF++ is not theoretically guaranteed to be as accurate as PLBF, except when the score distribution is "ideally monotonic." Therefore, we evaluated the accuracy of fast PLBF++ by creating a variety of datasets, ranging from data with monotonicity to data with little monotonicity. The results show that the smaller the monotonicity of the score distribution, the larger the difference in accuracy between fast PLBF++ and PLBF. We also observed that in most cases, the false positive rate for fast PLBF++ is within 1.1 times that of PLBF, but in cases where there is little monotonicity in the score distribution, the false positive rate of PLBF++ can be up to 1.85 times that of PLBF.
Here, we explain the process of creating an artificial dataset, which consists of two steps. First, as in the original PLBF paper [14], the key and non-key score distribution is generated using the Zipfian distribution. Figure 19(a) shows a histogram of the distribution of key and non-key scores at this time, and Figure 20(a) shows  $g_{i} / h_{i}$  ( $i = 1 \dots N$ ) when  $N = 1,000$ . This score distribution is ideally monotonic. Next, we perform swaps to add non-monotonicity to the score distribution. Swap refers to changing the scores of the elements in the two adjacent segments so that the number of keys and nonkeys in the two segments are swapped. Namely, an integer  $i$  is randomly selected from  $\{1,2,\ldots,N-1\}$ , and the scores of elements in the  $i$ -th segment are changed so that they are included in the  $(i+1)$ -th segment, and the scores of elements in the  $(i+1)$ -th segment are changed to include them in the  $i$ -th segment. Figures 19(b) to 19(i) and Figures 20(b) to 20(i) show the histograms of the score distribution and  $g_{i} / h_{i}$  ( $i = 1 \dots N$ ) for  $10,10^{2},\ldots,10^{8}$  swaps, respectively. It can be seen that as the number of swaps increases, the score distribution becomes more non-monotonic. For each case of the number of swaps, 10 different datasets were created using 10 different seeds.
Figure 21 shows the accuracy of each method for each number of swaps, with the seed set to 0. Hyperparameters for PLBFs are set to  $N = 1,000$  and  $k = 5$ . It can be seen that fast PLBF and fast  $\mathrm{PLBF}++$  achieve better Pareto curves than the other methods for all datasets. It can also be seen that the higher the number of swaps, the more often there is a difference between the accuracy of fast  $\mathrm{PLBF}++$  and fast PLBF.
Figure 22 shows the difference in accuracy between fast PLBF++ and fast PLBF for each swap count. Here, the "relative false positive rate" is the false positive rate of fast PLBF++ divided by that of PLBF constructed with the same hyperparameters and conditions (note that fast PLBF constructs the same data structure as PLBF, so the false positive rate of fast PLBF is the same as that of PLBF). We created 10 different datasets for each swap count and conducted 6 experiments for each dataset and method with a memory usage of 0.25Mb, 0.5Mb, 0.75Mb, 1.0Mb, 1.25Mb, and 1.5Mb. Namely, we compared the false positive rates of fast PLBF and fast PLBF++ under 60 conditions for each swap count. The result shows that fast PLBF++ consistently achieves the same accuracy as PLBF in a total of 240 experiments where the number of swaps is  $10^{3}$  or less. It also shows that in the experiments where the number of swaps is  $10^{7}$  or less, the false positive rate of fast PLBF++ is less than 1.1 times
(b) EMBER Dataset
Figure 17: Construction time. The memory usage of the backup bloom filter is  $500\mathrm{Kb}$ , and the hyperparameters for PLBFs are  $N = 1,000$  and  $k = 5$ .
that for PLBF, except for 14 cases. However, in the cases of  $10^{8}$  swap counts (where there is almost no monotonicity in the score distribution), the false positive rate for fast  $\mathrm{PLBF}++$  is up to 1.85 times that for PLBF.
Insert keys to Bloom filter Train machine learning model Find optimal parameters
(b) EMBER Dataset
Figure 18: Trade-off between memory usage and FPR. The hyperparameters for PLBFs are  $N = 1,000$  and  $k = 5$ .
(a) 0 swaps (score distribution is ideally monotonic)
(b) 10 swaps
(c)  $10^{2}$  swaps
(d)  $10^{3}$  swaps
(e)  $10^{4}$  swaps
(f)  $10^{5}$  swaps
(g)  $10^{6}$  swaps
(h)  $10^{7}$  swaps
(i)  $10^{8}$  swaps
Figure 19: Score distribution histograms of artificial datasets. All figures are with the seed set to 0.
(i)  $10^{8}$  swaps
Figure 20: Ratio of key to non-key of artificial datasets. All figures are with the seed set to 0.
(i)  $10^{8}$  swaps
Figure 21: Trade-off between memory usage and FPR for artificial datasets. All figures are with the seed set to 0. The hyperparameters for PLBFs are  $N = 1,000$  and  $k = 5$ .
Figure 22: Distribution of the "relative false positive rate" of fast PLBF++ for each swap count. The "relative false positive rate" is the false positive rate of fast PLBF++ divided by that of PLBF constructed with the same hyperparameters and conditions.