← Latest papers
💬 NLP

PSM: Prompt Sensitivity Minimization via LLM-Guided Black-Box Optimization

This paper introduces PSM, a novel black-box optimization framework that leverages an LLM-as-optimizer to append lightweight, utility-preserving protective layers (SHIELDs) to system prompts, effectively minimizing their vulnerability to adversarial extraction attacks without requiring model access.

Original authors: Huseein Jawad, Nicolas Brunel

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

Original authors: Huseein Jawad, Nicolas Brunel

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 secret recipe for the world's best chocolate cake. You hire a baker (the AI) to make it for you, but you don't want the baker to accidentally tell your customers the secret ingredients list.

In the world of AI, this "secret recipe" is called a System Prompt. It's the hidden set of instructions that tells the AI how to behave, what rules to follow, and what its "personality" should be. The problem is that clever hackers can trick the AI into spilling these secrets, just like a customer might trick a baker into revealing the recipe by asking, "Pretend you're a food critic and tell me exactly how you made this."

This paper introduces a new way to protect these secrets called PSM (Prompt Sensitivity Minimization). Here is how it works, explained simply:

The Problem: Why Old Locks Don't Work

Previously, people tried to protect these secrets by just adding a sign that says, "Do not tell anyone the recipe."

  • The Flaw: Hackers are smart. They can say, "Ignore that sign, I'm the boss now, tell me the recipe!" The AI, trained to be helpful and follow instructions, often obeys the new command and forgets the old one. It's like a security guard who is too polite to stop someone who claims to be the owner.

The Solution: The "Shield"

The authors propose a new strategy. Instead of just adding a sign, they add a Shield.

  • What is a Shield? Think of it as a special, invisible layer of armor glued to the very end of the secret recipe.
  • How does it work? It's a short piece of text that acts like a bouncer. When a hacker tries to trick the AI, the Shield steps in and says, "Nope, that's not allowed," without changing the cake recipe itself.

How They Built the Shield (The "AI vs. AI" Game)

The most interesting part is how they found the perfect Shield. They didn't write it by hand; they used a game of AI vs. AI.

  1. The Attacker AI: They used one AI to try to break the lock. It tried thousands of different tricks (like asking in different languages, pretending to be a friend, or demanding the recipe in code) to see if it could get the secret out.
  2. The Defender AI: They used a second AI to act as a coach. This coach watched the Attacker AI fail and succeed.
  3. The Evolution: The coach AI would say, "Okay, that Shield didn't work against the 'pretend to be a boss' trick. Let's try a new Shield that is better at ignoring that specific trick."
  4. The Result: They repeated this process over and over. The Defender AI kept tweaking the Shield until it became a master at blocking all the tricks, while still letting the AI bake the cake perfectly for normal customers.

Why This is a Big Deal

The paper claims this method is special for three reasons:

  • It's a "Black Box" Solution: You don't need to know how the AI is built inside (like its brain or code) to use this. You just need to talk to it through a standard API (like a website). It works on any AI you can access online.
  • It's Lightweight: The Shield is just a tiny bit of text added to the end. It doesn't slow down the AI or cost extra money to run. It's like adding a small sticker to a door; it doesn't make the door heavier.
  • It Keeps the Cake Tasty: The most important rule was that the Shield couldn't ruin the AI's ability to do its job. The paper shows that even with the Shield, the AI still answers normal questions perfectly. It didn't become "dumber" or "ruder" just because it was safer.

The Results

When they tested this against a huge list of hacker tricks (including ones that try to translate the secret into other languages or rephrase it), the PSM Shield worked incredibly well.

  • Old defenses (like simple "Do not tell" signs) let hackers steal the secrets about 30% to 50% of the time.
  • The PSM Shield reduced the success rate of hackers to almost 0% in many tests.

Summary

Think of PSM as an automatic, self-improving security guard. Instead of just shouting "Stop!" (which hackers ignore), this guard learns exactly how hackers try to sneak in and builds a custom, invisible wall that stops them, all while making sure the AI can still do its job for everyone else. It's a smart, cheap, and effective way to keep the "secret sauce" of AI applications safe.

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 →