跳到正文
原文

用指令检测防御间接提示注入攻击Defending against Indirect Prompt Injection by Instruction Detection

arXiv· arXiv:2505.06311· Findings of EMNLP 2025· Tongyu Wen, Chenglong Wang, Xiyuan Yang, Haoyu Tang, Yueqi Xie, Lingjuan Lyu, Zhicheng Dou, Fangzhao Wu·本站收录· 23 天前· 原文发表防御
AI 导读

论文提出 InstructDetector,一种利用 LLM 行为状态识别间接提示注入(IPI)攻击的检测方法。该方法认为 IPI 依赖外部内容中嵌入的指令来改变模型行为状态,作者据此提取中间层的隐藏状态与梯度,并将二者结合作为指令检测的判别特征。在域内设置下检测准确率为 99.60%,域外设置下为 96.90%,并在 BIPIA 基准上把攻击成功率降至 0.03%。代码已在 GitHub 公开。

阅读原文Findings of EMNLP 2025