arXiv:2611.00386cs.AIOct 2026

Manuscript Offprint

arXiv:2611.00386

Dependence-Aware Risk Assessment and Optimal Design of AI-Agent Safeguard Systems

Yijia Li, Maochao Xu, Peng Zhao

Abstract

Large language model (LLM) agents increasingly rely on safeguards to prevent unauthorized actions while preserving legitimate service. However, existing risk assessments often focus on individual safeguard performance while overlooking dependence among safeguard decisions. This paper develops a dependence-aware framework for risk assessment and optimal design of multi-component AI safeguard systems, jointly selecting configurations and operating policies for sequential layered screening and selective verification. We establish stochastic comparisons of layered-screening error probabilities and invocation costs under lower-orthant ordering. For selective verification, we characterize exactly which policies have error probabilities and review costs that respond monotonically to stronger dependence under supermodular ordering. For a fixed first stage and reviewer, we show that the optimal routing map is a two-threshold rule in the first-stage likelihood ratio, and that a reviewer enters an optimal policy only when its cost is below a quality-adjusted combination of the error losses. We further develop exact optimization algorithms for selecting safeguard subsets, execution orders, and verification policies under specified risk and cost requirements. An accompanying open-source software package, Dependence-Aware Policy Optimization Algorithms (DAPOA), facilitates the practical implementation of the proposed framework. Numerical experiments show that ignoring dependence can lead to inaccurate risk assessments and infeasible safeguard designs, with independence-based selections violating security requirements in six of eight scenarios. An empirical study using four LLM safeguards on benchmark-derived agent actions further demonstrates the practical implications of dependence modeling. Under the principal operating setting, dependence-aware selection lowers held-out total cost by 39.6% relative to independence-based selection.

Keywords: AI-agent safeguards; copula; optimal design; stochastic comparisons.

*Corresponding author. Email: mxu2@ilstu.edu

1 Introduction

LLM agents increasingly act through tools that retrieve information, modify records, execute code, and communicate with external services. An agent can propose an action that is syntactically valid but unauthorized, such as sending information to an unapproved recipient or changing a record when the user requested only a read. Such proposals can arise from ordinary model errors or from indirect prompt injection, in which instructions embedded in external content redirect the agent's behavior (Greshake et al., 2023; Debenedetti et al., 2024). Developers therefore deploy safeguards that screen agent inputs, outputs, and actions. Examples include learned content classifiers such as Llama Guard (Inan et al., 2023), programmable policy enforcement through NeMo Guardrails (Rebedea et al., 2023), and the prompt-injection and goal-alignment checks integrated in LlamaFirewall (Chennabasappa et al., 2025). When such components are combined, system risk depends on each safeguard's performance, how their errors overlap, and the rule used to combine their decisions. A safeguard layer operates on demand and has two consequential failure modes. A security miss allows an unauthorized action, whereas a false block stops an authorized action and interrupts service. Current practice uses several approaches to combining safeguards. Two approaches that arise in practice are layered screening and cascade verification. In layered screening, several safeguards are applied as successive layers to a proposed action, and the action proceeds only if every layer allows it. Thus, a blocking decision by any safeguard can stop the action. LlamaFirewall, for example, halts the agent when either its injection detector or its goal-alignment check raises a flag (Chennabasappa et al., 2025). Under this rule, an additional layer cannot increase the miss probability, but it can contribute false blocks of its own. In LlamaFirewall's AgentDojo evaluation, task utility was 47.0% with the injection detector alone, 43.1% with the alignment check alone, and 42.7% with both (Chennabasappa et al., 2025). For cascade verification (i.e., flag-to-review), an inexpensive safeguard first screens the proposed action, and flagged actions are escalated to a more costly reviewer for further verification. Anthropic's Constitutional Classifiers++ provides a content-safety example: a lightweight linear probe screens all exchanges and escalates suspicious ones to a second-stage classifier, whose final decision combines the probe and classifier scores (Cunningham et al., 2026). A cascade blocks an action only when the screen refers it and the reviewer confirms it, and it misses an attack whenever either stage does. Its security-miss probability therefore depends on the screen's miss probability and on the reviewer's miss probability conditional on referral.

Current practice often evaluates and tunes safeguards largely in isolation, reporting component detection and false-positive rates, or system-level performance for a single fixed configuration. System risk under alternative combination rules is then either not assessed or computed, implicitly, as if component errors were independent. This assumption is difficult to justify in practice as safeguards in the same system inspect the same context: an injected instruction that appears in a retrieved document is presented to every layer that reads it. Many safeguards are themselves language models, or probes on language-model activations, that share pretraining corpora, architectures, and often a base model family; some are trained on synthetic data generated from the same policy or constitution. Attacks also vary in intrinsic difficulty, so an obfuscated or semantically disguised instruction that defeats one detector tends to defeat others, a phenomenon recently documented for the errors of LLMs (Kim et al., 2025). Finally, architecture itself induces dependence: in a cascade, the reviewer sees only the actions the screen selects, and its decision may reuse the screen's score (Cunningham et al., 2026). Ignoring this dependence biases the assessment of system risk.

Dependence modeling plays a central role in reliability engineering and operations research. For example, Wu (2024) models the dependence between the age and usage of items under two-dimensional warranty with copulas and derives preventive maintenance policies from the resulting failure process. Rahimi et al. (2026) characterize ordering policies for multi-item inventory systems with autocorrelated and cross-correlated demands and report substantial cost reductions relative to policies that treat demands as independent. In portfolio credit derivatives, the dependence among default times drives pricing, and Lei et al. (2023) estimate copula sensitivities that quantify how changes in the dependence level affect the output. Kim & Weber (2022) use copula-based models to assess worst-case average value at risk under tail uncertainty, with an application to cyber risk. Cyber-risk research has also quantified the losses caused by security failures: Eling & Wirfs (2019) analyze actual cyber-event costs using operational risk data, and Dacorogna et al. (2023) develop a method for modeling heavy-tailed cyber losses. For security planning, Paul & Zhang (2021) develop a two-stage stochastic programming model for allocating prevention, detection, containment, and intelligence resources, and Li et al. (2026) represent dependent compromises in multi-tenant cloud systems and connect joint risk assessment to defensive decisions. Where these studies model dependence, it is among inputs, losses, or compromised assets. In a safeguard system, the relevant dependence is among the decisions of components that screen the same action.

Safeguard execution is also related to sequential testing, where costly tests are ordered to determine a system's state. Rostami et al. (2019) develop exact methods for testing serial systems under precedence constraints, and Rostami & Rostami (2026) study exact sequencing in sparse precedence networks. Agnetis et al. (2022) consider testing and search when limited resources and deadlines restrict the available decisions. In the safeguard setting studied here, the decisions include the component subset, execution order, reviewer, and final response to each first-stage pattern. The objective accounts for invocation costs and the consequences of both security misses and false blocks, using separate joint decision distributions for unauthorized and authorized actions. Stochastic comparisons provide a complementary way to assess system designs under structural assumptions on dependence. Navarro & Fernández-Martínez (2021) use copulas and distortion functions to compare redundancy mechanisms and determine where redundant components should be placed. Argyris et al. (2025) derive conditions for multidimensional stochastic dominance between discrete joint distributions with respect to specified classes of value functions.

Correlated errors among LLMs have been documented (Kim et al., 2025), and recent work shows that layered LLM defenses can be defeated jointly by staged attacks (McKenzie et al., 2026). To our knowledge, however, the joint distribution of safeguard decisions has not been modeled and used to compare alternative combination policies or to design how safeguards are selected, ordered, and combined. This gap matters because the effect of the joint distribution on system risk and cost depends on the policy that combines the decisions. In layered screening, the joint outcomes of the selected safeguards determine system errors, while their execution order determines how often each safeguard is invoked. In a cascade, the referral rule determines when the reviewer is used and which actions rely on its decision. These considerations raise two related questions: (i) how can joint safeguard decisions be modeled and translated into policy-specific measures of risk and cost; and (ii) how can these measures be used to select safeguards, execution orders, reviewers, and referral rules under operational constraints? To address these questions, we introduce two policy classes for the design of AI-agent action safeguards, building on layered screening and cascade verification used in practice. Sequential layered screening selects and orders a subset of safeguards, stopping when any selected safeguard returns BLOCK. Selective verification selects first-stage safeguards and a reviewer, then assigns each joint first-stage decision pattern to automatic allowance, automatic blocking, or review. These classes include fixed layered configurations and flag-to-review cascades as special cases. We assess and optimize their risk and operating cost using the class-conditional joint distribution of safeguard decisions.

Our main contributions are as follows.

  • Dependence-aware assessment and design formulation. We develop a copula-based framework for modeling the class-conditional joint distribution of safeguard decisions. For sequential layered screening and selective verification, we derive system-level miss and false-block probabilities and establish stochastic comparisons that characterize how dependence among safeguard decisions affects policy risk and invocation costs. For selective verification, we prove that a policy's error probabilities respond monotonically to stronger dependence if and only if its final-decision rule is supermodular or submodular, and its referrals and review cost do so if and only if its referral rule is.

  • Dependence-Aware Policy Optimization Algorithms (DAPOA). We formulate two design problems: minimizing expected total cost subject to risk requirements, and minimizing the security-miss probability subject to a cost constraint. For a fixed first stage and reviewer, we show that the optimal routing map is a two-threshold rule in the first-stage likelihood ratio. DAPOA uses subset dynamic programming to select safeguards and their execution order for sequential layered screening, and binary optimization to select safeguards, reviewers, referral regions, and final decisions for selective verification. The searches return an optimal feasible policy within the admitted classes for the supplied class-conditional distributions. The algorithms are implemented in the open-source (DAPOA)1^1 package.

  • Numerical and empirical evaluation. Through numerical experiments, we identify when dependence materially changes estimated system risk, policy feasibility, and the optimal design. Using agent-action safeguard data, we evaluate the fitted joint model and compare the risk and operating costs of layered, cascade, and selective verification policies. The results show how joint safeguard outcomes can be translated into safeguard selection, execution order, and review decisions, and delineate the conditions under which accounting for dependence improves the risk-cost tradeoff.

The remainder of the paper is organized as follows. Section 2 defines the safeguard policies,

1^1https://github.com/MSMCI-lab/DAPOA introduces the class-conditional copula representation, and formulates the risk-constrained design problems. Section 3 establishes the dependence comparisons, characterizes the verification policies whose risk responds monotonically to dependence, derives the structure of optimal routing maps, and develops exact algorithms for safeguard selection, execution ordering, and selective verification. Sections 4 and 5 present the numerical and empirical studies, respectively. Section 6 discusses the findings, limitations, and future research directions. The Supplementary Material provides copula definitions, family-specific calculations, and supplementary empirical methods and results.

Table 1 summarizes the main notation used throughout the paper.

Table 1: Main notation.

NotationDefinition
YYTrue authorization status: Y=1Y=1 for an unauthorized action and Y=0Y=0 for an authorized action
m,jm, jNumber of available safeguards and safeguard index
Dj,D,dD_j, \mathbf{D}, \mathbf{d}Decision of safeguard jj; potential decision vector D=(D1,…,Dm)\mathbf{D} = (D_1, \ldots, D_m); and a realization d∈{0,1}m\mathbf{d} \in \{0,1\}^m
Py,pjy,qy(d)P_y, p_{jy}, q_y(\mathbf{d})Class-conditional probability Py(⋅)=Pr⁡(⋅∣Y=y)P_y(\cdot) = \Pr(\cdot \mid Y=y); marginal blocking probability pjy=Py(Dj=1)p_{jy} = P_y(D_j=1); and joint pattern probability qy(d)=Py(D=d)q_y(\mathbf{d}) = P_y(\mathbf{D}=\mathbf{d})
π,Gπ,P\pi, G_\pi, \mathcal{P}Operating policy; final system decision; and admissible policy class P=PL∪PR\mathcal{P} = \mathcal{P}_L \cup \mathcal{P}_R
M(π),B(π)M(\pi), B(\pi)Security-miss probability P1(Gπ=0)P_1(G_\pi=0) and false-block probability P0(Gπ=1)P_0(G_\pi=1)
cj,ωc_j, \omegaCost of invoking safeguard jj and target proportion of unauthorized actions
K(π;ω),J(π;ω)K(\pi;\omega), J(\pi;\omega)Expected operating cost and total expected cost, respectively
ℓM,ℓB\ell_M, \ell_BExpected losses per security miss and false block
α,β,b\alpha, \beta, bUpper bounds on miss and false-block probabilities and operating-cost budget
S,σS, \sigmaSelected safeguard set and its execution order under layered screening
F,h,H,WF, h, H, WFirst-stage safeguard set; reviewer index; reviewer decision H=DhH=D_h; and first-stage pattern W=(Dj:j∈F)W=(D_j:j\in F)
Aπ,Bπ,Qπ\mathcal{A}_\pi, \mathcal{B}_\pi, \mathcal{Q}_\piAutomatic-allow, automatic-block, and review regions under selective verification
sy(w),ty(w)s_y(\mathbf{w}), t_y(\mathbf{w})First-stage pattern probability Py(W=w)P_y(W=\mathbf{w}) and joint probability Py(W=w,H=1)P_y(W=\mathbf{w}, H=1) that the pattern occurs and the reviewer blocks
λ(w),κy\lambda(\mathbf{w}), \kappa_yFirst-stage likelihood ratio and the reviewer's conditional BLOCK rate