rizzoaiacademy/rizzo-pii-it-dataset
rizzo-pii ยท Italian PII dataset ๐ฆ๐ก๏ธ The training & validation data behind rizzoaiacademy/rizzo-pii-0.3B โ a PII token-classification model for Italian legal text, covering 22 categories of personal data including the Italian legal identifiers (codice fiscale, partita IVA, dati catastali) that no other open PII model handles. Everything here serves one goal: anonymize legal documents locally before sending them to a closed LLM (anonymize โ reversible local dictionary โ API โโฆ See the full description on the dataset page: https://huggingface.co/datasets/rizzoaiacademy/rizzo-pii-it-dataset.
rizzo-pii ยท Italian PII dataset ๐ฆ๐ก๏ธ
The training & validation data behind **rizzoaiacademy/rizzo-pii-0.3B** โ a PII token-classification model for Italian legal text, covering 22 categories of personal data including the Italian legal identifiers (codice fiscale, partita IVA, dati catastali) that no other open PII model handles.
Everything here serves one goal: anonymize legal documents locally before sending them to a closed LLM (anonymize โ reversible local dictionary โ API โ reconstruction), for law firms and GDPR compliance.
What's in here
Full training pool โ 745k rows is the fusion of these files plus the external [Ai4Privacy `open-pii-masking-500k`](https://huggingface.co/datasets/ai4privacy/open-pii-masking-500k-ai4privacy) (multilingual real PII, ~464k train rows) which is not redistributed here โ download it from its own repo. Italian is reinforced to ~45% of the pool; ~38% is synthetic.
Record format
Every .jsonl line is one example with parallel token / BIO arrays:
{"tokens": ["Il", "Sig", ".", "Mario", "Rossi", ",", "C", ".", "F", ".", "RSSMRA85M01H501Z"],
"bio_labels": ["O", "O", "O", "B-FULLNAME", "I-FULLNAME", "O", "O", "O", "O", "O", "B-CF"]}โ ๏ธ Label encoding differs by file. The twosynthetic/*files store raw fine-grained labels (GIVENNAME,SURNAME,PEC,TAXNUM, โฆ). The model's 22-tag taxonomy is applied at load time byTAG_MAP/normalize_labels()in the training script (e.g.GIVENNAME+SURNAMEโFULLNAME,PECโTAXNUMโPIVA,CONTOโIBAN). Theprocessed/,validation/andsubsets/files are already remapped. This keeps the raw files intact so the taxonomy can change in one place.
The 22-tag taxonomy (after remapping)
FULLNAME, GENDER, AGE, EMAIL, TELEPHONENUM, STREET, BUILDINGNUM, CITY, ZIPCODE, PROVINCE, IBAN, CREDITCARDNUMBER, AMOUNT, CF, PIVA, CATASTO, DOCID, ID_DOC, ORG, DATE, TIME, TARGA โ BIO scheme = 44 label ids (+O).
The 5 IT-legal tags (CF, PIVA, CATASTO, DOCID, PROVINCE) do not exist as real data anywhere โ they come only from the synthetic generators.
Key idea: "LLM as author, code as labeler"
The synthetic data is built by letting an LLM write only the prose with `{SLOT}` placeholders, then code injects the values. This solves three problems at once:
- Exact BIO labels โ we know precisely where each value was injected.
- Mathematically valid checksums โ CF, PIVA, IBAN are generated correctly, not hallucinated.
- Zero real PII leakage โ the LLM never sees or writes a real sensitive value.
How it was used
- Training pool: all synthetic + augment + DeepMount train + Ai4Privacy (multilingual).
- Validation:
validation/validation_real.jsonlonly (Italian, real, held-out). DeepMount test is consumed exclusively by validation, never trained on.
Reproduce or retrain with the pipeline in the GitHub repo (src/data_pipeline/ to regenerate, src/training/train_pii.py to train).
Limitations
- Synthetic structure bias: tags from templates only (
CATASTO,PROVINCE) may learn structure over entity; mitigated with 72 templates + real-text augmentation + DeepMount context. - Italian-only validation (the real use case is the IT legal domain); the 7 non-IT training languages are not validated.
- Off-domain DeepMount values: US-style names/addresses โ useful for form/context, not as Italian values.
- Class imbalance:
FULLNAMEโซCREDITCARDNUMBER(~66ร).
Licensing
This repo mixes content with different licenses โ check the source before redistributing:
- *`synthetic/` โ original work, MIT** ยฉ 2026 Simone Rizzo / Rizzo AI Academy. Fully synthetic, no real PII.
- *`processed/deepmount_
** โ derived from [DeepMount00/pii-masking-ita`](https://huggingface.co/datasets/DeepMount00/pii-masking-ita); subject to that dataset's license. - `validation/validation_real.jsonl` โ built from held-out Ai4Privacy and DeepMount real text; subject to those upstream licenses (Ai4Privacy, DeepMount).
- *`subsets/`** โ stratified samples that include Ai4Privacy-derived rows; same upstream terms apply.
When in doubt, treat the non-synthetic parts as governed by their upstream licenses and cite the original datasets.
Citation
@dataset{rizzo_pii_dataset_2026,
author = {Simone Rizzo},
title = {rizzo-pii: Italian PII training pool for legal-text anonymization},
year = {2026},
url = {https://huggingface.co/datasets/rizzoaiacademy/rizzo-pii-it-dataset}
}