中文

DataSentinel:一种基于博弈论的提示注入攻击检测方法

密码学与安全 2025-11-13 v4 人工智能

摘要

LLM 集成应用和智能体容易受到提示注入攻击,即攻击者将提示注入输入以诱导攻击者期望的输出。检测方法旨在判断给定输入是否被注入提示污染。然而,现有检测方法对最新攻击效果有限,更遑论对自适应攻击。本文提出 DataSentinel,一种检测提示注入攻击的博弈论方法。具体而言,DataSentinel 通过微调 LLM 来检测被策略性地规避检测的注入提示污染的输入。我们将其形式化为一个最小-最大优化问题,旨在微调 LLM 以检测强大的自适应攻击。此外,我们提出一种梯度方法,通过在内层最大化和外层最小化之间交替求解来求解该最小-最大优化问题。在多个基准数据集和 LLM 上进行的评估结果表明,DataSentinel 能有效检测现有和自适应的提示注入攻击。

关键词

引用

@article{arxiv.2504.11358,
  title  = {DataSentinel: A Game-Theoretic Detection of Prompt Injection Attacks},
  author = {Yupei Liu and Yuqi Jia and Jinyuan Jia and Dawn Song and Neil Zhenqiang Gong},
  journal= {arXiv preprint arXiv:2504.11358},
  year   = {2025}
}

备注

Distinguished Paper Award in IEEE Symposium on Security and Privacy, 2025. For slides, see https://people.duke.edu/~zg70/code/PromptInjection.pdf