Guiding Text-to-Text Privatization by Syntax

Stefan Arnold, Dilara Yesilbas, Sven WeinzierlACL 2023

TL;DR

This paper introduces a novel approach to text-to-text privatization that preserves grammatical structure by incorporating part-of-speech tags into the substitution process. This method significantly improves the utility of privatized text for downstream tasks while maintaining comparable privacy guarantees, addressing a key limitation of existing methods that often result in grammatically incoherent outputs.

What Problem Does This Paper Address?

In today's data-driven world, protecting user privacy is paramount, especially when dealing with sensitive text data. Text-to-text privatization aims to anonymize text by replacing original words with semantically similar ones, often achieved by adding noise to word embeddings. While this approach ensures that substituted words come from a similar semantic context, it often fails to preserve the grammatical structure of the original text. This can lead to privatized texts that are grammatically incorrect and thus less useful for downstream applications like sentiment analysis or machine translation. The paper addresses this gap by proposing a method that guides the word substitution process to respect grammatical categories, thereby improving the syntactic coherence and utility of the privatized text.

Methods

The core of this paper's contribution lies in enhancing the existing Metric Differential Privacy (MDP) framework for text-to-text privatization. The standard MDP approach, exemplified by MADLIB, works by perturbing word embeddings and then selecting the nearest neighbor in the embedding space as a substitute.

The authors introduce a grammatical constraint into this candidate selection process. Instead of simply picking the closest word, their method first identifies a pool of k nearest neighbors (where k is greater than 1). From this pool, it prioritizes selecting a substitute word that shares the same grammatical category (e.g., noun, verb, adjective) as the original word. If no such word is found within the k neighbors, the process reverts to the standard MADLIB approach. This constraint is implemented using a lookup table that maps words to their grammatical categories.

The paper also analyzes the privacy implications of this constraint by examining plausible deniability statistics (Nw and Sw), which measure self-substitution and the diversity of substitutions, respectively.

Datasets

The paper uses the GloVe embedding space for its experiments. For evaluating the utility of the privatized text, they utilize a subset of the GLUE benchmark and the IMDb dataset for membership inference attacks.

Key Insights and Ideas

  • Grammar Matters for Utility: The most significant insight is that preserving grammatical structure is crucial for maintaining the utility of privatized text in downstream tasks. Simply relying on semantic similarity can lead to syntactically broken outputs.
  • Nouns Dominate Naive Privatization: Without grammatical constraints, text privatization tends to produce outputs heavily skewed towards nouns, indicating a loss of syntactic diversity.
  • Grammatical Constraints Improve Performance: By incorporating part-of-speech tags, the authors demonstrate a substantial improvement in downstream task performance, suggesting that syntactic coherence is a key factor for model understanding.
  • Privacy is Largely Unaffected: A crucial finding is that the proposed grammatical constraint does not significantly compromise privacy guarantees. While there are minor shifts in plausible deniability statistics, they remain within acceptable bounds, indicating that the privacy budget does not need recalibration.
  • Beyond Geometric Properties: The paper highlights a shift in focus from purely geometric properties of embeddings to linguistic properties for improving text privatization.

Key Results

  • The baseline MADLIB approach (k=1) resulted in a significant drop in BERT performance on GLUE tasks, from 81.46% to 55.45%.
  • The proposed method with a grammatical constraint and a candidate pool of k=20 narrowed this performance loss, achieving 60.11% on average. This represents a 4.66% improvement in utility compared to the baseline.
  • Linguistic analysis showed that the constrained method significantly improves the preservation of grammatical categories, with an 81.4% preservation rate at a moderate privacy budget (ε=10), compared to 45.1% for the unconstrained method.
  • Privacy analysis indicated that the grammatical constraint leads to a slight increase in self-substitution and a decrease in effective support, but these changes are marginal and do not compromise plausible deniability.

Limitations and Future Work

  • Information Leakage: The authors acknowledge that directing substitutions to candidates with matching grammatical categories might introduce additional information leakage not fully accounted for by their current privacy model. They suggest that the exponential mechanism could be used to address this.
  • Hyperparameter Tuning: The size of the candidate pool, k, is a hyperparameter that needs to be chosen appropriately. While they found k=20 to be effective, further research could explore optimal strategies for selecting k based on embedding properties.
  • Broader Grammatical Features: The current work focuses on part-of-speech tags. Future work could explore incorporating other grammatical features like number, tense, or dependency relations to further enhance syntactic preservation.
  • Membership Inference Attack: While the MIA results suggest no significant privacy loss, the authors mention that a more comprehensive attack analysis (e.g., a membership inference attack on the appendix) was conducted, indicating a willingness to explore more robust privacy evaluations.

Summary updated

BibTeX
@inproceedings{arnold2023guiding,
  author = {Stefan Arnold and Dilara Yesilbas and Sven Weinzierl},
  title = {{Guiding Text-to-Text Privatization by Syntax}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
}
Figure