Root Defence Strategies: Ensuring Safety of LLM at the Decoding Level
On the map: LLM safety and security → Jailbreaking
Abstract (arXiv)
Large language models (LLMs) have demonstrated immense utility across various industries. However, as LLMs advance, the risk of harmful outputs increases due to incorrect or malicious instruction prompts. While current methods effectively address jailbreak risks, they share common limitations: 1) Judging harmful responses from the prefill-level lacks utilization of the model's decoding outputs, leading to relatively lower effectiveness and robustness. 2) Rejecting potentially harmful responses based on a single evaluation can significantly impair the model's helpfulness.This paper examines the LLMs' capability to recognize harmful outputs, revealing and quantifying their proficiency in assessing the danger of previous tokens. Motivated by pilot experiment results, we design a robust defense mechanism at the decoding level. Our novel decoder-oriented, step-by-step defense architecture corrects harmful queries directly rather than rejecting them outright. We introduce speculative decoding to enhance usability and facilitate deployment to boost secure decoding speed. Extensive experiments demonstrate that our approach improves model security without compromising reasoning speed. Notably, our method leverages the model's ability to discern hazardous information, maintaining its helpfulness compared to existing methods.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). Placed in Jailbreaking, one of 12 directions in LLM safety and security. Builds on 32 of its 44 references that are in the map. First posted on arXiv 9 Oct 2024.
Builds on
32 of 44 references.
Closest ancestors · 10
Same direction, newest first
- 2024SafeAligner: Safety Alignment against Jailbreak Attacks via Response Disparity Guidance26 Jun
- 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decoding14 Feb
- 2024Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attacks30 Jan
- 2024Weak-to-Strong Jailbreaking on Large Language Models30 Jan
- 2023AutoDAN: Interpretable Gradient-Based Adversarial Attacks on Large Language Models23 Oct
- 2023Catastrophic Jailbreak of Open-source LLMs via Exploiting Generation10 Oct
- 2023Detecting Language Model Attacks with Perplexity27 Aug
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Models27 Jul
- 2023Jailbroken: How Does LLM Safety Training Fail?5 Jul
- 2023Jailbreaking ChatGPT via Prompt Engineering: An Empirical Study23 May
Other references · 22
- 2023GPT-4 Technical Reportcited by 18,132
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
- 2024Qwen2 Technical Reportcited by 2,076
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,615
- 2018Hierarchical Neural Story Generationcited by 1,182
- 2023Fine-tuning Aligned Language Models Compromises Safety, Even When Users Do Not Intend To!cited by 1,106
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 975
- 2021Ethical and social risks of harm from Language Modelscited by 957
- 2024Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Headscited by 821
10 more
- 2024TinyLlama: An Open-Source Small Language Modelcited by 604
- 2024EAGLE: Speculative Sampling Requires Rethinking Feature Uncertaintycited by 564
- 2023XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Modelscited by 477
- 2023SqueezeLLM: Dense-and-Sparse Quantizationcited by 285
- 2024Unlocking Efficiency in Large Language Model Inference: A Comprehensive Survey of Speculative Decodingcited by 266
- 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learningcited by 251
- 2023LLM Self Defense: By Self Examination, LLMs Know They Are Being Trickedcited by 226
- 2023Purple Llama CyberSecEval: A Secure Coding Benchmark for Language Modelscited by 130
- 2023Evil Geniuses: Delving into the Safety of LLM-based Agentscited by 103
- 2023Cascade Speculative Drafting for Even Faster LLM Inferencecited by 83
Built on by
Citing papers per year: 2025: 10; 2026: 1.
11 papers.
- 2025A Comprehensive Survey on Trustworthiness in Reasoning with Large Language Modelscited by 22
- 2025Rethinking the Reliability of Multi-agent System: A Perspective from Byzantine Fault Tolerancecited by 16
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Timecited by 13
- 2025Robustness in Large Language Models: A Survey of Mitigation Strategies and Evaluation Metricscited by 12
- 2025From LLMs to MLLMs to Agents: A Survey of Emerging Paradigms in Jailbreak Attacks and Defenses within LLM Ecosystemcited by 11
- 2025Proactive defense against LLM Jailbreakcited by 6
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defensescited by 4
- 2025A Survey on Training-free Alignment of Large Language Modelscited by 2
- 2025Red Teaming Large Reasoning Modelscited by 2
- 2025MirrorShield: Towards Universal Defense Against Jailbreaks via Entropy-Guided Mirror Craftingcited by 1
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Modelscited by 0
- 2026Beyond Tokens: A Survey on Decoding Methods for Large Language and Vision-Language Models14 Aug 2026
- 2025Red Teaming Large Reasoning Models29 Nov 2025
- 2025Rethinking the Reliability of Multi-agent System: A Perspective from Byzantine Fault Tolerance13 Nov 2025
- 2025SoK: Systematizing LLM Prompt Security: Taxonomies, Datasets, and Unified Evaluation of Attacks and Defenses17 Oct 2025
- 2025Proactive defense against LLM Jailbreak6 Oct 2025
- 2025A Comprehensive Survey on Trustworthiness in Reasoning with Large Language Models4 Sep 2025
- 2025A Survey on Training-free Alignment of Large Language Models12 Aug 2025
- 2025From LLMs to MLLMs to Agents: A Survey of Emerging Paradigms in Jailbreak Attacks and Defenses within LLM Ecosystem18 Jun 2025
- 2025Robustness in Large Language Models: A Survey of Mitigation Strategies and Evaluation Metrics24 May 2025
- 2025MirrorShield: Towards Universal Defense Against Jailbreaks via Entropy-Guided Mirror Crafting17 Mar 2025
- 2025On Almost Surely Safe Alignment of Large Language Models at Inference-Time3 Feb 2025
Similar, not cited
Close in wording, no citation either way
- 2024Probing the Safety Response Boundary of Large Language Models via Unsafe Decoding Path Generation
- 2026Defending Large Language Models Against Jailbreak Attacks via In-Decoding Safety-Awareness Probing
- 2025Speculative Safety-Aware Decoding
- 2025When Grammar Guides the Attack: Uncovering Control-Plane Vulnerabilities in LLMs with Structured Output
- 2025Decoding One Safety Trigger Token for Balancing Safety and Usability in Large Language Models
- 2026Grammar-Constrained Decoding Can Jailbreak LLMs into Generating Malicious Code
- 2025Beyond Jailbreaks: Revealing Stealthier and Broader LLM Security Risks Stemming from Alignment Failures
- 2025Paper Summary Attack: Jailbreaking LLMs through LLM Safety Papers