TL;DR
AI agents that read emails or web pages are vulnerable to prompt injection—hidden instructions that hijack the agent into harming its user. Isolating the agent's planner from untrusted data stops injections but cripples usefulness, while giving it "hints" leaves it open to clever adaptive attacks. DP-Bits solves this by giving each untrusted data source a strict budget in bits, provably bounding how much any attacker can steer the agent's decisions while preserving most of its utility.
What Problem Does This Paper Address?
When an AI agent acts on your behalf—reading emails, paying bills, or browsing the web—an attacker can hide malicious instructions inside those documents. To defend against this, "secure-by-design" systems like CaMeL isolate the planner (the model deciding which tools to call) from untrusted text. The planner writes a static program before seeing any data, while isolated reader models inspect the documents.
The catch? A static plan cannot adapt to what is actually inside the documents, so it fails on realistic tasks that require dynamic decisions. Newer "hinting" defenses (like Twin Agent or FIDES) restore utility by letting readers pass short free-text hints or typed answers back to the planner. However, because there is no mathematical bound on how much those hints can influence the planner, an adaptive attacker can still craft hints that fool the system's detector and steer the agent toward a harmful goal.
Methods
DP-Bits borrows ideas from Priced Guidance and differential privacy to put a hard, user-configurable cap ($B$ bits) on how much each untrusted source (such as an inbox or a web page) can influence the planner:
- Question & Prediction: Before a reader sees a document, the planner asks a multiple-choice question and states its own probability prediction over the possible answers.
- Pricing & Limiting: DP-Bits prices each answer by how surprising it is under the planner's prediction ($\log_2(1/r(a))$ bits). It then mixes the reader's reply with the planner's prediction so that no answer can become more than $2^\ell$ times as likely as predicted, where $\ell$ is the question's bit limit.
- Charging the Source: The drawn answer's cost is subtracted from the source's bit budget. Once a source hits 0 bits, it can no longer influence the planner.
- Provable Bound & Certification: By construction, any harmful outcome is at most $2^B$ times as likely as if the reader had said nothing at all (the "muted" session). This also allows a user to certify an agent's safety before running it, without having to search through every possible text an attacker could write.
Datasets
- AgentDojo: A widely used prompt-injection benchmark. Most tasks here only require answers the planner already expects, meaning even static plans solve many of them.
- AgentDyn: A harder, more realistic benchmark where the agent must change its plan based on what it reads from tool results. This is where static plans break down and where DP-Bits is primarily evaluated.
Key Insights and Ideas
- Adaptive attacks break unbounded hints: Standard benchmark attacks often miss vulnerabilities in hinting defenses. When tested against adaptive attackers that actively search for hints to bypass the detector, free-text hints (
hint-200) fail 25% of the time withQwen3.6-27B. - Uniformly priced hints leak massive information: If you price every printable character in a 10-character hint (
hint-10) uniformly, it can carry roughly $8\times$ more bits per session than DP-Bits charges at a 32-bit budget. - Better models = more utility at the same security: Because DP-Bits's bound holds regardless of the model, upgrading from
Qwen3.5-9BtoQwen3.6-27B,Qwen3.8-27B, orQwen4 Maxsolves more tasks at the exact same bit budget. - Why sessions still fail: Most failed DP-Bits runs happen when the planner asks a question whose multiple-choice options are too narrow to express what the document actually says.
Key Results
- Utility vs. Static Plans: On AgentDyn with
Qwen3.8-27Bat 32 bits per source, DP-Bits solves 18 of 52 data-dependent tasks, compared to just 2 for a static plan. - Security under Adaptive Attacks: Against the strongest adaptive attacks on AgentDyn (
Qwen3.6-27B),hint-200succeeds in 30 of 120 test cases, whereas DP-Bits drops this to 2 of 120 at 32 bits per source and 0 of 120 at 4 bits. - Certification Cost: Certifying a planner's safety is practical for small budgets—taking a few minutes at a few bits, and ~36 minutes at 9 bits on AgentDojo (or ~39 minutes at 3 bits on AgentDyn) on a single RTX PRO 6000 GPU.
Limitations and Future Work
- Handles: DP-Bits bounds what the planner decides, but values passed unread into tool calls (called handles, such as an account number) still require complementary authorization policies to stop attackers from injecting fake values.
- Budget & Certificate Scaling: Higher budgets (16–32 bits) are needed for harder AgentDyn tasks, which loosens the $2^B$ bound and makes certification exponentially more expensive.
- Model Access & Labels: DP-Bits relies on accurate source provenance labels and access to reader token probabilities, which some closed model APIs restrict.
- Future Work: The authors suggest training planners specifically for priced guidance so they ask more informative questions and spend fewer bits, as well as setting dynamic budgets per task.
Summary updated