A Bloom filter is a memory-efficient data structure for approximate membership queries used in numerous fields of computer science. Recently, learned Bloom filters that achieve better memory efficiency using machine learning models have attracted attention. One such filter, the partitioned learned Bloom filter (PLBF), achieves excellent memory efficiency. However, PLBF requires a $O(N^3k)$ time complexity to construct the data structure, where $N$ and $k$ are the hyperparameters of PLBF. One can improve memory efficiency by increasing $N$, but the construction time becomes extremely long. Thus, we propose two methods that can reduce the construction time while maintaining the memory efficiency of PLBF. First, we propose fast PLBF, which can construct the same data structure as PLBF with a smaller time complexity $O(N^2k)$. Second, we propose fast PLBF++, which can construct the data structure with even smaller time complexity $O(Nk\log N + Nk^2)$. Fast PLBF++ does not necessarily construct the same data structure as PLBF. Still, it is almost as memory efficient as PLBF, and it is proved that fast PLBF++ has the same data structure as PLBF when the distribution satisfies a certain constraint. Our experimental results from real-world datasets show that (i) fast PLBF and fast PLBF++ can construct the data structure up to 233 and 761 times faster than PLBF, (ii) fast PLBF can achieve the same memory efficiency as PLBF, and (iii) fast PLBF++ can achieve almost the same memory efficiency as PLBF.
翻译:布隆过滤器是一种用于近似成员查询的内存高效数据结构,广泛应用于计算机科学的多个领域。近年来,利用机器学习模型实现更高内存效率的学习型布隆过滤器引起了广泛关注。其中一种称为分区学习型布隆过滤器(PLBF)的变体在内存效率方面表现出色。然而,PLBF构建该数据结构需要 $O(N^3k)$ 的时间复杂度,其中 $N$ 和 $k$ 是PLBF的超参数。通过增大 $N$ 可以提升内存效率,但构建时间会变得极其漫长。为此,我们提出两种方法,能够在保持PLBF内存效率的同时缩短构建时间。首先,我们提出快速PLBF(fast PLBF),它能够以更小的 $O(N^2k)$ 时间复杂度构建与PLBF完全相同的数据结构。其次,我们提出快速PLBF++(fast PLBF++),它能够以更小的 $O(Nk\log N + Nk^2)$ 时间复杂度构建数据结构。快速PLBF++不一定构建与PLBF完全相同的数据结构,但其内存效率几乎与PLBF相当,并且理论上证明:当分布满足特定约束条件时,快速PLBF++与PLBF具有相同的数据结构。在真实数据集上的实验结果表明:(i)快速PLBF和快速PLBF++构建数据结构的速度分别比PLBF快233倍和761倍;(ii)快速PLBF能够达到与PLBF相同的内存效率;(iii)快速PLBF++能够实现与PLBF几乎相同的内存效率。