Abstract
Traditional text deidentification relies on the removal of predefined categories of Personally Identifiable Information (PII). However, individuals can often be reidentified through "quasi-identifiers"—combinations of non-private words that uniquely describe a subject. This paper discusses NN DeID, an unsupervised approach that identifies and masks these leaky terms by simulating an adversarial reidentification attack. By optimizing for K-anonymity using a neural dual-encoder model, NN DeID achieves superior privacy protection with significantly less text redaction than traditional frequency-based methods.
Introduction
In the era of large-scale data sharing, protecting individual privacy in text documents is a critical challenge. Standard practices, such as those mandated by HIPAA, typically focus on a checklist of 18 specific PII categories (e.g., names, social security numbers, zip codes). These are usually removed using supervised Named Entity Recognition (NER) models.
However, privacy leakage often occurs through a "nebulous 18th category": unique characteristics or combinations of facts that are not inherently private but become identifying in context. For example, a document describing an "American sculptor" from "Cradley Heath" might uniquely identify an individual even if their name is redacted. Because these words are common nouns or adjectives, supervised models trained only on PII fail to recognize them as risks. NN DeID addresses this by treating deidentification as a minimax problem: masking the minimum amount of text necessary to prevent a powerful neural model from successfully reidentifying the subject.
Methodology: The NN DeID Framework
The core philosophy of NN DeID is rooted in the principle of K-anonymity. An individual is considered deidentified if they cannot be distinguished from at least $K-1$ other individuals in a given population. The system consists of three primary components:
1. The Neural Reidentification Model
The researchers utilize a "dual encoder" architecture (employing RoBERTa and TAPAS). One encoder processes the document text, while the other encodes a "profile" (such as a structured Wikipedia infobox). The model is trained to maximize the similarity between a document and its corresponding profile while minimizing similarity to all other profiles in the dataset.
2. Training with Word Dropout
To ensure the model is a robust "attacker," it is trained using a word dropout strategy. By randomly masking words during training, the model learns to identify individuals even when the text is incomplete, forcing it to pick up on subtle linguistic cues and secondary identifiers.
3. Greedy Deidentification Algorithm
To deidentify a new document, NN DeID employs a greedy search algorithm. The system iteratively identifies the word that, if masked, most significantly reduces the model's confidence in the correct identity. This process continues until the probability of identifying the correct individual falls below a threshold where they are no longer within the top-$K$ predictions. This ensures a quantifiable privacy guarantee against a neural adversary.
Experimental Setup and Datasets
The study utilizes the Wikipedia Biographies (WikiBio) dataset, which provides a natural ground truth for deidentification research. The dataset contains thousands of biographical articles paired with structured infoboxes.
The scale of the experiment was significant: the model was trained on over 580,000 document-profile pairs and evaluated against a pool of over 720,000 possible identities. This high-cardinality environment ensures that the reidentification task is sufficiently challenging and representative of real-world privacy risks.
Key Insights and Results
The Failure of Standard Redaction
A striking finding of the research was the extent of "hidden leakage." The authors discovered that even after removing all named entities and every word that appeared in the subject's profile, a neural model could still correctly reidentify the individual 80% of the time. This demonstrates that traditional redaction is fundamentally insufficient for high-stakes privacy.
Contextual Sensitivity
NN DeID identifies quasi-identifiers that are often invisible to human annotators. For instance, the model might mask the article "an" before the phrase "American musician" because the grammatical structure "an [A...]" narrows the search space more than "a [M...]". It also frequently redacts gender markers and specific locations that serve as powerful filters for identity.
Privacy-Utility Trade-off
NN DeID demonstrated Pareto superiority over unsupervised baselines:
- Privacy: It achieved a reidentification rate of <1%.
- Utility: To reach this level of privacy, NN DeID only needed to mask 43.5% of the text. In comparison, a frequency-based baseline (IDF) required masking over 82% of the text to achieve the same privacy level, rendering the document nearly unreadable.
Limitations and Future Directions
While promising, the authors note several areas for further development:
- Profile Dependency: The method currently requires a structured dataset of profiles to train the reidentification model, which may not be available for all domains.
- Masking Artifacts: The number of masks can occasionally act as a signal (e.g., a three-word mask might imply a specific three-word entity). Future iterations may explore total deletion or variable-length masking to mitigate this.
- Domain Expansion: Extending this adversarial approach to legal and medical corpora is a priority, as these fields require the highest levels of privacy and utility preservation.
Conclusion
NN DeID represents a shift from rule-based deidentification to a dynamic, model-based approach. By thinking like an attacker, the system provides a more rigorous privacy guarantee while preserving the semantic utility of the text, offering a path forward for the safe sharing of sensitive textual data.
Summary updated