
HL
Huawei Lin, Yingjie Lao, Tony Geng, Tan Yu, Weijie Zhao
· 1 min read
ResearcharXiv cs.CL
UniGuardian: A Unified Defense for Detecting Prompt Injection, Backdoor Attacks and Adversarial Attacks in Large Language Models
arXiv:2502.13141v2 Announce Type: replace
Abstract: 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: Given a prompt, can we tell whether a hidden trigger is steering the model's behavior? We propose UniGuardian, to the best of our knowledge the first training-free LLM detector to jointly detect successfully activated prompt injection, backdoor, and adversarial attacks without knowing the attack type. Its shared mechanism measures how structured prompt perturbations shift the model's output distribution. Additionally, we introduce a single-forward strategy to optimize the detection pipeline, enabling simultaneous attack detection and text generation within a shared batched forward pass at each decoding step. Our experiments confirm that UniGuardian accurately and efficiently identifies trigger-activated prompts in LLMs.
Original source
This story was published by arXiv cs.CL and written by Huawei Lin, Yingjie Lao, Tony Geng, Tan Yu, Weijie Zhao. SyncAI.news shows a preview; the complete article is on the publisher's site.
Read the full story on arxiv.org


