← Latest papers
💻 computer science

Protecting User Prompts Via Character-Level Differential Privacy

This paper proposes a character-level differential privacy method that sanitizes user prompts by randomly perturbing characters before sending them to a remote LLM, which then reconstructs common non-sensitive words while effectively obscuring rare sensitive information, thereby achieving a strong privacy-utility tradeoff without requiring explicit PII identification.

Original authors: Shashie Dilhara Batan Arachchige, Hassan Jameel Asghar, Benjamin Zi Hao Zhao, Dinusha Vatsalan, Dali Kaafar

Published 2026-03-30
📖 4 min read☕ Coffee break read

Original authors: Shashie Dilhara Batan Arachchige, Hassan Jameel Asghar, Benjamin Zi Hao Zhao, Dinusha Vatsalan, Dali Kaafar

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a very smart, but slightly nosy, assistant (a Large Language Model or LLM) who lives in a different country. You want to ask this assistant to summarize a medical report or an email for you. The problem? Your report contains your home address, your phone number, and your doctor's name. If you send the raw text, the assistant might memorize it, leak it, or accidentally show it to someone else.

This paper proposes a clever way to send your message that protects your secrets but still lets the assistant do its job. Here is the simple breakdown:

The Problem: The "Glass House"

Currently, when you talk to an AI, you are essentially shouting your secrets into a glass house. The AI sees everything. If you type "My name is John Doe and I live at 123 Maple Street," the AI sees "John Doe" and "123 Maple Street" clearly.

The Solution: The "Scrambler" and the "Fixer"

The authors suggest a two-step process that happens before your message even leaves your computer.

Step 1: The Scrambler (Character-Level Noise)

Instead of trying to find and hide specific secrets (which is hard because you might miss something), they propose scrambling every single letter in your message randomly.

  • The Analogy: Imagine you are sending a letter, but before you put it in the envelope, you take a pair of scissors and randomly snip out a few letters from every word, replacing them with random gibberish.
    • Original: "John Doe"
    • Scrambled: "Joh3 D0e" or "Jxhn D#e"
    • Original: "Call me at 555-0199"
    • Scrambled: "C@ll m3 555-0!99"

This is done using a mathematical rule called Differential Privacy. It guarantees that the scrambled version looks almost like a random mess to anyone who intercepts it.

Step 2: The Fixer (The AI's Superpower)

Now, you send this scrambled, messy text to the AI and say: "Please fix the typos, make it readable, and then summarize it."

Here is where the magic happens. The AI is like a super-smart editor who has read millions of books.

  • Common Words: If the scrambled word was "Call," and it looks like "C@ll," the AI knows immediately, "Oh, that's 'Call'!" because "Call" is a common word, and the context (like "me at") makes it obvious. The AI fixes it easily.
  • Rare/Secret Words: If the scrambled word was a specific name like "Harlan," and it looks like "H_rlan" or "H@rld," the AI is stuck. It doesn't know if the name is "Harlan," "Herman," or "Harold." Because these names are rare and unique, the AI cannot guess them correctly. It might guess "Harold," but it's just a guess, not the real secret.

The Result: A "Magic Filter"

The paper tested this on real medical records and emails. The results were impressive:

  1. The Good Stuff (Utility): The AI successfully fixed the common words (like "patient," "doctor," "hospital"). The final summary made perfect sense and was very useful.
  2. The Secret Stuff (Privacy): The AI failed to guess the specific names, phone numbers, and addresses. It reconstructed them at a rate no better than just guessing randomly.

Why is this better than other methods?

  • Old Way (Redaction): Imagine trying to hide secrets by crossing them out with a black marker. If you miss one spot, the secret is out. Also, if you cross out too much, the sentence makes no sense.
  • This Paper's Way: You don't need to know what is a secret. You just scramble everything. The AI naturally fixes the boring stuff but leaves the secrets as a mystery. It's like sending a puzzle where the easy pieces snap together, but the unique, secret pieces remain a blur.

The Bottom Line

This method is like sending a letter through a foggy window.

  • If you look at a common object (like a chair) through the fog, you can still tell it's a chair.
  • If you look at a specific, unique object (like your house key) through the fog, you can't tell what it is.

The authors found that by adjusting how "foggy" the window is (a setting called epsilon), you can get the perfect balance: the AI gets enough clarity to do its job, but your secrets remain safely hidden in the fog.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →