攻击推理加速中的猜测解码,让速度暴跌却不改变输出质量。
Mistletoe: Stealthy Acceleration-Collapse Attacks on Speculative Decoding

- 通过扰动降低猜测模型与目标模型的一致性,隐蔽破坏接受率。
- 实验显示平均接受长度τ大幅下降,吞吐量显著降低,但输出质量不变。
- 适合研究大模型加速安全或对抗攻击的读者关注。
推测解码通过并行生成多个候选词并由目标模型验证来加速大语言模型推理,其效率高度依赖于平均接受长度τ(每步验证中存活的候选词数量)。本文发现模型驱动的推测解码存在机制级漏洞:猜测模型虽逼近目标模型分布,但不可避免存在偏差。这种偏差形成隐藏攻击面,微小扰动可保持目标模型输出可见行为不变,却大幅降低候选词接受率。我们提出Mistletoe攻击,直接针对推测解码的接受机制,联合优化降低猜测-目标一致性与保持语义不变的目标。为调和冲突,引入零空间投影,将退化梯度从局部语义保持方向移除,从而抑制接受率同时最小化语义漂移。在多种推测解码系统上的实验表明,Mistletoe显著降低平均接受长度τ,导致速度优势崩溃、平均吞吐量下降,但输出质量与困惑度保持稳定。本工作揭示推测解码在现有输出鲁棒性之外引入新的机制级攻击面,亟需更鲁棒的加速系统设计。
原文摘要 · Abstract (English)
Speculative decoding has become a widely adopted technique for accelerating large language model (LLM) inference by drafting multiple candidate tokens and verifying them with a target model in parallel. Its efficiency, however, critically depends on the average accepted length $τ$, i.e., how many draft tokens survive each verification step. In this work, we identify a new mechanism-level vulnerability in model-based speculative decoding: the drafter is trained to approximate the target model distribution, but this approximation is inevitably imperfect. Such a drafter-target mismatch creates a hidden attack surface where small perturbations can preserve the target model's visible behavior while substantially reducing draft-token acceptability. We propose Mistletoe, a stealthy acceleration-collapse attack against speculative decoding. Mistletoe directly targets the acceptance mechanism of speculative decoding. It jointly optimizes a degradation objective that decreases drafter-target agreement and a semantic-preservation objective that constrains the target model's output distribution. To resolve the conflict between these objectives, we introduce a null-space projection mechanism, where degradation gradients are projected away from the local semantic-preserving direction, suppressing draft acceptance while minimizing semantic drift. Experiments on various speculative decoding systems show that Mistletoe substantially reduces average accepted length $τ$, collapses speedup, and lowers averaged token throughput, while preserving output quality and perplexity. Our work highlights that speculative decoding introduces a mechanism-level attack surface beyond existing output robustness, calling for more robust designs of LLM acceleration systems.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。