Support Optimality and Adaptive Cuckoo Filters

Tsvi Kopelowitz, Samuel McCauley, Ely Porat

This paper, titled "Support Optimality and Adaptive Cuckoo Filters," presents a significant advancement in the design of approximate membership data structures. It introduces a simpler, more efficient way to handle "false positives" in filters used for high-speed networking and security.

TL;DR

The authors introduce the Cuckooing Adaptive Cuckoo Filter (ACF), the first practical filter that is "support optimal"—meaning its total false positives depend on the number of unique queries rather than the total number of queries. By simply moving elements when a mistake occurs, it outperforms existing adaptive filters without requiring any extra memory or metadata.

What Problem Does This Paper Address?

Standard filters, like Bloom Filters or Cuckoo Filters, are space-efficient tools used to check if an element belongs to a set. They have a "one-sided error": they never say "no" if an element is present, but they might occasionally say "yes" when it isn't (a false positive).

In traditional filters, if you query the same non-member 1,000 times, you might get 1,000 false positives. Adaptive filters aim to "fix" these mistakes so that a repeated query to the same element won't fail twice. The challenge is doing this efficiently without blowing up the memory usage or making the data structure too complex for high-speed hardware.

Methods

The authors propose a new mechanism called the Cuckooing ACF. Its approach is elegantly simple:

  • The "Fix" Operation: When a query $q$ results in a false positive, the filter identifies the element $x$ in the set that caused the collision. It then performs a standard "cuckoo" move: it rehashes $x$ and moves it to its alternative location in the hash table.
  • No Extra Bits: Unlike previous adaptive filters (like the Cyclic ACF or Swapping ACF), the Cuckooing ACF requires zero additional metadata or "selector bits." It uses the standard Cuckoo Filter architecture.
  • Support Optimality: The authors provide a rigorous theoretical proof using a potential function argument to show that this filter is support optimal. This means the expected number of false positives over $n$ queries is roughly proportional to the number of distinct elements queried, not the total volume of traffic.

Datasets

The authors evaluated their design using real-world network traffic data to simulate realistic query patterns:

  • CAIDA 2014 Network Traces: Specifically the "Chicago A," "Chicago B," and "San Jose" datasets.
  • These datasets are ideal because network traffic is typically "skewed" (some elements are queried much more often than others), which is exactly where adaptive filters provide the most benefit.

Key Insights and Ideas

  • Simplicity is a Feature: Previous attempts at adaptivity involved complex bit-swapping or internal slot rotations. This paper shows that the core "cuckooing" mechanism—originally designed just for insertions—is actually a powerful tool for adaptivity.
  • The "Support Optimal" Benchmark: The paper formalizes the goal of adaptivity. A filter shouldn't just be "better"; it should ideally only pay a false-positive penalty once per unique non-member.
  • Adversarial Limits: A major "aha moment" in the paper is the proof that any deterministic filter with fixed-size fingerprints can be defeated by a clever adversary. Using a "birthday attack" strategy, an attacker can find a set of queries that "block" the filter from ever fixing its mistakes. This suggests that truly robust security requires variable-length fingerprints.

Key Results

  • Empirical Performance: In tests on CAIDA traces, the Cuckooing ACF consistently achieved the lowest false positive rate, often outperforming previous state-of-the-art adaptive filters by a factor of 2.
  • High Load Efficiency: The filter maintains its performance even at 95% occupancy, making it extremely space-efficient for memory-constrained hardware.
  • Theoretical Bounds: They proved that for $n$ queries, the expected false positives are $\epsilon |Q| + O(\epsilon^2 |Q| + \log^4 n)$, where $|Q|$ is the number of unique queries. This confirms it scales with the diversity of the traffic, not the intensity.

Limitations and Future Work

  • External Dictionary Requirement: Like all current adaptive filters, the Cuckooing ACF assumes it has occasional access to the "ground truth" (the original set $S$) to know which element to move during a fix. While this is standard for the "remote memory access" model, it's a dependency to keep in mind.
  • Theoretical Scope: The current proof for support optimality focuses on a specific configuration ($k=2$ hash tables, $b=1$ slot per bin). While experiments show it works for broader settings, the formal proof for more complex configurations remains an open challenge.
  • Adversarial Vulnerability: Because it uses fixed-size fingerprints, it is not "adversarially adaptive." A malicious actor could still drive the false positive rate high, though this is unlikely to happen in normal network routing scenarios.

Summary updated

Abstract

Filters (such as Bloom Filters) are a fundamental data structure that speed up network routing and measurement operations by storing a compressed representation of a set. Filters are very space efficient, but can make bounded one-sided errors: with tunable probability $$\epsilon $$ , they may report that a query element is stored in the filter when it is not. This is called a false positive. Recent research has focused on designing methods for dynamically adapting filters to false positives, thereby reducing the number of false positives when some elements are queried repeatedly. Ideally, an adaptive filter would incur a false positive with bounded probability $$\epsilon $$ for each new query element, and would incur $$o(\epsilon )$$ total false positives over all repeated queries to that element. We call such a filter support optimal. In this paper we design a new Adaptive Cuckoo Filter, and show that it is support optimal (up to additive logarithmic terms) over any n queries when storing a set of size n. We complement these bounds with experiments that show that our data structure is effective at fixing false positives on network trace datasets, outperforming previous Adaptive Cuckoo Filters. Finally, we investigate adversarial adaptivity, a stronger notion of adaptivity in which an adaptive adversary repeatedly queries the filter, using the result of previous queries to drive the false positive rate as high as possible. We prove a lower bound showing that a broad family of filters, including all known Adaptive Cuckoo Filters, can be forced by such an adversary to incur a large number of false positives.
BibTeX
@inproceedings{kopelowitz2021support,
  author = {Tsvi Kopelowitz and Samuel McCauley and Ely Porat},
  title = {{Support Optimality and Adaptive Cuckoo Filters}},
  booktitle = {WADS},
  year = {2021},
  url = {https://openreview.net/forum?id=SsUXqreuSt},
}

Loading related content...

Figure