{
  "slug": "grafite-range-filter",
  "term": "Grafite range filter",
  "aliases": [
    "Grafite"
  ],
  "definition": "Grafite is an approximate integer-range emptiness filter that stores locality-preserving hash codes in an Elias-Fano representation.",
  "note": "The author's implementation exposes either a target error with a range length or a bits-per-key budget; its separate bucket class is a heuristic filter, not the same guarantee. The size method includes object and encoded-container storage. [grafite-code]\n\nFor leading budget B, the paper bounds false-positive probability by min(1, ell/2^(B-2)); ell counts possible integer positions, not stored keys. Query time is O(B), hence constant when B is fixed. Lower-order metadata is excluded from that leading budget. [grafite-paper]\n\nAn exact sizing example gives minimum integer leading budgets of 9, 14 and 19 bits per key for lengths 1, 32 and 1024 at a 1% target. This evaluates a bound, not observed FPR or allocated memory. [budget]",
  "related": [
    "succinct-range-filter",
    "rosetta-range-filter",
    "bloom-filter",
    "sstable"
  ],
  "citations": [
    {
      "id": "grafite-paper",
      "title": "Costa, Ferragina and Vinciguerra. Grafite. PACMMOD 2(1), 2024; theorem 3.4, corollary 3.5 and section 6.1. DOI: 10.1145/3639258.",
      "url": "https://arxiv.org/html/2311.15380v2",
      "accessed": "2026-11-10"
    },
    {
      "id": "grafite-code",
      "title": "Grafite author implementation: filter constructors, query and size; pinned commit 6838e9c6f757b300c410e79bc9c608ece2c5f23f.",
      "url": "https://github.com/marcocosta97/grafite/blob/6838e9c6f757b300c410e79bc9c608ece2c5f23f/include/grafite/grafite.hpp",
      "accessed": "2026-11-10"
    },
    {
      "id": "budget",
      "title": "Hesela: exact Grafite bound arithmetic and regression tests (CC0)",
      "url": "https://hesela.dev/research/grafite-budget.test.mjs",
      "accessed": "2026-11-10"
    },
    {
      "id": "analysis",
      "title": "Hesela: range length and filter memory budgets",
      "url": "https://hesela.com/analyses/bloom-filters-lsm-read-cost/#grafite-budget",
      "accessed": "2026-11-10"
    }
  ],
  "status": "research",
  "advantages": [],
  "limitations": [
    {
      "text": "A positive answer still needs data verification; a bound of one provides no useful filtering guarantee.",
      "citationIds": [
        "grafite-paper"
      ]
    }
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-10",
  "provenance": [
    "Primary-source review and original arithmetic only; no Grafite runtime, database benchmark or adaptive-security validation. [grafite-paper] [budget]"
  ]
}
