ATrust: Adaptive Trust Boundary Expansion for LLM Agent SecurityATrust: Adaptive Trust Boundary Expansion for Securing LLM Agents
The authors propose ATrust, which takes the user query as the root trust anchor and progressively admits task-essential information; the authors claim that on AgentDyn with GPT-4o as the backbone, it reduces ASR from 37.80% to 4.37%.
A black-box attacker manipulates data hosted on third-party platforms (e.g., sending emails containing malicious instructions to a user's inbox), which is exposed to the agent via tool retrieval; the goal is to hijack the agent into executing the injected malicious instructions and deviating from user intent; the system provider, the user, and the third-party service provider are all benign. The defender is the agent system developer or a third-party security service provider.
- LLM agents face the threat of indirect prompt injection (IPI); the authors argue that existing defenses rely on static trust boundaries, which easily leads to over-defense and discarding task-essential information, causing utility degradation.
- ATrust takes the user query as the root trust anchor and uses a fine-tuned admission model to partition each step's observations by task relevance, admitting only task-essential semantics into the trust boundary, while irrelevant content (whether benign or malicious) does not enter subsequent decision-making.
- Compared with six categories of baselines on AgentDojo and AgentDyn across five backbone models, the authors claim ATrust achieves the best security-utility trade-off: on AgentDyn with the GPT-4o backbone, ASR drops from 37.80% to 4.37%, and UA improves by 5.61 percentage points.
- The authors point out that the training corpus has only 1,030 entries, making it difficult to cover the full scope of real tasks, and that the trust expansion mechanism can still be partially exploited by adaptive attacks; the experiments cover only two benchmarks and five backbones, and do not report the number of repetitions or statistical tests.
- Evaluated models
- GPT-4o-miniGPT-4oClaude-3.5-HaikuQwen3-Coder (480B-A35B)Kimi-K2.5
- Benchmarks
- AgentDojoAgentDyn
- Metrics
- UTUAASRDTI
ATrust is a defense mechanism that adaptively expands the trust boundary at runtime in LLM agents, defending against indirect prompt injection attacks. It uses the user query as the root trust anchor, progressively incorporates external information necessary for the task as new anchors, and excludes irrelevant content. With GPT-4o as the engine, it reduces the attack success rate on AgentDyn from 37.80% to 4.37%, improves utility by 10.00%, and leads the existing best defense AuthGraph by 12.33%.
Related events and news
2 events · 2 news mentions
News that mentions this paper
香港城市大学提出 ATrust:动态扩展信任边界防提示注入
- 公众号 模安局cites the paper's id or link香港城市大学提出 ATrust:动态扩展 Agent 信任边界抵御提示注入
大模型安全周报:智能体安全边界在签名、授权与上下文
- 公众号 大模型安全研究cites the paper's id or link大模型安全周报:智能体的安全边界在签名、授权与上下文三层防线里
ATrust: Adaptive Trust Boundary Expansion for Securing LLM Agents(https://arxiv.org/abs/2611.02741)
Paper analysis
What problem does this paper attempt to solve?
How to defend against indirect prompt injection targeting LLM agents while avoiding over-defense and utility loss caused by static trust boundaries.
Core problem: how to defend against indirect prompt injection (IPI) targeting LLM agents while avoiding the over-defense and functionality loss caused by existing static trust boundary defenses.
- Problem scenario and importance: Tool-augmented LLM agents encounter untrusted external observations when calling APIs, browsing the web, and reading emails, which may embed IPI attacks, leading to privacy leakage, economic loss, or destructive operations; the authors cite OWASP 2026 as listing IPI as the top agent security threat.
- Shortcomings of existing methods: The authors argue that existing defenses (such as CaMeL, DRIFT, PromptArmor, PIGuard) base security decisions on a narrow and static trust boundary, relying only on a small amount of predefined trusted evidence such as the user query or executed tool names, or evaluating a single tool output in isolation, discarding the contextual semantics needed to judge whether external instructions are task-relevant, leading to over-defense; the authors claim that on AgentDyn these defenses suffer severe utility loss, with CaMeL's utility dropping to zero on all suites.
- Core observation: The trustworthiness of external instructions depends on user intent, prior interactions, and the current execution state; task-necessary environmental feedback (e.g., authentication verification codes) should be retained, while content unrelated to the task (whether benign or malicious) should be excluded from decisions.
- Proposed approach: ATrust, a defense mechanism that adaptively expands the trust boundary at agent runtime, starting from the root trust anchor of the user query and gradually admitting task-necessary information as new trust anchors.
- Threat model:
- Attacker goal: Hijack the agent so that it follows injected malicious instructions, deviates from the user's original intent, and performs harmful actions.
- Attacker knowledge: black-box attacker.
- Attacker capability: Manipulate data hosted on third-party platforms (e.g., send emails containing malicious instructions to the user's inbox), which are then retrieved by tools and exposed to the agent.
- Victim system and benign assumptions: An LLM agent that receives user queries and interacts with the external environment through trusted tools; the system provider, the user, and third-party service providers are all benign. The defender is the agent system developer or a third-party security service provider.
What related research exists?
The paper divides related work into LLM agents, IPI attacks and benchmarks, and three types of IPI defenses, and points out that they share the limitation of a static trust boundary.
LLM agents
- ReAct (Yao et al., 2022), Plan-and-Solve (Wang et al., 2023), ToT (Yao et al., 2023), and RAP (Hao et al., 2023)—paradigms that enhance reasoning and planning.
- PAL (Gao et al., 2023), Toolformer (Schick et al., 2023), ToolLLM (Qin et al., 2024)—integrate external tools and code execution; ToolLLM scales to more than 16,000 real APIs.
- MIND2WEB, WebAgent, VisualWebArena, OSWorld, etc.—general agents that perform end-to-end tasks in real environments; the authors note that these integrations with external environments expand the attack surface.
IPI attacks and evaluation benchmarks
- Goodside (2022), Willison (2022), Perez & Ribeiro (2022)—early work characterizing prompt injection as a local semantic alignment failure; Greshake et al. (2023), Liu et al. (2023), Kang et al. (2024) shift the threat model toward indirect prompt injection.
- InjecAgent (Zhan et al., 2024) evaluates single-step interactions; AgentDojo (Debenedetti et al., 2024) formalizes multi-tool environments and adaptive IPI; ASB (Zhang et al., 2025) achieves long-term latency through poisoned memory and planning modules; AgentDyn (Li et al., 2026b) designs tasks with longer trajectories, which the authors claim expose the over-defense problem of existing guardrails.
- PISmith (Yin et al., 2026)—a reinforcement-learning-based automated red-teaming method that adaptively synthesizes prompt injection attacks.
IPI defenses (three categories)
- System-level: IsolateGPT (Wu et al., 2024) uses hub-and-spoke execution isolation; CaMeL (Debenedetti et al., 2025) enforces data isolation and access control between untrusted data and user queries; Progent (Shi et al., 2025a) implements programmable privilege control; DRIFT (Li et al., 2026a) uses a security planner to predict tool trajectories and enforce dynamic control and data constraints; AgentSys (Wen et al., 2026) performs explicit memory management with layered context isolation.
- Internal model-level: Jatmo (Piet et al., 2024) performs task-specific fine-tuning; StruQ (Chen et al., 2025a) uses structured queries to separate data from instructions; SecAlign (Chen et al., 2025b) uses preference optimization; Meta-SecAlign (Chen et al., 2025c) uses meta-learning to generalize to unseen injection strategies; ReasAlign (Li et al., 2026c) adds safety-oriented CoT trajectories during fine-tuning.
- External model-level: Sandwich defense (Schulhoff, 2024) and Spotlighting (Hines et al., 2024) isolate untrusted data through prompt engineering; PromptArmor (Shi et al., 2025b) wraps untrusted content in structured prompt blocks; AttriGuard (He et al., 2026) uses causal attribution to analyze the causal dependence between prompt segments and tool calls; ProtectAI (2024) and PromptGuard (MetaAI, 2024) are fine-tuned small guardrail models; PIGuard (Li et al., 2025) reduces trigger-word bias through training strategies to lower false positives; DataSentinel (Liu et al., 2025) models the injector and the detector as a min-max game.
Baselines and benchmarks: The baselines compared in the experiments are PromptSandwich (repeat user query), PIGuard, PromptArmor, CaMeL, DRIFT, and AuthGraph (Wang et al., 2026); the evaluation benchmarks are AgentDojo and AgentDyn.
Positioning of this paper: The authors argue that the above defenses share a fundamental limitation—they treat the initial user query as the only trusted source, which makes it impossible to execute task-necessary instructions that come from third-party data; ATrust is positioned as a plug-and-play external guardrail that dynamically builds a set of trusted entities and finely separates trusted semantic components from external data.
How does the paper address this problem?
ATrust takes the user query as the root trust anchor, uses a fine-tuned admission model to segment observations by task relevance, and gradually expands the trust boundary.
Overall idea: ATrust defines the set of trusted information maintained by the defense mechanism as the trust domain (each information unit in it is a trust anchor). Starting from the user query, at each interaction step it admits only task-necessary external information into the trust domain, and irrelevant content (whether benign or malicious) does not enter subsequent decisions, thereby limiting the attack surface of indirect injection to the minimum necessary scope.
Problem setting and formalization
- A secure agent system is represented as S = ⟨F, M, T, P, D⟩: F is the backend LLM, M is memory, P is the planning process, T is the tool set, and D is the defense mechanism; a tool call is denoted (τ, x), and each execution returns an output containing external observations.
- The authors argue that the trust boundary of existing defenses is static: policy-enforcement types use fixed policies as the criterion, and filtering types mostly use the user query as the sole criterion; information loss leads to error accumulation and task failure (Figure 2(a)).
Stepwise expansion of the trust boundary
- The trust boundary at step t is represented by the trajectory of trust anchors accumulated step by step, Et; the root trust anchor is initialized to the user query: E0 ← q, because when receiving the query the agent has not yet been exposed to any unverified environment.
- At step t, the learnable admission model Dθ takes the previous step's trust boundary Et−1 as context and decomposes the raw observation ot into semantic segments labeled with task relevance: {(sti, rti)} = Dθ(ot ∣ Et−1, τt, xt), where the label is <related> or <unrelated>.
- The authors' rationale: injected instructions usually introduce goals that deviate from the user's intent and are themselves irrelevant information, so defense based on task relevance is suitable for agents that interact frequently with the external environment.
Semantic segmentation constraints and anchor construction
- Segmentation must satisfy completeness (the union of all information items equals the information of the original observation), pairwise disjointness, and non-fragmentation (each information item falls entirely within a single segment).
- For segments labeled <related>, a semantic integration strategy g(·) is used for further normalization, removing social content such as greetings and pleasantries to obtain supplementary anchors ∆Et, and the boundary is then updated via Et = Append(Et−1, ∆Et).
- The planner then decides the next tool call based on execution memory and the latest trust boundary: (τt+1, xt+1) = P(Mt, Et).
Training of the admission model (Appendix B)
- Data construction: Using Toucan-1.5M as the raw corpus, task descriptions and tool-call trajectories are retained, and GPT-4o-mini is used to reconstruct benign observations according to the user query, task context, tool name, and raw output format; GPT-4o-mini is then used to rewrite seed injection examples and construct benign irrelevant content (e.g., advertisements, recommendation information), which is inserted at different positions in the observation to form clean and mixed-content samples; the training corpus does not overlap with AgentDojo or AgentDyn.
- Training setup: LoRA (rank r = 8, applied to q proj and v proj) fine-tuning on Qwen3.5-4B for 4 epochs on a single NVIDIA A40; 1,030 training samples in total (Appendix E).
- Operation: The system prompt of Dθ (Figure 6) requires verbatim segmentation of the current tool output into two XML blocks, <useful> and <unrelated>, according to whether it helps complete the user query, without rewriting or omission; Appendix B gives the complete data construction and admission prompt.
What experiments did the paper conduct?
Compared with six types of baselines on two benchmarks and five backbones, ATrust's ASR is 0.18%–4.48%, and ablation, adaptive attack, and overhead analyses were also conducted.
Experimental setup
- Backbone models under test: GPT-4o-mini, GPT-4o, Claude-3.5-Haiku, Qwen3-Coder (480B-A35B), Kimi-K2.5, five in total.
- Benchmarks: AgentDojo (97 open-ended tasks, four scenarios: Banking, Slack, Travel, Workspace; 629 IPI attack cases); AgentDyn (60 open-ended tasks, three scenarios: Shopping, Dailylife, GitHub; 560 injection cases); neither benchmark is used for training.
- Baselines: prompting-type repeat user query (PromptSandwich); filtering-type PIGuard, PromptArmor; system-level CaMeL, DRIFT, AuthGraph.
- Metrics: UT (task completion rate without injection), UA (task completion rate under attack), ASR (proportion of attacks that achieve the preset malicious goal), DTI (Euclidean distance between (1−ASR, UA) and the ideal point (0% ASR, 100% UA)).
- ATrust configuration: the admission model Dθ is Qwen3.5-4B fine-tuned with LoRA; decoding temperature is 0 in all experiments; the paper does not report the number of repetitions or statistical significance tests.
Main results
According to Table 1 (average across suites for each benchmark, unit %; AuthGraph and PromptArmor are reported only on GPT-4o-mini and GPT-4o, and are not reported on Claude-3.5-Haiku, Qwen3-Coder, Kimi-K2.5):
Swipe horizontally to read the table
Backbone Defense AgentDojo UA AgentDojo ASR AgentDyn UA AgentDyn ASR GPT-4o-mini None 39.35 44.29 37.02 50.19 GPT-4o-mini ATrust 54.65 1.48 46.20 3.61 GPT-4o None 61.31 46.71 55.52 37.80 GPT-4o ATrust 66.84 1.21 61.13 4.37 Claude-3.5-Haiku None 61.46 10.80 35.46 4.61 Claude-3.5-Haiku ATrust 54.93 0.18 40.09 0.37 Qwen3-Coder None 41.11 51.17 15.76 14.61 Qwen3-Coder ATrust 60.10 1.92 53.87 4.48 Kimi-K2.5 None 82.41 8.32 54.17 11.65 Kimi-K2.5 ATrust 77.09 0.52 70.50 1.30 - Overall trade-off: The authors report that ATrust achieves ASR of 0.18%–4.48% across the ten benchmark×backbone settings, and in eight of these settings UA is higher than that of the undefended agent; it has the lowest average DTI on both benchmarks (AgentDojo 37.30, AgentDyn 45.76) and achieves the lowest DTI in seven of the ten settings.
- Exceptions: On Claude-3.5-Haiku, ATrust's AgentDojo UA is 54.93%, 6.54 percentage points lower than without defense; on Kimi-K2.5 it is 5.32 percentage points lower (∆UA column of Table 1).
- Comparison with static-boundary and filtering-type defenses: The authors state that although CaMeL and DRIFT have low ASR, their UA loss is large (e.g., on Claude-3.5-Haiku, UA drops by 33.79 and 20.70 percentage points, respectively); under GPT-4o, PIGuard's UA drops to 18.79% (AgentDojo) and 1.46% (AgentDyn), and PromptArmor's to 21.00% and 2.00%.
Ablation: adaptive trust boundary expansion (Figure 3)
- What was tested: On AgentDyn with the GPT-4o-mini backbone, full ATrust was compared with ATrust (w/o Et), which keeps the same fine-tuned admission model but fixes the trust boundary at E0.
- Results: w/o Et has UA of 42.58% (full version 46.20%) and ASR of 14.04% (full version 3.61%), a difference of 10.43 percentage points; on the GitHub suite, w/o Et has ASR of 22.22% versus 2.22% for the full version.
- Authors' interpretation: The admission model and trust boundary expansion reinforce each other—boundary expansion provides richer trusted task-relevant evidence for subsequent admission decisions.
Ablation: targeted training of the admission model (Table 2)
- What was tested: On AgentDyn with the GPT-4o-mini backbone, the fine-tuned Dθ was replaced with directly prompted GPT-4o-mini (ATrust G) and Qwen3-Coder (480B-A35B) (ATrust Q).
- Results: Original ATrust has ASR of 3.61%, ATrust G 23.74%, and ATrust Q 35.06%; UA is 46.20%, 36.57%, and 40.61%, respectively; ATrust Q has the highest UT (48.33%).
- Authors' interpretation: Instruction-following LLMs are themselves vulnerable to IPI attacks and struggle to reliably identify task-necessary information in adversarial observations, which demonstrates the necessity of targeted admission training.
Adaptive attack stress test (Figure 4)
- What was tested: On AgentDyn with the GPT-4o-mini backbone, two defense-aware adaptive attacks were used: the black-box jailbreak optimization method PAIR, and a manually crafted trust assertion attack targeting the trust boundary expansion mechanism (prepending to the original injection a statement claiming that the information source is trusted; the template is given in Appendix C.3).
- Results: PAIR and the trust assertion attack raise overall ASR from 3.61% to 8.26% and 12.11%, respectively, and lower UA from 46.20% to 38.94% and 38.35%, respectively; both remain below the undefended baseline's 50.19% ASR.
- Authors' interpretation: ATrust still maintains attack suppression and task functionality under adaptive pressure, but this exposes that there remains room for attacks targeting its trust boundary mechanism.
Other ablations and analyses
- Overhead (Table 3, GPT-4o backbone): ATrust's token usage increases by 9–16% relative to no defense; under attack, its efficiency metric Eff atk is the highest on both benchmarks (AgentDojo 13.64, AgentDyn 6.18), which the authors claim is 1.70× and 2.94× that of the runner-up.
- Benign efficiency (Table 3): Eff ben is comparable to no defense (AgentDojo 161.47 vs. 164.79; AgentDyn 71.97 vs. 70.17), which the authors claim exceeds other defenses by 1.20–5.25×.
- Per-suite results (Appendix D, Tables 4 and 5): Ut, UA, and ASR are given for all backbones×defenses on the seven suites; the per-suite values for AuthGraph and PromptArmor are N/A, with only Overall reported.
- Case study (Appendix F): Under the same transfer task, DRIFT submitted bank credentials according to the injected instruction and did not complete the transfer; PIGuard blocked the injection but removed the bill form along with it, causing the wrong amount to be transferred; ATrust retained the bill information and completed the correct transfer.
What are some points that can be further explored?
The authors point out two limitations: training data scale and adaptive robustness. The experiments cover two benchmarks and five backbones, and the number of repetitions is not reported.
Limitations and future directions noted by the authors
- Insufficient training corpus coverage (Appendix E): The trust expansion module is trained on only 1,030 samples; the authors point out that a corpus of this scale cannot fully cover the broad spectrum of real agent tasks, and that expanding the diversity and scale of trust expansion data is a promising direction.
- Not yet fully robust to adaptive manipulation (Appendix E): PAIR and trust-assertion attacks can still partially exploit the trust expansion process; the authors point out that ATrust is not yet fully robust to adaptive manipulation, and that incorporating adversarial samples into training and strengthening admission decisions is the next step.
- Future directions (Conclusion): The authors plan to broaden the coverage of admission training and further enhance robustness to adaptive manipulation.
- Code release (Reproducibility Statement): The authors plan to publicly release the code.
Experimental coverage
- The backbone models tested are GPT-4o-mini, GPT-4o, Claude-3.5-Haiku, Qwen3-Coder (480B-A35B), and Kimi-K2.5, five in total (§4.1).
- The evaluation benchmarks are AgentDojo (97 tasks, 629 attack cases) and AgentDyn (60 tasks, 560 injection cases), seven task suites in total (§4.1).
- The comparison baselines cover six defenses across three categories: prompting, filtering, and system-level; AuthGraph and PromptArmor report results only on the two backbones GPT-4o-mini and GPT-4o (Table 1).
- The adaptive attack evaluation includes PAIR and a manual trust-assertion attack, conducted only on AgentDyn with the GPT-4o-mini backbone (§4.5).
- The paper does not report the number of repetitions per condition, statistical significance tests, or the specific determination method for UA and ASR (rule-based, manual, or LLM judging).
Summarize the main content of the paper
ATrust defends against IPI by adaptively expanding the trust boundary, and the authors claim it achieves the best security-utility trade-off on two benchmarks.
A paper on a system-level defense against indirect prompt injection (IPI) in LLM agents.
- Problem to solve: The authors argue that existing defenses rely on static trust boundaries, trusting only a small amount of evidence such as the user query, which leads to over-defense and discarding task-essential information, causing severe utility loss on long-horizon benchmarks such as AgentDyn (CaMeL's utility drops to zero).
- Method highlights: ATrust takes the user query as the root trust anchor and uses a LoRA fine-tuned Qwen3.5-4B admission model to partition each step's external observations by task relevance, admitting only task-essential semantics into the trust boundary, while irrelevant content (whether benign or malicious) does not participate in subsequent decision-making; the training data consists of 1,030 reconstructed samples with no overlap with the evaluation benchmarks.
- Main results:
- On AgentDojo and AgentDyn with five backbone models, ATrust's ASR is 0.18%–4.48%, and in eight of the ten settings UA is higher than without defense (Table 1).
- AgentDyn, GPT-4o backbone: ASR drops from 37.80% to 4.37%, UA rises from 55.52% to 61.13%; GPT-4o-mini backbone: ASR drops from 50.19% to 3.61%, UA rises from 37.02% to 46.20% (Table 1).
- Exceptions: on Claude-3.5-Haiku and Kimi-K2.5, AgentDojo's UA is 6.54 and 5.32 percentage points lower than without defense, respectively (Table 1).
- Ablation shows that a fixed trust boundary (w/o Et) raises ASR on AgentDyn from 3.61% to 14.04%; replacing the fine-tuned admission model with an off-the-shelf LLM raises ASR to 23.74% (GPT-4o-mini) and 35.06% (Qwen3-Coder) (Figure 3, Table 2).
- Under adaptive attacks, ASR rises to 8.26% (PAIR) and 12.11% (trust-assertion attack), still lower than 50.19% without defense (Figure 4).
- Authors' conclusion: Effective agent defense requires a trust boundary that evolves with task execution rather than being fixed at initialization; the authors acknowledge that the training corpus is limited in scale and that it is not yet fully robust to adaptive manipulation, and plan to broaden training coverage and release the code.