ConfGuard: A Simple and Effective Backdoor Detection for Large Language Models
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
Backdoor attacks pose a significant threat to Large Language Models (LLMs), where adversaries can embed hidden triggers to manipulate LLM's outputs. Most existing defense methods, primarily designed for classification tasks, are ineffective against the autoregressive nature and vast output space of LLMs, thereby suffering from poor performance and high latency. To address these limitations, we investigate the behavioral discrepancies between benign and backdoored LLMs in output space. We identify a critical phenomenon which we term sequence lock: a backdoored model generates the target sequence with abnormally high and consistent confidence compared to benign generation. Building on this insight, we propose ConfGuard, a lightweight and effective detection method that monitors a sliding window of token confidences to identify sequence lock. Extensive experiments demonstrate ConfGuard achieves a near 100% true positive rate (TPR) and a negligible false positive rate (FPR) in the vast majority of cases. Crucially, the ConfGuard enables real-time detection almost without additional latency, making it a practical backdoor defense for real-world LLM deployments.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 18 of its 31 references that are in the map. First posted on arXiv 2 Aug 2025.
Builds on
18 of 31 references.
Closest ancestors · 4
Same direction, newest first
- 2023Stealthy and Persistent Unalignment on Large Language Models via Backdoor Injections15 Nov
- 2021RAP: Robustness-Aware Perturbations for Defending against Backdoor Attacks on NLP Models15 Oct
- 2021Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer14 Oct
- 2021Hidden Killer: Invisible Textual Backdoor Attacks with Syntactic Trigger26 May
Other references · 14
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,224
- 2020Extracting Training Data from Large Language Modelscited by 2,189
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
- 2017BadNets: Identifying Vulnerabilities in the Machine Learning Model Supply Chaincited by 1,106
- 2019STRIP: A Defence Against Trojan Attacks on Deep Neural Networkscited by 459
- 2022A Systematic Evaluation of Large Language Models of Codecited by 363
- 2020ONION: A Simple and Effective Defense Against Textual Backdoor Attackscited by 263
- 2019A backdoor attack against LSTM-based text classification systemscited by 227
2 more
- 2024Stealing Part of a Production Language Modelcited by 159
- 2024Watch Out for Your Agents! Investigating Backdoor Threats to LLM-Based Agentscited by 137
Built on by
Citing papers per year: 2025: 2; 2026: 7.
9 papers.
- 2026BackdoorAgent: A Unified Framework for Backdoor Attacks on LLM-based Agentscited by 16
- 2026The Trigger in the Haystack: Extracting and Reconstructing LLM Backdoor Triggerscited by 14
- 2025Learning to Interpret Weight Differences in Language Modelscited by 11
- 2025Are Robust LLM Fingerprints Adversarially Robust?cited by 8
- 2026BadTemplate: A Training-Free Backdoor Attack via Chat Template Against Large Language Modelscited by 1
- 2026Layerwise Convergence Fingerprints for Runtime Misbehavior Detection in Large Language Modelscited by 1
- 2026BackFlush: Knowledge-Free Backdoor Detection and Elimination with Watermark Preservation in Large Language Modelscited by 1
- 2026Localize-and-Detect: Auditing Task-Level Poisoning in Instruction-Tuned Modelscited by 0
- 2026Towards Merging-conditional Backdoor Unalignment against Large Language Modelscited by 0
- 2026Towards Merging-conditional Backdoor Unalignment against Large Language Models10 Oct 2026
- 2026Localize-and-Detect: Auditing Task-Level Poisoning in Instruction-Tuned Models2 Oct 2026
- 2026Layerwise Convergence Fingerprints for Runtime Misbehavior Detection in Large Language Models27 Apr 2026
- 2026BackFlush: Knowledge-Free Backdoor Detection and Elimination with Watermark Preservation in Large Language Models15 Apr 2026
- 2026BadTemplate: A Training-Free Backdoor Attack via Chat Template Against Large Language Models5 Feb 2026
- 2026The Trigger in the Haystack: Extracting and Reconstructing LLM Backdoor Triggers3 Feb 2026
- 2026BackdoorAgent: A Unified Framework for Backdoor Attacks on LLM-based Agents8 Jan 2026
- 2025Learning to Interpret Weight Differences in Language Models6 Oct 2025
- 2025Are Robust LLM Fingerprints Adversarially Robust?30 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2026An Empirical Study of Output-to-Input Loops for Black-Box Backdoor Detection in Fine-Tuned Open-Weight LLMs
- 2024BackdoorLLM: A Comprehensive Benchmark for Backdoor Attacks and Defenses on Large Language Models
- 2024Rethinking Backdoor Detection Evaluation for Language Models
- 2025Large Language Models Can Verbatim Reproduce Long Malicious Sequences
- 2024A Survey of Recent Backdoor Attacks and Defenses in Large Language Models
- 2025ELBA-Bench: An Efficient Learning Backdoor Attacks Benchmark for Large Language Models
- 2026SpecGuard: Inference-Time Backdoor Detection For Free
- 2024TrojanRAG: Retrieval-Augmented Generation Can Be Backdoor Driver in Large Language Models