Skip to content

PvP: Intent-Conditioned Anomaly Detection for Tool Poisoning Attacks on Agentic AIPvP: Intent-Conditioned Anomaly Detection Against Tool Poisoning Attacks in Agentic AI

Max de Leeuw, Cristoffer Leite, Indika Kumara
Tilburg University; Eindhoven University of Technology; Jheronimus Academy of Data Science
arXiv: Adversarial Attacks, Backdoors & PoisoningarXiv:2612.05593Originally published Indexed by this site · 2 days agoDefenses

Quick read

Defenses

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

The authors propose PvP, which performs anomaly detection according to user intent before the agent's plan is executed; LOF reaches 91.7% TPR and 5.1% FPR on the synthetic plan set.

Threat modelThe defense targets Tool Poisoning Attacks (TPAs): a third-party attacker tampers with static tool metadata so that it enters the agent context at registration time and manipulates the execution plan; the user is benign. It is assumed that the attacker cannot access model internals; runtime tool poisoning, jailbreak, and gradient attacks are out of scope.

Questions
Tool poisoning can bring malicious instructions into the context at tool registration time and manipulate the agent's execution plan. The authors argue that existing rules, isolation, and runtime detection do not cover pre-execution plan checking that incorporates user intent.
Methods
PvP detects plans between planning and execution in Plan-and-Act: it uses sentence embeddings and k-NN to retrieve benign plans with the same intent, computes 8 reference-relative features, and then scores them with detectors such as LOF.
Experiments and results
The synthetic corpus contains 7,543 benign plans and 3,875 grafted attack plans. LOF reaches 91.7% TPR and 5.1% FPR on the p4 attack set; atomic attack TPR is 76.4%, and precision is low at low attack rates.
Limitations and future work
The authors state that the synthetic data is not realistic enough, and assume the initial query is benign; semantic camouflage and adaptive attacks remain to be studied. The experiments do not directly compare with existing systems, nor do they report detection latency or manual review cost.
Experimental setupClaude Sonnet-4.6、DeepSeek v4 Pro et al. · AgentDojo、TaskBench et al. · TPR、FPR et al.
AI summaryPvP implements intent-conditioned anomaly detection for tool poisoning attacks targeting the planning stage of agentic AI, reaching a 91.7% true positive rate at a 5.1% false positive rate. The method is based on the Plan-then-Execute pattern, using sentence embeddings and k-NN clustering to associate user intent with execution plans. The authors graft attacks from the MITRE ATLAS framework onto existing benchmarks to build a dataset of tool plans containing anomalies, and the selected detector still generalizes robustly to new prompts.

PvP implements intent-conditioned anomaly detection for tool poisoning attacks targeting the planning stage of agentic AI, reaching a 91.7% true positive rate at a 5.1% false positive rate. The method is based on the Plan-then-Execute pattern, using sentence embeddings and k-NN clustering to associate user intent with execution plans. The authors graft attacks from the MITRE ATLAS framework onto existing benchmarks to build a dataset of tool plans containing anomalies, and the selected detector still generalizes robustly to new prompts.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    PvP aims to detect anomalous plans caused by tool poisoning before plan execution, in combination with user intent.

    Core question: How can a tool-call plan that deviates from user intent due to tool poisoning be detected before the agent executes the plan?

    • Problem setting: The authors define Tool Poisoning Attacks (TPAs) as malicious instructions embedded in static metadata such as tool descriptions and parameter schemas, which enter the context at tool registration; a poisoned tool need not ultimately be called and may manipulate other legitimate tools.
    • Existing shortcomings: The authors argue that rules such as regex lack context, and that isolation modes still trust tool metadata at planning time; TraceAegis focuses on execution traces, and Mindguard requires the model's internal attention states.
    • Core observation: The authors model attacks as subgraphs grafted onto benign plans and argue for measuring anomalies relative to benign plans with the same user intent, rather than only content classification or global comparison.
    • Proposed approach: Plan-versus-Poison (PvP) works between planning and execution in Plan-and-Act, performing anomaly detection with plan graphs, intent-conditioned retrieval, and 8 reference-relative features; the authors call it the first context anomaly detection method for the agent planning stage.
    • Threat model:
      • Goal: Make the policy produce adversarial actions that deviate from the user's task, including information theft, exfiltration, and destruction.
      • Attacker: Third-party tool service providers, attackers who compromise legitimate services, or impersonating service registrants; the user is considered benign.
      • Knowledge and capability: Can construct natural language and control tool metadata; assumed to have no access to model internals and no need for privileged credentials.
      • Victim system and scope: Plan-and-Act agents using tools/MCP; runtime tool poisoning, jailbreaks, and gradient-based weight attacks are out of scope.
  2. What related research exists?

    Related work covers rule filtering, isolation architectures, and plan anomaly detection; PvP is positioned as pre-execution intent-conditioned detection.

    Static Rule and Policy Filtering

    • MCP-Guardian [33]: Combines deterministic rules, regular expressions, and WAF content filtering, and provides post-hoc observation; the authors consider that handcrafted rules may be bypassed by obfuscation.
    • ShieldAgent [9]: Extracts verifiable rules from natural language policy documents rather than hand-written regexes; the authors consider that policy-based methods still have the characteristic of defining rules post hoc.
    • Neural methods such as Llama Guard and Gentel-safe [28, 39]: Use semantic models for input-output protection; the authors consider that such methods and filters cannot monitor malicious tool execution plans.

    Isolation and Planning Architectures

    • Plan-and-Act / Plan-then-Execute [17, 23]: Separate planning from execution; Del Rosario et al. [15] interpret their security benefit as fixing the high-level control flow before receiving untrusted data.
    • IPIGuard [3]: Represents tool calls and data dependencies with a Tool Dependency Graph, executes only pre-approved tools, and restricts new calls added at runtime.
    • CaMeL [14]: Uses a privileged LLM without tool permissions to handle trusted instructions and a quarantined LLM to handle untrusted content; the authors point out that the above methods still trust tool metadata at planning time.

    Plan and Behavior Anomaly Detection

    • TraceAegis [40]: Builds hierarchical normal rules from historical execution traces and constrains tool-call sequences at runtime; the authors consider that it cannot judge malicious intent in context, nor prevent malicious tools from entering the plan.
    • Mindguard [62]: Inspects attention activations and input concepts when tool-call decisions are made; the authors point out that it requires a local open-weight model, and its experiments evaluate only the first turn of multi-turn interactions, with at most one tool call per turn.

    Baselines and Data Foundations

    • Detection controls: The experiments compare three candidate detectors, k-NN distance, LOF, and M-LW, all using the same set of 8-dimensional features; the authors do not use existing defense systems as directly runnable detection baselines.
    • Data foundations: Plan generation combines AgentDojo's tool environment, TaskBench's dependency subgraph sampling, and MCP-Bench's multi-stage query reverse generation; attacks are organized by MITRE ATLAS techniques.

    The authors position PvP as a complement to, not a replacement for, parameter and data-flow defenses such as CaMeL: the differences are pre-execution, no model internals required, no explicit policy required, and conditioning on user intent; Table 1 summarizes these properties.

  3. How does the paper address this problem?

    PvP uses benign plans with neighboring intents as references, extracts 8-dimensional features, and uses classical anomaly detectors to block plans.

    PvP places detection between the Planner and the Executor: the planner first generates a directed acyclic plan, then the detector judges anomalies in combination with the user task, and only plans judged benign proceed to execution.

    Threat Formalization and Plan Representation

    • The agent is written as a POMDP tuple, and the policy selects reasoning or tool actions based on state and memory. TPA replaces normal metadata with poisoned metadata, causing the policy to produce actions that deviate from the task.
    • A plan P is a DAG composed of tool-call nodes and data-dependency edges; an attack is modeled as P′ = P ∪ g, i.e., grafting a malicious subgraph onto a benign plan.
    • The detector is written as D(P,T)→{0,1}, evaluating both plan structure and semantic context; 1 indicates anomalous, 0 indicates benign.

    Intent-Conditioned Retrieval

    • The user prompt is encoded via sentence embedding, and k-NN retrieval is performed with cosine distance, dynamically obtaining similar benign plans for each new query rather than offline fixed partitions.
    • The final configuration takes K=20 reference plans; the authors chose this approach to adapt to small data and to avoid sparse regions matching only overly broad intent groups.
    • The embedding model is NV-Embed-v1, and text is mapped to 4096-dimensional vectors; it is used both for final corpus construction and for conditional clustering evaluation.

    Eight-Dimensional Reference-Relative Features

    • L1 Tool Identity: l1_sensitive_residual and l1_act_residual compute the residuals of the counts of sensitive tools and broader action tools, respectively, relative to the mean over K reference plans.
    • L2 Semantics: l2_ref_centroid_dist and l2_ref_desc_centroid_dist compare the cosine distance between the plan embedding centroid of tool names and tool descriptions, respectively, and the reference centroid.
    • L3 Query–Plan Alignment: l3_q2tool_mean and l3_q2tool_min measure the reference-relative change in the mean and minimum cosine similarity between the query and each tool name embedding.
    • L4 Retrieval Membership: l4_min_tool_recall_k takes the minimum proportion of plan tools appearing in the reference plans; l4_zero_tool_count counts the number of tools that do not appear in any reference plan.
    • L5 structural graph features and L6 graph kernel features were excluded; Appendix C gives the reasons as natural structural fluctuations of small-scale plans and graph kernel degradation.

    Detector and Response

    • The candidates are k-NN distance, Local Outlier Factor (LOF), Mahalanobis Distance with Ledoit-Wolf Shrinkage (M-LW); the authors consider that after reference conditioning, classical detectors are sufficient and can run without GPU inference and be calibrated to a target FPR.
    • The final primary detector is LOF (k=7); k-NN uses k=5. The threshold is taken as the 95th percentile of scores on the p3 benign calibration set, with a nominal target of 5% FPR.
    • The response can passively block and log an alert, or enter a remediation mode: suppress anomalous dependencies, or pass feedback to the planner to regenerate the plan; the experiments mainly evaluate detection rather than remediation effectiveness.

    Synthetic Data and Quality Checks

    • The data pipeline is as follows: sample 5 types of topological subgraphs from tool input-output signatures; reverse-generate canonical user queries by an LLM; then rewrite the queries and check semantic consistency with an LLM-as-a-Judge. The paper does not state the model names used for rewriting and judging.
    • Attacks cover MITRE ATLAS AML.T0036, AML.T0087, AML.T0086, AML.T0101, and are organized into five types: atomic, two-chain, three-chain, fan-in exfiltration, and complex-with-cover; Appendix E gives complete grafting examples.
    • The planning framework comparison is ReWOO vs. IPIGuard, and the model comparison is Claude Sonnet-4.6, DeepSeek v4 Pro, MiniMax M2.7; the final choice is DeepSeek v4 Pro + IPIGuard to generate the corpus.
  4. What experiments did the paper conduct?

    LOF reaches 91.7% TPR and 5.1% FPR, but atomic attacks and low-attack-rate deployments remain weak points.

    Experimental Setup

    • Planning models and frameworks: Claude Sonnet-4.6, DeepSeek v4 Pro, and MiniMax M2.7, each combined with ReWOO and IPIGuard to compare planning capability; the final corpus uses DeepSeek v4 Pro + IPIGuard.
    • Data sources: AgentDojo provides 26 email, cloud drive, contact, and calendar tools; TaskBench provides the dependency subgraph sampling mechanism, and MCP-Bench provides the query reverse-generation mechanism.
    • Corpus size: 7,543 benign plans; 5,656 in the p0–p2 training set and 1,887 in the p3 calibration set. The p4 attack set has 3,130, 626 per class; the novel-canonical attack set has 745 (Table 3).
    • Repetition and splits: In the planning capability evaluation, each query is repeated 8 times; in the final set, each canonical query yields about 12 plans through rewriting and repetition. Training and testing use different rewrites of the same canonical query, and a separate set of new canonical queries tests new task intents.
    • Metrics and statistics: TPR, FPR, AUC-ROC, AP; proportions use the Wilson score interval. The detector is calibrated on p3 at the 95th percentile, and the main results correspond to about 5% FPR.
    • Baseline limitations: The authors did not directly reproduce existing defenses, because the required policy documents, execution traces, or attention states differ from the pre-execution plan setting; the experiments compare three candidate detectors sharing the same features.

    Main Results

    According to Table 5, the evaluation set is p4 (n=3,130), all using 8 reference-relative features; the actual calibrated FPR of k-NN is 1.5%, differing from the operating points of the other two.

    Swipe horizontally to read the table

    DetectorTPR95% CIAPAUC-ROC
    LOF (k=7, FPR 5.1%)0.917[0.907, 0.926]0.9720.963
    M-LW (FPR 5.0%)0.878[0.866, 0.889]0.9680.940
    k-NN (k=5, FPR 1.5%)0.736[0.720, 0.751]not reportednot reported
    • Detector selection: The authors choose LOF; the paired McNemar test with M-LW has 210 discordant decisions, with LOF winning 196, χ²=76.8, p<0.0001.
    • Deployment precision: In Table 6, at TPR=0.917 and FPR=0.051, precision is 0.083 at an attack rate of 0.5%, 0.154 at 1.0%, 0.486 at 5.0%, and 0.667 at 10.0%.
    • Authors' interpretation: At low attack rates, false positives outnumber true alerts, so the authors position LOF as a triage-and-ranking layer and recommend secondary review rather than automatic rejection.

    Generalization by Attack Type and to New Tasks

    • Attack families: In Table 7, LOF's TPR is atomic 0.764, two_chain 0.875, three_chain 0.967, fan_in_exfil 0.981, and complex 0.997; the authors state that multi-tool attacks cause larger feature shifts.
    • Attack categories: In Table 8, exfiltration is 0.942 (n=2,690), destruction is 0.784 (n=254), and poisoning is 0.737 (n=186); the authors note that tools in the latter two categories also often appear in legitimate plans.
    • New task intents: In Table 9, LOF has TPR=0.918 on 745 novel-canonical attacks, versus 0.915 on the p4 control; M-LW is 0.895 for both. LOF's benign FPR rises from 4.9% to 5.4%, and M-LW's from 5.0% to 6.0%.
    • Exceptions: LOF's atomic TPR rises from 0.751 on p4 to 0.805 on new tasks, and two_chain falls from 0.880 to 0.839; the authors link the former to looser reference matching and L4 being more easily triggered.

    Clustering and Feature Evidence

    • Clustering feasibility: Hopkins H=0.999; UMAP trustworthiness=0.9803 at 5D; HDBSCAN yields 691 clusters, with 1.0% noise and DBCV=0.900.
    • Label correspondence: ARI/NMI is 0.688/0.940 for query_group, 0.150/0.765 for subgraph_id, and 0.008/0.353 for topology_class; the authors conclude that clusters correspond more to query groups than to topology classes.
    • Feature separation: All 8 features in Table 4 reach Z≥1; l4_zero_tool_count has Z=5.41, with a benign mean of 0.069 and an attack mean of 2.182, the largest effect size reported.
    • Excluding structural features: In Table C.10, Zvariability for each topology is below 2, with the highest being 1.67 for single-node; the authors conclude that a single grafted node is often smaller than the natural node-count variation among benign plans of the same kind.

    Other Ablations and Analyses

    • Feature-layer ablation: Table F.17 uses M-LW at 5% FPR; L4-only has an overall TPR=0.894, L1+L2+L3 is 0.750, and the full 8D is 0.878.
    • atomic counterexample: In the same table, L4-only has atomic TPR=0.754 and the full 8D is 0.709; the authors state that the full model has higher AUC-ROC and explain this operating-point regression as a calibration phenomenon.
    • FPR sweep: In Table F.19, at 1% FPR, M-LW TPR=0.553 and LOF=0.325; at 2% they are 0.657 and 0.717, and at 10% they are 0.918 and 0.942.
    • Base plan topologies: Table F.20 uses LOF; single-node TPR=0.965 (n=375), chain-3 is 0.893 (n=375), and dag-4 is 0.901 (n=1,110).
    • Analysis boundary: The authors explicitly state that Table 4 is a univariate marginal validation of each feature and cannot fully characterize feature synergy or redundancy.
  5. What are some points that can be further explored?

    The authors list real plan data, adaptive attacks, and initial query manipulation as future issues.

    Limitations and Future Directions Noted by the Authors

    • Realism of synthetic data: Section 5 explicitly states that using synthetic data is not ideal and that the dataset could better reflect real-world scenarios; the authors consider collecting or generating complex task execution plan data to be valuable work.
    • Adaptive attacks: Section 5 points out that attackers may make tool descriptions produce benign-like plan topologies, or use semantically ambiguous tool names to reduce L1 residuals; robustness under such adaptive models could be studied in the future.
    • Initial query assumption: Section 5 states that the method assumes the initial query is benign, but attackers may manipulate user prompts to shift context retrieval away from the normal distribution; the authors propose more robust context classification via intent.
    • Threshold transfer for new tasks: Section 4.4.3 points out that if deployment continually encounters new task types, thresholds should still be re-derived, and the p3 operating point cannot be assumed to remain applicable.
    • Univariate feature analysis: Section 4.3 explicitly calls Table 4 marginal validation; scoring each feature independently misses synergy and redundancy, and Z≥1 only indicates discriminative value.
    • Reproduction of existing systems: Section 4.4 leaves reimplementing existing defense systems for pre-execution plans as future work.

    Scope of Experimental Coverage

    • The planning capability experiments involve 3 models and 2 Plan-and-Act frameworks; the final detection corpus is generated by DeepSeek v4 Pro + IPIGuard, and detection rates on other backbone models are not reported individually (Section 4.1.3).
    • Detection evaluation uses 5,656 training plans, 1,887 calibration plans, 3,130 p4 attacks, and 745 new canonical query attacks; attacks are divided into 5 structural families (Table 3).
    • The tool environment is AgentDojo's 26 tools, covering email, cloud drive, contacts, and calendar; attacks are mapped to 4 MITRE ATLAS techniques (Section 4.1, Appendix D).
    • The main experiments compare LOF, M-LW, and k-NN, and report paired McNemar tests; existing defenses are not directly run as end-to-end controls (Section 4.4).
    • The paper does not report the models used for query rewriting and LLM-as-a-Judge, human agreement, detection latency, or secondary review cost; the response remediation mechanism also has no experimental results.
  6. Summarize the main content of the paper

    PvP supplements pre-execution plan checking with intent-conditioned anomaly detection; the synthetic experiments are effective, but deployment precision is limited.

    PvP (Plan-versus-Poison) is a pre-execution defense for Plan-and-Act agents, with the goal of discovering anomalous tool-call plans caused by static tool metadata poisoning.

    • Problem: The authors argue that rule filtering lacks context, isolation architectures still trust tool metadata at planning time, and runtime trajectory or attention detection cannot directly inspect pre-execution plans.
    • Method: Encode user queries with NV-Embed-v1 and retrieve K=20 intent-similar benign plans; extract 8 relative features from tool identity, semantic centroids, query alignment, and retrieval membership, then score with detectors such as LOF.
    • Data: Combining the mechanisms of AgentDojo, TaskBench, and MCP-Bench with MITRE ATLAS attack mappings, forming 7,543 benign plans and 3,875 attack plans; the final planning backbone is DeepSeek v4 Pro, and the framework is IPIGuard.
    • Main results: LOF (k=7) achieves 91.7% TPR and 5.1% FPR on the p4 attack set (n=3,130), with AUC-ROC=0.963; M-LW's TPR is 87.8% (Table 5).
    • Result differences: atomic attack TPR is 76.4%, complex is 99.7% (Table 7); on 745 new canonical query attacks, LOF TPR is 91.8%, but benign FPR rises from 4.9% to 5.4% (Table 9).
    • Deployment implications: At an attack rate of 0.5%, precision is only 0.083, so the authors recommend using the detector for alert triage and ranking rather than direct automatic rejection (Table 6).

    The authors consider that the detection signal mainly comes from plan features and their intent conditioning, rather than detector capacity; real plan data, adaptive attack evaluation, and handling of manipulated initial queries still remain.

Research lineage

4 foundations · 0 follow-ups in library
Explore in knowledge graph →
Builds on / cites4
This paper
PvP: Intent-Conditioned Anomaly Detection Against Tool Poisoning Attacks in Agentic AI
2026-12-03
Follow-up work

No later in-library follow-ups recorded yet.

Why cited · Relation evidenceCites§ 2 Background and Related WorkThis paper → Foundation
“TraceAegis [40] uses a provenance-based framework with previous execution traces collected from logs to construct a hierarchical structure of (normal) rules.”
TraceAegis: Securing LLM-Based Agents via Hierarchical and Behavioral Anomaly Detection · 2025-10

Related papers

Show 3 more papers
Read originalarxiv.org