Trusted Weights, Treacherous Optimizations? Optimization-Triggered Backdoor Attacks on LLMs
On the map: LLM safety and security → Backdoor and data poisoning attacks
Abstract (arXiv)
Inference optimization aims to minimize the latency and resource consumption of LLM inference while preserving output quality, making large-scale deployment practical and cost-effective. However, optimized execution can introduce small numerical inconsistencies from the original model. We reveal that this inconsistency not only causes the model's outputs to diverge, but more critically can introduce hidden backdoors. The backdoor remains dormant under standard unoptimized execution and is activated only when inference optimization is enabled, allowing it to evade existing backdoor detection pipelines. We first introduce the Input-Specific Optimization Backdoor (ISOB) to demonstrate that optimization-induced differences can cause wrong predictions. However, ISOB remains input-specific and cannot establish a universal optimization-triggered backdoor. To overcome this limitation, we design the Universal Optimization Backdoor (UOB). The backdoored model stays benign under unoptimized execution but activates when inference optimization is enabled. We conduct extensive experiments across seven mainstream open-source LLMs, four tasks, and three optimization backends. UOB reaches up to 100% attack success while largely preserving clean accuracy. To mitigate this vulnerability, we design three defense methods that reduce the backdoor ASR to at most 0.02 while preserving clean accuracy. These results reveal inference optimization as a new LLM security attack surface and motivate defenses against test-deployment disagreement.
Key facts. Cited by 1 paper 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 49 of its 78 references that are in the map. First posted on arXiv 20 May 2026.
Builds on
49 of 78 references.
Closest ancestors · 6
Same direction, newest first
- 2025Revisiting Backdoor Attacks on LLMs: A Stealthy and Practical Poisoning Framework via Harmless Inputs23 May
- 2025BadToken: Token-level Backdoor Attacks to Multi-modal Large Language Models20 Mar
- 2024Sleeper Agents: Training Deceptive LLMs that Persist Through Safety Training10 Jan
- 2023Backdooring Instruction-Tuned Large Language Models with Virtual Prompt Injection31 Jul
- 2023BAGM: A Backdoor Attack for Manipulating Text-to-Image Generative Models31 Jul
- 2022BITE: Textual Backdoor Attacks with Iterative Trigger Injection25 May
Other references · 43
- 2020Scaling Laws for Neural Language Modelscited by 6,586
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2023A Survey on Large Language Model based Autonomous Agentscited by 2,242
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,420
- 2023AWQ: Activation-aware Weight Quantization for LLM Compression and Accelerationcited by 1,298
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,154
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
- 2026DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencecited by 1,040
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 651
31 more
- 2018Fine-Pruning: Defending Against Backdooring Attacks on Deep Neural Networkscited by 580
- 2018Spectral Signatures in Backdoor Attackscited by 484
- 2023SmoothLLM: Defending Large Language Models Against Jailbreaking Attackscited by 469
- 2019STRIP: A Defence Against Trojan Attacks on Deep Neural Networkscited by 459
- 2019Hidden Trigger Backdoor Attackscited by 371
- 2020Weight Poisoning Attacks on Pre-trained Modelscited by 341
- 2024Agent-SafetyBench: Evaluating the Safety of LLM Agentscited by 306
- 2023Poisoning Language Models During Instruction Tuningcited by 269
- 2020Blind Backdoors in Deep Learning Modelscited by 182
- 2023A Survey of Large Language Models for Healthcare: from Data, Technology, and Applications to Accountability and Ethicscited by 163
- 2023Fundamental Limitations of Alignment in Large Language Modelscited by 155
- 2024SafeAgentBench: A Benchmark for Safe Task Planning of Embodied LLM Agentscited by 116
- 2025A Comprehensive Survey in LLM(-Agent) Full Stack Safety: Data, Training and Deploymentcited by 116
- 2019TBT: Targeted Neural Network Attack with Bit Trojancited by 113
- 2024Large Language Models for Robotics: Opportunities, Challenges, and Perspectivescited by 89
- 2024Exploiting LLM Quantizationcited by 65
- 2020The Deep Learning Compiler: A Comprehensive Surveycited by 46
- 2021Quantization Backdoors to Deep Learning Commercial Frameworkscited by 29
- 2024Glitch Tokens in Large Language Models: Categorization Taxonomy and Effective Detectioncited by 29
- 2022Alpa: Automating Inter- and Intra-Operator Parallelism for Distributed Deep Learningcited by 20
- 2025LLM-Safety Evaluations Lack Robustnesscited by 18
- 2022DeepStability: A Study of Unstable Numerical Methods and Their Solutions in Deep Learningcited by 11
- 2022ImpNet: Imperceptible and blackbox-undetectable backdoors in compiled neural networkscited by 9
- 2025Evaluation and Facilitation of Online Discussions in the LLM Era: A Surveycited by 9
- 2025Your Compiler is Backdooring Your Model: Understanding and Exploiting Compilation Inconsistency Vulnerabilities in Deep Learning Compilerscited by 7
- 2025Fewer Weights, More Problems: A Practical Attack on LLM Pruningcited by 7
- 2025Taught Well Learned Ill: Towards Distillation-conditional Backdoor Attackcited by 5
- 2026Adversarial Contrastive Learning for LLM Quantization Attackscited by 5
- 2026Hidden Reliability Risks in Large Language Models: Systematic Identification of Precision-Induced Output Disagreementscited by 5
- 2026Hardware-Triggered Backdoorscited by 2
- 2026TFL: Targeted Bit-Flip Attack on Large Language Modelcited by 2
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026SpecGuard: Inference-Time Backdoor Detection For Free
- 2026STAR: Detecting Inference-time Backdoors in LLM Reasoning via State-Transition Amplification Ratio
- 2026An Empirical Study of Output-to-Input Loops for Black-Box Backdoor Detection in Fine-Tuned Open-Weight LLMs
- 2026Lilith: Backdoor Generalization under Training-Inference Trigger Shift
- 2026Purifying Generative LLMs from Backdoors without Prior Knowledge or Clean Reference
- 2026Backdoor Unlearning Generalization: A Path Toward the Removal of Unknown Triggers in LLMs
- 2026AKRASIA: Stealthy Backdoor Attack on Reasoning-based Code LLMs
- 2026Removing the NEEDLE in the Haystack: Backdoor Removal in LLMs via Weight Orthogonalisation