mlsanityData to 14 Oct 2026

SafeSpec: Fast and Safe LLM via Dynamic Reflective Sampling

arXiv 2606.19755 ↗First posted 18 Jun 2026cs.CR cs.AIcited by 0

On the map: Efficient LLM inference and serving → Speculative decoding

also in 1 more
Abstract (arXiv)

Speculative inference accelerates large language model (LLM) decoding but provides no inherent safety guarantees. Existing safety defenses are largely incompatible with speculative inference: they either introduce additional computation or disrupt the draft-verify mechanism, negating acceleration benefits. This reveals a fundamental incompatibility between current safety methods and speculative decoding. We propose SafeSpec, a safety-aware speculative inference framework that integrates risk estimation directly into the verification process. SafeSpec attaches a lightweight latent safety head to the target model to jointly evaluate semantic validity and safety in a single forward pass. When unsafe generations are detected, SafeSpec applies rollback and safety-guided reflective multi-sampling to recover safe continuations rather than terminating generation. We model jailbreak attacks as distributional shifts over generative trajectories, where adversarial prompts increase the probability of harmful continuations without eliminating safe ones. Under this model, SafeSpec performs risk-aware trajectory recovery within the speculative decoding process. Across multiple models and adversarial benchmarks, SafeSpec achieves a substantially improved safety-efficiency trade-off. On Qwen3-32B, SafeSpec reduces attack success rates by 15% while preserving a 2.06x inference speedup on benign workloads, demonstrating that speculative acceleration and inference-time safety can be jointly optimized.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Speculative decoding, one of 12 directions in Efficient LLM inference and serving. Builds on 26 of its 31 references that are in the map. First posted on arXiv 18 Jun 2026.

Builds on

26 of 31 references.

Closest ancestors · 4

Same direction, newest first

  1. 2025SpecReason: Fast and Accurate Inference-Time Compute via Speculative Reasoning10 Apr
  2. 2024EAGLE: Speculative Sampling Requires Rethinking Feature Uncertainty26 Jan
  3. 2024Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Heads19 Jan
  4. 2022Fast Inference from Transformers via Speculative Decoding30 Nov

Other references · 22

  1. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  2. 2025Qwen3 Technical Reportcited by 8,820
  3. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
  4. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  5. 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,879
  6. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 1,032
  7. 2024JailbreakBench: An Open Robustness Benchmark for Jailbreaking Large Language Modelscited by 536
  8. 2023XSTest: A Test Suite for Identifying Exaggerated Safety Behaviours in Large Language Modelscited by 505
  9. 2023DeepInception: Hypnotize Large Language Model to Be Jailbreakercited by 367
  10. 2023A Wolf in Sheep's Clothing: Generalized Nested Jailbreak Prompts can Fool Large Language Models Easilycited by 259
  11. 2024SafeDecoding: Defending against Jailbreak Attacks via Safety-Aware Decodingcited by 247
  12. 2024Robust Prompt Optimization for Defending Language Models Against Jailbreaking Attackscited by 156
10 more
  1. 2025Qwen3Guard Technical Reportcited by 155
  2. 2025Safety Tax: Safety Alignment Makes Your Large Reasoning Models Less Reasonablecited by 122
  3. 2025H-CoT: Hijacking the Chain-of-Thought Safety Reasoning Mechanism to Jailbreak Large Reasoning Models, Including OpenAI o1/o3, DeepSeek-R1, and Gemini 2.0 Flash Thinkingcited by 99
  4. 2024How Alignment and Jailbreak Work: Explain LLM Safety through Intermediate Hidden Statescited by 98
  5. 2024Uncovering Safety Risks of Large Language Models through Concept Activation Vectorcited by 67
  6. 2025A Mousetrap: Fooling Large Reasoning Models for Jailbreak with Chain of Iterative Chaoscited by 43
  7. 2025MTSA: Multi-turn Safety Alignment for LLMs through Multi-round Red-teamingcited by 32
  8. 2024Shaping the Safety Boundaries: Understanding and Defending Against Jailbreaks in Large Language Modelscited by 23
  9. 2025One Model Transfer to All: On Robust Jailbreak Prompts Generation against LLMscited by 12
  10. 2024Reasoning as a Weapon: Adaptive Dual-Path Jailbreak Attack on Large Language Modelscited by 8

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Speculative Safety-Aware Decoding
  2. 2025Think Before You Accept: Semantic Reflective Verification for Faster Speculative Decoding
  3. 2026Secure Speculative Decoding for Large Language Models
  4. 2026MARS: Unleashing the Power of Speculative Decoding via Margin-Aware Verification
  5. 2025Speculative Decoding: Performance or Illusion?
  6. 2025Training-Free Loosely Speculative Decoding: Accepting Semantically Correct Drafts Beyond Exact Match
  7. 2024Unlocking Efficiency in Large Language Model Inference: A Comprehensive Survey of Speculative Decoding
  8. 2025Judge Decoding: Faster Speculative Sampling Requires Going Beyond Model Alignment