arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.08313cs.CRcs.AIcs.LG
收藏

LLM采样中的种子劫持与量子随机数防御

Seed Hijacking of LLM Sampling and Quantum Random Number Defense

School of Electronic, Electrical and Physics, Fujian University of Technology(福建工程学院电子、电气与物理系);School of Humanities, Fujian University of Technology(福建工程学院人文学院);Department of Investigation, Fujian Police College(福建警察学院调查系);Institute of Applied Physics and Materials Engineering, University of Macau(澳门大学应用物理与材料工程研究院)

Ziyang You, Xiaoke Yang, Zhanling Fan, Feng Guo, Xiaogen Zhou, Xuxing Lu

AI总结:

本文提出SeedHijack攻击,通过操控PRNG输出实现指定token注入,提出基于量子随机数生成器的防御方案,解决LLM采样层的关键漏洞。

摘要:

大型语言模型(LLM)依赖确定性伪随机数生成器(PRNG)进行自回归采样,这创建了一个被现有防御忽视的关键供应链攻击面。我们提出了SeedHijack攻击,通过操控PRNG输出迫使攻击者指定的token选择而不改变模型logits。在对GPT-2(124M)的540次测试中,该攻击在9种采样配置中实现了99.6%的精确token注入;在四个对齐模型(1.5B-7B,RLHF/SFT/推理蒸馏)上达到100%的成功率,并绕过了本文中测试的所有对齐方法。我们进一步提出基于硬件量子随机数生成器(QRNG)的防御方法,该方法在我们的评估威胁模型中以几乎无代价的中位数开销(+0.6%延迟,+7.7 MB内存)中和了该攻击。我们的工作识别了一个关键的采样层漏洞,并提供了一个实用且可部署的基于QRNG的防御方案。

英文摘要:

Large language models (LLMs) rely on deterministic pseudorandom number generators (PRNGs) for autoregressive sampling, creating a critical supply-chain attack surface overlooked by existing defenses. We present SeedHijack, a backdoor attack that manipulates PRNG outputs to force attacker-specified token selection without altering model logits. In a 540-trial benchmark on GPT-2 (124M), the attack achieves 99.6% exact token injection across 9 sampling configurations; it reaches 100% success on four aligned models (1.5B-7B, RLHF/SFT/reasoning distillation) and bypasses all alignment methods tested in this work. We further propose a defense based on a hardware quantum random number generator (QRNG), which neutralizes the attack in our evaluated threat model with negligible median overhead (+0.6% latency, +7.7 MB memory). Our work identifies a critical sampling-layer vulnerability and provides a practical, deployable QRNG-based defense.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑