Metric Differential Privacy for Semantic Text Sanitization

You are reading version 1 of this direction, frozen 2026-10-04. The latest version is version 2.

Version 1 of 2171 papers273 conceptsfrozen 2026-10-04

Standard Differential Privacy (DP) is often described as a "blunt instrument" when applied to natural language. In its classic form, DP treats all data points as equally distinct: replacing the word "doctor" with "physician" is viewed as just as significant a change as replacing "doctor" with "refrigerator." For text, where meaning is derived from the relationships between words, this lack of nuance often results in "word salad"—privatized text that is mathematically secure but linguistically useless.

To solve this, researchers have developed Metric Differential Privacy (also known as $d$-privacy or $d_\chi$-privacy). This framework moves away from the binary "is it the same or different?" logic of standard DP and instead scales privacy guarantees based on the semantic distance between words.

The Geometry of Meaning

The core intuition behind metric-based privacy is that some substitutions preserve more utility than others. As Mark Dras, Natasha Fernandes, and Annabelle McIver argue in Generalised Differential Privacy for Text Document Processing, effective text obfuscation requires a framework that understands "conceptual neighborhoods."

To achieve this, the process typically follows four steps:

  1. Embedding: Discrete tokens (words) are mapped into a high-dimensional vector space using models like Word2Vec or GloVe. In this space, "doctor" and "surgeon" are geometrically close, while "doctor" and "banana" are far apart.
  2. Metric Definition: A distance metric $d$ (such as Euclidean distance) is defined over this space.
  3. Perturbation: Calibrated noise is added to the vector. Instead of a coin flip to decide whether to change a word, the system samples a new point in the vector space from a distribution (like the Laplace or Gumbel distribution) centered on the original word.
  4. Projection: The resulting noisy vector is mapped back to the nearest real word in the vocabulary.

By using this approach, Oluwaseyi Feyisetan and Thomas Drake demonstrated in Privacy- and Utility-Preserving Textual Analysis via Calibrated Multivariate Perturbations that we can provide "plausible deniability" for specific words while ensuring the output remains semantically related to the input.

Scaling Indistinguishability

In standard Local Differential Privacy (LDP), the privacy parameter $\epsilon$ defines a global bound on how much any single change can affect the output. In Metric DP, the privacy guarantee is distance-aware.

As pioneered in the context of location privacy by Miguel E. Andrés and Catuscia Palamidessi in Geo-Indistinguishability: Differential Privacy for Location-Based Systems, the probability of two inputs $x$ and $x'$ producing the same output $y$ is bounded by $e^{\epsilon \cdot d(x, x')}$.

This means that if two words are very similar (small $d$), they must be very hard to distinguish. If they are very different (large $d$), the privacy requirement relaxes. This allows the mechanism to "concentrate" its probability mass on synonyms, preserving the topic of a sentence while hiding the specific identity of the words used.

Refining the Substitution Space

While simple vector perturbation is powerful, it has pitfalls. For example, antonyms like "good" and "bad" often appear in similar contexts and thus end up close together in embedding spaces. To combat this, Haoqi Wu introduced Cape, a context-aware mechanism that uses local language models to ensure substitutions maintain the original sentence's intent, preventing a "privacy-preserving" flip from "I love this" to "I hate this" (Cape: Context-Aware Prompt Perturbation Mechanism with Differential Privacy).

Another optimization involves the Exponential Mechanism. Fengran Mo and colleagues developed CusText, which restricts the output space to a small set of semantically related candidates rather than the entire dictionary (A Customized Text Sanitization Mechanism with Differential Privacy). By reducing the "sensitivity" of the selection process, they achieved stronger privacy guarantees with significantly less distortion to the text's meaning.

From Words to Documents

The utility of Metric DP extends beyond individual words. Researchers like Ahmed Musa Awon have explored CluSanT, which uses clustering to group semantically similar embeddings before applying noise (CluSanT: Differentially Private and Semantically Coherent Text Sanitization). This ensures that the model preserves fine-grained factual details—critical for tasks like Retrieval-Augmented Generation (RAG)—while still satisfying formal privacy requirements.

By treating privacy as a geometric problem rather than a logical one, Metric DP allows us to navigate the "privacy-utility trade-off" with far more precision, enabling the use of sensitive text data in Large Language Models without turning the results into unreadable noise.

Papers in this version

Showing 60 of 171 papers.

History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 109 papers
  2. Version 1 · 2026-10-04 · 171 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_metric_based_differential_privacy_df3dc248,
  title = {metric-based differential privacy},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/metric-based-differential-privacy/rdr_df3dc248a0234505988aabb830f4c108},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-19},
}

This exact version (version 1, frozen text):

@misc{lacuna_metric_differential_privacy_for_semantic_df3dc248_v1,
  title = {Metric Differential Privacy for Semantic Text Sanitization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/metric-differential-privacy-for-semantic-text-sanitization/rdr_df3dc248a0234505988aabb830f4c108/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-19},
}