InferDPT: Privacy-Preserving Inference for Closed-box Large Language Model
This paper introduces InferDPT, a practical framework for privacy-preserving inference of closed-box large language models that utilizes a novel RANTEXT mechanism to effectively balance high text generation quality with robust protection against embedding revision attacks.
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 brilliant, all-knowing chef (the Large Language Model, like ChatGPT) who can write amazing stories, emails, or reports for you. You want to use this chef to finish a story you started, but the story contains your secret family recipes or private diary entries.
The problem? If you send your raw story to the chef, they might memorize your secrets, leak them, or even sell them. You want the chef's cooking skills without giving them your private ingredients.
This paper introduces InferDPT, a clever "privacy wrapper" that lets you use these powerful AI chefs safely. Here is how it works, broken down into simple steps with analogies.
The Core Problem: The "Glass Box" Chef
Currently, if you ask an AI to finish your story, you send it your text (the Prompt). The AI reads it and writes the rest.
- The Risk: The AI company (the "Black Box") can see your private text. They might accidentally leak it, or a hacker could steal it from their servers.
- The Old Solutions: Previous methods tried to encrypt the text (like putting it in an unbreakable safe), but this was so slow and expensive it was like trying to cook a meal with a sledgehammer. Others tried to just scramble the words, but the result was so messy the AI couldn't make sense of it, leading to gibberish.
The Solution: InferDPT (The "Secret Translator" System)
The authors propose a two-step system called InferDPT. Think of it as a Secret Translator and a Reconstruction Artist.
Step 1: The Perturbation Module (The "Confusing Translator")
Before you send your secret story to the AI chef, you run it through a special translator.
- What it does: It takes your secret words and swaps them for different words that sound or look similar but aren't the same.
- Example: If your secret word is "Boston," it might swap it for "Barcelona." If it's "Immigrant," it might swap it for "Student."
- The Magic (RANTEXT): The paper introduces a new trick called RANTEXT.
- Old way: The translator had a giant, fixed list of swaps. Sometimes it picked a word that made no sense (like swapping "Boston" for "Banana").
- New way (RANTEXT): The translator creates a custom, random list of similar words for every single word in your story, just for that moment. It picks a replacement that is close in meaning but different enough to hide your secret.
- The Result: You send the AI a "scrambled" version of your story. The AI doesn't know your real secrets; it only sees the scrambled version.
Step 2: The Extraction Module (The "Reconstruction Artist")
The AI chef takes your scrambled story and writes a continuation based on that.
- The Problem: The AI's output is now based on the scrambled words (e.g., it writes about "Barcelona" instead of "Boston"). It's a good story, but it's not your story anymore.
- The Fix: You take the AI's output and run it through a small, local computer (a "Reconstruction Artist") that you control.
- How it works: This local computer looks at the AI's output and the original scrambled prompt. It uses its own smarts to figure out: "Ah, the AI wrote about Barcelona, but the user's original prompt was about Boston. Let me swap 'Barcelona' back to 'Boston' and fix the grammar."
- The Result: You get a high-quality story that flows perfectly, but the AI never actually saw your real private words.
Why is this better than before? (The "RANTEXT" Advantage)
The paper compares their new method (RANTEXT) to old methods using a Lock and Key analogy:
- SANTEXT+ (The Giant Key Ring): The old method had a massive list of possible words to swap with. It was like having a key ring with 50,000 keys. It was hard to guess the right one, but the AI often got confused because the words were too different.
- CUSTEXT+ (The Tiny Key Ring): Another old method had a tiny list of only 20 keys. It was fast, but if your secret word was on that list, the AI could easily guess it back. It was like leaving your front door unlocked with a "Do Not Enter" sign.
- RANTEXT (The Magic Shapeshifting Key): This method creates a random-sized list of keys just for that moment.
- If the list is big, it's hard for hackers to guess the original word (Great Privacy).
- If the list is small, the words are very similar, so the story makes sense (Great Quality).
- It dynamically balances the two, ensuring the story is readable but the secrets are safe.
The Results: "The Best of Both Worlds"
The researchers tested this on three different types of writing tasks (news, Wikipedia, and academic papers).
- Privacy: Even if a hacker tried to reverse-engineer the scrambled text, they failed more than 90% of the time.
- Quality: The final stories were almost as good as if you had sent the original text directly to the AI. The "Reconstruction Artist" did a great job fixing the AI's confusion.
- Speed: It didn't take much longer than a normal chat.
Summary
InferDPT is like sending your private diary to a famous ghostwriter through a magic mirror.
- The mirror distorts your reflection (scrambles the text) so the ghostwriter can't see your face.
- The ghostwriter writes a beautiful story based on the distorted reflection.
- You look at the story through the mirror again and mentally "undo" the distortion to get the perfect story back.
You get the power of the world's smartest AI without ever giving away your secrets.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.