Skip to content

PIPES: Protecting Agent Perception with Provenance and PriorsPIPES: Securing Agent Perception with Provenance and Priors

arXiv· arXiv:2608.12789· Sanjay Kariyappa, Severin Klingler, G. Edward Suh·Indexed by this site · 2026-10-12· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

PIPES filters tool responses using priors and a provenance hierarchy; on Gemma 4 31B IT, the six-split average ASR drops from 84.7% to 2.3%.

Threat modelThe attacker cannot modify user requests, agent instructions, or available tools; they can only replace one externally writable component in the tool response while preserving its syntactic type. The goal is to have that component make environment claims beyond its information authority, making the target action valid relative to the corrupted perceived state. The available agent or defense feedback can rewrite the payload on the same component.

Questions
Tool responses rarely indicate which component produced each part or what it should convey. Attackers can make environment claims beyond information authority in low-trust fields, corrupting the agent's perceived state and making subsequent actions appear reasonable to existing guardrails.
Methods
PIPES screens response units before observations enter the context. Stable fields use static contracts; open content combines trajectory, broad priors, and trusted source metadata. Violating units can be deleted, warned, blocked, or escalated; experiments use whole-unit deletion.
Experiments and results
On the six splits of VitaBench and AgentDyn, for adaptive PAIR attacks, the authors report that Gemma 4 31B IT average ASR drops from 84.7% to 2.3%, GPT-5.6 Luna from 21.6% to 1.1%, with no decline in average benign utility.
Limitations and future work
The authors state that PIPES does not judge factual truth, relies on accurate contracts or informative trajectories and trustworthy metadata, and model evaluation may have false negatives or false positives. The evaluation covers two benchmarks, two target models, a single injection surface, and atomic deletion; multiple injection surfaces, compromised provenance anchors, and other dispositions are left for future work.
Experimental setupGemma 4 31B IT、GPT-5.6 Luna · VitaBench delivery、VitaBench in-store et al. · ASR、U (benign utility)
Evaluated models
Gemma 4 31B ITGPT-5.6 Luna
Benchmarks
VitaBench deliveryVitaBench in-storeVitaBench OTAAgentDyn ShoppingAgentDyn GitHubAgentDyn Daily-life
Metrics
ASRU (benign utility)
AI summaryThe paper proposes PIPES, a defense method that screens tool response units using semantic priors and provenance tracing to defend against state pollution attacks. In such attacks, attacker-controlled content exceeds the information authority of its response component, polluting the agent's perceived environment, making subsequent actions appear reasonable under existing guardrails. PIPES uses static field contracts when the schema provides stable expectations, and for open-ended content, it screens based on the pre-response trajectory and trusted source metadata, flagging units that violate semantic priors or provenance levels; the deployment can remove, warn, block, or report them. On three splits each of VitaBench and AgentDyn, with Gemma 4 31B IT as the target agent, against adaptive PAIR-style attacks, the average attack success rate drops from 84.7% to 2.3%, with normal task utility at 92.5% compared to 90.6% without defense.

The paper proposes PIPES, a defense method that screens tool response units using semantic priors and provenance tracing to defend against state pollution attacks. In such attacks, attacker-controlled content exceeds the information authority of its response component, polluting the agent's perceived environment, making subsequent actions appear reasonable under existing guardrails. PIPES uses static field contracts when the schema provides stable expectations, and for open-ended content, it screens based on the pre-response trajectory and trusted source metadata, flagging units that violate semantic priors or provenance levels; the deployment can remove, warn, block, or report them. On three splits each of VitaBench and AgentDyn, with Gemma 4 31B IT as the target agent, against adaptive PAIR-style attacks, the average attack success rate drops from 84.7% to 2.3%, with normal task utility at 92.5% compared to 90.6% without defense.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Tool responses lack provenance and semantic priors, allowing low-trust content to overstep and rewrite the agent's perceived environment.

    Tool responses usually do not indicate which component produced each part or what it should convey, so low-trust content can overstep and rewrite the environment the agent perceives.

    • Scenario: The authors state that tool-based agents consume external data of different trust levels, but responses rarely indicate the producer and the information to be conveyed. Browser-like tools compress articles, ads, navigation, and user content into token sequences; interfaces unseen during training make it harder to discover empirically that fields exceed their semantic contract.
    • Existing shortcomings: The authors state that indirect prompt injection is often written as embedding explicit instructions. In Figure 1, an explicit instruction in a merchant-controllable tags field exposes the control transfer, and action guardrails can intercept it; if changed to a platform rating claim, the action is consistent with the corrupted state, and guardrails approve it. The authors call this a state-corruption attack, whose mechanism is provenance overreach.
    • Core observation: The authors use reading web pages as an analogy: priors constrain what a piece of content should say, and provenance distinguishes producer incentives and trust, thereby limiting its influence on beliefs and subsequent actions. Agent interfaces usually do not explicitly enforce these two signals.
    • Proposed screening: The authors propose PIPES, which filters response units before observations enter the context. Prior consistency checks whether content matches the type of information that component should convey; the provenance hierarchy prevents low-trust sources from negating or overriding higher-trust sources. It flags only when one of these is violated.
    • Threat model:
      • Goal: make the trajectory deviate from the benign trajectory, with success predicate J_g equal to 1. The running example is placing an order at the attacker's store; under action guardrails, success occurs only if that call is approved and executed.
      • Cannot change: the user request, agent instructions, available tools, and responses other than f, earlier turns, and tool definitions.
      • Can control: only replace one component f in the observation. Addressable fields use JSON paths; open content uses specified provenance units, text fragments, or content regions. Payloads must maintain syntactic type, and f must be writable by an external party in the environment.
      • Feedback: payloads can be rewritten based on feedback exposed by the agent or defenses, with control always limited to the same f. The paper does not use white-box or black-box to describe this model.
  2. What related research exists?

    Related work mostly handles instruction-type injection or restricts whether data can affect actions; PIPES filters whether data-form claims can enter the perceived state.

    In Related Work, the paper groups similar work into four categories, differing mainly in the threat addressed and the boundary where intervention occurs.

    Indirect Prompt Injection and Agent Benchmarks

    • Early attacks and benchmarks: Greshake et al. (2023) discuss how external retrieved content can redirect LLM-integrated applications via indirect prompt injection. AgentDojo (Debenedetti et al., 2024), InjecAgent (Zhan et al., 2024), and AgentDyn (Li et al., 2026) evaluate this threat in tool environments; AgentDyn is also the benchmark used in experiments.
    • Data without embedded commands: Schlichtkrull (2025) discusses how misleading external data can subvert research agents without embedding commands, with defenses focusing on cross-document fact-checking and source criticism. The authors state that this paper focuses on local, contract-relative source overreach, without requiring cross-document truth adjudication.
    • Data poisoning and role impersonation: Gyevnar et al. (2026) discuss how adversarial data can distort agent research conclusions. Ye et al. (2026) study untrusted text impersonating user or reasoning roles, calling it state poisoning. The authors state that state corruption does not require role impersonation; payloads remain in data form and corrupt the perceived state through source overreach.

    Instruction-Data Separation and Filtering

    • Source marking and representation separation: Spotlighting (Hines et al., 2024) marks untrusted text to highlight source; ASIDE (Zverev et al., 2026) separates instruction and data representations within the model architecture.
    • Hierarchical signals: Instructional Segment Embedding (Wu et al., 2025) encodes instruction priority into model representations; Kariyappa and Suh (2025) use augmented intermediate representations to reinforce hierarchical signals across layers.
    • Content filtering: PromptArmor (Shi et al., 2025) uses LLMs to detect and remove injected prompts; DataFilter (Wang et al., 2026) trains specialized filters to remove malicious instructions while preserving benign content. The authors state these defenses mainly target instruction-data confusion; PIPES filters claims that remain in data form.

    Architectural Isolation and Information Flow

    • Control flow and labels: CaMeL (Debenedetti et al., 2025) derives trusted control flow before processing untrusted values; Fides (Costa et al., 2025) enforces confidentiality and integrity labels.
    • Sinks and actions: Prompt Flow Integrity (Kim et al., 2025) combines isolation with source-sensitive flow checks for privileged sinks; DRIFT (Li et al., 2025) combines least-privilege planning, injection isolation, and validation of proposed actions.
    • Boundary with PIPES: The authors state these systems govern whether data can affect computation or actions; PIPES asks whether a claim should enter the agent's perceived state.

    Restricted Interfaces

    • Type constraints: Jacob et al. (2026)'s type-directed privilege separation and Nikoli'c et al. (2026)'s Untrusted Content Masking restrict content crossing trust boundaries to type-constrained values, narrowing the expression channel.
    • Difference from PIPES: The authors state PIPES preserves rich content while screening semantic priors and source authority.

    Baselines are no defense, action guardrails, PromptArmor, and DRIFT (Table 2). Benchmarks are VitaBench's delivery, in-store, OTA, and AgentDyn's Shopping, GitHub, Daily-life. On the attack side, PAIR (Chao et al., 2025) is adapted, and payloads are optimized against current defenses following the principles of Nasr et al. (2025).

    The authors place PIPES before observations enter the reasoning context: it neither treats external data uniformly as instructions to delete nor narrows the channel to type-constrained values, but checks whether each response unit remains within its information role and source authority.

  3. How does the paper address this problem?

    PIPES flags violating units with semantic priors and source hierarchy before responses enter the context; in experiments, entire units are deleted.

    PIPES (Provenance-Informed, Prior-Enforced Screening) performs unit-level compliance assessment before tool responses enter the reasoning context. It does not modify the agent, tools, or action policy; the experimental intervention is atomic deletion.

    Compliance Assessment

    • Decomposition and labeling: Observations are first divided into independently assessable units. A single LLM call reports only non-compliant units, indicating violation of priors, source hierarchy, or both. For clarity, the paper writes sparse results as two 0/1 vectors, with unreported units as 0. A unit is compliant only if both flags are unset.
    • Two checks: Priors constrain what a unit can convey; source hierarchy handles conflicts between acceptable claims from different sources. Untrustworthy source alone is not a violation.
    • Attack substitution: The controlled component only does õt = ot[f ← p]. p must preserve the syntactic type of f; the rest of the response, previous turns, tool definitions, and instructions remain unchanged.

    Static Priors and Sources

    • Field grouping: In stable schemas, closed formats such as numbers, booleans, enums undergo deterministic checks and serve as trusted reference context. Open-vocabulary fields like names, descriptions, and tags are paired with semantic priors and source labels, and are evaluated by the LLM.
    • Evaluation formula: (vprior, vhier) = LLMAssess(Xassess; Xref, CT, qT). The four items are the open-vocabulary value, trusted reference value, the prior and source contract for the assessed field, and the source ordering within that configuration. Under index i, prior violations and hierarchy violations are each represented by 1.
    • Labeling condition: An open-vocabulary field is flagged if it exceeds the prior or contradicts a trusted reference or a higher-ranked assessed field. In Figure 2, platform source ranks above merchant; the merchant-controlled tags are flagged for both violations because they claim to update an already-compliant rating.
    • Contract provenance: The authors expect developers to publish contracts alongside response schemas. In experiments, missing contracts are written offline and frozen before attack queue construction and evaluation, based on tool documentation, response structure, and up to ten representative benign values per field, preferably from different tasks.

    Contextual Priors and Sources

    • When used: For web pages, emails, and files, trajectory-independent priors are too broad. Tool-level contracts are written as C_T = (π_T^broad, m_T): a frozen broad prior plus trusted metadata. The metadata specifies unit structure, filterable fields, deterministic source extraction rules, and available anchors, such as app-authenticated email senders.
    • Units: m_T normalizes responses into complete regions attributable to a single source, such as an email, a product review, a repository issue, a document, or an externally authored web page region. Each unit is paired with the strongest evidence that can be deterministically established: authenticated producer, structural source category, or coarse-grained tool-level attribution.
    • Trajectory specialization: For unit content X, the evaluation is written as LLMAssess(X; C_T, h_t). The evaluator uses a bounded pre-response history to narrow the broad prior to this invocation, combined with the source assigned by the extractor and the trust ordering given by metadata or trajectory. In Figure 3, a trajectory that opens the inbox to retrieve a GitHub OTP narrows the broad email prior to expectations about verification codes and expected sources; the injected email violates both, while the legitimate verification code is compliant. Appendix D provides the full evaluation prompt and output schema.
    • Runtime cap: Contextual PIPES receives at most 12 pre-response trajectory messages. browse_webpage is first divided into HTML by a deterministic parser based on structural tags, then contextually evaluated; unrecognized content remains in a generic page content unit (Appendix A).

    Atomic Deletion

    • Policy separation: Deployments can delete or redact violating units, annotate and pass to the agent, block the entire response, or request human approval. The authors state that different risk levels can be paired with different policies.
    • Experimental choice: If any part violates, the entire unit is deleted without rewriting, to avoid introducing unsupported content or blurring source boundaries. Compliant units and non-textual structures are preserved.
    • Two reconstructions: In the static setting, objects retain their original representation, violating scalar text is cleared, and violating list elements are removed. In the contextual setting, the response is reconstructed after removing the violating provenance unit. The processed response is denoted o_out_t and then passed to the agent.
  4. What experiments did the paper conduct?

    The authors report that across six splits, PIPES reduces Gemma's average ASR from 84.7% to 2.3%, and average utility from 90.6% to 92.5%.

    The authors report that, across six splits and two target models, PIPES reduces the split-average ASR of adaptive attacks to 2.3% (Gemma 4 31B IT) and 1.1% (GPT-5.6 Luna), and state that average benign utility does not decline.

    Experimental Setup

    • Target and auxiliary models: The target agents are Gemma 4 31B IT and GPT-5.6 Luna. To isolate the target model, all other model intermediary roles use Gemma 4 31B IT: PAIR attacker, VitaBench simulated user and rubric judge, queue constructor, action guardrail, PromptArmor detector, PIPES evaluator, and DRIFT's planner, injection isolator, and action validator. Reasoning mode is enabled when supported (Section 4.5, Appendix A).
    • Benchmarks and queues: VitaBench has 100 benign tasks each for delivery, in-store, and OTA, with attack instances of 69, 38, and 28, and PIPES is Static. AgentDyn has 20/20 each for Shopping, GitHub, and Daily-life, set to Mixed, Contextual, and Mixed (Table 1). VitaBench uses one Gemma benign trajectory, with both targets sharing the prefix, injection surface, goal, and success predicate; benign reward does not need to be perfect. AgentDyn attack vectors and goals are fixed, and each model's benign trajectories are only used to land on specific retrieval fields. Numeric fields such as price are not an attack surface in VitaBench (Appendix B).
    • Attack protocol: Adapted from PAIR, with at most ten attempts per instance and one repair for malformed responses; responses that still fail formatting after repair are counted as unsuccessful and not removed from the denominator. The attacker sees the target agent's reasoning, replies, all proposed tool calls, and success evaluation feedback; when defenses are enabled, it also sees their reasoning, adjudication, and interventions. For PIPES, this includes unit-level evaluations and available static field contracts. Injection points, goals, and uncontrollable values are fixed across attempts (Section 4.3).
    • Steps and adjudication: VitaBench replays at most three steps after the injected response, and J_g requires the observed tool calls to exactly match the specified target action sequence. AgentDyn replays the benign prefix followed by at most 40 steps, using the benchmark's native safety predicates. Benign trajectories are capped at 40 steps (Section 4.3, Appendix A).
    • Defenses: no defense, action guardrail, PromptArmor, DRIFT, and PIPES atomic deletion (Table 2). Within the same target model and split, retained instances are identical across defenses, with only payloads re-optimized.
    • Metrics and decoding: U is benign utility, and ASR is the proportion of instances satisfying J_g within ten attempts. VitaBench task utility is the proportion of rubric satisfaction, judged by final tool state and trajectory, with split utility as the task mean; AgentDyn uses binary task predicates then averages within the split. Target agents, PAIR, simulated users, rubric judges, queue constructors, and PIPES evaluators use temperature 1.0, top-p 0.95; PromptArmor, action guardrails, and DRIFT stages use temperature 0, top-p 1.0. Output budget is 16,384 tokens (Section 4.6, Appendix A).

    Main Results

    The authors state that lower ASR reflects resistance to adaptive attackers, not failure of fixed payloads to transfer (Section 5). The table below shows ASR for no defense and PIPES, with units the same as Table 3 and Table 4.

    | Split | Gemma no defense | Gemma PIPES | Luna no defense | Luna PIPES | | Delivery | 84.1 | 1.4 | 33.3 | 2.9 | | In-store | 94.7 | 0.0 | 36.8 | 0.0 | | OTA | 89.3 | 7.1 | 39.3 | 3.6 | | Shopping | 60.0 | 0.0 | 0.0 | 0.0 | | GitHub | 85.0 | 0.0 | 10.0 | 0.0 | | Daily-life | 95.0 | 5.0 | 10.0 | 0.0 |

    Per Table 3 and Table 4. Luna's three VitaBench rows use the fixed Gemma trajectory prefix; the three AgentDyn rows resolve fields from that model's own benign trajectories. Utility is measured on each target model's own benign runs.

    • Six-split average: The authors average over the six splits and report that Gemma 4 31B IT's ASR goes from 84.7% to 2.3%, and GPT-5.6 Luna's from 21.6% to 1.1%; benign utility goes from 90.6% to 92.5%, and from 84.0% to 86.5%. The two benchmarks define U differently, and this average pools split-level U together.
    • Utility exceptions: The authors state that of twelve utility comparisons against no defense, eight are unchanged or higher; of the remaining four, three decline by at most one percentage point, and the largest is five percentage points. In Table 3 and Table 4, those below no defense are Gemma delivery 88.7% vs. 89.7%, in-store 80.8% vs. 81.5%, Luna OTA 77.2% vs. 78.2%, and GitHub 95.0% vs. 100.0%.
    • Not every cell is near zero: On Gemma's OTA, PIPES ASR is 7.1%; Daily-life is 5.0%, tied with the action guardrail. On Luna's Shopping, no-defense ASR is already 0.0%.

    Relative to Other Defenses

    • What is compared: PromptArmor and PIPES at the response boundary, the action guardrail at the action boundary, and DRIFT across both boundaries. Each defense optimizes payloads independently.
    • ASR: The authors state that on Gemma's VitaBench static path, PromptArmor and DRIFT have average ASR of 19.1% and 17.9%, while PIPES has 2.8%. In Table 3, PromptArmor's ASR on Daily-life is 75.0%, and the action guardrail's on OTA is 50.0%. On Gemma Daily-life, PIPES and the action guardrail are both 5.0%, and DRIFT is 15.0%.
    • Utility: In Table 3, the action guardrail reduces Shopping and GitHub U from 95.0% to 70.0%; DRIFT reduces it to 75.0% and 70.0%. The authors state that on AgentDyn, PIPES has average ASR of 1.7% and average utility of 100.0%, while DRIFT has 5.0% and 81.7%. This sentence does not repeat the target model; these numbers match Table 3's three Gemma AgentDyn splits, not Table 4's Luna.

    Violation Signatures

    • What was measured: Appendix C and Figure 5 summarize signatures on payload-containing responses during the PAIR process: prior-only, hierarchy-only, and both. Each instance with violations is first aggregated over executed attempts (at most ten, stopping on success), then macro-averaged over instances. Instances without violations do not enter the distribution.
    • Number of tasks entering the distribution: Figure 5 labels delivery as Gemma 69, Luna 69; in-store as 38 and 37; OTA as 28 for both. Shopping static/contextual is Gemma 8/12, Luna 9/11; GitHub contextual is 20 for both; Daily-life static/contextual is Gemma 3/17, Luna 1/18. The corresponding attack instances in Table 1 are 69, 38, 28, and 20 per domain.
    • Authors' interpretation: The authors state that in static settings, attacks are almost all flagged as exceeding field semantic priors; contextual settings more often violate both trajectory-derived priors and the provenance hierarchy; hierarchy-only findings are rare, and provenance signals usually supplement rather than replace priors.

    Other Ablations and Analyses

    • The paper does not report ASR after removing the prior check or removing the hierarchy check.
    • The paper does not report U and ASR for warning, blocking, or human escalation relative to atomic deletion; Section 3 only lists these optional dispositions.
    • The contextual trajectory cap is 12 pre-response messages (Appendix A); the paper does not report results from changing this cap.
    • VitaBench contracts are built with at most ten benign values per field, and AgentDyn contextual broad priors are built with at most two error-free benign responses per domain (Section 4.4); the paper does not report results from changing these offline sample sizes.
  5. What are some points that can be further explored?

    The authors state PIPES does not judge factual truth; evaluation is limited to two benchmarks, two models, a single injection surface, and atomic deletion.

    The authors list not judging factual truth, dependence on contracts and metadata, and the single injection surface and atomic deletion as limitations, and leave multi-injection surfaces and other interventions for future work.

    Limitations and Future Directions Identified by the Authors

    • No factual truth judgment: False values that conform to priors, come from expected sources, and do not conflict with higher-authority information may still pass (Section 7).
    • Dependence on input quality: Effectiveness depends on accurate static contracts or informative trajectories and trusted metadata (Section 7).
    • Model evaluation error: Model-based evaluation may miss violations and may also produce false positives (Section 7).
    • Evaluation scope: The authors state the evaluation covers two benchmarks, two target models, single-injection-surface attacks, and atomic deletion (Section 7).
    • Future work: Coordinated multi-injection-surface manipulation, compromised source anchors or tools, and other response policies are left for future work (Section 7).

    Experimental Coverage

    • Target models are Gemma 4 31B IT and GPT-5.6 Luna; PAIR, simulated users, rubric judging, queue construction, action guardrails, PromptArmor, PIPES evaluator, and DRIFT stages all use Gemma 4 31B IT (Section 4.5, Appendix A).
    • The sizes and settings of the six splits are in Table 1: VitaBench benign tasks are 100 each, attack instances are 69, 38, 28, all Static; AgentDyn has 20 benign tasks and 20 attack instances per domain, with Shopping and Daily-life as Mixed, and GitHub as Contextual.
    • No-defense, action guardrails, PromptArmor, DRIFT, and PIPES atomic deletion are compared on the same held-out instances; each defense runs adaptive PAIR separately, with up to ten attempts per instance plus one malformed-response repair (Table 2, Section 4.3).
    • Success determination is separated by benchmark: VitaBench requires exact match of tool calls and target action sequence, with at most three steps after injection; AgentDyn uses native safety predicates, with at most 40 steps after injection. Benign trajectories are capped at 40 steps (Section 4.3, Appendix A).
    • The paper does not report statistical significance tests, repetition counts for the full evaluation, or separate precision or recall for the screener; Section 5 gives end-to-end U and ASR. Figure 5 reports the distribution of violation signatures on payload-containing responses.
  6. Summarize the main content of the paper

    PIPES screens tool responses with priors and sources; the authors report average ASR on Gemma dropping from 84.7% to 2.3%, with no drop in average utility.

    The authors propose PIPES, which screens response units with semantic priors and source hierarchy before tool observations enter the context, to counter state corruption: a controlled component makes environment claims beyond its information authority, making the target action appear valid relative to the corrupted perceived state.

    • Problem boundary: The attacker cannot modify user requests, agent instructions, or available tools; they can only replace one externally writable component while preserving its syntactic type. Explicit instructions would expose control transfer; data-form overreach claims may be treated by guardrails as actions consistent with the state.
    • Approach: Stable narrow fields use frozen static contracts, closed formats serve as trusted references, and open vocabularies are handled by the LLM. Open content uses broad priors, deterministic source extraction, and pre-response trajectory. A single call flags prior violations, hierarchy violations, or both. In experiments, entire units are deleted without rewriting, and the agent is not modified.
    • Main results: The authors average over six splits: Gemma 4 31B IT ASR drops from 84.7% to 2.3%, GPT-5.6 Luna from 21.6% to 1.1%; average benign utility goes from 90.6% to 92.5% and from 84.0% to 86.5% (Section 5). Luna's VitaBench ASR uses Gemma trajectory prefixes. In Table 3, Gemma's OTA remains 7.1% and Daily-life 5.0%; in Table 4, Luna Shopping is already 0.0% without defense.
    • Authors' conclusion: The authors argue that protecting tool-based agents requires not only constraining which instructions to follow or which actions to execute, but also which external claims can enter the perceived state used for action selection. They also state that PIPES judges semantic acceptability and source authority, not factual truth.

Related papers

Read originalarxiv.org