docs: fix Markdown line breaks and polish README header formatting
Browse files55 unmodified lines56575859606162636465666768697071727374754 unmodified lines8081828384854 unmodified lines90919293949518 unmodified lines1141151161171181196 unmodified lines12612712812913013113213321 unmodified lines15515615715815916016116216316416516616716816917017117217317417517617717817918055 unmodified lines# PII-Bench: Evaluating Query-Aware Privacy Protection Systems (ACL 2026)**Authors:** Hao Shen, Zhouhong Gu, HaoKai Hong, Weili Han\*, Hongfeng Chai**Affiliations:** Institute of Fintech & Laboratory of Data Analytics and Security, Fudan University**Paper:** *PII-Bench: Evaluating Query-Aware Privacy Protection Systems* (ACL 2026)**Official Mirrors & Code:**- **GitHub (Code + JSONL):** https://github.com/shenhao-stu/PII-Bench- **HuggingFace (Parquet):** https://huggingface.co/datasets/shenhao/PII-Bench- **ModelScope (Parquet, China Mirror):** https://modelscope.cn/datasets/shenhao23/PII-Bench> **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**: identifying all PII entities across one or more subjects, determining the minimal subset of PII entities necessary to answer a user query ($E_q \subseteq E$), and masking only the query-unrelated PII ($E \setminus E_q$).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:4 unmodified linesPlus 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.4 unmodified lines| **`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```python18 unmodified linesds_pu = load_dataset("shenhao/PII-Bench", "privacy_utility", split="test")```## Dataset Statistics### Cleaned `default` (v1.1) vs. `paper_exact` (ACL 2026)6 unmodified lines| `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 Schema21 unmodified lines| `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` |## Evaluation Tasks & Reference 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` (Strict-F1)- Claude-3.5-Sonnet: `0.858` / `0.890` / `0.813` / `0.910` (Strict-F1)- GPT-5 (Table 23): `0.871` / `0.884` / `0.840` / `0.832` (Strict-F1)- DeepSeek-R1 (Table 23): `0.876` / `0.879` / `0.835` / `0.826` (Strict-F1)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` F13. **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 & MaintenanceSee [DATA_CARD_AUDIT.md](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 & 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.## Citation55 unmodified lines565758596061626364656667686970717273747576777879808182838485864 unmodified lines91929394959697984 unmodified lines10310410510610710810911018 unmodified lines1291301311321331341351366 unmodified lines14314414514614714814915015115221 unmodified lines17417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420555 unmodified lines# PII-Bench: Evaluating Query-Aware Privacy Protection Systems (ACL 2026)[](#citation)[](#dataset-statistics)[](https://github.com/shenhao-stu/PII-Bench)[](https://modelscope.cn/datasets/shenhao23/PII-Bench)[](LICENSE)- **Paper:** *PII-Bench: Evaluating Query-Aware Privacy Protection Systems* (ACL 2026)- **Authors:** Hao Shen<sup>1,2</sup>, Zhouhong Gu<sup>3</sup>, HaoKai Hong<sup>1</sup>, Weili Han<sup>1,2\*</sup>, Hongfeng Chai<sup>1</sup>- **Affiliations:** <sup>1</sup>Institute of Fintech, Fudan University; <sup>2</sup>Laboratory of Data Analytics and Security, Fudan University; <sup>3</sup>Fudan University- **Official Repositories & Mirrors:**- **GitHub (Evaluation Code + JSONL):** https://github.com/shenhao-stu/PII-Bench- **HuggingFace (Parquet):** https://huggingface.co/datasets/shenhao/PII-Bench- **ModelScope (Parquet, China Mirror):** https://modelscope.cn/datasets/shenhao23/PII-Bench> **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:4 unmodified linesPlus 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.4 unmodified lines| **`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```python18 unmodified linesds_pu = load_dataset("shenhao/PII-Bench", "privacy_utility", split="test")```---## Dataset Statistics### Cleaned `default` (v1.1) vs. `paper_exact` (ACL 2026)6 unmodified lines| `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 Schema21 unmodified lines| `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` F13. **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 & MaintenanceSee [DATA_CARD_AUDIT.md](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
README.md+42-17