Manuscript Offprint

arXiv:2608.25276

Groundhog Bit-Flip Attack: Seeding Infinite Generation Loops in Mixture-of-Experts LLMs through Bit Flips

Huakang Lin, Tiancheng Zheng, Mingxuan Sun, Tianhong Xu, Fan Zhang, Yunsi Fei, Ruyi Ding

Abstract

Mixture-of-Experts (MoE) architectures enable scalable and efficient large language models (LLMs) by selectively activating expert subnetworks through a routing mechanism. However, this adaptive design introduces a new attack surface: specific experts become disproportionately correlated with certain tokens (e.g., end-of-sequence), allowing adversaries to manipulate model behavior via lightweight perturbations. In this work, we present Groundhog Bit-Flip Attack (GBFA), the first bit-flip-based Denial-of-Wallet availability attack against MoE-based LLMs. By identifying and flipping routing-layer bits associated with related expert activations, we demonstrate that GBFA substantially extends the decoding token usage across three different LLM modes: conversational, reasoning, and agentic tasks, while largely preserving semantic fidelity. Across four main real-world MoE-based LLMs, manually deactivating on average fewer than 4 experts drives average output inflation to 5912%, with the majority of test samples reaching max tokens. These results reveal a robustness vulnerability of MoE architectures to bit flip, and highlight the potential of GBFA as an availability attack against LLMs.

1 Introduction

To reduce the inference cost of Large Language Models (LLMs), service providers have increasingly adopted Mixture-of-Experts (MoE) architectures, which expand model capacity while activating only a small subset of specialized experts for each token. Recent models such as Mixtral (Jiang et al., 2024), DeepSeek (DeepSeek-AI, 2024), Qwen3-MoE (Qwen Team, 2025), and GPT-OSS (OpenAI, 2025) demonstrate the effectiveness of this design in supporting concurrent inference. However, such sparse architecture also introduces new attack surfaces.

Figure

Figure 1: Groundhog Bit Flip Attack on MoE LLMs.

Prior works have focused on exploiting MoE-specific architectural vulnerabilities to attack LLM models. MoEcho (Ding et al., 2025b) exploits temporal and spatial traces of expert execution as side channels to infer user prompts and outputs. SAFEx (Lai et al., 2025) reveals that the intrinsic safety-aligned behaviors of MoE-based LLMs strongly depend on specific positional experts. In this work, we observe that the generation of termination tokens (e.g., end of sequence) is governed by a dedicated subset of experts. As a result, the same routing mechanism designed to improve inference efficiency can become an availability vulnerability: by disrupting these termination-related experts, an attacker can delay or suppress termination token generation. This threat is especially severe in rapidly growing agentic applications, where inflated outputs directly translate into Denial-of-Wallet (DoW) risk.

MoE sparsity makes bit-flip attacks a natural tool for availability attacks, as termination behavior can be concentrated in a small set of routing parameters. A few targeted bit flips can disrupt termination-related expert activations and induce excessive generation. However, existing BFA studies mainly focus on model integrity (Rakin et al., 2022b), such as accuracy degradation or output corruption, while DoW attacks against MoE-based LLMs remain unexplored. To fill these gaps, we

∗^{*} Equal contribution.

introduce Groundhog Bit-Flip Attack (GBFA) 1^{1}, the first bit-flip DoW attack on MoE-based LLMs. GBFA treats MoE routing as a structural attack surface: as illustrated in Figure 1, targeted bit flips in router parameters can reroute tokens away from termination-related experts, thereby delaying sequence termination. This causes substantial output inflation and increased inference cost while largely preserving semantic fidelity.

Our analysis shows that MoE experts exhibit strong specialization for termination-related tokens, including end-of-sequence (EOS) and end-of-thinking (EOT) tokens. A small set of termination-related experts disproportionately governs the generation of stops, making MoE routing a localized attack surface for availability manipulation. By applying router-level bit flips to disrupt these experts, an attacker can delay termination and induce excessive generation. This reframes bit-flip attacks from integrity-oriented attacks that degrade model accuracy or corrupt outputs into availability-oriented attacks that maximize output length while preserving apparent utility, directly leading to increased inference cost and Denial-of-Wallet risk.

This paper makes the following contributions:

• Expert–Token Specialization. We discover specialization patterns in MoE experts, showing that a small set of experts dominate EOS or EOT handling and therefore govern termination behavior.

• Systematic Detection Methodology. We introduce Global and Local Expert Detection that use activation-difference metrics to efficiently identify target-related experts that are consistently activated when specific tokens generating.

• Identify Vulnerable Bits. We show that a small number of router-weight or bias bits exert disproportionate control over target-related experts. By analyzing expert-activation sensitivity under bit-level perturbations, we identify Vulnerable Bits for GBFA.

• Structural DoW Attack Demonstration. We demonstrate structural DoW attacks on six MoE models under three LLM modes: conversational, reasoning, and agentic tasks. We further realize them with GBFA bit flips on four of these models. With only minimal parameter changes, our attacks consistently induce dramatic output inflation across all three modes, amplifying output token counts by up to 87×87 \times in the most severe cases.

References (18)