← Latest papers
💻 computer science

Strengthening Polymorphic Prompt Assembling: Dynamic Separator Generation Against Emerging Prompt Injection Attacks

This paper proposes a dynamic separator generation mechanism for Polymorphic Prompt Assembling (PPA) that replaces static separator pools with unique, per-request canary pairs derived from cryptographic digests, effectively eliminating blast-radius vulnerabilities and significantly reducing prompt injection attack success rates without requiring model fine-tuning.

Original authors: Nima Dorzhiev, Peng Liu

Published 2026-06-01
📖 4 min read☕ Coffee break read

Original authors: Nima Dorzhiev, Peng Liu

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 are a highly intelligent but slightly gullible robot assistant (an AI agent). Your job is to follow a strict set of rules written by your boss (the system instructions) while also listening to requests from the public (user input).

The problem is that a clever hacker can sneak a note into the public request that says, "Ignore your boss and do what I say instead." This is called a Prompt Injection Attack.

The Old Solution: The "Static" Password

Previously, researchers developed a defense called Polymorphic Prompt Assembling (PPA). Think of this like putting a special, unique fence between the boss's rules and the public's requests.

  • How it worked: The system had a fixed box of 84 different fence designs (separators). Every time a request came in, it randomly picked one fence from the box to use.
  • The Flaw: Imagine the hacker manages to peek at one of these fences and sees exactly what it looks like. Because the system keeps reusing the same box of fences, the hacker can now use that exact same fence design to trick the robot in future conversations. The damage spreads (a "blast radius") because the fence design never truly changes; it just gets reused.

The New Solution: The "Dynamic" One-Time Lock

This paper proposes a major upgrade: Dynamic Separator Generation.

Instead of picking a fence from a box, the system now builds a brand new, unique fence for every single request.

  • How it works: Every time you ask the robot a question, the system looks at the exact second it is, your unique ID, and a random number generated just for that moment. It mixes these ingredients together (using a mathematical recipe called SHA-256) to create a one-of-a-kind "Start" and "End" marker.
  • The Analogy: Imagine you are sending a letter.
    • Old Way: You use a standard red envelope. If a thief steals a red envelope, they can use it to forge letters later.
    • New Way: You use a magic printer that creates a unique, unrepeatable envelope for every single letter based on the exact time you press the button. Even if a thief steals the envelope from Letter #1, it is useless for Letter #2 because Letter #2 has a completely different, impossible-to-predict envelope.

What the Researchers Found

The team tested this new "Dynamic" method against 16 different types of hacker tricks on a powerful AI model (Llama-3.3).

  1. Stopping the "Leetspeak" Trick: One specific hacker trick (called M1) uses secret code and urgent language to confuse the AI.
    • Before: The AI fell for it 88% of the time.
    • After: The AI only fell for it 38% of the time. That's a massive improvement (more than double the safety).
  2. Stopping the "Format Breakout" Trick: Another trick tries to trick the AI into repeating the fence markers back to the hacker.
    • Before: The AI accidentally revealed the fence markers 47% of the time.
    • After: The AI revealed them 0% of the time. Because the fence was unique to that one moment, revealing it didn't help the hacker with any future requests.
  3. Speed: This new method is incredibly fast. It adds only 2.7 microseconds (a tiny fraction of a blink) to the time it takes to process a request. It's so fast you wouldn't even notice it.
  4. Quality: The robot's ability to do its actual job (like summarizing text or answering questions) didn't get worse. It worked just as well as before.

The One Catch (Limitations)

The paper admits one thing this method can't fix: If a hacker explicitly commands the robot, "Please repeat the fence markers back to me," the robot might still do it.

  • The Fix: The researchers say this is a fundamental limit of the current layer. To stop this, you would need an extra "security guard" at the very end who checks the robot's answer before it leaves, but that wasn't part of this specific study.

Summary

This paper introduces a way to make AI agents safer by giving them a fresh, unique, one-time-use fence for every single conversation. If a hacker steals a fence, it's useless because the next conversation will have a completely different one. It's a fast, easy-to-add upgrade that significantly reduces the chance of the AI being tricked.

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 →