PRISM: Generation-Time Detection and Mitigation of Secret Leakage in Multi-Agent LLM Pipelines
PRISM is a real-time defense mechanism for multi-agent LLM systems that mitigates secret leakage by detecting early generation dynamics, such as entropy collapse and logit concentration, to intervene per-token before sensitive information is fully reconstructed, achieving perfect precision and zero leakage on a comprehensive adversarial benchmark.
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 a team of four robots working together to solve a complex problem, like debugging a computer system. They pass notes back and forth in a shared notebook (the "context").
Here is the problem: If the first robot accidentally picks up a secret password from a file and writes it in the notebook, the second robot might see it, copy it into its own note, and pass it to the third. Even if no one intended to steal the password, the secret gets passed down the line, amplified, and eventually ends up in the final message sent to the human user. The paper calls this "Propagation Amplification." It's like a game of "Telephone," but instead of the message getting garbled, it gets dangerously exposed.
The Old Ways of Stopping Leaks
The authors say that current security guards for these robot teams are like bouncers who only check people after they have already left the club.
- Static Scanners: These are like looking for a specific red shirt. If the secret is written in a different font or hidden in a weird way, the scanner misses it.
- LLM Judges: These are like hiring a second robot to read the final note and say, "Hmm, this looks risky." But by the time they read it, the secret is already out, and the damage is done.
- Prompt Instructions: This is like telling the robots, "Don't talk about secrets!" But if the robots are confused or tricked, they forget the rule.
The New Solution: PRISM
The paper introduces PRISM (Predictive Risk Intervention for Secret Monitoring). Instead of waiting until the note is finished, PRISM acts like a traffic cop standing right next to the robot's mouth while it is speaking.
PRISM doesn't just look at what the robot is saying; it watches how the robot is thinking as it speaks.
The "Aha!" Moment: The Entropy Collapse
The paper's biggest discovery is a specific pattern in how robots think when they are about to reveal a secret.
- Normal Thinking: When a robot is writing a story or solving a math problem, it has many options for the next word. It's like a person wandering through a forest with many paths to choose from. This is called "high entropy" (lots of uncertainty).
- Secret Thinking: When a robot starts to reproduce a memorized secret (like a password), it stops wandering. It knows exactly what the next letter must be. The "forest" shrinks to a single, straight path. The robot becomes extremely certain, and its "uncertainty" collapses.
PRISM detects this sudden shift from "wandering" to "certainty." It sees the robot's brain locking onto a specific pattern before the full secret is even written down.
How PRISM Works (The Traffic Light System)
PRISM assigns a risk score to every single word the robot is about to say, using a mix of 16 different clues (like how certain the robot is, the shape of the words, and what tools it is using). It uses a three-color system:
- 🟢 Green (Safe): The robot is just chatting or solving a normal problem. Let it speak.
- 🟡 Yellow (Suspicious): The robot is getting a bit too certain about a pattern that looks like a password. PRISM gently swaps that word for a placeholder (like
[MASK]) so the flow continues but the secret is hidden. - 🔴 Red (Danger): The robot is on a fast track to revealing a full secret. PRISM hits the brakes immediately, stopping the robot before the secret is finished.
The Results
The authors tested this on a massive simulation with 2,000 different tasks and 13 different ways to trick the robots.
- The Old Guards: Even the best existing methods let secrets leak in about 15% of the cases.
- PRISM: It stopped 100% of the leaks. It didn't just catch the secret at the end; it caught the robot while it was trying to write the secret.
- Speed: It was incredibly fast, adding almost no delay to the conversation, unlike other methods that required a second robot to read the whole thing first.
The Bottom Line
The paper argues that in a team of AI agents, secrets don't just leak because of a bad prompt; they leak because of the structure of the team itself. Once a secret enters the shared notebook, it spreads like a virus. PRISM is the first tool that acts like an immune system, spotting the early symptoms of the infection (the robot's sudden certainty) and stopping it before the virus spreads to the final output.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.