{
  "slug": "stable-bloom-filter",
  "term": "Stable Bloom filter",
  "aliases": [],
  "definition": "A stable Bloom filter is an approximate stream-history filter that ages counter cells to bound memory while allowing both false positives and forgotten duplicates.",
  "note": "Each arrival is queried before selected distinct cells are decremented and its hash cells are reset to Max. The update runs even when the query reports a duplicate. Aging advances with arrivals, not wall-clock time. [stable-paper]\n\nWhen each cell loses at most one per update, a just-inserted key remains positive after fewer than Max intervening updates. Its cells cannot fall below Max minus that update count. With Max=3, two intervening updates cannot erase it, but three can; shared-cell refreshes can retain it longer. [stable-paper]\n\nStable refers to limiting expected occupancy under an unchanged input distribution, not permanent membership or a fixed expiry time. False negatives depend on duplicate gaps and cell refreshes, so a false-positive target is not a same-rate recall guarantee. [stable-paper]\n\nSliding-window contract: A sliding Bloom filter instead guarantees positive answers for the last n arrivals, permits arbitrary answers in an older slack region, and bounds positives outside both. This is an arrival-count window, not a time duration. [sliding-paper]\n\nImplementation scope: The pinned PowerDNS version uses Max=1 and clears adjacent cells. The Max=3 example is not its configuration. For Max=1, the bound protects an immediate repeat with zero intervening updates; it does not guarantee survival through even one intervening update. [stable-implementation]",
  "status": "shipping",
  "advantages": [],
  "limitations": [
    {
      "text": "A negative answer may reject an earlier item, so an aging filter cannot safely skip reads of arbitrary authoritative data.",
      "citationIds": [
        "hesela"
      ]
    }
  ],
  "related": [
    "bloom-filter",
    "counting-bloom-filter",
    "cuckoo-filter",
    "invertible-bloom-lookup-table",
    "scalable-bloom-filter"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-10",
  "citations": [
    {
      "id": "stable-paper",
      "title": "Deng and Rafiei. Approximately Detecting Duplicates for Streaming Data using Stable Bloom Filters. SIGMOD 2006. DOI: 10.1145/1142473.1142477.",
      "url": "https://web.archive.org/web/20260124091405/https://webdocs.cs.ualberta.ca/~drafiei/papers/DupDetExt.pdf",
      "accessed": "2026-10-31"
    },
    {
      "id": "hesela",
      "title": "Hesela. Filter retention and counting: fixed-address counterexamples.",
      "url": "https://hesela.com/analyses/bloom-filters-lsm-read-cost/#retention",
      "accessed": "2026-10-17"
    },
    {
      "id": "sliding-paper",
      "title": "Naor and Yogev. Tight Bounds for Sliding Bloom Filters. Author manuscript, 7 November 2013, section 1.1.",
      "url": "https://www.wisdom.weizmann.ac.il/~naor/PAPERS/sbf.pdf",
      "accessed": "2026-10-31"
    },
    {
      "id": "deployed-use",
      "title": "PowerDNS Recursor documentation. Newly Observed Domain Tracking: stable-filter use and error definitions.",
      "url": "https://docs.powerdns.com/recursor/nod_udr.html",
      "accessed": "2026-10-31"
    },
    {
      "id": "stable-implementation",
      "title": "PowerDNS stableBF implementation at commit 60be7ecb53c4715c8b8d832ec2268b100b827cd3: bit cells, testAndAdd and decrement.",
      "url": "https://github.com/PowerDNS/pdns/blob/60be7ecb53c4715c8b8d832ec2268b100b827cd3/pdns/recursordist/stable-bloom.hh",
      "accessed": "2026-10-31"
    }
  ],
  "provenance": [
    "The linked examples use explicit addresses and decay schedules; they do not estimate production error rates. [hesela]",
    "The SIGMOD author manuscript was recovered from its 2026-01-24 archive capture after the former endpoint redirected to HTTP 404; Algorithm 1 and sections 3.3, 3.6 and 5.2 were reviewed. [stable-paper]",
    "Shipping status reflects documented use in PowerDNS Recursor, not a claim that all implementations share parameters. Its novelty-detection FP/FN labels invert the duplicate-membership labels used here. [deployed-use]"
  ]
}
