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

嵌入投毒:通过嵌入语义偏移绕过安全对齐

Embedding Poisoning: Bypassing Safety Alignment via Embedding Semantic Shift

University of Electronic Science and Technology of China(电子科技大学);Huazhong University of Science and Technology(华中科技大学);The University of Queensland(昆士兰大学)

Shuai Yuan, Zhibo Zhang, Yuxi Li, Guangdong Bai, Wang Kailong

AI总结:

针对LLM部署阶段,提出基于搜索的嵌入投毒(SEP)框架,通过向高风险令牌嵌入注入优化扰动,绕过安全对齐,在六个模型上实现96.43%平均攻击成功率,揭示嵌入级完整性检查的迫切性。

摘要:

大型语言模型(LLMs)通过Hugging Face等公共平台的广泛分发引入了重大的安全挑战。虽然这些平台执行基本的安全扫描,但它们往往无法检测嵌入层中的微妙操纵。这项工作识别了一类新型的部署阶段攻击,该攻击利用这一漏洞,通过直接在嵌入层输出中注入不可察觉的扰动,而不修改模型权重或输入文本。这些扰动虽然在统计上是良性的,但系统地绕过了安全对齐机制,并在推理过程中诱导有害行为。我们提出了基于搜索的嵌入投毒(SEP),一个实用的、模型无关的框架,该框架将精心优化的扰动引入与高风险令牌相关的嵌入中。SEP利用模型响应中从拒绝到有害输出再到语义偏离的可预测线性转变,来识别一个能够规避对齐防护的狭窄扰动窗口。在六个对齐的LLM上评估,SEP实现了96.43%的平均攻击成功率,同时保持了良性任务性能并规避了传统的检测机制。我们的发现揭示了部署安全中的一个关键疏忽,并强调了在未来LLM防御策略中进行嵌入级完整性检查的迫切需求。

英文摘要:

The widespread distribution of Large Language Models (LLMs) through public platforms like Hugging Face introduces significant security challenges. While these platforms perform basic security scans, they often fail to detect subtle manipulations within the embedding layer. This work identifies a novel class of deployment phase attacks that exploit this vulnerability by injecting imperceptible perturbations directly into the embedding layer outputs without modifying model weights or input text. These perturbations, though statistically benign, systematically bypass safety alignment mechanisms and induce harmful behaviors during inference. We propose Search based Embedding Poisoning(SEP), a practical, model agnostic framework that introduces carefully optimized perturbations into embeddings associated with high risk tokens. SEP leverages a predictable linear transition in model responses, from refusal to harmful output to semantic deviation to identify a narrow perturbation window that evades alignment safeguards. Evaluated across six aligned LLMs, SEP achieves an average attack success rate of 96.43% while preserving benign task performance and evading conventional detection mechanisms. Our findings reveal a critical oversight in deployment security and emphasize the urgent need for embedding level integrity checks in future LLM defense strategies.

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

↑