LoopLLM: Transferable Energy-Latency Attacks in LLMs via Repetitive Generation
Xingyu Li, Xiaolei Liu, Cheng Liu, Yixiao Xu, Kangyi Ding, Bangzhou Xin, Jia-Li Yin
Abstract
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers1
Ask how each one uses itBuilds on6
- Self-Instruct: Aligning Language Models with Self-Generated InstructionsYizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu et al.ACL 2023 · 540 citations
- Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text GenerationJin Xu, Xiaojiang Liu, Jianhao Yan, Deng Cai et al.NeurIPS 2022 · 135 citations
- A Panda? No, It's a Sloth: Slowdown Attacks on Adaptive Multi-Exit Neural Network InferenceSanghyun Hong, Yigitcan Kaya, Ionut-Vlad Modoranu, Tudor DumitrasICLR 2021 · 85 citations
- Inducing High Energy-Latency of Large Vision-Language Models with Verbose ImagesKuofeng Gao, Yang Bai, Jindong Gu, Shu-Tao Xia et al.ICLR 2024 · 79 citations
- NMTSloth: understanding and testing efficiency degradation of neural machine translation systemsSimin Chen, Cong Liu, Mirazul Haque, Zihe Song et al.FSE 2022 · 22 citations
Related papers
- LingoLoop Attack: Trapping MLLMs via Linguistic Context and State Entrapment into Endless LoopsJiyuan Fu, Kaixun Jiang, Lingyi Hong, Jinglun Li et al.ICLR 2026 · 12 citations
- Transferable Direct Prompt Injection via Activation-Guided MCMC SamplingMinghui Li, Hao Zhang, Yechao Zhang, Wei Wan et al.EMNLP 2025 · 1 citation
- ThinkTrap: Denial-of-Service Attacks against Black-box LLM Services via Infinite ThinkingYunzhe Li, Jianan Wang, Hongzi Zhu, James Lin et al.NDSS 2026 · 26 citations
- An Engorgio Prompt Makes Large Language Model Babble onJianshuo Dong, Ziyuan Zhang, Qingjie Zhang, Tianwei Zhang et al.ICLR 2025
- Attention Eclipse: Manipulating Attention to Bypass LLM Safety-AlignmentPedram Zaree, Md Abdullah Al Mamun, Quazi Mishkatul Alam, Yue Dong et al.EMNLP 2025
