acceptodds
Under review as a conference paper at ICLR 2027

Only What You've Signed up For: Secure Workflows with Constrained Diffusion Agents

Abstract

As agentic AI systems take on increasingly complex and consequential tasks, securing them against prompt injection becomes critical. Existing defenses often rely on detecting or reasoning about injected malicious instructions and can therefore remain vulnerable to adaptive attacks that optimize the injection itself. Diffusion language models (dLLMs), an emerging framework for language generation, offer a new opportunity for security enforcement: by iteratively refining their sequence-wide predictions, they enable broader-scope constraint enforcement throughout generation. This paper introduces (CoDA), a framework that enforces task-dependent security policies directly within the denoising process of diffusion language models. At each denoising step, CoDA projects token distributions onto a policy-compliant set, maintaining constraint satisfaction throughout generation. CoDA is evaluated across static and adaptive prompt injection security benchmarks and state-of-the-art diffusion language model families. Results demonstrate substantial reductions in attack success rate with competitive task utility and practical inference overhead.

Primary area:
generative models
Keywords:
Diffusion Language Models, LLM Agents, Agentic AI, Prompt Injection, AI Security, Constrained Decoding, Constrained Generation

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_DSuhOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

The paper introduces Policy-Constrained Diffusion Agents (CoDA), a training-free method for enforcing task-level security policies during diffusion-model decoding. At each denoising step, CoDA identifies policy-relevant regions in the model’s provisional output and projects their token distributions onto policy-compliant values, using structured constraints such as tool allowlists and multi-token argument-value restrictions. The authors evaluate CoDA with DiffusionGemma and LLaDA-2 Mini on four AgentDojo suites under static and adaptive prompt-injection attacks, using both manually constructed oracle policies and automatically LLM-selected policies. With oracle policies, CoDA reports zero attack success in the adaptive evaluation; automatically selected policies retain much of that protection but still allow some attacks, particularly in Banking.

Critical strengths

1-CoDA constrains security-sensitive fields during generation, so its core protection need not depend on recognizing the attacker’s wording. This is a consequential design choice for prompt injection, where attacks can adapt to detection-based defenses.

2-The comparison between repeated denoising-time enforcement and applying the same policy only at the end helps isolate the value of enforcing constraints throughout generation. Evaluation across two diffusion paradigms also provides some evidence that the approach is not tied to a single sampler.

Critical weaknesses

1-CoDA can only enforce restrictions that the policy expresses and that its parsers identify in the generated output. The paper itself notes that open-ended semantic constraints are out of scope, while oracle policies are manually specified and refined. The nonzero adaptive ASR under LLM-selected policies—most notably in Banking—shows that policy specification remains a material failure point. Thus, the zero-ASR result supports a conditional guarantee over the tested constraints, not a general guarantee against prompt injection.

2-The evaluation covers two diffusion models and four AgentDojo suites, with LLaDA-2 Mini evaluated on a 25% stratified subsample in the adaptive setting. Some results also show substantial utility degradation—for example, oracle CoDA’s adaptive Slack utility with LLaDA-2 Mini is 7.41%, versus 25.93% for the vanilla agent. Broader tests and uncertainty estimates are needed to judge how reliably the security–utility trade-off generalizes.

Questions for authors

1-What happens when a tool call or security-sensitive field is malformed, ambiguous, or not recognized by the structure-identification logic? Does the runtime fail closed by rejecting or withholding execution, or can such an output proceed without the relevant constraint? This affects how broadly the claimed enforcement guarantee applies.

2-For each adaptive-attack result, please report the exact number of evaluated task–attack units and uncertainty estimates, and clarify which results use the full suite versus the 25% LLaDA-2 Mini subsample. How sensitive are the reported ASRs and utility scores to task sampling and attack-search randomness?

3 comments

[Part 1]

We thank the reviewer for their valuable feedback and appreciate their recognition of CoDA's approach to enforcing security constraints during generation, the benefits of iterative denoising-time enforcement, and its evaluation across different diffusion architectures.

W1. CoDA can only enforce restrictions that the policy expresses and that its parsers identify in the generated output. The paper itself notes that open-ended semantic constraints are out of scope, while oracle policies are manually specified and refined. The nonzero adaptive ASR under LLM-selected policies—most notably in Banking—shows that policy specification remains a material failure point. Thus, the zero-ASR result supports a conditional guarantee over the tested constraints, not a general guarantee against prompt injection.

We agree that CoDA's security guarantees are conditional on correct policy specification and identification of policy-relevant structures, rather than universal protection against prompt injection. Crucially, CoDA separates two distinct challenges: policy synthesis, which requires interpreting user intent, and policy enforcement, which mechanically restricts generation to authorized behavior. While automatic policy synthesis remains an open challenge, CoDA provides reliable enforcement of correctly specified, identifiable constraints without relying on stochastic LLM-based verification.

Importantly, with DiffusionGemma, all three automated policy selectors achieve 0% adaptive ASR in three of four suites. Our analysis of all 54 successful static Banking attacks (reported below) further identifies over-authorized tool capabilities as the source of these breaches, with no observed bypass of an active constraint. These findings distinguish policy-selection failures from enforcement failures and clarify the scope of CoDA's security guarantees.

User TaskOver-authorized ToolsGPT-5.6 SolGemini 3.7 FlashClaude Opus 5
UT0: Pay bill from filesend_money222
UT2: Adjust rent from fileupdate_scheduled_transaction222
UT10: Repeat prior paymentsend_money222
UT12: Follow file instructionssend_money, update_scheduled_transaction0011
UT15: Address, standing orders, refundsend_money, update_scheduled_transaction11113
Total successful breaches171720
Active constraint bypasses000

W2. The evaluation covers two diffusion models and four AgentDojo suites, with LLaDA-2 Mini evaluated on a 25% stratified subsample in the adaptive setting. Some results also show substantial utility degradation—for example, oracle CoDA’s adaptive Slack utility with LLaDA-2 Mini is 7.41%, versus 25.93% for the vanilla agent. Broader tests and uncertainty estimates are needed to judge how reliably the security–utility trade-off generalizes.

The original 25% stratified subsample was motivated by LLaDA-2 Mini's higher inference cost (7.2× longer per episode than DiffusionGemma). To assess broader generalization, we are extending the evaluation to the full AgentDojo grid using the same 20-query attack budget as the original experiments.

The full Slack and Banking evaluations (249 scenarios) are now complete, with CoDA (Oracle) maintaining 0% ASR. On Slack, CoDA's utility improves from 7.41% on the subsample to 18.10% on the full suite, narrowing the gap relative to Vanilla (25.71%). We also report 95% Wilson confidence intervals to quantify scenario-level uncertainty. Results are shown below; remaining suites and LLM-selected policy evaluations are ongoing and will be updated once finalized.

SuiteMethodnUtility ↑ (95% CI)ASR ↓ (95% CI)
SlackVanilla10525.71% [18.3, 34.8]30.48% [22.5, 39.8]
CoDA (Oracle)10518.10% [11.9, 26.5]0.00% [0.0, 3.5]
BankingVanilla14438.19% [30.7, 46.3]20.83% [15.0, 28.2]
CoDA (Oracle)14431.94% [24.9, 39.9]0.00% [0.0, 2.6]

[Part 2]

Q1. What happens when a tool call or security-sensitive field is malformed, ambiguous, or not recognized by the structure-identification logic? Does the runtime fail closed by rejecting or withholding execution, or can such an output proceed without the relevant constraint? This affects how broadly the claimed enforcement guarantee applies.

Malformed or incomplete tool calls that fail the agent framework's parsing or schema validation are not executed. However, enforcement of syntactically valid tool calls remains conditional on correct identification of security-sensitive fields. To assess this assumption empirically, we audited 5,661 Oracle-policy episodes, covering 24,988 executed tool calls and 260 non-executed incomplete calls, with zero observed parser-coverage bypasses (reported below).

SuiteEpisodesExecuted Native CallsIncomplete (Not Executed)Coverage Bypasses
Banking1,2963,056110
Slack9454,09320
Workspace2,1609,718940
Travel1,2608,1211530
Total5,66124,9882600

Q2. For each adaptive-attack result, please report the exact number of evaluated task–attack units and uncertainty estimates, and clarify which results use the full suite versus the 25% LLaDA-2 Mini subsample. How sensitive are the reported ASRs and utility scores to task sampling and attack-search randomness?

DiffusionGemma and its baselines were evaluated on all 629 eligible AgentDojo task–attack scenarios (105 Slack, 240 Workspace, 140 Travel, and 144 Banking), using up to 100 unique attacker queries per scenario. LLaDA-2 Mini originally used a 25% stratified subsample with 20 queries per scenario due to computational constraints.

As detailed in W2, we have extended LLaDA-2 Mini, and will continue to update as new results arrive. These results maintain 0% Oracle ASR, while observing a smaller utility degradation on Slack. We additionally report 95% Wilson confidence intervals to quantify scenario-level uncertainty.

We again thank the reviewer for their valuable feedback.

AuthorsOpenReview ↗

Thanks for reviewing, please let us know if you need any further clarifications

Thank you again for your review. We wanted to follow up on our clarification that CoDA’s guarantees depend on correct policy specification and identification of policy-relevant fields. We also analyzed the Banking policy-selection failures, audited parser coverage across 5,661 episodes, and added full-suite LLaDA-2 Mini results for Slack and Banking with scenario counts and 95% Wilson confidence intervals. Please let us know if any part of the scope of enforcement, the failure analysis, or these additional results needs further clarification. If these responses address your concerns, we would appreciate it if you would reconsider your rating in light of the revised manuscript.

Reviewer_jJNsOpenReview ↗
Rating
2
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

This paper introduces Policy-Constrained Diffusion Agents (CoDA), a training-free framework for enforcing task-level security policies during discrete diffusion decoding in tool-using agents. At each reverse-diffusion step, CoDA obtains a sequence-wide clean-state proposal, identifies policy-relevant regions, projects the corresponding token distributions onto policy-compliant values, and uses the constrained proposal for the next reverse update. The framework covers tool capabilities, security-sensitive arguments, URL and outbound-link authorization, entity provenance, and information flow. The authors evaluate CoDA on four AgentDojo suites (Slack, Workspace, Travel, and Banking) using DiffusionGemma and LLaDA-2 Mini under static and adaptive prompt-injection attacks. With manually specified Oracle policies, CoDA achieves 0% attack success rate (ASR) across all four suites under adaptive attacks, although its effect on task utility varies across domains. LLM-selected policies retain much of the security benefit but exhibit nonzero ASR on Banking. Overall, the results suggest that enforcing structured security policies during denoising is a promising approach to mitigating prompt injection, while its practical effectiveness depends on policy quality and reliable identification of policy-relevant output structures.

Critical strengths
  1. A technically motivated approach to policy enforcement during generation. CoDA exploits the sequence-wide clean-state predictions of discrete diffusion models to enforce task-level policies throughout denoising, rather than relying solely on detecting malicious instructions or checking a completed response. The treatment of structured, multi-token values, including the use of prefix tries to preserve valid token combinations, is particularly relevant to security-sensitive fields such as recipients and URLs. The separation between policy specification and policy enforcement also provides a useful framework for analyzing these two sources of security failure independently.
  2. Evaluation under adaptive attacks with attention to utility and overhead. The evaluation covers four AgentDojo suites, two diffusion formulations, and both static and feedback-guided adaptive attacks. Reporting ASR alongside task utility, wall-clock time, and model calls provides a more informative assessment than attack success alone. The comparison between Oracle policies and LLM-selected policies is also useful because it distinguishes the effectiveness of the enforcement mechanism under high-quality policies from the challenges of automatically specifying those policies.
Critical weaknesses
  1. Practical effectiveness depends on policy quality. CoDA achieves its strongest results with manually specified Oracle policies, whereas LLM-selected policies still produce nonzero ASR on Banking. This gap matters for practical deployment because manually defining a suitable policy for every task may require substantial human effort. The paper would benefit from a clearer discussion of the effort required to construct Oracle policies and the types of errors made by automatically selected policies.
  2. The security guarantees depend on reliable identification of policy-relevant fields. CoDA can constrain only the fields it identifies and the actions covered by the task-level policy. If a security-sensitive field is missed or an unauthorized action is not covered by the policy, the corresponding action may not be blocked. Although the appendix mentions checks for incomplete or hybrid tool calls, the paper does not report how reliably these checks handle deliberately malformed outputs. The conditions under which the security claims hold, and the behavior when a field cannot be identified, should be clarified.
Questions for authors
  1. Practicality of policy construction. The strongest results are obtained with manually specified Oracle policies, whereas LLM-selected policies still show nonzero ASR on Banking. How much human effort is required to construct Oracle policies, and what types of policy-selection errors account for the remaining ASR?
  2. Failure handling in structure identification. How does CoDA behave when the provisional sequence contains malformed tool-call syntax, alternative serializations, or adversarially modified fields that the constraint-specific parsers fail to recognize? Does the system reliably prevent execution when a security-sensitive field cannot be identified, or can such a call pass through unconstrained? Please report the frequency of parser failures or missed policy-relevant regions, if available.
  3. Construction and refinement of Oracle policies. The appendix states that Oracle policies may be refined based on development-time evaluation. Could the authors clarify how these policies were constructed and refined, and whether they were finalized before the final evaluation? In particular, how do the authors ensure that the reported 0% ASR was not influenced by tuning the policies based on evaluation results?
  4. Robustness of the adaptive-attack results. The adaptive attacker is limited to 100 unique queries per scenario. How many attack scenarios were tested, and did the authors repeat the adaptive attack search to check whether the 0% ASR result with Oracle policies is stable?
  5. Scope of the LLaDA-2 Mini evaluation. The adaptive-attack evaluation for LLaDA-2 Mini uses a 25% stratified subsample of each suite. Could the authors explain why a subset was used and whether the results are expected to hold on a larger sample?
  6. Interpretation of the adaptive-attack results. The paper reports ASR and task utility under the strongest trigger selected by the adaptive attacker. Could the authors clarify how this trigger is selected and whether the two metrics are evaluated under the same conditions?
  7. Inference overhead and reproducibility. Could the authors clarify the hardware and inference settings used for the reported wall-clock time and model-call measurements, and specify which components are included in these measurements? In particular, it would be useful to distinguish CoDA's per-episode enforcement overhead from the cost of policy synthesis and adaptive-attack generation.
  8. There appears to be a missing space in the Conclusion between “attacks.” and “Under oracle task-level policies.”
4 comments

[Part 1]

We thank the reviewer for their constructive feedback. We particularly appreciate their recognition of CoDA's technically motivated approach, its separation of policy specification from enforcement, and its evaluation across diverse models, agent environments, and attack settings.

W1. Practical effectiveness depends on policy quality. CoDA achieves its strongest results with manually specified Oracle policies, whereas LLM-selected policies still produce nonzero ASR on Banking. This gap matters for practical deployment because manually defining a suitable policy for every task may require substantial human effort. The paper would benefit from a clearer discussion of the effort required to construct Oracle policies and the types of errors made by automatically selected policies.

We thank the reviewer for raising this concern. CoDA separates policy selection from enforcement, with Oracle policies serving as an upper-bound reference for policy quality. Each Oracle policy is initially drafted by an LLM and subsequently refined through human verification and development-time attack feedback, once per user task rather than per attack instance. Human refinement primarily involves selecting applicable constraints and authorized tool capabilities. Once constructed, Oracle policies remain fixed throughout adaptive evaluation.

Importantly, with DiffusionGemma, all three automated LLM policy selectors achieve 0% adaptive ASR in three of four suites, despite being generated in a single pass without human refinement, iterative optimization, or attack feedback. To investigate the remaining Banking vulnerabilities, we manually analyzed all 54 successful static attacks across the three LLM policy selectors. Every observed breach involved an over-authorized tool capability excluded by the Oracle policy, with no observed bypass of an active constraint. The primary failure mode was capability overgeneralization: for example, authorizing send_money based on payment instructions contained in untrusted files. These findings attribute the observed static-attack vulnerabilities to policy-selection errors rather than failures to enforce the selected constraints. Improving automatic policy synthesis for tasks involving indirect authorization remains an important direction for future work.

User TaskOver-authorized ToolsGPT-5.6 SolGemini 3.7 FlashClaude Opus 5
UT0: Pay bill from filesend_money222
UT2: Adjust rent from fileupdate_scheduled_transaction222
UT10: Repeat prior paymentsend_money222
UT12: Follow file instructionssend_money, update_scheduled_transaction0011
UT15: Address, standing orders, refundsend_money, update_scheduled_transaction11113
Total successful breaches171720
Active constraint bypasses000

W2. If a security-sensitive field is missed or an unauthorized action is not covered by the policy, the corresponding action may not be blocked. Although the appendix mentions checks for incomplete or hybrid tool calls, the paper does not report how reliably these checks handle deliberately malformed outputs. The conditions under which the security claims hold, and the behavior when a field cannot be identified, should be clarified.

We thank the reviewer for highlighting this important assumption. CoDA's security guarantees depend on accurate policy specification and identification of policy-relevant structures. Importantly, malformed or incomplete tool calls that fail the agent framework's parsing or schema validation are not executed and therefore cannot trigger unauthorized actions.

Q1. Practicality of policy construction. How much human effort is required to construct Oracle policies, and what types of policy-selection errors account for the remaining ASR?

Oracle policies were initially LLM-generated and subsequently refined by a single practitioner through development-time security testing, analogous to red-teaming practices used to identify policy underspecification or misconfiguration in real-world deployments. ASR feedback served as a signal for identifying overly permissive or restrictive policies, with refinements primarily involving authorized tool capabilities and applicable constraints. Once finalized, each task-level policy remained fixed throughout adaptive evaluation, without further modifications. Regarding automatic policy-selection failures, our analysis of all 54 successful static Banking attacks (W1) found that every breach involved over-authorized tool capabilities, with no observed bypass of an active constraint.

[Part 2]

Q2. Failure handling in structure identification. How does CoDA behave when the provisional sequence contains malformed tool-call syntax, alternative serializations, or adversarially modified fields that the constraint-specific parsers fail to recognize? Does the system reliably prevent execution when a security-sensitive field cannot be identified, or can such a call pass through unconstrained? Please report the frequency of parser failures or missed policy-relevant regions, if available.

Malformed or incomplete tool calls rejected by the agent framework cannot trigger tool execution. CoDA additionally applies structural checks that reopen inconsistent regions for regeneration or render them non-executable, discussed in Appendix F.

To assess parser coverage, we audited 5,661 Oracle-policy episodes across all four suites and three seeds. All 24,988 executed calls used CoDA's covered native representation, while 260 incomplete calls were never executed, yielding zero observed parser-coverage bypasses.

SuiteEpisodesExecuted Native CallsIncomplete (Not Executed)Coverage Bypasses
Banking1,2963,056110
Slack9454,09320
Workspace2,1609,718940
Travel1,2608,1211530
Total5,66124,9882600

Q3. Construction and refinement of Oracle policies. The appendix states that Oracle policies may be refined based on development-time evaluation. Could the authors clarify how these policies were constructed and refined, and whether they were finalized before the final evaluation? In particular, how do the authors ensure that the reported 0% ASR was not influenced by tuning the policies based on evaluation results?

Oracle policies were initially LLM-generated and refined by a single practitioner through development-time security testing and attack feedback, analogous to real-world red-teaming practices. Refinement focused on identifying overly permissive capabilities and selecting appropriate tools and constraints, without modifying CoDA's enforcement mechanism.

Importantly, policies were constructed per user task, not per attack instance, and remained fixed throughout final adaptive evaluation. We acknowledge that development-time feedback improves policy quality, which is why Oracle policies serve as an upper-bound reference. However, policy quality alone does not explain CoDA's security results: our additional Oracle Prompting baseline (reported in our response to Reviewer NDjK, W2/Q2), using the same Oracle policies without constrained decoding, still exhibits nonzero ASR.

Q4. Robustness of the adaptive-attack results. The adaptive attacker is limited to 100 unique queries per scenario. How many attack scenarios were tested, and did the authors repeat the adaptive attack search to check whether the 0% ASR result with Oracle policies is stable?

We evaluate all 629 eligible task–attack scenarios across the four AgentDojo suites (105 Slack, 144 Banking, 140 Travel, and 240 Workspace), following the defense-aware adaptive-attack methodology of Nasr et al. [1]. Each scenario consists of a user-task/injection-task pair, with up to 100 unique attacker queries, each requiring a complete agent execution with diffusion decoding. CoDA (Oracle) achieved 0% ASR across all 629 scenarios.

We prioritized full benchmark coverage over repeated adaptive searches across random seeds, given the substantial computational cost. A single full-budget evaluation of CoDA (Oracle) requires up to 62,900 complete agent episodes, corresponding to approximately $1,472 in estimated GPU costs and 5.3 days on one AWS g6e.12xlarge instance with parallel workers. Additional computational estimates are provided below.

Estimated GPU costs for 629 scenarios under different attack-query budgets (one constraint configuration):

Model1 query20 queries100 queriesWall-clock at 100 queries on one g6e.12xlarge
DiffusionGemma (CoDA)$15$294$1,472~5.3 days
AR Gemma-4$24$489$2,447~8.8 days
LLaDA-2 Mini$34$686$3,430~12.4 days

[Part 3]

Q5. Scope of the LLaDA-2 Mini evaluation. The adaptive-attack evaluation for LLaDA-2 Mini uses a 25% stratified subsample of each suite. Could the authors explain why a subset was used and whether the results are expected to hold on a larger sample?

The original 25% stratified subsample was motivated by LLaDA-2 Mini's substantially higher computational cost. In our reported adaptive evaluations (Tables 4–5), LLaDA-2 Mini required 84.0 seconds per episode on average, compared with 11.7 seconds for DiffusionGemma (approximately 7.2× longer), making full-grid adaptive search considerably more expensive.

To assess robustness beyond the subsample, we are extending the evaluation to the full AgentDojo grid using a template-warm-started adaptive attacker. Consistent with the original LLaDA-2 Mini evaluation reported in the paper, we use 20 unique attacker queries per scenario, balancing attack-search depth with broader scenario coverage under computational constraints.

The complete Slack and Banking evaluations (249 scenarios) have now finished, with CoDA (Oracle) maintaining 0% ASR in both suites, consistent with the original subsample findings. Results are summarized below. Evaluations for Travel and Workspace are ongoing, and we will update this response with the remaining results once finalized.

SuiteMethodnUtility ↑ASR ↓
SlackVanilla10525.71%30.48%
CoDA (Oracle)10518.10%0.00%
BankingVanilla14438.19%20.83%
CoDA (Oracle)14431.94%0.00%

Q6. Interpretation of the adaptive-attack results. The paper reports ASR and task utility under the strongest trigger selected by the adaptive attacker. Could the authors clarify how this trigger is selected and whether the two metrics are evaluated under the same conditions?

For each task–attack scenario, the adaptive attacker evaluates up to 100 unique candidate injections for DiffusionGemma and AR Gemma-4, or 20 for LLaDA-2 Mini, each requiring a complete agent episode. Candidates are ranked by attack success and graded progress toward the adversarial objective, without considering legitimate task utility. The search terminates upon successful injection or selects the highest-ranked candidate within the query budget.

Importantly, both ASR and task utility are measured from the same agent execution under the selected trigger, evaluating adversarial objective completion and legitimate user-task success, respectively. Thus, reported utility reflects agent performance under the strongest observed attack, rather than a separate benign evaluation.

Q7. Inference overhead and reproducibility. Could the authors clarify the hardware and inference settings used for the reported wall-clock time and model-call measurements, and specify which components are included in these measurements? In particular, it would be useful to distinguish CoDA's per-episode enforcement overhead from the cost of policy synthesis and adaptive-attack generation.

All experiments used NVIDIA A40 (48 GB) GPUs with BF16 precision, with DiffusionGemma sharded across two GPUs and LLaDA-2 Mini running on one.

Reported wall-clock time measures a complete target-agent episode, including model inference, diffusion decoding, CoDA's constraint enforcement and regeneration, tool execution, and task evaluation. Model calls count agent-level invocations, not individual denoising steps.

Measurements exclude one-time model loading, offline policy synthesis, and adaptive attack generation (including attacker/critic inference). The attacker and critic run on separate GPUs to avoid contention. Thus, reported timings capture end-to-end agent execution, including CoDA's enforcement overhead, rather than total attack-search costs.

Q8. There appears to be a missing space in the Conclusion between “attacks.” and “Under oracle task-level policies.”

Thank you for catching this typo. We will correct it in the revised manuscript.

We thank the reviewer again for their constructive feedback. We believe the additional failure analyses, structure-identification audit, and clarifications on policy construction, adaptive evaluation, and inference overhead provide stronger empirical support for CoDA's effectiveness and reliability while addressing the reviewer's primary concerns.

These revisions have been incorporated into the updated manuscript, particularly Sections 5.1 and 6.1 and Appendices D.3, F.1, and G.3, with modifications highlighted in blue for ease of review.

References.

[1] Nasr, M. et al, (2025). The attacker moves second: Stronger adaptive attacks bypass defenses against LLM jailbreaks and prompt injections.

AuthorsOpenReview ↗

Thanks for reviewing, please let us know if you need any further clarifications

Thank you again for your review. We wanted to follow up on our clarifications of Oracle-policy construction, the conditions required for enforcement, and the adaptive-attack protocol and runtime measurements. We also added a parser-coverage audit of 5,661 episodes and expanded the LLaDA-2 Mini evaluation to the full Slack and Banking suites, while clarifying which evaluations remain incomplete. Please let us know if any part of our explanation or these additional results needs further clarification. If these responses address your concerns, we would appreciate it if you would reconsider your rating in light of the revised manuscript.

Reviewer_NDjKOpenReview ↗
Rating
3(+1)
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes CoDA, a training-free agent security framework based on diffusion language models. The method defines security policies based on trusted user tasks and enforces constraints on tool calls and their security-sensitive arguments throughout the diffusion denoising process to prevent unauthorized actions caused by prompt injection. The paper evaluates CoDA against static and adaptive attacks across multiple AgentDojo task environments. Experimental results show that CoDA significantly reduces attack success rates while maintaining competitive task utility in some settings.

Critical strengths
  1. The paper applies the iterative denoising mechanism of dLLMs to agent security guardrails, offering a novel and insightful approach.

  2. CoDA significantly reduces the success rate of prompt injection attacks across multiple agent environments, demonstrating strong robustness against adaptive attacks while maintaining competitive task utility in some settings.

  3. CoDA is a training-free framework that requires neither additional training nor modifications to the base model parameters.

Critical weaknesses
  1. The advantages of diffusion-based enforcement are not sufficiently justified. The paper emphasizes the benefits of dLLMs' sequence-wide predictions and iterative refinement for enforcing security constraints, but similar constraints can also be implemented through autoregressive constrained decoding or system-level authorization. The existing experiments mainly compare CoDA with Last-Step projection and lack direct comparisons with existing agent security defenses such as CaMeL [1] and DRIFT [2]. Therefore, it remains unclear whether dLLMs offer unique advantages in terms of security, task utility, or inference efficiency.

  2. The effectiveness of CoDA heavily depends on manually refined Oracle policies. The strongest security results mainly rely on Oracle policies that are manually validated and revised for each user task, which may limit the method's generalizability and practical applicability to unseen tasks. Although the authors also evaluate LLM-generated policies, their effectiveness is significantly weaker than that of Oracle policies. In particular, in the Banking environment, all CoDA settings using automatically generated policies perform worse than PBG in terms of both security and task utility. Moreover, the comparison between CoDA with Oracle policies and PBG does not fully control for differences in policy quality, making it difficult to determine how much of the performance improvement comes from diffusion-based enforcement itself.

[1] Debenedetti et al. Defeating Prompt Injections by Design.

[2] Li et al. DRIFT: Dynamic Rule-Based Defense with Injection Isolation for Securing LLM Agents.

Questions for authors
  1. What unique advantages does CoDA's diffusion-time enforcement offer over existing approaches such as CaMeL, DRIFT, and autoregressive constrained decoding? Can the authors provide empirical evidence to support these advantages?

  2. To what extent do the Oracle policies depend on manual refinement? Can automatically generated policies achieve comparable performance on unseen tasks?

6 comments

[Part 1]

We thank the reviewer for their thoughtful and constructive feedback. We particularly appreciate their recognition of CoDA's novelty, robustness, and its training-free nature. We are grateful for the opportunity to clarify our contributions and address the concerns raised below.

W1 & Q1. The advantages of diffusion-based enforcement are not sufficiently justified. The paper emphasizes the benefits of dLLMs' sequence-wide predictions and iterative refinement for enforcing security constraints, but similar constraints can also be implemented through autoregressive constrained decoding or system-level authorization. The existing experiments mainly compare CoDA with Last-Step projection and lack direct comparisons with existing agent security defenses such as CaMeL [1] and DRIFT [2].

The key component is whether diffusion time enforcement offers utility advantages over applying identical policies through autoregressive constrained decoding. We thus conducted a comparison between CoDA and AR constrained decoding using identical Oracle policies, authorized tool and argument constraints, and adaptive attack settings. The AR model enforces constraints through next-token masking [1], whereas CoDA applies sequence-wide projections throughout iterative denoising, allowing subsequent refinement of constrained regions, as proposed in the paper. For this baseline, we use Gemma 4 26B A4B IT as the AR model, which is the autoregressive backbone on which DiffusionGemma was adapted from. Interestingly both approaches achieve 0% ASR across the tested suites, but, AR constrained decoding reduces overall task utility by 14.64% relative to its non-constrained version. This is a crucial observation becasue CoDA instead improves (rather than reducing) utility by 20.45% compared to its non-constrained dllm backbone.

Also, notably, despite substantially lower baseline utility, DiffusionGemma achieves comparable defended utility to AR (57.88% vs. 58.53%), while requiring 39.7% fewer agent-level model calls (4.20 vs. 6.96).

SuiteArchitectureMethodUtility ↑ASR ↓Δ Utility vs. VanillaAvg. Model Calls ↓
SlackGemma-4 (AR)Vanilla69.52%55.24%–8.79
Gemma-4 (AR)Oracle Constrained Decoding57.14%0.00%−17.80%7.38
DiffusionGemmaVanilla62.86%95.24%–5.81
DiffusionGemmaCoDA (Oracle)66.67%0.00%+6.06%3.67
WorkspaceGemma-4 (AR)Vanilla73.33%7.92%–4.26
Gemma-4 (AR)Oracle Constrained Decoding57.92%0.00%−21.02%6.79
DiffusionGemmaVanilla50.00%28.57%–4.29
DiffusionGemmaCoDA (Oracle)51.67%0.00%+3.34%5.38
TravelGemma-4 (AR)Vanilla56.43%5.00%–6.09
Gemma-4 (AR)Oracle Constrained Decoding61.43%0.00%+8.86%5.71
DiffusionGemmaVanilla25.19%74.07%–5.51
DiffusionGemmaCoDA (Oracle)68.75%0.00%+172.93%4.88
BankingGemma-4 (AR)Vanilla75.00%34.03%–4.94
Gemma-4 (AR)Oracle Constrained Decoding57.64%0.00%−23.15%7.94
DiffusionGemmaVanilla54.17%77.78%–3.68
DiffusionGemmaCoDA (Oracle)44.44%0.00%−17.96%2.86
OverallGemma-4 (AR)Vanilla68.57%25.55%–6.02
Gemma-4 (AR)Oracle Constrained Decoding58.53%0.00%−14.64%6.96
DiffusionGemmaVanilla48.06%68.92%–4.82
DiffusionGemmaCoDA (Oracle)57.88%0.00%+20.45%4.20

Additionally, we acknowledge the relevance of CaMeL [2] and DRIFT [3], which share our goal of preventing untrusted content from inducing unauthorized actions. These methods operate primarily at the agent-system level and entail greater architectural intervention: CaMeL separates trusted planning from untrusted data processing through a dual-model architecture and restricted execution program, while DRIFT introduces dynamic planning, validation, and injection isolation. CoDA instead preserves the existing tool-using agent architecture and enforces task-level policies directly during generation, allowing policy-relevant regions to be iteratively revised toward compliance. CoDA can also serve as a policy-constrained action-generation component within broader plan-and-execute architectures. These approaches are therefore complementary and could be combined as defense in depth; CoDA contributes a distinct, training-free generation-level enforcement mechanism rather than replacing system-level authorization.

We additionally note that CoDA is a general decoding-time framework whose applicability is not limited to the capabilities of current dLLMs, thus we see it as a foundation for security-constrained generation as diffusion models continue to improve.

[Part 2]

W2 & Q2. The effectiveness of CoDA heavily depends on manually refined Oracle policies. The strongest security results mainly rely on Oracle policies that are manually validated and revised for each user task, which may limit the method's generalizability and practical applicability to unseen tasks. Although the authors also evaluate LLM-generated policies, their effectiveness is significantly weaker than that of Oracle policies. In particular, in the Banking environment, all CoDA settings using automatically generated policies perform worse than PBG in terms of both security and task utility. Moreover, the comparison between CoDA with Oracle policies and PBG does not fully control for differences in policy quality, making it difficult to determine how much of the performance improvement comes from diffusion-based enforcement itself.

We clarify that Oracle policies represent an upper-bound reference for policy specification quality, allowing us to isolate CoDA's enforcement capabilities independently of automatic policy selection. For each user task, an LLM initially proposes a policy, which is subsequently reviewed and refined by humans using development-time evaluations and attack feedback. This process involves selecting authorized tool capabilities and applicable security constraints. This setting also reflects deployments in which security or compliance stakeholders review and approve authorization policies before enforcement. Once constructed, Oracle policies are fixed and remain unchanged throughout adaptive attack evaluation, without adjustments to individual injection attempts or attack outcomes. In contrast, automatic LLM policy selectors generate policies directly from trusted user instructions in a single pass, without human intervention, iterative refinement, or feedback from evaluation runs. These policies are generated once per user task and remain fixed throughout evaluation, without access to adversarial inputs.

Importantly, all three fully automated LLM policy selectors achieve 0% ASR in three of four suites, without human refinement or access to adversarial inputs. Their weaker performance in the Banking domain were also acknowledged in the paper; We further manually analyzed all 54 successful static attacks under LLM-generated policies. As shown below, every observed breach involved an over-authorized tool capability (no selected policy constraint was bypassed). The primary failure mode we found was in cases when user tasks referenced instructions in untrusted external files. These results further help us identify policy selection as the key source of the observed Banking vulnerabilities, rather than failure to enforce the selected constraints!

User TaskOver-authorized ToolsGPT-5.6 SolGemini 3.7 FlashClaude Opus 5
UT0: Pay bill from filesend_money222
UT2: Adjust rent from fileupdate_scheduled_transaction222
UT10: Repeat prior paymentsend_money222
UT12: Follow file instructionssend_money, update_scheduled_transaction0011
UT15: Address, standing orders, refundsend_money, update_scheduled_transaction11113
Total successful breaches171720
Selected policy constraint bypasses000

[Part 3] - Continuation of response to W2&Q2

In addition to the AR constrained decoding results provided in response to W1, to further distinguish the effects of policy specification and enforcement, we provide an additional Oracle Prompting baseline. This baseline provides vanilla DiffusionGemma with the same task-specific Oracle policy as trusted system instructions, including authorized tools, security-sensitive argument values derived from trusted information, and applicable authorization rules. Crucially, it employs no constrained decoding, logit projection, tool filtering, or post-generation validation. This controlled comparison evaluates whether access to high-quality Oracle policies alone is sufficient for security, or whether their explicit enforcement during denoising provides additional protection. Under adaptive attacks, Strict Oracle Prompting achieves 19.74% ASR, compared with 0% for CoDA, demonstrating the additional security benefit of mechanical policy enforcement beyond policy specification alone.

SuiteMethodUtility ↑ASR ↓
SlackOracle Prompting72.38%23.81%
CoDA (Oracle)66.67%0.00%
WorkspaceOracle Prompting56.25%4.58%
CoDA (Oracle)51.67%0.00%
TravelOracle Prompting61.43%20.71%
CoDA (Oracle)68.75%0.00%
BankingOracle Prompting56.94%29.86%
CoDA (Oracle)44.44%0.00%
OverallOracle Prompting61.75%19.74%
CoDA (Oracle)57.88%0.00%

We acknowledge that reliable automatic policy synthesis, particularly for unseen tasks involving indirect authorization, remains an important open challenge. Nevertheless, CoDA provides a general framework for enforcing task-level security policies during diffusion generation, separating the enforcement mechanism from the upstream policy-construction process.

We thank the reviewer again for their constructive feedback. We believe the additional comparisons with AR constrained decoding and Oracle Prompting, together with our analysis of automatic policy-selection failures, provide stronger empirical evidence for CoDA's contributions and address the reviewer's primary concerns. These additions have been incorporated into the revised manuscript in Sections 6.1 and 6.3 and Appendices G.1–G.3, with all modifications highlighted in blue for ease of review.

References.

[1] Koo, Terry et al. “Automata-Based Constraints for Language Model Decoding.” COLM, 2024.

[2] Debenedetti et al. Defeating Prompt Injections by Design.

[3] Li et al. DRIFT: Dynamic Rule-Based Defense with Injection Isolation for Securing LLM Agents.

Comments on the paper

1 comment
AuthorsOpenReview ↗

Rebuttal Summary, Manuscript Revisions, and Closing Remarks

We thank the reviewers and Area Chair for their time and constructive feedback. During the rebuttal period, we conducted several additional experiments and analyses to directly address the reviewers' concerns. These additions substantially strengthen the empirical evidence for CoDA's contributions and have been incorporated into the revised manuscript, with changes highlighted in blue.

Summary of key additions:

  1. Comparison with autoregressive constrained decoding (Reviewer NDjK): We compared CoDA against AR constrained decoding using the same Oracle policies and adaptive attacks. Both achieve 0% ASR, however CoDA improves utility by 20.45% relative to its unconstrained dLLM baseline, whereas AR constrained decoding decreases utility by 14.64% relative to its AR baseline. CoDA also achieves comparable defended utility (57.88% vs. 58.53%) with 39.7% fewer agent-level model calls, empirically highlighting the advantages of diffusion-time enforcement.

  2. Oracle Prompting baseline (Reviewer NDjK): To isolate the contribution of explicit policy enforcement, we evaluated vanilla DiffusionGemma with identical Oracle policies provided as trusted system instructions, but without constrained decoding. Oracle Prompting achieves 19.74% adaptive ASR, compared with 0% for CoDA, demonstrating that high-quality policy instructions alone do not ensure security.

  3. Parser-coverage and enforcement reliability (Reviewers jJNs, DSuh): We audited 5,661 episodes and 24,988 executed tool calls, finding zero observed parser-coverage bypasses. We further clarified the conditions under which policy enforcement guarantees hold and the treatment of malformed or incomplete tool calls.

  4. Expanded evaluation and policy-selection analysis (Reviewers jJNs, DSuh): We expanded LLaDA-2 Mini's adaptive evaluation to the full Slack and Banking suites, maintaining 0% Oracle ASR, and reported confidence intervals. We also analyzed all 54 successful static Banking attacks under automatically selected policies, finding that every breach involved over-authorized tool capabilities, with no observed bypass of an active constraint.

We also clarified the Oracle-policy construction process, the separation of policy synthesis from enforcement, and the adaptive evaluation protocol and computational overhead.

We appreciate Reviewer NDjK's follow-up, acknowledging that the rebuttal addressed most concerns and increasing their assessment. While we have not yet received follow-up feedback from Reviewers jJNs and DSuh, we hope the additional experiments, clarifications, and manuscript revisions help address their concerns.

In closing, we believe these additions substantially strengthen CoDA's central contribution: a training-free framework for enforcing task-level security policies directly during diffusion generation, supported by extensive adaptive-attack evaluations and controlled comparisons. We respectfully ask the Area Chair to consider the revised manuscript and additional rebuttal evidence in the final assessment.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.