你是否读对了内容?重新思考用于提示注入检测的内部信号
Are You Reading the Right Thing? Rethinking Internal Signals for Prompt-Injection Detection
AI总结:
本研究在两款大模型上对比五种内部信号检测提示注入的方法,发现Attention Tracker检测成功注入的一致性最强,且检测性能受提示模板影响较大。
摘要:
近期多项研究提出从语言模型的内部状态检测提示注入,但这些方法并未测量单一安全属性。残差流探针、注意力分数、角色投影、暴露探针及概念读出可能捕获注入存在性、识别、信息路由或行为影响,因此提示注入检测性能的差异究竟反映了这些方法所读取的内部信号的何种特性尚不明确。本研究在Qwen3.6-35B-A3B与Gemma-4-26B-A4B-it上,于统一的结构化间接提示注入设置下,探究五种表征读取方法的表现差异;通过评估各方法区分注入提示与良性对照的能力,进一步分析其在攻击成功与失败场景下的检测能力,以更好评估各检测方法可能依赖的属性。结果显示,用于检测注入存在或攻击相关概念的方法,通常能更清晰区分失败的注入与良性输入;而基于注意力转向、暴露及角色混淆的方法,在两种模型上均能更清晰区分成功的注入。其中,Attention Tracker提供最强的成功注入区分一致性,在Qwen上达到0.949的AUROC,在Gemma上达到0.887的AUROC。这些结果表明,更接近响应形成的信号可能更好地编码攻击成功的信息,且检测性能在很大程度上取决于提示模板。本研究的相关数据已在https://anonymous.4open.science/r/paper-evaluation-data-7877公开。
英文摘要:
Several recent studies propose detecting prompt injections from a language model's internal state. However, these methods do not measure a single security property. Residual-stream probes, attention scores, role projections, exposure probes, and concept readouts may capture injection presence, recognition, information routing, or behavioral influence. It is therefore unclear what differences in prompt-injection detection performance reveal about the internal signals these methods read. We study how five representation-reading methods vary under a common structured indirect prompt-injection setup on Qwen3.6-35B-A3B and Gemma-4-26B-A4B-it. We evaluate each method by how well it distinguishes injected prompts from benign controls. We then further analyze each detection method's ability to detect attacks in cases where they are successful and in cases where they are not. This helps us better assess what properties each detection method might rely on. Methods trained to detect injection presence or attack-related concepts generally separate unsuccessful injections more strongly from benign inputs, whereas attention diversion, exposure, and role-confusion-based methods separate successful injections more strongly on both models. Attention Tracker provides the strongest consistent successful injection separation, reaching 0.949 AUROC on Qwen and 0.887 on Gemma. These results suggest that signals closer to response formation may better encode information about an attack's success, and that detection performance can depend strongly on the prompt template. We share the data associated with this study at https://anonymous.4open.science/r/paper-evaluation-data-7877
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。