arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.17098cs.CRcs.AI
收藏

Transformer记忆能否被破坏?调查大型语言模型中的缓存侧漏洞

Can Transformer Memory Be Corrupted? Investigating Cache-Side Vulnerabilities in Large Language Models

College of Engineering and Computer Science, University of Central Florida(中央佛罗里达大学工程与计算机科学学院);Department of Computer Science and Engineering, Mississippi State University(密苏里州立大学计算机科学与工程系);Department of Electrical and Computer Engineering, North Carolina State University(北卡罗来纳州立大学电子与计算机工程系)

Elias Hossain, Swayamjit Saha, Somshubhra Roy, Ravi Prasad

AI总结:

本文提出恶意令牌注入框架,揭示了大型语言模型缓存中的安全漏洞,通过扰动缓存关键向量影响模型输出和任务性能。

摘要:

即使提示和参数被保护,transformer语言模型仍然容易受到攻击,因为其推理过程中的关键值(KV)缓存构成了一个被忽视的攻击面。本文介绍了恶意令牌注入(MTI),一种模块化框架,通过受控的幅度和频率,在选定的层和时间步中系统性地扰动缓存的关键向量,使用加性高斯噪声、零化和正交旋转。理论分析量化了这些扰动如何通过注意力机制传播,将logit偏差与破坏的Frobenius范数和softmax Lipschitz动态联系起来。实验结果表明,MTI显著改变了下一个令牌分布和下游任务性能,涵盖了GPT-2和LLaMA-2/7B,同时破坏了检索增强和代理推理管道。这些发现将缓存完整性确定为当前LLM部署中关键但未被充分探索的漏洞,将缓存破坏定位为一种可重复和理论基础的威胁模型,为未来鲁棒性和安全研究提供基础。

英文摘要:

Even when prompts and parameters are secured, transformer language models remain vulnerable because their key-value (KV) cache during inference constitutes an overlooked attack surface. This paper introduces Malicious Token Injection (MTI), a modular framework that systematically perturbs cached key vectors at selected layers and timesteps through controlled magnitude and frequency, using additive Gaussian noise, zeroing, and orthogonal rotations. A theoretical analysis quantifies how these perturbations propagate through attention, linking logit deviations to the Frobenius norm of corruption and softmax Lipschitz dynamics. Empirical results show that MTI significantly alters next-token distributions and downstream task performance across GPT-2 and LLaMA-2/7B, as well as destabilizes retrieval-augmented and agentic reasoning pipelines. These findings identify cache integrity as a critical yet underexplored vulnerability in current LLM deployments, positioning cache corruption as a reproducible and theoretically grounded threat model for future robustness and security research.

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

↑