D-Judge: Disrupting Multi-Turn Jailbreaks using Semantics-Preserving Output Rewriting
The paper introduces D-Judge, a defense mechanism that disrupts multi-turn jailbreak attacks by rewriting LLM responses to preserve their original meaning while deliberately misaligning the feedback signals from attacker-controlled judge models, thereby derailing the iterative prompt refinement process.
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
The Problem: The "Feedback Loop" Trap
Imagine you are trying to teach a very strict robot (the Victim LLM) to do something it's not supposed to do, like write a guide on how to build a bomb.
In the old days, hackers would just shout one loud, obvious command at the robot. If the robot said "No," the hacker gave up.
But now, hackers have found a smarter way called a Multi-Turn Jailbreak. Instead of one shout, they have a long, slow conversation.
- They ask the robot a harmless question.
- The robot answers.
- The hacker has a Judge (another AI) listen to the robot's answer and say, "That was close, but you need to be a little more specific next time."
- The hacker uses that feedback to tweak their next question.
- They repeat this loop over and over, slowly steering the robot toward the forbidden goal.
The paper argues that the Judge's feedback is the fuel that keeps this engine running. As long as the hacker gets accurate feedback on how close they are to the goal, they can eventually trick the robot.
The Solution: The "Magic Translator" (D-Judge)
The authors introduce a new defense called D-Judge. Instead of trying to block the hacker or censor the robot's answers, D-Judge acts like a Magic Translator sitting between the robot and the hacker.
Here is how it works:
- The Setup: The robot gives an answer.
- The Translation: Before the hacker (and their Judge) sees the answer, D-Judge rewrites it.
- The Trick: The rewrite is semantics-preserving. This means the meaning of the answer stays exactly the same. If the robot said, "I can't tell you that," the rewrite might say, "It is against my rules to share that information." The meaning is identical, but the words are different.
- The Confusion: The hacker's Judge reads the rewritten version. Because the words are slightly different, the Judge gets confused. It might think the answer is more dangerous than it actually is, or less dangerous.
- The Result: The Judge gives the hacker bad feedback. The hacker thinks, "Oh, I'm getting closer!" when they aren't, or "I'm failing!" when they are actually succeeding.
Because the hacker is optimizing their next question based on bad data, they get lost. They stop making progress, and the attack fails.
How They Trained the Magic Translator
To teach D-Judge how to do this, the researchers didn't just tell it to "confuse the Judge." They built a special training gym:
- The Dataset: They took thousands of robot answers and created "twin" versions. One twin was rewritten to look slightly more dangerous to a Judge, and the other to look slightly less dangerous, even though both twins meant the exact same thing.
- The Training (Two Steps):
- Step 1 (Learning the Rules): They taught the translator to make these twins without changing the meaning (like a strict editor).
- Step 2 (Learning the Trick): They used a technique called Direct Preference Optimization (DPO). They showed the translator: "When you see this pair of twins, always pick the one that makes the Judge panic (or get confused) more."
This taught the translator to be a master of "word juggling"—changing the flavor of the sentence just enough to mess up the Judge's score, without changing the recipe.
The Results: Breaking the Loop
The researchers tested D-Judge against the smartest hackers (using methods like "Crescendo," "X-Teaming," and "Foot-in-the-Door").
- Without D-Judge: The hackers were very successful, tricking the robot about 58% of the time on average.
- With D-Judge: The success rate dropped to just 8.6%.
The paper shows that D-Judge is much better than previous defenses that just tried to "block" bad words. By messing with the feedback loop, D-Judge stops the attack before it even gets started.
Does It Break the Robot? (The "Safety Tax")
A big worry with these defenses is that they might make the robot stupid or unhelpful for normal people. The paper checked this by testing the robot on normal tasks (like writing code, doing math, or answering history questions).
- The Verdict: The robot remained almost as smart and helpful as before. The "safety tax" (the loss in performance) was very small. The Magic Translator is good at confusing the Judge without breaking the robot's ability to help regular users.
Summary Analogy
Imagine a game of Hot and Cold.
- The Attacker is blindfolded, trying to find a hidden treasure (the harmful content).
- The Judge is the person whispering "Warmer" or "Colder" to guide them.
- The Victim is the person holding the treasure.
In a normal attack, the Judge whispers the truth, and the attacker finds the treasure.
D-Judge is a prankster standing between the Judge and the Attacker. Every time the Judge whispers "Warmer," the prankster changes it to "Colder" (or vice versa), but they don't move the treasure. The attacker gets confused, walks in the wrong direction, and never finds the treasure. Meanwhile, the treasure (the robot's actual meaning) hasn't moved at all.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.