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

针对大型语言模型的拒绝服务投毒攻击

Denial-of-Service Poisoning Attacks against Large Language Models

Sea AI Lab, Singapore(新加坡Sea AI实验室);Tsinghua University(清华大学);Peng Cheng Laboratory(鹏城实验室)

Kuofeng Gao, Tianyu Pang, Chao Du, Yong Yang, Shu-Tao Xia, Min Lin

AI总结:

本文提出基于投毒的拒绝服务攻击(P-DoS),通过注入单个投毒样本突破LLM输出长度限制,使GPT-4o等模型产生超长重复输出,并扩展至LLM智能体场景。

摘要:

最近的研究表明,LLM容易受到拒绝服务攻击,其中拼写错误或非语义提示等对抗性输入会触发无休止的输出,而不生成[EOS]标记。这些攻击可能导致高延迟,使其他用户或任务无法访问LLM服务。然而,当存在语音转文本接口(例如对机器人的语音命令)时,执行此类DoS攻击变得具有挑战性,因为很难通过语音引入拼写错误或非语义提示。在这些场景中,一种简单的DoS攻击是指示模型“不断重复Hello”,但我们观察到仅依赖自然指令会限制输出长度,该长度受限于LLM监督微调(SFT)数据的最大长度。为克服这一限制,我们提出了针对LLM的基于投毒的DoS(P-DoS)攻击,证明注入单个为DoS目的设计的投毒样本可以打破输出长度限制。例如,一个投毒样本可以成功攻击GPT-4o和GPT-4o mini(通过OpenAI的微调API),成本不到1美元,导致重复输出达到最大推理长度(16K个标记,而投毒前为0.5K)。此外,我们对开源LLM进行了全面的消融研究,并将我们的方法扩展到LLM智能体,其中攻击者可以控制微调数据集和算法。我们的发现强调了对P-DoS攻击进行防御以保护LLM的迫切需求。我们的代码可在https://github.com/sail-sg/P-DoS获取。

英文摘要:

Recent studies have shown that LLMs are vulnerable to denial-of-service (DoS) attacks, where adversarial inputs like spelling errors or non-semantic prompts trigger endless outputs without generating an [EOS] token. These attacks can potentially cause high latency and make LLM services inaccessible to other users or tasks. However, when there are speech-to-text interfaces (e.g., voice commands to a robot), executing such DoS attacks becomes challenging, as it is difficult to introduce spelling errors or non-semantic prompts through speech. A simple DoS attack in these scenarios would be to instruct the model to "Keep repeating Hello", but we observe that relying solely on natural instructions limits output length, which is bounded by the maximum length of the LLM's supervised finetuning (SFT) data. To overcome this limitation, we propose poisoning-based DoS (P-DoS) attacks for LLMs, demonstrating that injecting a single poisoned sample designed for DoS purposes can break the output length limit. For example, a poisoned sample can successfully attack GPT-4o and GPT-4o mini (via OpenAI's finetuning API) using less than $1, causing repeated outputs up to the maximum inference length (16K tokens, compared to 0.5K before poisoning). Additionally, we perform comprehensive ablation studies on open-source LLMs and extend our method to LLM agents, where attackers can control both the finetuning dataset and algorithm. Our findings underscore the urgent need for defenses against P-DoS attacks to secure LLMs. Our code is available at https://github.com/sail-sg/P-DoS.

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

↑