A Dynamic Space-Efficient Filter with Constant Time Operations

Ioana Oriana Bercea, Guy Even

TL;DR

This paper introduces the first dynamic, space-efficient filter that guarantees constant-time operations (insert, delete, query) in the worst case, even for "dense" scenarios where the error parameter $\epsilon$ is large relative to the universe size. This is achieved by novel dictionary constructions that efficiently handle "random multisets," bridging a gap in existing data structure research.

What Problem Does This Paper Address?

The paper tackles the challenge of building highly efficient data structures for managing dynamic sets of data. Specifically, it focuses on filters, which are like dictionaries but allow for a small probability of false positives (saying an element is present when it's not). The ideal scenario is a filter that is:

  1. Space-efficient: Uses space close to the theoretical minimum.
  2. Dynamically updatable: Supports insertions and deletions efficiently.
  3. Constant-time operations: All operations (insert, delete, query) take a fixed amount of time, even in the worst case, with high probability.

Existing solutions often sacrifice one of these properties. For instance, some are space-efficient but have amortized or expected constant-time operations, not worst-case. Others are not space-efficient. A key challenge arises in the "dense case," where the error parameter $\epsilon$ is relatively large (specifically, $\log(1/\epsilon) = O(\log \log n)$), making it harder to achieve both space efficiency and constant worst-case time. This paper aims to solve this dense case problem.

Methods

The core of the paper's contribution lies in two main areas:

  1. Reduction to Random Multisets: The authors leverage a classic reduction by Carter et al. [CFG+78] that transforms a dictionary problem into a filter problem. Instead of requiring a dictionary that handles arbitrary multisets (which is complex), they show it's sufficient to have a dictionary that handles random multisets. A random multiset is essentially a uniformly random sample (with replacement) from the universe. This relaxation is crucial.
  2. Novel Dictionary for Random Multisets (RMS-Dictionary): To support the random multiset requirement, they design a new dynamic dictionary. This dictionary has a two-level structure:
  3. Bin Dictionaries: Most elements are stored in many small, specialized dictionaries. These dictionaries are designed to be space-efficient and operate in constant time.
  4. Spare Dictionary: A single larger dictionary handles elements that don't fit into their designated "bins" due to collisions or high occupancy.

    The construction uses careful parameterization and specific hash functions (including succinct ones) to ensure that the overall space remains near the information-theoretic lower bound and operations are constant time in the worst case.

Datasets

Not discussed in the paper. The paper deals with abstract data structures and theoretical guarantees over a universe $\hat{U}$ and a set of size $n$.

Key Insights and Ideas

  • Random Multisets are Sufficient: The most significant insight is that for constructing space-efficient dynamic filters using the Carter et al. reduction, a dictionary supporting random multisets is enough, rather than arbitrary ones. This simplifies the underlying dictionary construction considerably.
  • Bridging the Dense Case Gap: The paper successfully addresses the "dense case" ($\log(1/\epsilon) = O(\log \log n)$), which was a known open problem for achieving space-efficient, constant-time dynamic filters.
  • Two-Level Dictionary Design: The RMS-Dictionary's structure, combining many small "bin" dictionaries with a "spare" for overflow, is a clever way to manage space and time trade-offs.
  • Succinct Hash Functions: The ability to replace fully random hash functions with "succinct" ones (requiring less than $O(n)$ bits for their representation) is important for achieving the overall space efficiency.

Key Results

  • First Space-Efficient Dynamic Filter for Dense Case: The paper presents the first data structure that is a dynamic filter, space-efficient (within $1+o(1)$ of the lower bound), and supports insertions, deletions, and queries in constant time in the worst case with high probability, specifically for the dense case ($\log(1/\epsilon) = O(\log \log n)$).
  • Space Complexity: The filter requires $(1+o(1)) \cdot n \log(1/\epsilon) + O(n)$ bits of space.
  • Time Complexity: All operations (insert, delete, query) take $O(1)$ time in the worst case with high probability.
  • Overflow Probability: The filter does not overflow with high probability.

Limitations and Future Work

  • Universe Size: The construction assumes the universe size $\hat{U}$ is polynomial in $n$. While this is common, it's a limitation for extremely large universes.
  • "Historical Reasons" for Spare: The paper notes that elements sent to the spare due to a full bin might remain there even after the bin is no longer full. While this doesn't affect correctness or performance bounds, it's an interesting aspect of the mechanism.
  • Future Work: The paper implicitly points towards further exploration of dynamic dictionaries for multisets (which they address in a companion paper [BE20]) and potentially extending these techniques to other data structure problems. The analysis of overflow and the interaction between different hash function families also suggests avenues for deeper theoretical study.

Summary updated

Abstract

A dynamic dictionary is a data structure that maintains sets of cardinality at most $n$ from a given universe and supports insertions, deletions, and membership queries. A filter approximates membership queries with a one-sided error that occurs with probability at most $ε$. The goal is to obtain dynamic filters that are space-efficient (the space is $1+o(1)$ times the information-theoretic lower bound) and support all operations in constant time with high probability. One approach to designing filters is to reduce to the retrieval problem. When the size of the universe is polynomial in $n$, this approach yields a space-efficient dynamic filter as long as the error parameter $ε$ satisfies $\log(1/ε) = ω(\log\log n)$. For the case that $\log(1/ε) = O(\log\log n)$, we present the first space-efficient dynamic filter with constant time operations in the worst case (whp). In contrast, the space-efficient dynamic filter of Pagh, Pagh, Rao (SODA 2005) supports insertions and deletions in amortized expected constant time. Our approach employs the classic reduction of Carter et al. (STOC 1978) on a new type of dictionary construction that supports random multisets.
BibTeX
@inproceedings{bercea2020dynamic,
  author = {Ioana Oriana Bercea and Guy Even},
  title = {{A Dynamic Space-Efficient Filter with Constant Time Operations}},
  booktitle = {SWAT},
  year = {2020},
  url = {https://openreview.net/forum?id=1JZmxak1Or},
}

Loading related content...

Figure