MindGuard: Intrinsic Decision Inspection for Securing LLM Agents Against Metadata Poisoning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Wang, Zhiqiang, Du, Haohua, Shi, Guanquan, Zhang, Junyang, Cheng, HaoRan, Yao, Yunhao, Guo, Kaiwen, Li, Xiang-Yang
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908766107074560
author Wang, Zhiqiang
Du, Haohua
Shi, Guanquan
Zhang, Junyang
Cheng, HaoRan
Yao, Yunhao
Guo, Kaiwen
Li, Xiang-Yang
author_facet Wang, Zhiqiang
Du, Haohua
Shi, Guanquan
Zhang, Junyang
Cheng, HaoRan
Yao, Yunhao
Guo, Kaiwen
Li, Xiang-Yang
contents The Model Context Protocol (MCP) is increasingly adopted to standardize the interaction between LLM agents and external tools. However, this trend introduces a new threat: Tool Poisoning Attacks (TPA), where tool metadata is poisoned to induce the agent to perform unauthorized operations. Existing defenses that primarily focus on behavior-level analysis are fundamentally ineffective against TPA, as poisoned tools need not be executed, leaving no behavioral trace to monitor. Thus, we propose MindGuard, a decision-level guardrail for LLM agents, providing provenance tracking of call decisions, policy-agnostic detection, and poisoning source attribution against TPA. While fully explaining LLM decision remains challenging, our empirical findings uncover a strong correlation between LLM attention mechanisms and tool invocation decisions. Therefore, we choose attention as an empirical signal for decision tracking and formalize this as the Decision Dependence Graph (DDG), which models the LLM's reasoning process as a weighted, directed graph where vertices represent logical concepts and edges quantify the attention-based dependencies. We further design robust DDG construction and graph-based anomaly analysis mechanisms that efficiently detect and attribute TPA attacks. Extensive experiments on real-world datasets demonstrate that MindGuard achieves 94\%-99\% average precision in detecting poisoned invocations, 95\%-100\% attribution accuracy, with processing times under one second and no additional token cost. Moreover, DDG can be viewed as an adaptation of the classical Program Dependence Graph (PDG), providing a solid foundation for applying traditional security policies at the decision level.
format Preprint
id arxiv_https___arxiv_org_abs_2508_20412
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MindGuard: Intrinsic Decision Inspection for Securing LLM Agents Against Metadata Poisoning
Wang, Zhiqiang
Du, Haohua
Shi, Guanquan
Zhang, Junyang
Cheng, HaoRan
Yao, Yunhao
Guo, Kaiwen
Li, Xiang-Yang
Cryptography and Security
The Model Context Protocol (MCP) is increasingly adopted to standardize the interaction between LLM agents and external tools. However, this trend introduces a new threat: Tool Poisoning Attacks (TPA), where tool metadata is poisoned to induce the agent to perform unauthorized operations. Existing defenses that primarily focus on behavior-level analysis are fundamentally ineffective against TPA, as poisoned tools need not be executed, leaving no behavioral trace to monitor. Thus, we propose MindGuard, a decision-level guardrail for LLM agents, providing provenance tracking of call decisions, policy-agnostic detection, and poisoning source attribution against TPA. While fully explaining LLM decision remains challenging, our empirical findings uncover a strong correlation between LLM attention mechanisms and tool invocation decisions. Therefore, we choose attention as an empirical signal for decision tracking and formalize this as the Decision Dependence Graph (DDG), which models the LLM's reasoning process as a weighted, directed graph where vertices represent logical concepts and edges quantify the attention-based dependencies. We further design robust DDG construction and graph-based anomaly analysis mechanisms that efficiently detect and attribute TPA attacks. Extensive experiments on real-world datasets demonstrate that MindGuard achieves 94\%-99\% average precision in detecting poisoned invocations, 95\%-100\% attribution accuracy, with processing times under one second and no additional token cost. Moreover, DDG can be viewed as an adaptation of the classical Program Dependence Graph (PDG), providing a solid foundation for applying traditional security policies at the decision level.
title MindGuard: Intrinsic Decision Inspection for Securing LLM Agents Against Metadata Poisoning
topic Cryptography and Security
url https://arxiv.org/abs/2508.20412