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

Huawei Lin, Yingjie Lao, Tony Geng, Tan YU, Weijie Zhao


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? To address this, we propose UniGuardian, the first unified, training-free defense that detects trigger-activated prompt injection, backdoor, and adversarial attacks by measuring how structured perturbations of the prompt 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 single forward pass. Our experiments confirm that UniGuardian accurately and efficiently identifies trigger-activated prompts in LLMs.
Anthology ID:
2026.findings-aacl.119
Volume:
Findings of the Association for Computational Linguistics: IJCNLP-AACL 2026
Month:
November
Year:
2026
Address:
Hengqin, China
Editors:
Yue Zhang, Ruifeng Xu, Ayu Purwarianti, Tong Rong, Jun Suzuki
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
2338–2362
Language:
URL:
https://aclanthology.org/2026.findings-aacl.119/
DOI:
Bibkey:
Cite (ACL):
Huawei Lin, Yingjie Lao, Tony Geng, Tan YU, and Weijie Zhao. 2026. UniGuardian: A Unified Defense for Detecting Prompt Injection, Backdoor Attacks and Adversarial Attacks in Large Language Models. In Findings of the Association for Computational Linguistics: IJCNLP-AACL 2026, pages 2338–2362, Hengqin, China. Association for Computational Linguistics.
Cite (Informal):
UniGuardian: A Unified Defense for Detecting Prompt Injection, Backdoor Attacks and Adversarial Attacks in Large Language Models (Lin et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-aacl.119.pdf