遇见数据集

tursunait/roberta-pii-synth

收藏
Hugging Face2025-12-08 更新2025-12-20 收录
官方服务:

资源简介:

--- license: mit datasets: - tursunait/RoBERTa-pii-synth language: - en tags: - pii - ner - synthetic-data - token-classification - deidentification - privacy - nlp task_categories: - token-classification task_ids: - named-entity-recognition pretty_name: RoBERTa PII Synthetic Dataset size_categories: - 100K<n<1M --- # **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** | Split | Samples | |-------|---------| | **Train** | ~96,000 | | **Validation** | ~12,000 | | **Test** | ~12,000 | --- ### **Features** | Feature | Type | Description | |---------|------|-------------| | `text` | `string` | Raw synthetic text | | `spans` | `list[{start,end,label}]` | Character-level entity annotations | | `tokens` | `list[string]` | Word-level tokens (RoBERTa tokenizer) | | `input_ids` | `list[int]` | RoBERTa token IDs | | `attention_mask` | `list[int]` | Mask for valid tokens | | `labels` | `list[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 ---

--- license: MIT许可证 datasets: - tursunait/RoBERTa-pii-synth language: - 英语 tags: - 个人可识别信息(Personally Identifiable Information,简称PII) - 命名实体识别(Named Entity Recognition,简称NER) - 合成数据 - Token分类(Token-classification) - 去标识化 - 隐私 - 自然语言处理(Natural Language Processing,简称NLP) task_categories: - Token分类(Token-classification) task_ids: - 命名实体识别(Named Entity Recognition,简称NER) pretty_name: RoBERTa PII 合成数据集 size_categories: - 100K<样本数<1M --- # **合成个人可识别信息检测数据集(RoBERTa-PII-Synth)** *一款大规模全合成数据集,用于训练Token分类模型以识别真实文本中的个人可识别信息(Personally Identifiable Information,简称PII)。* 本数据集基于**增强型合成数据生成流水线**构建,旨在更好地还原真实世界用户文本的语言特征与格式多样性。所有样本均为**完全人工合成**——未包含任何真实人物或真实标识符。 --- # **📘 数据集概览** **RoBERTa-PII-Synth** 包含**12万+合成样本**,每个样本均具备: - 自然语言文本(涵盖短、中、长多句样本) - 字符级PII跨度标注 - 适配RoBERTa的分词特征:`tokens`、`input_ids`、`attention_mask`与`labels` - 多样化实体类型: - `PERSON`(人物)、`EMAIL`(电子邮箱)、`PHONE`(电话号码)、`ORG`(组织机构)、`ADDRESS`(地址)、 - `DATE`(日期)、`CREDIT_CARD`(信用卡号)、`SSN`(社会安全号码(Social Security Number,简称SSN))、**`AGE`(年龄,新增)** 数据集包含以下特性: ✔ **混淆式PII** (例如:`john[at]gmail[dot]com`、带空格的电话号码、拼写错误的标识符) ✔ **丰富格式多样性** (用户名、国际电话号码格式、带点或空格分隔的社会安全号码) ✔ **噪声注入机制** (实体外保留长度的噪声;实体内的真实化篡改) ✔ **难例负样本** (全局唯一标识符(Globally Unique Identifier,简称GUID)、媒体访问控制地址(Media Access Control Address,简称MAC)、SHA1哈希、无效信用卡号) ✔ **全非PII干净样本** (用于提升模型精度的真实化非PII文本) --- # **📁 数据集结构** ### **数据集划分** | 划分 | 样本量 | |-------|---------| | **训练集** | 约96,000 | | **验证集** | 约12,000 | | **测试集** | 约12,000 | --- ### **数据特征** | 特征名 | 数据类型 | 描述 | |---------|------|-------------| | `text` | `string` | 原始合成文本 | | `spans` | `list[{start,end,label}]` | 字符级实体标注 | | `tokens` | `list[string]` | 词级分词结果(适配RoBERTa分词器) | | `input_ids` | `list[int]` | RoBERTa分词ID序列 | | `attention_mask` | `list[int]` | 有效Token掩码 | | `labels` | `list[int]` | Token分类标签(采用BILOU编码) | --- # **📥 数据集加载方法** python from datasets import load_dataset ds = load_dataset("tursunait/RoBERTa-pii-synth") train = ds["train"] val = ds["validation"] test = ds["test"] 查看样本示例: python sample = train[0] sample 样本示例: json { "text": "请联系 kees.guirard@aol.com 或 +31 880 385 2406。申请人:约翰·D·史密斯,出生日期: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"} ] } ## 适用场景 本数据集专为以下场景优化: 1. 训练PII命名实体识别模型(如RoBERTa、DeBERTa、Electra等) 2. 构建大语言模型(Large Language Model,简称LLM)隐私过滤与内容脱敏工具 3. 用于在将文本发送至聊天机器人前掩码PII的Chrome浏览器扩展程序 4. 数据防泄漏系统 5. 评估模型对混淆式PII与噪声的鲁棒性 ## 局限性 1. 本数据集为全合成数据,可能仍缺失部分罕见的真实世界格式 2. 未包含共指消解逻辑(例如将“他”与对应`PERSON`实体关联) 3. 实体内的噪声可能会偏移字符位置;下游系统需谨慎处理坐标映射 ## 伦理考量 1. 数据集未包含任何真实PII 2. 旨在提升隐私保护、合规性与安全性 3. 采用MIT许可证,支持学术与商业使用 ## 引用格式 bibtex @dataset{tursunait2025_piisynth, author = {Turumbekova, Tursunai}, title = {RoBERTa PII 合成数据集}, year = {2025}, url = {https://huggingface.co/datasets/tursunait/RoBERTa-pii-synth} } ## 联系方式 图尔孙艾·图伦别科娃(Tursunai Turumbekova) GitHub: https://github.com/tursunait

提供机构:
tursunait
二维码
社区交流群
二维码
科研交流群
商业服务