PII-Bench / README.md
shenhao's picture
docs: fix Markdown line breaks and polish README header formatting
c124dd8 verified
|
Raw History Blame Contribute Delete
12.8 kB
metadata
annotations_creators:
  - machine-generated
  - expert-generated
language:
  - en
language_creators:
  - machine-generated
  - expert-generated
license: cc-by-4.0
multilinguality:
  - monolingual
pretty_name: PII-Bench (ACL 2026)
size_categories:
  - 1K<n<10K
source_datasets:
  - original
task_categories:
  - token-classification
  - text-classification
  - question-answering
tags:
  - pii
  - privacy
  - privacy-preserving-nlp
  - benchmark
  - llm-evaluation
  - acl-2026
configs:
  - config_name: default
    default: true
    data_files:
      - split: single
        path: data/default/single.parquet
      - split: multi
        path: data/default/multi.parquet
      - split: hard
        path: data/default/hard.parquet
      - split: distract
        path: data/default/distract.parquet
  - config_name: paper_exact
    data_files:
      - split: single
        path: data/paper_exact/single.parquet
      - split: multi
        path: data/paper_exact/multi.parquet
      - split: hard
        path: data/paper_exact/hard.parquet
      - split: distract
        path: data/paper_exact/distract.parquet
  - config_name: privacy_utility
    data_files:
      - split: test
        path: data/privacy_utility/test.parquet

PII-Bench: Evaluating Query-Aware Privacy Protection Systems (ACL 2026)

Conference Dataset GitHub ModelScope License: CC BY 4.0

Iterative Updates Notice: PII-Bench is actively maintained and will be iteratively updated (future versions may add new splits such as PII-Real, extended evaluation subsets, and further quality refinements). The paper_exact configuration remains permanently frozen to guarantee 0.0000 bit-exact reproducibility of all ACL 2026 paper results.


Overview

PII-Bench is a benchmark for evaluating query-aware privacy protection systems on user prompts sent to Large Language Models (LLMs). Instead of leaving all Personally Identifiable Information (PII) exposed (No Masking) or masking every PII entity indiscriminately (All PII Masking), PII-Bench evaluates Query-Unrelated PII Masking:

  1. Task 1 — PII Detection: Identify all PII entities ($E$) across one or more subjects, attribute each entity to its subject ($s \in S$), and classify its coarse PII type ($t \in T$).
  2. Task 2 — Query-Related PII Detection: Determine the minimal subset of PII entities necessary to answer a user query ($E_q \subseteq E$).
  3. Task 3 — Query-Unrelated PII Masking: Mask only the query-unrelated PII ($E \setminus E_q$) while preserving $E_q$ and prompt utility.

PII-Bench contains 2,842 core benchmark samples across 7 coarse PII types (PER, CODE, LOC, ORG, DEM, DATETIME, QUANTITY) and fine-grained subcategories (55 defined in Table 11; 54 observed canonical tags in the cleaned dataset), organized into four official splits:

  • single (1,214 samples; 607 unique single-subject descriptions $\times$ 2 queries each)
  • multi (1,228 samples; 614 unique two-subject descriptions $\times$ 2 queries each, covering Intersection, Contains, and No Intersection relationships)
  • hard (200 samples; challenging subset drawn from single [114] and multi [86] — see metadata/hard_subset_indices.json)
  • distract (200 samples; complex multi-party forum/network dialogues integrating 5 descriptions and ~7.5 subjects per sample)

Plus the privacy_utility configuration (200 samples from Section 4.5 / Table 8 with span-safe full and query-unrelated masked prompts).


Configurations (default vs. GitHub cleaned vs. paper_exact)

Naming Note: HuggingFace's default config and the GitHub repository's data/cleaned/ directory contain 100% identical data (verified row-for-row). HuggingFace uses the reserved config name default so load_dataset("shenhao/PII-Bench") loads the recommended cleaned v1.1 release automatically.

HF Config Matching GitHub Path Splits Intended Use
default (recommended) data/cleaned/pii_{single,multi,hard,distract}.jsonl single (1,214), multi (1,228), hard (200), distract (200) Schema-verified, cleaned v1.1 release: zero leaked prediction fields, zero UNKNOWN types, 100% aligned entity arrays, 100% twin-description entity symmetry across all 1,221 pairs, zero absent-from-text ghost entities, canonicalized tags, and realistic synthetic formats preserved. Verified $\le +0.0015$ F1 delta vs. raw ACL 2026 evaluations with identical model rankings.
paper_exact (frozen) data/paper_exact/PII_{single_final,multi_final,hard,distract}.jsonl single (1,214), multi (1,228), hard (200), distract (200) Bit-exact ground-truth strings from the ACL 2026 camera-ready experiments (removing only the accidentally saved 'predict' output field from hard), reproducing Table 3, Table 10, and Tables 4–26 with 0.0000 drift.
privacy_utility data/cleaned/pii_masked_200.jsonl test (200) Cleaned v1.1 200-sample subset for Section 4.5 Privacy-Utility tradeoff evaluation using span-safe, case-insensitive, most_related-protected masking (zero corrupted query-relevant spans and zero case-mismatch leaks; verbatim raw prompts are preserved in GitHub data/paper_exact/PII_masked.jsonl).

Quickstart

from datasets import load_dataset

# Load the recommended cleaned release (v1.1; identical to GitHub data/cleaned/)
ds = load_dataset("shenhao/PII-Bench")
print(ds)
# DatasetDict({single: 1214, multi: 1228, hard: 200, distract: 200})

sample = ds["single"][0]
print("Description:", sample["usr_desc"][:160])
print("Query:", sample["query"])
print("All PII:", sample["entities"]["total"])
print("Query-Related PII:", sample["most_related"])
print("Query-Unrelated PII (to mask):", sample["query_unrelated"])

# Load the frozen bit-exact ACL 2026 reproduction config
ds_exact = load_dataset("shenhao/PII-Bench", "paper_exact")

# Load the Section 4.5 Privacy-Utility tradeoff subset (span-safe v1.1)
ds_pu = load_dataset("shenhao/PII-Bench", "privacy_utility", split="test")

Dataset Statistics

Cleaned default (v1.1) vs. paper_exact (ACL 2026)

Split #Samples Unique Descs Avg #Subjects Avg #Chars (Desc) Avg #PII (Desc) Avg #Chars (Query) Avg #PII (Query) Total Entities (default v1.1 / paper_exact Table 10)
single 1,214 607 1.00 893.48 7.66 / 7.67 211.21 1.95 9,300 / 9,303
multi 1,228 614 2.00 652.65 13.14 236.21 2.06 16,136 / 16,136
hard* 200 200 1.43 746.08 9.18 / 9.17 222.66 2.06 1,835 / 1,834
distract 200 200 7.47 4,403.64 51.05 / 51.08 859.68 / 859.69 5.82 10,210 / 10,211
Total 2,842 1,421** 1.92 1,026.07 13.19 268.45 2.28 37,481 / 37,484
  • * hard is an overlapping challenging subset selected from single (114) and multi (86) via metadata/hard_subset_indices.json; its paper_exact entity distribution matches ACL 2026 Table 10 (1,834 entities) and Table 23 evaluations verbatim.
  • ** 607 (single) + 614 (multi) + 200 (distract) = 1,421 non-overlapping unique descriptions (hard reuses 200 of the 1,221 single+multi descriptions).

Data Schema

Each record in default and paper_exact shares an identical strongly-typed schema:

Field Type Description
sample_id string Globally unique identifier (single_0000, multi_0000, hard_0000, distract_0000)
split string Split name (single, multi, hard, distract)
id int64 Original within-file integer ID from ACL 2026 source JSONL
from_id string Source description lineage identifier (origin_*, extra_*, or comma-separated component IDs in distract)
rel string Multi-subject relationship type (Intersection, Contains, No Intersection, or "" for single/distract)
scene string Target real-world consultation scenario
num_subjects int64 Number of distinct subjects ($
usr_desc string User background description containing synthetic PII ($d$)
query string User query ($q$)
most_related list[string] Ground-truth query-relevant PII entities ($E_q$)
subjects list[string] Subject IDs (A, B, AB, ...) aligned 1-to-1 with most_related
query_unrelated list[string] Ground-truth query-unrelated PII entities to mask ($E \setminus E_q$)
entities.total list[string] Deduplicated list of all PII entities ($E$)
entities.total_subjects list[string] Subject attribution (A, AB, ...) aligned 1-to-1 with entities.total
entities.total_types list[string] Coarse PII type (PER/CODE/LOC/ORG/DEM/DATETIME/QUANTITY) aligned with entities.total
entities.total_tags list[string] Fine-grained PII subcategory aligned with entities.total
entities.values list[list[string]] Per-subject entity lists (values[i] = entities of subject $i$)
entities.types list[list[string]] Per-subject coarse PII types aligned with entities.values
entities.tags list[list[string]] Per-subject fine-grained tags aligned with entities.values

Reference Benchmark Results (ACL 2026)

  1. Task 1 — PII Detection (Strict-F1 across single, multi, hard, distract; deduplicated to unique usr_desc):
    • Human Baseline: 97.2 (single), 95.4 (multi), 91.3 (hard), 92.8 (distract)
    • GPT-4o: 0.893 / 0.891 / 0.817 / 0.715
    • Claude-3.5-Sonnet: 0.858 / 0.890 / 0.813 / 0.910
    • GPT-5 (Table 23): 0.871 / 0.884 / 0.840 / 0.832
    • DeepSeek-R1 (Table 23): 0.876 / 0.879 / 0.835 / 0.826
  2. Task 2 — Query-Related PII Detection (PII-Single best non-oracle F1):
    • Human Baseline: 95.1 F1
    • GPT-4o (Self-Consistency): 0.72 F1 | GPT-5 (Self-CoT): 0.733 F1 | DeepSeek-V3.2 (Self-CoT): 0.765 F1 | DeepSeek-R1 (Self-CoT): 0.745 F1
  3. Task 3 — Query-Unrelated PII Masking (PII-Single best non-oracle F1):
    • GPT-4o (Self-Consistency, single+multi): 0.77 F1 | GPT-5 (Self-CoT, single): 0.840 F1 | DeepSeek-V3.2 (Self-CoT, single): 0.852 F1

Data Cleaning, Realism & Maintenance

See DATA_CARD_AUDIT.md for the complete v1.1 cleaning log (474 audited events) and exact empirical parity verification against ACL 2026 saved predictions.

  • Synthetic Realism Preserved: All 2,842 released samples are fully synthetic (generated via rule-based templates, Faker, and GPT-4-0806, followed by multi-round human verification). Realistic formats — including common email suffixes (e.g., @163.com, @gmail.com) and authentic regional formats (e.g., Chinese license plates 湘A-65225, 黑A53975, 鄂A·55978) — are intentionally preserved to maintain real-world evaluation fidelity.
  • Versioning & Iterative Updates: This dataset will continue to be iteratively maintained and expanded in future releases (including potential future release of PII-Real and additional benchmarks), while keeping paper_exact immutable for ACL 2026 paper reproducibility.

Citation

@inproceedings{shen2026piibench,
  title     = {{PII-Bench}: Evaluating Query-Aware Privacy Protection Systems},
  author    = {Shen, Hao and Gu, Zhouhong and Hong, HaoKai and Han, Weili and Chai, Hongfeng},
  booktitle = {Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (ACL 2026)},
  year      = {2026}
}