CoolFace
Datasetpublic

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.

sourceHugging Facemitupdated 27d agoView on Hugging Face
0likes84downloads
Dataset Card

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

SplitSamples
Train~96,000
Validation~12,000
Test~12,000

Features

FeatureTypeDescription
textstringRaw synthetic text
spanslist[{start,end,label}]Character-level entity annotations
tokenslist[string]Word-level tokens (RoBERTa tokenizer)
input_idslist[int]RoBERTa token IDs
attention_masklist[int]Mask for valid tokens
labelslist[int]Token classification labels (BILOU-coded)

πŸ“₯ How to Load the Dataset

python
from datasets import load_dataset

ds = load_dataset("tursunait/RoBERTa-pii-synth")

train = ds["train"]
val = ds["validation"]
test = ds["test"]

Inspect sample:

pyhton
sample = train[0]
sample

Example sample:

json
{
  "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