Semantic Preserving Text Sanitization and Obfuscation

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

Version 1 of 299 papers115 conceptsfrozen 2026-10-04

When we share text—whether it’s a tweet, a medical record, or a prompt to a cloud-based LLM—we share more than just the literal message. We share a "linguistic fingerprint." As Gary Kacmarcik and Michael Gamon demonstrated in Obfuscating Document Stylometry to Preserve Author Anonymity, changing just a few words per thousand can drastically reduce the chance of an author being identified.

The challenge, however, is the privacy-utility trade-off. If you redact every name, date, and stylistic quirk, you end up with "word salad"—text that is grammatically broken and semantically hollow. Modern research in text sanitization aims to break this trade-off by using neural models to rewrite text so that it remains natural and useful while becoming "blind" to sensitive attributes.

The Failure of Hard Redaction

Traditional privacy methods often rely on masking (replacing "John Doe" with <NAME>). While this removes explicit identifiers, it fails to protect against "logical" or "stylometric" attacks. Shouling Ji and colleagues showed in De-Health: All Your Online Health Information Are Belong to Us that even "anonymous" health forum profiles can be linked to real identities by analyzing writing styles and social patterns.

Furthermore, hard redaction destroys the context needed for AI. As noted by Xiongtao Sun in DePrompt, removing entities from a prompt often prevents an LLM from providing an accurate response. The goal of the field has shifted from deleting information to transforming it.

Differential Privacy in a Discrete Space

Differential Privacy (DP) is the gold standard for privacy, but it was designed for continuous numbers, not discrete words. If you add "noise" to a sentence, you usually get gibberish.

To solve this, Mark Dras and Natasha Fernandes introduced a framework for Author Obfuscation Using Generalised Differential Privacy. Instead of adding noise to the text itself, they use word embeddings. By treating the distance between word meanings as a metric, they can swap a sensitive word with a "noisy" synonym that satisfies mathematical privacy guarantees while keeping the sentence readable.

Fengran Mo refined this further with CusText, which uses "customized" token sets. Instead of picking from every word in the dictionary (which introduces too much noise), the system only considers words that are semantically related to the original, significantly improving the utility of the sanitized text for tasks like sentiment analysis.

Generative Adversarial Anonymization

If the goal is to hide a specific attribute (like gender or age) while keeping the rest of the message intact, why not use an AI "detective" to guide the process?

Robin Staab and Mark Vero proposed a feedback-guided framework in Language Models are Advanced Anonymizers. In this setup:

  1. An Adversary LLM tries to guess private details from the text.
  2. An Anonymizer LLM rewrites the text to block those specific inferences.
  3. The process repeats until the detective is stumped but the story remains coherent.

Similarly, Zexue He and Julian McAuley developed DEPEN, which uses gradient-based decoding to "steer" a language model toward neutral language, stripping away demographic markers without losing the original intent.

Local Trust Zones and Prompt Desensitization

With the rise of cloud-based LLMs like ChatGPT, a new problem has emerged: how do we protect our data before it leaves our computer?

Frameworks like PP-TS by Zhigang Kan and PromptObfus by Xiaodong Gu advocate for a "local-remote" split. A small, private model on the user's device "desensitizes" the prompt—replacing private words with placeholders or unreadable (to humans) but semantically equivalent tokens—before sending it to the powerful cloud model.

For even deeper protection, the Stained Glass Transform (SGT) by Kaan Kale applies stochastic noise directly to the LLM's internal embedding sequences. This ensures that even if the service provider's servers are compromised, the original plaintext remains information-theoretically unrecoverable.

The Goal: Naturalness and Utility

The ultimate benchmark for this research is no longer just "did we hide the name?" but "does the result sound human?" Shuo Huang and colleagues introduced NAP^2 to measure this "Naturalness and Privacy-Preserving" quality.

By moving from rigid deletion to fluid, semantic-aware rewriting—using tools like DP-BART by Timour Igamberdiev or TAROT by Gabriel Loiseau—researchers are creating a future where we can share the value of our data without ever having to share ourselves.

Papers in this version

Showing 60 of 99 papers.

History & citationVersion 2 · 2026-10-04

Current · Permanent link

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

Latest version (a living page):

@misc{lacuna_privacy_utility_trade_off_semantic_prese_bef9df49,
  title = {privacy-utility trade-off (semantic preservation)},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/privacy-utility-trade-off-semantic-preservation/rdr_bef9df49edb14c2dad7b4e83d105ab51},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-20},
}

This exact version (version 1, frozen text):

@misc{lacuna_semantic_preserving_text_sanitization_an_bef9df49_v1,
  title = {Semantic Preserving Text Sanitization and Obfuscation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/semantic-preserving-text-sanitization-and-obfuscation/rdr_bef9df49edb14c2dad7b4e83d105ab51/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-20},
}