LoopLLM:通过重复生成实现大语言模型中可迁移的能量-延迟攻击
LoopLLM: Transferable Energy-Latency Attacks in LLMs via Repetitive Generation
AI总结:
针对现有LLM能量-延迟攻击因输出变长难以控制终止符号的问题,提出LoopLLM框架,通过重复生成触发低熵解码循环迫使模型生成至输出限制,引入重复诱导提示优化和令牌对齐集成优化,在多模型上实现超90%最大输出长度且迁移性提升约40%。
摘要:
随着大型语言模型(LLMs)的规模扩大,其推理过程会消耗大量计算资源,使其面临能量-延迟攻击——精心设计的提示会导致高能量和延迟成本。现有攻击方法旨在通过延迟终止符号的生成来延长输出。然而,随着输出变长,通过输入控制终止符号变得困难,导致这些方法效果不佳。因此,我们提出LoopLLM,一种基于重复生成可触发低熵解码循环的观察的能量-延迟攻击框架,能可靠地迫使LLMs生成直到达到输出限制。LoopLLM引入了(1)利用自回归漏洞诱导重复生成的重复诱导提示优化,以及(2)聚合梯度以提高跨模型迁移性的令牌对齐集成优化。在12个开源LLM和2个商用LLM上的大量实验表明,LoopLLM显著优于现有方法,实现了超过90%的最大输出长度(基线方法仅为20%),并将对DeepSeek-V3和Gemini 2.5 Flash的迁移性提高了约40%。
英文摘要:
As large language models (LLMs) scale, their inference incurs substantial computational resources, exposing them to energy-latency attacks, where crafted prompts induce high energy and latency cost. Existing attack methods aim to prolong output by delaying the generation of termination symbols. However, as the output grows longer, controlling the termination symbols through input becomes difficult, making these methods less effective. Therefore, we propose LoopLLM, an energy-latency attack framework based on the observation that repetitive generation can trigger low-entropy decoding loops, reliably compelling LLMs to generate until their output limits. LoopLLM introduces (1) a repetition-inducing prompt optimization that exploits autoregressive vulnerabilities to induce repetitive generation, and (2) a token-aligned ensemble optimization that aggregates gradients to improve cross-model transferability. Extensive experiments on 12 open-source and 2 commercial LLMs show that LoopLLM significantly outperforms existing methods, achieving over 90% of the maximum output length, compared to 20% for baselines, and improving transferability by around 40% to DeepSeek-V3 and Gemini 2.5 Flash.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。