Privacy- and Utility-Preserving NLP with Anonymized data: A case study of Pseudonymization

Oleksandr Yermilov, Vipul Raheja, Artem ChernodubACL 2023

TL;DR

This paper explores how different pseudonymization techniques impact the performance of NLP models on downstream tasks like text classification and summarization. They found that while NER-based methods offer better privacy preservation, LLM-based approaches excel at maintaining the original text's integrity, highlighting a crucial trade-off between privacy and utility.

What Problem Does This Paper Address?

As AI and machine learning systems become more data-hungry, handling sensitive text data (like emails, medical records, or customer chats) presents a significant challenge. Personally Identifiable Information (PII) is often embedded in this data, making its use for improving services or conducting research legally and ethically complex. While true anonymization is elusive, pseudonymization, a technique recognized by GDPR, offers a way to reduce re-identification risks. However, a key question remains: how do these pseudonymization methods affect the quality and utility of the data for NLP tasks? This paper investigates this trade-off, aiming to provide insights for researchers and practitioners working with sensitive text.

Methods

The authors evaluated three main categories of pseudonymization systems:

  1. NER-based Pseudonymization (NER-PS): This approach uses off-the-shelf Named Entity Recognition (NER) models (spaCy and FLAIR) to detect PII (PERSON, LOCATION, ORGANIZATION). These detected entities are then replaced with realistic substitutes, often sourced from knowledge graphs like Wikidata.
  2. Seq2Seq Pseudonymization (Seq2Seq-PS): This method frames pseudonymization as a sequence-to-sequence task. They fine-tuned a BART-base model on parallel corpora of pseudonymized texts generated by the NER-PS systems.
  3. LLM Pseudonymization (LLM-PS): This system leverages large language models (LLMs) like GPT-3 and ChatGPT. It involves a two-step process: first, using GPT-3 for entity extraction (zero-shot/few-shot), and then using ChatGPT for replacement with realistic substitutes.

These systems were used to pseudonymize datasets for text classification and summarization, and the performance of models trained on this data was evaluated.

Datasets

The paper used the following datasets for downstream tasks:

  • Summarization: CNN/DM (Nallapati et al., 2016)
  • Text Classification: IMDB (Maas et al., 2011)

For privacy preservation evaluation, they used the English CoNLL-2003 test set.

Key Insights and Ideas

  • The Privacy-Utility Trade-off is Real: There's no single "best" pseudonymization method; the optimal choice depends on whether privacy preservation or downstream task utility is prioritized.
  • NER-based Methods for Privacy: NER-based systems, particularly those using FLAIR, demonstrated superior privacy preservation by minimizing false negatives (i.e., PII that was not anonymized).
  • LLMs for Text Integrity: The LLM-based approach (LLM-PS) excelled in preserving the syntactic and semantic integrity of the original text, showing the best results in text syntheticity detection. This suggests LLMs can generate more natural-sounding pseudonymized text.
  • Summarization is More Sensitive: The summarization task was found to be more sensitive to errors introduced by pseudonymization compared to text classification. False positives or negatives in summarization can lead to corrupted data and inconsistent entity mentions, impacting model learning.
  • NER System Choice Matters: The choice of the underlying NER system (spaCy vs. FLAIR) can influence results. While FLAIR offered better privacy, spaCy-based approaches sometimes showed better utility, suggesting a nuanced relationship between NER performance and pseudonymization effectiveness.

Key Results

  • Summarization Performance: NER-based pseudonymization achieved the best results for summarization. Approaches using spaCy generally outperformed those using FLAIR. LLM-PS, while good for text integrity, showed lower ROUGE scores for summarization.
  • Text Classification Performance: For text classification, all pseudonymization approaches showed similar results. Using FLAIR as the underlying NER system led to slightly better performance than spaCy. This is attributed to sentiment classification relying less on named entities compared to summarization.
  • Privacy Preservation (False Negatives): NER-PS(FLAIR) had the lowest false negative rate (10.23%), indicating better privacy. Seq2Seq-PS(FLAIR) was also competitive (36.03%), while Seq2Seq-PS(SPACY) performed poorly (75.67%). LLM-PS was in the middle (35.53%).
  • Text Syntheticity Detection: LLM-PS achieved the best results, indicating that its generated texts were most similar to natural language. NER-based approaches also performed well, significantly outperforming Seq2Seq-based methods.

Limitations and Future Work

  • LLM API Dependency: A major limitation of the LLM-PS approach is its reliance on closed-source LLM APIs. Sending sensitive data to third-party APIs raises privacy concerns, potentially defeating the purpose of pseudonymization without appropriate legal safeguards.
  • Language Specificity: All experiments were conducted solely on English language data.
  • Prompt Sensitivity: LLMs are highly sensitive to prompts, and the authors had limited experiments due to API cost constraints.
  • NER Model Training Data: The FLAIR NER system was trained on the CoNLL-2003 dataset, which might affect its performance for privacy protection tasks. Similar concerns apply to GPT-3 and ChatGPT regarding their training data.
  • Limited Entity Types: The study focused only on PERSON, LOCATION, and ORGANIZATION entities, excluding other PII types like dates or phone numbers. Sentiment associated with named entities was also not considered for substitution.

Future work could explore these limitations, including expanding to other languages, investigating more comprehensive PII types, and developing more robust and privacy-preserving LLM-based pseudonymization techniques that don't rely on external APIs.

Summary updated

BibTeX
@inproceedings{yermilov2023privacy,
  author = {Oleksandr Yermilov and Vipul Raheja and Artem Chernodub},
  title = {{Privacy- and Utility-Preserving NLP with Anonymized data: A case study of Pseudonymization}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
}
Figure