xorushi/roberta-pii-synth
Synthetic PII Detection Dataset (RoBERTa-PII-Synth) A large-scale, fully synthetic dataset for training token-classification models to detect Personally Identifiable Information (PII) in realistic text. This dataset was built using an enhanced synthetic generation pipeline, designed to better capture the linguistic and formatting variability of real-world user text. All samples are fully artificial β no real people or identifiers appear anywhere. π Dataset Summaryβ¦ See the full description on the dataset page: https://huggingface.co/datasets/xorushi/roberta-pii-synth.
Synthetic PII Detection Dataset (RoBERTa-PII-Synth)
A large-scale, fully synthetic dataset for training token-classification models to detect Personally Identifiable Information (PII) in realistic text.
This dataset was built using an enhanced synthetic generation pipeline, designed to better capture the linguistic and formatting variability of real-world user text. All samples are fully artificial β no real people or identifiers appear anywhere.
π Dataset Summary
RoBERTa-PII-Synth contains 120k+ synthetic examples, each with:
- Natural-language text (short, medium, or long multi-sentence samples)
- Character-level PII span annotations
- Tokenized features for RoBERTa (
tokens,input_ids,attention_mask,labels) - A diverse set of entity types:
PERSON,EMAIL,PHONE,ORG,ADDRESS,DATE,CREDIT_CARD,SSN, `AGE` (new)
The dataset includes:
β Obfuscated PII (e.g., john[at]gmail[dot]com, spaced-out phone numbers, misspellings)
β Heavy format diversity (usernames, international phone formats, dotted/space-separated SSNs)
β Noise injection (length-preserving noise outside entities; realistic corruption inside entities)
β Hard negatives (GUIDs, MAC addresses, SHA1 hashes, invalid credit card numbers)
β Clean all-O examples (realistic non-PII text for improving precision)
π Dataset Structure
Splits
Features
π₯ How to Load the Dataset
from datasets import load_dataset
ds = load_dataset("tursunait/RoBERTa-pii-synth")
train = ds["train"]
val = ds["validation"]
test = ds["test"]Inspect sample:
sample = train[0]
sampleExample sample:
{
"text": "Contact kees.guirard@aol.com or +31 880 385 2406. Applicant: John D. Smith, DOB 1990-05-15.",
"spans": [
{"start": 8, "end": 29, "label": "EMAIL"},
{"start": 33, "end": 49, "label": "PHONE"},
{"start": 61, "end": 74, "label": "PERSON"},
{"start": 81, "end": 91, "label": "DATE"}
]
}Intended Use
The dataset is optimized for:
Training PII NER models (RoBERTa, DeBERTa, Electra, etc.)
Building LLM privacy and redaction filters
Chrome extensions that mask PII before sending text to chatbots
Data-loss prevention systems
Benchmarking robustness to obfuscation + noise
Limitations
Fully synthetic β rare real-world formats may still be missing
No coreference (e.g., linking βheβ to a PERSON)
In-span noise can alter offsets; downstream systems should handle mapping carefully
Ethical Considerations
Contains no real PII
Designed to improve privacy, compliance, and safety
MIT license allows academic and commercial use
Citation
@dataset{tursunait2025_piisynth, author = {Turumbekova, Tursunai}, title = {RoBERTa PII Synthetic Dataset}, year = {2025}, url = {https://huggingface.co/datasets/tursunait/RoBERTa-pii-synth} }
Contact
Tursunai Turumbekova GitHub: https://github.com/tursunait
