NeuRel-Attack: Neuron Relearning for Safety Disalignment in Large Language Models

Yi Zhou, Wenpeng Xing, Dezhang Kong, Changting Lin, Meng HanarXiv 2025

TL;DR

NeuRel-Attack is a highly efficient jailbreaking method that systematically strips away safety alignments in Large Language Models (LLMs) by identifying and fine-tuning the specific neurons responsible for safety constraints. By targeting less than 0.1% of the model's total parameters, this approach achieves a 96% average jailbreak success rate across multiple open-source models, exposing a critical vulnerability in current alignment techniques.

What Problem Does This Paper Address?

Modern LLMs undergo rigorous safety alignment processes—such as Reinforcement Learning from Human Feedback (RLHF) and adversarial training—to prevent them from generating harmful, unethical, or malicious content. However, these safety guardrails are often treated as a holistic overlay rather than a deeply understood internal mechanism.

Existing fine-tuning-based jailbreak attacks typically modify large chunks of model parameters (e.g., via standard LoRA), which can degrade general model capabilities or require substantial computational overhead. The authors of this paper ask a fundamental question: Can we locate the exact neurons responsible for safety constraints and selectively "erase" their alignment without disrupting the rest of the model?

Methods

The authors introduce NeuRel-Attack, a three-step pipeline designed to achieve precise safety disalignment:

  1. Neuron Activation Analysis: The model is fed two distinct prompt sets: one harmful (unlearn queries) and one harmless (retention queries). By analyzing the internal activation patterns, the method calculates the absolute activation gap to find neurons that behave differently depending on the safety of the input.
  2. Similarity-Based Neuron Identification: To refine this selection, the authors analyze neuron gradients. They compute the cosine similarity between gradients generated by harmful vs. harmless inputs. Neurons exhibiting low similarity and high gradient magnitude under harmful prompts are flagged as critical components of the safety alignment mechanism.
  3. Neuron Relearning for Safety Removal: Instead of updating the entire model, a selective fine-tuning strategy called MemFlex is deployed. It restricts parameter updates exclusively to the identified safety neurons, training them to ignore previous safety constraints while preserving the rest of the network.
Figure 2: Overall pipeline of NeuRel-Attack. Top left: The process of Neuron Activation to detect neurons that are critical for distinguishing between harmful and harmless inputs. Top right: The process of Neuron Identification, based on similarity neuron recognition, locates neurons responsible for safe alignment. Below: Our relearn method improves upon traditional forgetting methods. The selected neurons are learned to eliminate safe alignment.

Datasets

The method was evaluated using two prominent safety benchmarks:

  • AdvBench: A dataset consisting of 520 malicious queries covering harmful categories like profanity, cybercrime, threats, and misinformation.
  • MaliciousInstruct: A dataset containing 100 questions designed to elicit illegal or unsafe behaviors across ten distinct malicious intentions (e.g., tax fraud, sabotage, cyberbullying).

Key Insights and Ideas

  • Safety is Localized, Not Fully Diffuse: The most striking insight is that safety alignment is heavily concentrated within a tiny fraction of the network. The attack successfully breaks alignment by modifying as little as 0.046% of the parameters in some models.
  • The Threshold Sweet Spot: The success of the attack depends heavily on the cosine similarity threshold ($\mu$). Setting the threshold to $0.85$ yielded a 100% attack success rate. Going higher introduces weakly correlated neurons, reducing precision, while going lower misses critical safety neurons.
Figure 3: Effect of Neuron Similarity Threshold on ASR

Key Results

NeuRel-Attack was tested against four popular white-box models: Vicuna-7B, Llama-2-7B-Chat, Guanaco-7B, and Mistral-7B-Instruct.

  • High Success Rates: The attack achieved an average Attack Success Rate (ASR) of 96% across all tested models and datasets, outperforming baseline white-box attacks like PEZ, DSN, and standard LoRA fine-tuning. Notably, it achieved a 100% ASR on Llama-2-7B-Chat, a model renowned for its strict safety tuning.
  • Extreme Efficiency: Compared to standard LoRA, NeuRel-Attack reduced the number of trainable parameters by up to 83%.
  • Blazing Fast Disalignment: The targeted approach drastically cuts down training time. On the AdvBench dataset, NeuRel-Attack reached an 80% ASR within the first 50 seconds of training, whereas standard baseline methods required over 150 seconds to achieve similar results.
Figure 4: Compare the progress of ASR over training time in our approach with baseline finetuning strategies

Limitations and Future Work

Despite its efficacy, the authors note several limitations:

  • Forensic Detectability: Because the attack makes highly localized modifications to specific neurons, it leaves a distinct statistical footprint that could potentially be caught by gradient-based anomaly detection or neuron importance scoring.
  • Scalability Bottlenecks: Tracking and analyzing individual neuron activations across billions of parameters is computationally expensive, which may limit its direct application to massive frontier models without optimization.
  • The Localization Assumption: The attack assumes safety is localized. If future alignment techniques manage to distribute safety representations evenly across the entire network, this style of attack may become less effective.

To counter these vulnerabilities, the authors recommend that future AI safety research focuses on proactive defenses, such as embedding behavioral watermarks or implementing hardcoded external safety layers that operate independently of the base model's internal weights.

Summary updated

BibTeX
@misc{zhou2025neurel,
  author = {Yi Zhou and Wenpeng Xing and Dezhang Kong and Changting Lin and Meng Han},
  title = {{NeuRel-Attack: Neuron Relearning for Safety Disalignment in Large Language Models}},
  year = {2025},
  eprint = {2504.21053},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.21053},
}
Figure