Abstract
Differential Privacy (DP) is essential for protecting sensitive information in word embeddings, yet traditional uniform noise injection often degrades model performance. We introduce Neighbourhood-Aware Differential Privacy (NADP), which tailors noise levels to the local density of word clusters in vector space. Our approach partitions the vocabulary into semantically related neighborhoods and applies adaptive noise, ensuring that "loner" words receive more protection than those in dense clusters. Experimental results across multiple benchmarks show that NADP consistently outperforms state-of-the-art DP mechanisms in maintaining utility while providing robust privacy.
Introduction
Large Language Models (LLMs) are frequently trained on sensitive datasets, such as private communications or medical records. To prevent these models from leaking private information, researchers employ Differential Privacy (DP) to mask individual identities by adding mathematical noise to word embeddings.
However, a significant privacy-utility trade-off exists: excessive noise renders embeddings unusable, while insufficient noise leaves data vulnerable. Traditional methods apply a uniform "blanket" of noise across the entire vocabulary. This is inefficient because word embeddings are not distributed evenly; some words exist in dense clusters of synonyms, while others are isolated "loners." Applying uniform noise often leaves these isolated words vulnerable to nearest-neighbor attacks. NADP addresses this by formalizing the intuition that privacy requirements should be density-dependent.
The NADP Framework
The proposed NADP mechanism follows a three-step pipeline to achieve adaptive noise injection:
- Graph Construction: A nearest-neighbor graph of the vocabulary is constructed using Jaccard similarity to determine semantic proximity.
- Neighborhood Partitioning: The graph is decomposed into connected components, representing distinct neighborhoods of semantically related words.
- Adaptive Noise Injection: Instead of a global noise level, NADP calculates local sensitivity for each neighborhood. In dense neighborhoods, less noise is required to disguise a word among its peers. Conversely, in sparse neighborhoods, more noise is added to ensure the word is sufficiently masked.
The authors mathematically prove that this neighborhood-specific approach satisfies formal $(\epsilon, \delta)$-Differential Privacy requirements.
Experimental Evaluation
The study evaluated NADP using 300-dimensional GloVe embeddings across several standard benchmarks:
- Word Similarity & STS: Evaluated using MEN, SimLex-999, SimVerb-3500, and the STS Benchmark.
- Text Classification: Tested on sentiment analysis datasets including movie and customer reviews.
- Odd-Man-Out: Assessing the model's ability to identify semantically unrelated words.
Key Results
NADP consistently outperformed existing methods such as Laplacian, Gaussian, and Mahalanobis noise across all downstream tasks. Qualitatively, NADP successfully disguised sensitive words that other state-of-the-art methods failed to hide. For instance, while the Mahalanobis mechanism might leave a word like "police" as a top neighbor of its anonymized version, NADP replaces it with semantically distant neighbors.
Furthermore, the mechanism proved computationally efficient; partitioning a 73k-word vocabulary took less than five minutes, making it a practical pre-processing step for large-scale NLP pipelines.
Conclusion and Future Work
NADP provides a robust solution for the privacy-utility trade-off in static word embeddings by leveraging the geometric structure of the vector space. While currently focused on static embeddings like GloVe, future work aims to extend this neighborhood-aware approach to contextualized embeddings (e.g., BERT, GPT). Additionally, researchers must investigate how such DP mechanisms interact with existing social biases in embeddings to ensure that privacy protection does not inadvertently amplify unfairness.
Summary updated