# ReCoPII: A Relation-Grounded Framework for Building Contextual PII Masking Datasets

DevFeed: [ReCoPII: A Relation-Grounded Framework for Building Contextual PII Masking Datasets](<https://devfeed.tech/articles/recopii-a-relation-grounded-framework-for-building-contextual-pii-masking-datasets-103057.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.35925>)

Author: Taehwan Lee

Published: 2026-10-28T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>)

Topics: [privacy-filter](<https://devfeed.tech/topics/privacy-filter.md>), [pii](<https://devfeed.tech/topics/pii.md>), [responsible-ai](<https://devfeed.tech/topics/responsible-ai.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-cl](<https://devfeed.tech/tags/cs-cl.md>), [datasets](<https://devfeed.tech/tags/datasets.md>), [framework](<https://devfeed.tech/tags/framework.md>), [masking](<https://devfeed.tech/tags/masking.md>), [pii](<https://devfeed.tech/tags/pii.md>)

## AI overview

ReCoPII builds contextual PII masking data without assuming a document has only one data subject. It plans ontology-constrained entity relations, creates placeholder-based insertion sentences, reconstructs annotations with code, checks them with a separate LLM, and assigns MASK/KEEP labels from the relations. On Korean documents across six domains, the resulting ReCoPII-Ko corpus achieved 88.42% annotator agreement on sampled KEEP labels across 300 pairs, compared with 26.27% for SPY-style augmentation from the same sources. Models trained on ReCoPII-Ko over-masked less on a matched test. Jointly fine-tuning contextual masking with a PII detector reduced most over-masking from detection alone at a fixed leakage budget; among four detectors meeting that budget, over-masking was at most 5.04% and leakage at most 4.18% on human-verified entity records. The detector was comparable to XLM-R-large on KDPII with about one quarter as many parameters.

## Source excerpt

arXiv:2610.35925v1 Announce Type: cross Abstract: Training contextual masking systems for personally identifiable information (PII) requires examples distinguishing maskable from preservable mentions of one entity type, but privacy restrictions limit access to real data. Author-based augmentation (SPY) labels mentions unrelated to the author as non-PII, presuming a single data subject and overlooking others. We propose ReCoPII (Relation-grounded Contextual PII masking), a framework that builds such data without this premise: it plans ontology-constrained entity relations, writes insertion sentences with placeholders, reconstructs annotations with code, checks the result with a separate LLM, and derives MASK/KEEP labels from entity relations. On Korean documents from six domains, it yields ReCoPII-Ko, a corpus with relation, privacy, and MASK/KEEP annotations, which we validate. Across 300 pairs, four annotators agree with 88.42% of its sampled KEEP labels, against 26.27% for SPY-style augmentation of the same sources. Classifiers trained on it over-mask less than under that reference on a matched test. Contextual masking fine-tuned jointly with a PII detector removes most over-masking of detection alone within a fixed leakage budget; on human-verified entity records, the four detectors meeting it over-mask at most 5.04% with at most 4.18% leakage. The detector is comparable to XLM-R-large on KDPII with about a quarter of its parameters.