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

针对基于Mamba的语言模型的隐藏状态污染攻击

Hidden State Poisoning Attacks against Mamba-based Language Models

IDLab–T2K, Ghent University–imec(IDLab–T2K,根特大学–imec)

Alexandre Le Mercier, Chris Develder, Thomas Demeester

AI总结:

本文研究了特定短输入短语对Mamba模型造成部分遗忘效应的攻击现象,揭示了SSM模型对隐藏状态污染攻击的脆弱性,并展示了攻击对Jamba和Nemotron-3-Nano模型的影响。

摘要:

状态空间模型(SSMs)如Mamba提供了比Transformer-based语言模型更高效的替代方案,具有线性时间复杂度。然而,其对抗鲁棒性仍严重缺乏研究。本文研究了特定短输入短语如何在这些模型中引发部分遗忘效应,通过不可逆地覆盖其隐藏状态信息,称为隐藏状态污染攻击(HiSPA)。我们的基准测试RoBench-25允许在受HiSPA影响时评估模型的信息检索能力,并确认了SSM对这种攻击的脆弱性。即使最近的Jamba-1.7-Mini SSM——Transformer(一个52B混合模型)在某些HiSPA触发下也会崩溃,而纯Transformer模型不会。我们还观察到HiSPA触发显著削弱了Jamba模型在流行的Open-Prompt-Injections基准中的表现,与纯Transformer不同。我们进一步展示了理论和实证发现扩展到Mamba-2,并分析了基于Mamba-2的混合模型(Nemotron-3-Nano)。最后,我们的可解释性研究揭示了HiSPA期间Mamba隐藏层中的模式,可用于构建HiSPA缓解系统。完整的代码和数据以https://anonymous.4open.science/r/hispa_anonymous-5DB0可复现实验。

英文摘要:

State space models (SSMs) like Mamba offer efficient alternatives to Transformer-based language models, with linear time complexity. Yet, their adversarial robustness remains critically unexplored. This paper studies the phenomenon whereby specific short input phrases induce a partial amnesia effect in such models, by irreversibly overwriting information in their hidden states, referred to as a Hidden State Poisoning Attack (HiSPA). Our benchmark RoBench-25 allows evaluating a model's information retrieval capabilities when subject to HiSPAs, and confirms the vulnerability of SSMs against such attacks. Even the recent Jamba-1.7-Mini SSM--Transformer (a 52B hybrid model) collapses on RoBench-25 under some HiSPA triggers, whereas pure Transformers do not. We also observe that HiSPA triggers significantly weaken the Jamba model on the popular Open-Prompt-Injections benchmark, unlike pure Transformers. We further show that the theoretical and empirical findings extend to Mamba-2, and also analyse a Mamba-2-based hybrid (Nemotron-3-Nano). Finally, our interpretability study reveals patterns in Mamba's hidden layers during HiSPAs that could be used to build a HiSPA mitigation system. The full code and data to reproduce the experiments can be found at https://github.com/TortueSagace/hispa.

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

↑