arXiv:cs.LG· Yichi Zhang, Zhiqi Wang, Neil Gong, Yuchen Yang·· 7 小时前AI 评分45
SecureSD:面向大语言模型的更安全投机解码方法
Secure Speculative Decoding for Large Language Models
AI 导读
研究首次系统考察投机解码的安全影响,发现各类有损投机解码方法在大幅提升推理效率的同时,会让越狱和提示注入攻击成功率上升得远快于效用下降。为此作者提出 SecureSD,理论分析指出安全退化主要源自 draft model 早期生成的 token,因而对早期解码位置的 draft token 采用更严格的验证标准。安全与效用基准测试显示,SecureSD 在保持效率和效用的同时显著提升了安全性。
正文
Abstract:Speculative decoding accelerates inference for a large language model (LLM), referred to as the \emph{target model}, by first using a smaller model, referred to as the \emph{draft model}, to generate candidate tokens and then verifying them with the target model for acceptance or rejection. Prior studies primarily focused on the efficiency-utility trade-off of speculative decoding, e.g., lossy speculative decoding, leaving its security implications largely unexplored.
In this work, we bridge this gap by providing the \emph{first} systematic study of the security implications of speculative decoding. Through a large-scale measurement study, we reveal a pronounced security-utility asymmetry: across a wide range of lossy speculative decoding methods, improvements in inference efficiency come at a disproportionately high cost to security, with attack success rates for jailbreak and prompt injection attacks increasing much faster than utility degrades.
We then propose SecureSD, a new theory-guided speculative decoding method that enhances security while maintaining efficiency and utility. Specifically, our theoretical analysis reveals that security degradation primarily originates from the early tokens generated by the draft model. Motivated by this insight, SecureSD applies a stricter verification criterion to draft-model tokens at early decoding positions. Extensive experiments on both security and utility benchmarks demonstrate that SecureSD significantly improves security while preserving efficiency and utility compared to existing speculative decoding methods.
| Comments: | 18 pages, accepted by IEEE S&P 2027 |
| Subjects: | Cryptography and Security (cs.CR); Artificial Intelligence (cs.AI); Machine Learning (cs.LG) |
| Cite as: | arXiv:2610.08678 [cs.CR] |
| (or arXiv:2610.08678v1 [cs.CR] for this version) | |
| https://doi.org/10.48550/arXiv.2610.08678 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Yichi Zhang [view email]
[v1]
Tue, 6 Oct 2026 16:59:37 UTC (151 KB)
来源:arXiv:cs.LG · arxiv.org