用三层过滤提升大模型提示注入攻击检测能力
Palisade -- Prompt Injection Detection Framework
- 分三步筛查:规则匹配、机器学习分类、配套大模型复核
- 多层框架使误检率降低,关键攻击识别率显著提升
- 适合关注AI安全与可信交互的研究者和开发者
大型语言模型(LLM)的兴起标志着人工智能的重要里程碑,但其易受恶意提示注入攻击,此类攻击通过精心构造的输入操纵模型行为,破坏系统完整性并导致错误输出。传统检测方法依赖静态规则,难以应对异常令牌序列和别名替换等复杂威胁,存在适应性差、误报与漏报率高的问题。本文提出一种基于自然语言处理的新型提示注入检测框架,采用分层输入筛查机制:提示依次通过规则基、机器学习分类器和配套大模型三重筛选后才进入目标模型,从而降低恶意交互风险。实验表明,机器学习分类器在单层中表现最优,而多层框架整体提升了检测准确率,虽略微增加误报,但有效减少了漏检,优先保障安全性。该框架揭示了大模型的脆弱性,并为未来人机可信交互研究提供了系统化方案。
原文摘要 · Abstract (English)
The advent of Large Language Models LLMs marks a milestone in Artificial Intelligence, altering how machines comprehend and generate human language. However, LLMs are vulnerable to malicious prompt injection attacks, where crafted inputs manipulate the models behavior in unintended ways, compromising system integrity and causing incorrect outcomes. Conventional detection methods rely on static, rule-based approaches, which often fail against sophisticated threats like abnormal token sequences and alias substitutions, leading to limited adaptability and higher rates of false positives and false negatives.This paper proposes a novel NLP based approach for prompt injection detection, emphasizing accuracy and optimization through a layered input screening process. In this framework, prompts are filtered through three distinct layers rule-based, ML classifier, and companion LLM before reaching the target model, thereby minimizing the risk of malicious interaction.Tests show the ML classifier achieves the highest accuracy among individual layers, yet the multi-layer framework enhances overall detection accuracy by reducing false negatives. Although this increases false positives, it minimizes the risk of overlooking genuine injected prompts, thus prioritizing security.This multi-layered detection approach highlights LLM vulnerabilities and provides a comprehensive framework for future research, promoting secure interactions between humans and AI systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。