arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.18248cs.CRcs.CL
收藏

超越模式匹配:七种跨领域技术用于提示注入检测

Beyond Pattern Matching: Seven Cross-Domain Techniques for Prompt Injection Detection

Independent Researcher(独立研究者);prompt-shield project(prompt-shield项目)

Thamilvendhan Munirathinam

AI总结:

本文提出七种跨领域技术用于提示注入检测,通过引入来自不同领域的机制,如法医学语言学、材料科学疲劳分析、网络安全欺骗技术、生物信息学本地序列比对、经济学机制设计、流行病学谱信号分析和编译器理论中的污点跟踪,以改进现有的提示注入检测方法。

摘要:

当前开源的提示注入检测器集中在两种架构选择上:正则表达式模式匹配和微调的变压器分类器。两者都存在近期研究已明确的失败模式。正则表达式无法检测到改写攻击。微调的分类器对适应性对手易受攻击:2025年NAACL Findings研究报告称,八个已发表的间接注入防御方法在适应性攻击下被绕过,攻击成功率超过50%。本文提出七种检测技术,每种技术都引入了来自大语言模型安全领域之外的特定机制:法医学语言学、材料科学疲劳分析、网络安全欺骗技术、生物信息学本地序列比对、经济学机制设计、流行病学谱信号分析以及编译器理论中的污点跟踪。七种技术中的三种在提示防护v0.4.1版本中实现(Apache 2.0),并在六个数据集上的四配置消融测试中进行评估,包括deepset/prompt-injections、NotInject、LLMail-Inject、AgentHarm和AgentDojo。本地比对检测器在deepset数据集上将F1分数从0.033提升到0.378,且无额外的假阳性。风格度量检测器在间接注入基准上增加了11.1个百分点的F1分数。疲劳跟踪器通过探测活动整合测试进行验证。所有代码、数据和重现脚本均以Apache 2.0许可证发布。

英文摘要:

Current open-source prompt-injection detectors converge on two architectural choices: regular-expression pattern matching and fine-tuned transformer classifiers. Both share failure modes recent work has made concrete. Regular expressions miss paraphrased attacks. Fine-tuned classifiers are vulnerable to adaptive adversaries: a 2025 NAACL Findings study reported that eight published indirect-injection defenses were bypassed with greater than fifty percent attack-success rates under adaptive attacks. This work proposes seven detection techniques that each port a mechanism from a discipline outside LLM security: forensic linguistics, materials-science fatigue analysis, deception technology, local-sequence alignment from bioinformatics, mechanism design, spectral signal analysis, and taint tracking. Each produces a signal architecturally independent of both regex matching and transformer classification, so the seven compose with existing defenses rather than replacing them. Four of seven are now implemented in prompt-shield v0.7.3 (Apache 2.0): d028 sequence alignment, d027 stylometric discontinuity, materials-fatigue tracking, and d034 honeypot tool definitions (new in v4.0). A four-configuration ablation across nine benchmarks (~10,300 samples) covers deepset, NotInject, LLMail-Inject, AgentHarm, AgentDojo, and an independent evaluation against three peer-reviewed academic benchmarks (Liu USENIX 2024, Garak, InjecAgent). This revision adds Section 5.7 (composed-stack adaptive-attack partial run, evidence for the composability thesis), Section 5.8 (50-document held-out benchmark: d027 collapses 1.000 to 0.000 F1 in isolation but the composed engine recovers 0.815 F1), and Section 7 (three architectural patterns extracted from prompt-shield in Gang-of-Four format). All code, data, and reproduction scripts are released Apache 2.0.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑