GateBreaker: A training-free safety alignment attack framework for MoE large modelsGateBreaker: Gate-Guided Attacks on Mixture-of-Expert LLMs
The authors propose GateBreaker, which masks an average of 2.6% of neurons in the target layer at inference time, raising the average ASR of 8 MoE LLMs on StrongREJECT from 7.4% to 64.9%.
White-box inference-time attack. The attacker has access to a self-hosted malicious deployment or a compromised service environment, can observe the model's internal state at inference time and insert lightweight runtime hooks to modify the activation values of selected neurons, but cannot modify model hyperparameters, architecture configuration, training data, or perform fine-tuning.
- MoE large language models dynamically and sparsely activate experts through gating. Because the distribution of safety alignment mechanisms within MoE is not yet clear, harmful inputs may exploit routing paths to bypass safety defenses, while existing safety research mainly targets dense models or stays at the coarse-grained expert level, lacking fine-grained neuron-level safety mechanism and attack research.
- The authors design a training-free inference-time attack called GateBreaker: first, gate analysis identifies candidate experts that frequently process harmful inputs; then, within experts, safety neurons are localized based on activation differences between harmful and benign inputs; finally, at inference time, the activation values of safety neurons are zeroed out, weakening the refusal mechanism while maintaining routing and benign capabilities.
- On 8 MoE LLMs, masking an average of 2.6% of neurons in target layers raised the average ASR from 7.4% to 64.9% (Table 2). The attack transferred between models of the same family with an average single-sample ASR of 66.1%, and achieved an average ASR of 60.9% on 5 MoE VLMs (Tables 3 and 4).
- The authors note that their attack is a white-box setting, and future work needs to explore black-box attacks based on surrogate models; in addition, it only targets inference-time activation modification, which can be defended against through multi-expert safety redundancy or internal activation verification. The experiments cover 8 text MoE models and 5 MoE VLMs, focusing on single-turn attacks, and do not report variance across multiple repeated samplings.
- Evaluated models
- GPT-OSS-20BQwen3-30B-A3B-Instruct-2507Phi-3.5-MoE-InstructMixtral-8x7B-Instruct-v0.1Qwen1.5-MoE-A2.7B-ChatDeepseek-MoE-16b-ChatHunyuan-A13B-InstructOpenPangu-Pro-MoE-72BGPT-OSS-120BGPT-OSS-20B-math7kCAI-20BANITA-NEXT-20B-gpt-oss-ITAQwen3-30B-A3BQwen3-30B-A3B-Thinking-2507notux-8x7b-v1Qwen1.5-MOE-sft-nemotron-codeQwen1.5-MoE-A2.7B-WikihowDeepseek-VL2-SmallDeepseek-VL2Kimi-VL-A3B-Instruct
- Benchmarks
- StrongREJECTCoLARTEWinoGrandeOpenBookQAARC Challenge
- Metrics
- ASRSafety Neuron RatioAccuracy
The researchers propose GateBreaker, a training-free, lightweight, and architecture-agnostic attack framework that can break the safety alignment of MoE large language models at inference time. The method consists of three steps: first, gate-layer profiling to identify safety experts that are overly activated by harmful inputs; then, expert-level localization to pinpoint safety neurons associated with refusal responses; finally, zeroing out the activations of these neurons at inference time to achieve targeted safety removal. On eight aligned MoE large language models, masking only about 3% of neurons in the target layer raises the average attack success rate from 7.4% to 64.9%, with limited degradation in general capabilities. Safety neurons can transfer across models in the same family, and a one-shot transfer attack raises the average attack success rate from 17.9% to 67.7%, with the highest gain reaching 91.2%. The method also applies to five MoE vision-language models, achieving a 60.9% attack success rate on unsafe image inputs.
Why it was selectedThe paper provides a method for locating and masking safety neurons in MoE large models at inference time, and reports attack success rates that transfer across models, which can serve as a reference for assessing MoE deployment risks.
Paper analysis
What problem does this paper attempt to solve?
The authors state that the safety mechanisms of MoE models are highly concentrated in a small number of neurons, aiming to address the problems that the safety alignment mechanism under MoE architectures is unknown and that it is vulnerable to targeted disruption at inference time.
Core Question: How to reveal and disrupt the safety alignment mechanism of MoE LLMs at inference time without fine-tuning or breaking benign general capabilities.
- MoE Safety Mechanism and Scenario Importance: The authors note that the Mixture-of-Experts (MoE) architecture reduces computational overhead by dynamically activating a subset of parameters through gating, but its conditional computation routes different inputs to different experts, causing safety alignment mechanisms to be no longer uniformly distributed, providing a potential pathway for harmful inputs to bypass defenses.
- Gaps in Existing Safety Research: The authors state that existing LLM safety research focuses almost entirely on dense architectures, and research on MoE-specific safety properties is still in its infancy; existing work operates only at the coarse-grained expert level (e.g., SAFEx), assuming the existence of dedicated safety control experts, and ignores the fine-grained neuron-level properties of the latest diverse MoE architectures.
- Core Observation and Hypothesis: The authors hypothesize that safety alignment does not eliminate the model's underlying harmful generation capability, but rather acts like a blocking mechanism; in MoE models, safety behavior is not borne by a single dedicated expert independently, but is jointly realized by a few key neurons coordinated by sparse routing, forming an exploitable "safety trap."
- Proposed Approach: The authors propose GateBreaker, which selects candidate safety experts through gate-level profiling, localizes safety neurons deep within experts, and zeroes out the activations of these neurons at inference time to disable safety alignment.
- Threat Model:
- Attacker Goal: To disrupt the safety alignment of deployed MoE LLMs at inference time, inducing the model to generate harmful outputs for malicious prompts while maintaining general utility on benign tasks.
- Attacker Knowledge and Capabilities: White-box setting; the attacker operates in a self-hosted malicious deployment or compromised service environment (e.g., insider or supply chain attacks), can observe the model's internal state, and can insert lightweight runtime hooks at inference time to modify the activations of selected neurons.
- Attack Constraints: The attacker cannot modify the model's hyperparameters, architecture configuration, or training data, and cannot fine-tune the model.
- Victim Systems: Covers various MoE architectures based on open-source weights, including Sparse MoE, Mixture MoE, and Grouped Mixture MoE, as well as multimodal MoE vision-language models.
What related research exists?
The paper reviews dense LLM jailbreaks and neuron interpretability, MoE-specific safety vulnerabilities, and expert-level coarse-grained attacks, noting that it focuses on neuron-level inference-time attacks.
The paper reviews related work from three aspects: dense model attacks, MoE-specific vulnerabilities, and expert-level safety analysis:
Jailbreaks and Safety Neuron Manipulation in Dense LLMs
- Fixed templates and adaptive prompts: Early jailbreaks relied on fixed prompt templates such as role-playing, hidden instructions, and obfuscation (Perez & Ribeiro, 2022; Shen et al., 2024; Li et al., 2023), later evolving into fuzzing (Yu et al., 2023), gradient-based prompt optimization (Wen et al., 2023; Zou et al., 2023), and generative LLM iterative optimization (Chao et al., 2023; Chang et al., 2024). The authors note that these methods all stay at input-level prompt attacks, ignoring the internal mechanisms of safety alignment.
- Neuron-level analysis and manipulation: Neuron interpretability research (Geva et al., 2022; Anthropic, 2024) shows that individual neurons can encode specific concepts; recent studies show that pruning or modifying safety-related neurons in dense models can greatly reduce refusal rates (Wu et al., 2026; Wei et al., 2024; Chen et al., 2024).
Safety Vulnerabilities Specific to MoE Architectures
- Routing mechanism-related risks: Hayes et al. (2024) point out that cross-batch routing strategies can be used for integrity and availability attacks; Wang et al. (2025) achieve backdoor attacks through dormant expert poisoning; Yona et al. (2024) exploit routing tie side channels to leak user prompts.
Safety Alignment Bypass Attacks on MoE Architectures
- Expert-level safety control and pruning: Lai et al. (2025) proposed SAFEx, which reduces refusal rates by identifying and masking safety control experts. The authors note that SAFEx operates at the coarse-grained expert level and relies on the assumption that dedicated safety experts exist.
Comparison Baselines and Evaluation Benchmarks
- Baseline methods: The paper uses SAFEx as the only inference-time MoE attack comparison baseline and reproduces it on the 8 MoE models evaluated in this work; it also sets a 0% unpruned baseline and two random pruning baselines (R1 random across the whole network, R2 random within safety experts).
- Evaluation benchmarks: The experiments use StrongREJECT as the primary attack evaluation benchmark; expert profiling uses the LLM-LAT harmful dataset, JailbreakV-28k jailbreak prompts, and the Natural Questions benign dataset; general utility evaluation uses CoLA, RTE, WinoGrande, OpenBookQA, and ARC Challenge.
Positioning of This Work Relative to Existing Work
- The authors note that, compared to SAFEx's coarse-grained whole-expert pruning and analysis based on binary jailbreak labels, GateBreaker operates at the fine-grained neuron level, combining gate activation frequency with harmful/benign activation differences, avoiding destructive whole-block expert removal, and achieving more precise and efficient dismantling of safety mechanisms.
How does the paper address this problem?
GateBreaker filters high-frequency candidate experts through gating feature analysis, locates safety neurons using the mean difference between harmful and benign activations, and zeroes their activations at inference time.
The authors propose GateBreaker, a training-free, architecture-agnostic inference-time attack framework that, through three stages—gate-level feature analysis, intra-expert neuron localization, and targeted safety removal—suppresses safety neurons at specific points without changing the model's gated routing.
Runtime Computation Graph Patching and Input Filtering
- Unified decoupling of the computation graph: To address the problems that in actual MoE implementations the gate projection is tightly fused with expert computation (e.g., GPT-OSS), that gate logits outputs are lacking (e.g., DeepSeek-MoE), or that customized capacity dispatch logic is included (e.g., Hunyuan-A13B), the authors design a runtime patching system that decouples independent gate modules and expert modules without changing weights or architecture, exposing the intermediate activations of each token.
- Semantic token filtering: When extracting gate and neuron activations, chat-template format tokens and padding tokens in the input prompt are masked out, retaining only the semantic tokens corresponding to the user question, to prevent non-semantic tokens from distorting expert activation statistics.
Stage One: Gate-level Profiling
- Activation frequency statistics: For each harmful input in the harmful prompt dataset, the hit situation of the experts selected by the gate at each layer is recorded and normalized by prompt length into expert activation frequency.
- Expert utility score: The expert utility score formula is defined as: Ul,j = 1/(|Dharm|) ∑M ∈ Dharm fl,j(M) This formula computes the average activation frequency of the j-th expert at layer l over the entire harmful prompt dataset, quantifying the statistical association between the expert and the processing of harmful inputs.
- Candidate safety expert selection: To cover potential safety pathways, a conservative strategy is adopted, selecting the top-3k experts by average activation frequency in each MoE layer as candidate safety experts (k is the model's default number of experts activated per token).
Stage Two: Expert-level Localization
- Sub-layers of interest and feature aggregation: For sparse experts, activations are recorded only when their conditional input is activated; for shared experts, all token activations are collected; the analysis focuses on the gate-projection and up-projection sub-layers in the MLP, and token activation vectors are aggregated by element-wise maximum to capture peak responses.
- Safety weight definition: Using a harmful dataset and a benign dataset of equal size, the activation difference of a neuron on the two datasets is computed: wl,j,n = 𝔼M ∈ Dharm[vl,j(M)n] − 𝔼B ∈ Dbenign[vl,j(B)n] This formula represents the difference in mean aggregated activation of neuron n under harmful inputs and benign inputs; the larger the positive value, the stronger the association with refusal behavior.
- Outlier screening: The safety weights of neurons within each expert are z-score standardized, and outlier neurons satisfying a standardized score greater than the threshold τ = 2 are identified as safety neurons.
Stage Three: Targeted Safety Removal and Inference-Time Blocking
- Inference-time activation zeroing: During the inference forward pass, without retraining or modifying model weights, the post-activation values of the selected safety neurons are directly forced to 0 through runtime hooks.
- Safety trap mechanism: The gating network still normally routes harmful tokens to high-frequency experts, but the key neurons responsible for refusal within the experts have been silenced, allowing the underlying generation capability to bypass safety alignment and output directly.
What experiments did the paper conduct?
Experiments cover 8 MoE LLMs and 5 MoE VLMs, showing that lightweight inference-time neuron pruning can substantially increase ASR while maintaining benign utility relatively well.
Experimental Setup
- Tested Models: Evaluation covers 8 mainstream open-source MoE LLMs, including GPT-OSS-20B (Sparse, 32 experts, Top-4), Qwen3-30B-A3B-Instruct-2507 (Sparse, 128 experts, Top-8), Phi-3.5-MoE-Instruct (Sparse, 16 experts, Top-2), Mixtral-8x7B-Instruct-v0.1 (Sparse, 8 experts, Top-2), Qwen1.5-MoE-A2.7B-Chat (Mixture, 60 sparse + 4 shared, Top-4), Deepseek-MoE-16b-Chat (Mixture, 64 sparse + 2 shared, Top-6), Hunyuan-A13B-Instruct (Mixture, 64 sparse + 1 shared, Top-8), OpenPangu-Pro-MoE-72B (Grouped Mixture, 64 sparse + 4 shared, Top-8); the main text also adds GPT-OSS-120B.
- Datasets and Scale: Main attack evaluation uses the StrongREJECT benchmark (containing over 300 malicious prompts across multiple safety categories); profiling uses the LLM-LAT harmful dataset and the Natural Questions benign dataset; reproducing SAFEx uses 20,000 harmful requests and 20,000 jailbreak prompts from JailbreakV-28k; utility evaluation uses CoLA, RTE, WinoGrande, OpenBookQA, and ARC Challenge; multimodal experiments convert StrongREJECT into image-text inputs, supplemented with 500 NSFW images.
- Baseline Methods: Inference-time expert pruning baseline SAFEx, 0% unpruned baseline, and full-network random pruning R1 and random pruning within safety experts R2.
- Metric Definitions: Attack Success Rate (ASR, proportion of outputs judged harmful or violating by review models), Safety Neuron Ratio (Ratio, percentage of modified neurons among all neurons in target layers), Utility Benchmark Accuracy (Accuracy).
- Review Method: Llama-Guard-3-8b as primary review model, supplemented by second review model Qwen3Guard-Gen-8B to prevent judge hacking, with human spot checks to exclude gibberish.
- Samples and Repetition: StrongREJECT contains over 300 samples; the paper does not report random seeds and variance for multiple repeated sampling.
Main Results
Swipe horizontally to read the table
Target Model 0% Pruning (Baseline) 50% Pruning 100% Pruning Neuron Ratio GPT-OSS-20B 1.6% 33.9% 80.2% 2.4% Qwen3-30B-A3B-Instruct-2507 0.3% 24.3% 56.9% 2.7% Phi-3.5-MoE-Instruct 0.6% 17.3% 56.5% 2.8% Mixtral-8x7B-Instruct-v0.1 12.5% 53.7% 64.2% 2.9% Deepseek-MoE-16b-Chat 22.0% 50.8% 53.6% 2.6% Hunyuan-A13B-Instruct 10.9% 49.8% 76.9% 2.6% OpenPangu-Pro-MoE-72B 6.1% 42.5% 73.1% 2.6% Per Table 2. Note: as required, the table does not exceed 8 rows, omitting Qwen1.5-MoE-A2.7B-Chat (0% at 5.1%, 50% at 54.0%, 100% at 57.8%, ratio 2.4%) and the Average row (0% at 7.4%, 50% at 40.8%, 100% at 64.9%, ratio 2.6%); the table already includes the model with the lowest ASR under 100% pruning, Deepseek-MoE-16b-Chat.
- Layer Depth Distribution: The authors state that as the number of pruned layers increases, ASR improves for all models, indicating that MoE safety alignment behavior is distributed across the full network depth, not limited to shallow layers.
- Effectiveness of Extremely Low Parameter Intervention: The authors note that modifying an average of 2.6% of neurons in target layers can dismantle safety mechanisms, and even pruning only the first half of layers (50% pruning) achieves an average ASR of 40.8%.
- Separation of Reasoning Capability and Safety Alignment: The authors state that instruction-tuned models with strong reasoning capabilities (such as GPT-OSS-20B and OpenPangu-Pro-MoE-72B) also achieve high ASR, and on the larger GPT-OSS-120B, ASR rises from 1.3% to 69.0%, suggesting reasoning and alignment may be structurally decoupled.
Cross-Model Single-Sample Transfer Attack
- Test Content: Directly reusing safety neuron masks identified from source models on same-family derivative models (including math reasoning, marketing, specific language, programming, and general knowledge variants) without re-profiling (Table 3).
- Experimental Results: Average baseline ASR is 17.9%; after applying GateBreaker single-sample transfer, average ASR rises to 66.1%. For example, GPT-OSS-20B transfers to CAI-20B from 0.0% to 84.0%, and to ANITA-NEXT-20B from 0.0% to 82.4%; Qwen1.5-MoE-A2.7B-Chat transfers to the Wikihow variant from 17.5% to 67.7% (Table 3).
- Authors' Interpretation and Exceptions: The authors believe same-family derivative models share base architecture and alignment strategies, with safety neurons being structurally conservative; an exception is the code-specialized model Qwen1.5-MOE-sft-nemotron-code, whose baseline ASR is already high at 88.9%, rising only slightly to 91.2% after transfer. The authors speculate that code fine-tuning data changed attention distributions, disrupting or overwriting safety neurons learned during pretraining.
MoE Multimodal Vision-Language Model Attacks
- Test Content: Evaluated on Deepseek-VL2 series and Kimi-VL family, totaling 5 MoE VLMs, converting StrongREJECT prompts to image-text inputs, and testing cross-model single-sample transfer (Table 4).
- Experimental Results: Unmodified average baseline ASR is 20.8%; after applying GateBreaker, average ASR rises to 60.9%, with average target-layer safety neuron ratio of 2.4%; single-sample transfer on two Thinking variants reaches ASR of 54.0% and 57.8%, respectively (Table 4).
- Authors' Interpretation and NSFW Experiment: The authors believe VLM safety alignment is still primarily mediated by MoE in the language component; additionally, in the auxiliary experiment with 500 NSFW images, none of the tested VLMs refused, and the authors report these models are not aligned against NSFW content itself.
Comparison with Existing Methods and General Utility Evaluation
- Test Content: Compared ASR with inference-time MoE attack method SAFEx on all 8 models (Table 5), and evaluated general utility changes on 5 standard NLU and reasoning benchmarks (Table 6).
- Experimental Results: GateBreaker achieves average ASR of 64.9%, exceeding SAFEx's 29.9% (Table 5); in utility evaluation, RTE average accuracy changes from 80.8% to 77.9%, CoLA from 74.9% to 70.2%, while WinoGrande, OpenBookQA, and ARC change less (Table 6), with some models (e.g., GPT-OSS-20B on RTE) showing slight performance improvement.
- Authors' Interpretation: The authors state GateBreaker operates at the neuron level, avoiding SAFEx's coarse-grained whole-expert deletion that damages model capability, achieving higher attack success while better preserving general language and reasoning abilities.
Other Ablations and Analyses
- Sparse vs. shared expert ablation (Table 7): pruning only sparse experts gives average ASR of 38.8%, only shared experts 36.6%, and both 65.3%.
- Intra-expert sublayer ablation (Table 8): pruning only gate projection layers gives average ASR of 55.9%, only up-projection layers 20.6%, and both 64.9%.
- Candidate safety expert count ablation (Table 9): with Top-k, Top-2k, and Top-3k experts, average ASR is 37.0%, 51.3%, and 64.9%, respectively.
- z-score filtering threshold ablation (Table 10): with threshold tau of 1, 2, and 3, average ASR is 71.6% (some models output collapse), 64.9%, and 42.5%, respectively.
- Neuron suppression strength ablation (Table 12): with suppression strengths of 35%, 65%, and 100%, average ASR is 22.4%, 45.0%, and 64.9%, respectively.
- Random neuron pruning control (Table 13): full-network random pruning R1 gives average ASR of 7.8%, random pruning within safety experts R2 gives 11.8%, and GateBreaker gives 64.9%.
What are some points that can be further explored?
The authors point out limitations such as the white-box assumption, inference-time activation modification, and single-turn attacks, and suggest future work on black-box attacks based on proxy models and multi-expert safety redundancy defenses.
Limitations and future directions noted by the authors
- Extension to black-box attack scenarios: The authors note in Section 8 that GateBreaker is designed for white-box settings; future work could explore using open-source MoE models as proxy models to identify activation patterns and construct adversarial prompts that bypass safety experts to attack black-box or closed-source MoE models.
- Response to inference-time defenses: The authors note in Section 8 that, because GateBreaker relies on activation modification at inference time, service providers could in the future implement defenses by monitoring or validating internal activations and key layers (e.g., checksums).
- Building multi-expert safety redundancy: The authors note in Section 8 that safety alignment in current MoE models is concentrated in a few neurons; future training could explicitly introduce safety redundancy across experts (e.g., load-balancing-aware alignment objectives, cross-expert contrastive regularization), or integrate safety constraints more deeply into reward modeling and fine-tuning stages (e.g., RLHF/DPO targeting individual experts or expert ensembles).
- Single-turn attack limitation: The authors note in Section 3.1 that this work focuses on single-turn attacks; multi-turn attacks would require repeated or permanent injection.
Experimental coverage
- Number and architecture types of tested models: The evaluation covers 8 open-source text MoE LLMs (GPT-OSS-20B, Qwen3-30B-A3B-Instruct-2507, Phi-3.5-MoE-Instruct, Mixtral-8x7B-Instruct-v0.1, Qwen1.5-MoE-A2.7B-Chat, Deepseek-MoE-16b-Chat, Hunyuan-A13B-Instruct, OpenPangu-Pro-MoE-72B) and 5 MoE VLMs, with GPT-OSS-120B additionally tested in the main text.
- Benchmark dataset coverage: Attack effectiveness is evaluated using the StrongREJECT benchmark containing over 300 English harmful prompts; utility evaluation uses 5 natural language understanding and reasoning datasets: CoLA, RTE, WinoGrande, OpenBookQA, and ARC Challenge.
- Comparison baseline coverage: The inference-time comparison baseline includes only SAFEx (reproduced on 8 models); control experiments include a 0% unpruned baseline and two random neuron pruning baselines (R1 and R2).
- Defense mechanism evaluation: The experiments only performed activation pruning on models without added defense guardrails; no adaptive attack evaluation was conducted against systems that have deployed runtime activation detection or validation defenses.
- Evaluation metrics and sample statistics: Two automated judges, Llama-Guard-3-8b and Qwen3Guard-Gen-8B, were used together with manual spot checks; the paper does not report variance or confidence intervals across repeated sampling.
Summarize the main content of the paper
The authors state GateBreaker reveals the vulnerability of MoE safety mechanisms concentrated in a few neurons, achieving high ASR attacks through lightweight inference-time activation zeroing.
GateBreaker is a study of attacks on and mechanisms of the inference-time safety alignment of mixture-of-experts (MoE) large language models.
- Problem addressed: As MoE architectures are widely adopted in large language models, their sparse activation and conditional computation characteristics change the distribution of computational pathways, but the organizational principles of their internal safety alignment mechanisms remain unclear, and there is a lack of fine-grained safety analysis and inference-time attack methods.
- Core mechanism of the method: GateBreaker uses a training-free three-stage inference-time pipeline. First, gate activation frequency statistics identify candidate safety experts that frequently process harmful inputs; then, based on the mean activation difference between harmful and benign inputs, key safety neurons are localized within experts; finally, at inference time, runtime hooks zero out the activation values of selected neurons, suppressing refusal behavior while maintaining original routing and general capabilities.
- Main attack effect: On 8 mainstream open-source MoE LLMs, modifying only an average of 2.6% of neurons in the target layer raises the average ASR on StrongREJECT from 7.4% without modification to 64.9%, exceeding the expert-level pruning baseline SAFEx's 29.9% (Tables 2, 5).
- Cross-model transfer and multimodal extension: In one-shot transfer attacks across models in the same family, safety neurons extracted from the source model raise the target model's average ASR from 17.9% to 66.1% (Table 3); on 5 MoE vision-language models, GateBreaker raises the average ASR on harmful image-text inputs from 20.8% to 60.9% (Table 4).
- General utility preservation: On 5 natural language understanding and reasoning benchmarks, the modified models show no substantial average performance decline (e.g., RTE average accuracy changes from 80.8% to 77.9%, Table 6), and some models improve slightly on specific tasks.
- Authors' conclusions and implications: The authors argue that the safety alignment of current MoE models is highly concentrated in a very small number of neurons coordinated by sparse routing, creating a structural vulnerability; they suggest that future work should enhance cross-expert safety redundancy during training, or introduce internal activation monitoring at the deployment end to strengthen defenses.