paper-with-me

홈 › Papers

Finding Safety Neurons in Large Language Models

2024-06-20 · Jianhui Chen, Xiaozhi Wang, Zijun Yao, Yushi Bai, Lei Hou, Juanzi Li

Large language models (LLMs) excel in various capabilities but also pose safety risks such as generating harmful content and misinformation, even after safety alignment. In this paper, we explore the inner mechanisms of safety alignment from the perspective of mechanistic interpretability, focusing on identifying and analyzing safety neurons within LLMs that are responsible for safety behaviors. We propose generation-time activation contrasting to locate these neurons and dynamic activation patching to evaluate their causal effects. Experiments on multiple recent LLMs show that: (1) Safety neurons are sparse and effective. We can restore $90$% safety performance with intervention only on about $5$% of all the neurons. (2) Safety neurons encode transferrable mechanisms. They exhibit consistent effectiveness on different red-teaming datasets. The finding of safety neurons also interprets "alignment tax". We observe that the identified key neurons for safety and helpfulness significantly overlap, but they require different activation patterns of the shared neurons. Furthermore, we demonstrate an application of safety neurons in detecting unsafe outputs before generation. Our findings may promote further research on understanding LLM alignment. The source codes will be publicly released to facilitate future research.

📄 PDF Abstract BibTeX arXiv:2406.14144

Code (0)

등록된 구현이 없습니다.

Tasks

MisinformationRed TeamingSafety Alignment

Methods 이 논문이 사용한 방법론

Patching Activation patching studies the model's computation by altering its latent representations, the token embeddings in transformer-based language models, during the inference process

Similar Papers 제목 키워드 기반

A Single Neuron Is Sufficient to Bypass Safety Alignment in Large Language Models

2026-05-08 · Hamid Kazemi, Atoosa Chegini, Maria Safi arxiv

Safety alignment in language models operates through two mechanistically distinct systems: refusal neurons that gate whether harmful knowledge is expressed, and concept neurons that encode the harmful knowledge itself. B…

Prompt Engineering

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

2025-04-29 · Yi Zhou, Wenpeng Xing, Dezhang Kong, Changting Lin 외

Safety alignment in large language models (LLMs) is achieved through fine-tuning mechanisms that regulate neuron activations to suppress harmful content. In this work, we propose a novel approach to induce disalignment b…

Safety Alignment

NLSR: Neuron-Level Safety Realignment of Large Language Models Against Harmful Fine-Tuning

2024-12-17 · Xin Yi, Shunfan Zheng, LinLin Wang, Gerard de Melo 외

The emergence of finetuning-as-a-service has revealed a new vulnerability in large language models (LLMs). A mere handful of malicious data uploaded by users can subtly manipulate the finetuning process, resulting in an …

One Anchor for All: Unified Multilingual and Multimodal Safety Alignment for LVLMs

2026-07-30 · Enyi Shi, Fei Shen, Chuancheng Shi, Linxia Zhu 외 arxiv

As large vision-language models (LVLMs) are deployed globally, the combination of multilingual instructions and visual information makes malicious attacks more covert and sophisticated than ever before. However, existing…

Targeted Interpretable Safety Neuron Enhancement for Multilingual Vision-Language Large Models

2026-04-10 · Enyi Shi, Fei Shen, Shuyi Miao, Linxia Zhu 외 arxiv

With the widespread deployment of vision-language large models (VLLMs), their safety alignment faces dual challenges across languages and modalities. Existing methods model multilingual and multimodal safety separately, …