arXiv:2502.13141cs.CLcs.AI2025-02被引 20

统一检测大模型的三类恶意攻击,提升安全防护效率。

UniGuardian: A Unified Defense for Detecting Prompt Injection, Backdoor Attacks and Adversarial Attacks in Large Language Models

  • 将三类攻击统一为提示触发攻击,构建联合检测框架。
  • 单次前向传播即可完成检测与生成,推理速度提升显著。
  • 适用于需高安全性的大模型应用,如金融、医疗对话系统。

大型语言模型(LLMs)易受提示注入、后门攻击和对抗攻击的影响,这些攻击通过操纵提示或模型生成有害输出。本文突破传统深度学习攻击范式,揭示其内在关联,将三者统称为提示触发攻击(PTA),并提出首个统一防御机制UniGuardian,可同时检测上述三类攻击。此外,引入单次前向策略优化检测流程,实现攻击检测与文本生成在一次前向传播中完成。实验表明,UniGuardian能准确高效地识别大模型中的恶意提示。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are vulnerable to attacks like prompt injection, backdoor attacks, and adversarial attacks, which manipulate prompts or models to generate harmful outputs. In this paper, departing from traditional deep learning attack paradigms, we explore their intrinsic relationship and collectively term them Prompt Trigger Attacks (PTA). This raises a key question: Can we determine if a prompt is benign or poisoned? To address this, we propose UniGuardian, the first unified defense mechanism designed to detect prompt injection, backdoor attacks, and adversarial attacks in LLMs. Additionally, we introduce a single-forward strategy to optimize the detection pipeline, enabling simultaneous attack detection and text generation within a single forward pass. Our experiments confirm that UniGuardian accurately and efficiently identifies malicious prompts in LLMs.

大模型安全攻击检测统一防御

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。