13 minute read

Concentric translucent security rings surrounding a processor chip, representing layered defense architecture

TL;DR. Three papers from March 2026 fit together as a defense stack against indirect prompt injection: a system-level architecture position paper from NVIDIA researchers (arXiv 2603.30016), RL-based automated red teaming with PISmith (arXiv 2603.13026), and causal tool-call attribution with AttriGuard (arXiv 2603.10749). This is the companion to why detection is broken: that post explains the problem, this one explains the solution.


Detection is one layer. What are the other layers?

Prompt injection detectors can be evaded, so detection cannot be the primary defense. What replaces it?

Three papers posted within three weeks of each other in March 2026 answer this question from different angles. Together, they form a defense stack:

  1. System-level architecture (arXiv 2603.30016, NVIDIA): What constraints should the agent system enforce regardless of what the model detects?
  2. Automated red teaming (arXiv 2603.13026, PISmith): How do you continuously test whether your defenses actually work?
  3. Causal attribution (arXiv 2603.10749, AttriGuard): How do you determine, at runtime, whether a tool call was caused by the user or by injected content?

None of these three rely on detecting malicious input text. All three operate at the system level, above the model.

What does the NVIDIA architecture paper propose?

The position paper by Chong Xiang and seven co-authors, almost all at NVIDIA (one also at Johns Hopkins, and including Kai Greshake of the original indirect injection paper), frames indirect prompt injection as a system design problem (arXiv 2603.30016). Its starting point: when an agent processes untrusted data (documents, emails, API responses, web pages) and can take actions, model-level robustness alone will not hold, so the system around the model has to structure and constrain what it does.

The architecture it describes separates planning, policy and enforcement: an orchestrator plans, an executor carries out steps, and a policy enforcer approves or blocks each proposed action against the current security policy. On top of that it takes three positions:

Position 1: Plans and policies must be able to change. Strict “plan once, then execute” isolation breaks on realistic tasks, where benign errors and new information force replanning. Defenses need dynamic replanning and security-aware policy updates rather than a frozen plan.

Position 2: Some security decisions need a model, but a constrained one. Context-dependent judgments (is this action in line with what the user asked?) may require an LLM or another learned model. Those decisions should only be made inside designs that strictly limit what the model can observe and decide, so an injection cannot simply talk the checker out of its job.

Position 3: Ambiguity goes to people. When user intent is unclear, or it is ambiguous whether an action serves the objective, personalization and human interaction are core design elements, not afterthoughts.

The paper also warns that current benchmarks such as AgentDojo contain few tasks that require replanning and mostly use static, non-adaptive payloads, which can create a false sense of both utility and security.

A practical pattern: trust levels by data source

One concrete way to apply these ideas, and the one this post builds on, is to give each data source a trust level and let tool permissions follow it. This is a design pattern, not something the paper prescribes. User messages get high trust. Retrieved documents get medium trust. External API responses and web content get low trust. High-trust sources can trigger any permitted action; low-trust sources can only trigger read-only operations.

graph TD
    A[User message - high trust] --> D[Agent processing]
    B[Retrieved document - medium trust] --> D
    C[External API response - low trust] --> D
    D --> E[Agent requests tool call]
    E --> F{Trust level of triggering source?}
    F -->|High trust| G[Any action permitted]
    F -->|Medium trust| H[Read + approved writes only]
    F -->|Low trust| I[Read-only actions only]
    
    J[Action verification layer] --> F
    
    style A fill:#4caf50,color:#fff
    style B fill:#ff9800,color:#000
    style C fill:#d32f2f,color:#fff

The practical implication: if your agent processes emails and has tool access, the email content should never be able to trigger actions beyond what reading an email requires. The agent can summarize, classify, and extract information. It cannot forward, delete, or reply based on instructions found inside the email body.

How AttriGuard traces what caused each tool call

AttriGuard (arXiv 2603.10749) solves the attribution problem: when an agent calls a tool, which part of the input caused that call?

The technique is counterfactual: for each proposed tool call, AttriGuard re-executes the agent in parallel under a “control-attenuated” view of the external observations, where instruction-like content from tools and retrieved data is suppressed but task-relevant information is kept. If the tool call survives that test, it is supported by the user’s intent. If it disappears, it was driven by untrusted content and is blocked. The paper adds three pieces to make this reliable:

  • Teacher-forced shadow replay, so the re-execution follows the same trajectory and the comparison is not confounded by unrelated differences
  • Hierarchical control attenuation, which suppresses different kinds of control channels in observations while preserving the information the task needs
  • A fuzzy survival criterion, so normal LLM randomness does not make legitimate calls look suspicious

Across four LLMs and two agent benchmarks, the authors report 0% attack success under static attacks with negligible utility loss and moderate overhead, and say AttriGuard stays resilient under adaptive, optimization-based attacks where leading defenses degrade significantly. The paper is accepted at USENIX Security 2026. The key architectural decision: AttriGuard operates at the tool-call boundary, not the input boundary. It does not try to detect malicious text. It checks whether actions are causally justified by the user’s original request.

This is a concrete instance of the NVIDIA paper’s policy enforcer and its Position 2: a model-assisted security decision made inside a tightly constrained setup. The NVIDIA paper describes the principle; AttriGuard implements a mechanism.

How PISmith automates attack discovery

The defense stack is only as good as your testing. PISmith (arXiv 2603.13026) automates the testing side.

Most red teaming for prompt injection relies on human-written attack payloads. This is slow, biased toward known attack patterns, and cannot keep pace with model updates. PISmith trains an attack LLM using reinforcement learning to discover injection payloads that bypass a specific defense.

The process:

  1. The attack LLM generates candidate injected prompts for a target task
  2. Each one is run against the defended system, and the attacker only sees the outputs
  3. Payloads that achieve the attacker’s goal earn reward; the attack LLM is updated with GRPO-style policy optimization
  4. Because strong defenses block almost everything, rewards are sparse. PISmith adds adaptive entropy regularization to keep exploring and dynamic advantage weighting to learn from the rare successes
  5. Iterate until the attack succeeds reliably or the budget runs out

Across 13 benchmarks, the authors report that state-of-the-art prompt injection defenses remain vulnerable and that PISmith beats seven static, search-based and RL-based baseline attacks, including in agentic settings on InjecAgent and AgentDojo against both open and closed models such as GPT-4o-mini and GPT-5-nano. The paper is to appear at COLM 2026.

The output is a set of injection payloads that bypass your current defenses. These are not generic attacks. They are optimized for your specific stack, your specific model, and your specific tool configuration.

PISmith operates in a black-box setting: it does not need access to model weights, defense internals, or training data. It only observes whether its injection payloads succeed or fail against the deployed system. This matches realistic attack conditions.

The practical use: run PISmith, or a similar RL-based attacker, against a staging copy of your defense stack on a regular schedule. If it discovers new bypasses, update your defenses. If a well-resourced run finds nothing, that is evidence about your defense quality, not a proof. This is continuous automated red teaming, the security equivalent of continuous integration testing.

Assembling the defense stack

The three papers compose into a layered architecture:

graph TD
    subgraph "Layer 1: Input Processing"
        A[Input detection - signal only] --> B[Trust classification by source]
    end
    
    subgraph "Layer 2: Runtime Defense"
        C[Privilege separation by trust level]
        D[AttriGuard causal attribution on tool calls]
        F[Runtime monitoring, e.g. AgentWatcher]
    end
    
    subgraph "Layer 3: Continuous Testing"
        E[PISmith-style automated red teaming]
    end
    
    B --> C
    C --> D
    D -->|Legitimate| G[Execute action]
    D -->|Suspicious| H[Block + alert]
    E -->|New bypass found| I[Update Layer 1 + 2 defenses]
    
    style A fill:#ff9800,color:#000
    style D fill:#4caf50,color:#fff
    style E fill:#1976d2,color:#fff

Layer 1 classifies inputs by trust level and runs detection as a signal (not a gate). Even imperfect detection raises the cost of attack and provides signal for downstream layers.

Layer 2 enforces constraints at runtime. Privilege separation limits what actions untrusted data can trigger. AttriGuard checks causal attribution on every tool call, blocking actions driven by injected content. A deterministic rule engine at the tool boundary, such as ClawGuard, fits here too.

Layer 3 continuously tests the defense stack. PISmith discovers new bypass techniques. The discoveries feed back into Layers 1 and 2 as defense updates.

This architecture does not depend on perfect detection at any single layer. Each layer catches what the previous layer misses. An injection that evades input detection is caught by trust-level privilege separation. An injection that works despite privilege limits is caught by causal attribution. And PISmith continuously probes for attacks that bypass all layers.

What to implement first

If you are starting from zero defense beyond input detection:

Week 1: Trust classification. Tag every data source in your agent’s pipeline with a trust level: user input (high), internal databases (high), retrieved documents (medium), external APIs (low), web content (low). This is a metadata change, not a model change.

Week 2: Privilege separation. Map tool permissions to trust levels. Low-trust sources can trigger read-only tools. High-risk actions (writes, sends, deletes) require high-trust source attribution. This mirrors the excessive agency controls applied at the data-source level.

Week 3: Action logging for attribution. Before implementing full causal attribution, log every tool call with its input provenance: which source(s) contributed to this action? This creates the audit trail for both post-incident analysis and future AttriGuard-style runtime checks.

Week 4: Automated testing baseline. Run a basic red team battery against your defense stack using known injection payloads, for example in the environment open-sourced by the 272,000-attack study. Measure bypass rates. This becomes your baseline for evaluating PISmith or equivalent automated red teaming.

Key takeaways

  • Three papers from March 2026 fit together as a defense stack: system-level architecture (arXiv 2603.30016), RL-based red teaming (PISmith, arXiv 2603.13026), and causal attribution (AttriGuard, arXiv 2603.10749)
  • The NVIDIA position paper frames indirect injection as a system design problem: plan, policy and enforcement components, constrained model-based checks, and humans in the loop for ambiguous cases, not better detection
  • AttriGuard re-executes the agent with untrusted instructions attenuated to determine whether each tool call was driven by the user’s instruction or injected content, operating at the action level rather than the input level
  • PISmith automates red teaming by training an attack LLM with reinforcement learning to discover defense bypasses in a black-box setting
  • The defense stack layers compose: input trust classification, runtime privilege separation + causal attribution, and continuous automated testing
  • Implementation starts with trust tagging (Week 1), privilege mapping (Week 2), action logging (Week 3), and red team baseline (Week 4)

FAQ

What is the best defense against indirect prompt injection in 2026? Layered defense that does not depend on detecting malicious text. Classify data sources by trust level, enforce privilege separation so low-trust data cannot trigger high-risk actions, implement causal attribution on tool calls (AttriGuard), and continuously test with automated red teaming (PISmith). Input detection stays as one signal among many.

What is AttriGuard? AttriGuard (arXiv 2603.10749) uses counterfactual causal analysis at the tool-call boundary. For each action the agent attempts, it checks: would this action still happen if the instructions in untrusted content were attenuated? If not, the action was likely caused by injected content and is blocked. This catches attacks that bypass every input-layer detector.

How does PISmith differ from manual red teaming? PISmith trains an attack LLM using reinforcement learning to automatically discover injection payloads that bypass your specific defenses. It operates in black-box mode (no access to model weights or defense internals), generates attacks optimized for your stack, and runs continuously. Manual red teaming is slow, biased toward known patterns, and cannot keep pace with model updates.

Can these defenses be combined with existing detection tools? Yes. Detection stays in the stack as Layer 1. The architectural difference is treating detection output as a risk signal rather than a binary block/allow gate. A flagged input gets higher scrutiny from AttriGuard and tighter privilege restrictions, but is not blocked outright, preventing the false-positive problem that makes detection-only systems unusable.

Further reading