atlas

Research map / Large language models / Language, safety and interpretability

On the Role of Attention Heads in Large Language Model Safety

ICLR 2025 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Identifies a small set of safety-critical attention heads in aligned LLMs via a new head attribution metric (Ships) and two ablation methods (Undifferentiated Attention and Scaling Contribution), showing ablating them compromises refusal.

Problem

Existing LLM safety interpretability work focuses on neurons, representations, or residual streams and overlooks the role of multi-head attention in safety; prior head-ablation methods are judged insufficient for identifying safety heads.

Approach

Ablate attention heads by scaling their Query/Key matrices by a tiny epsilon, which makes softmax attention uniform (undifferentiated), or scaling the Value matrix to reduce contribution, and attribute safety to heads whose ablation most increases attack success rate, using a metric called Ships computed on harmful queries or datasets.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Ablate safety attention heads using Undifferentiated Attention with affirmative initial response (ablation)Llama-2-7B-chat · AdvbenchASR: 0.35 -> 0.68Hurt
Ablate safety attention heads using Undifferentiated Attention with affirmative initial response (ablation)Llama-2-7B-chat · JailbreakBenchASR: 0.47 -> 0.76Hurt
Ablate safety attention heads using Undifferentiated Attention with affirmative initial response (ablation)Llama-2-7B-chat · Malicious InstructASR: 0.35 -> 0.75Hurt
Ablate safety attention heads using Scaling Contribution with affirmative initial response (ablation)Llama-2-7B-chat · AdvbenchASR: 0.35 -> 0.40Hurt
Ablate safety attention heads using Scaling Contribution with affirmative initial response (ablation)Llama-2-7B-chat · JailbreakBenchASR: 0.47 -> 0.51Hurt
Ablate safety attention heads using Scaling Contribution with affirmative initial response (ablation)Llama-2-7B-chat · Malicious InstructASR: 0.35 -> 0.40Hurt
Ablate safety heads selected using Ships and Undifferentiated Attention (ablation)Vicuna-7B-v1.5 · Malicious InstructASR: +0.11 (generalized Ships); +0.20 (specific-query Ships)Hurt
Ablate safety heads selected using Ships and Undifferentiated Attention (ablation)Vicuna-7B-v1.5 · JailbreakBenchASR: +0.33 (generalized Ships); +0.33 (specific-query Ships)Hurt
Ablate safety heads selected using Ships and Scaling Contribution (ablation)Vicuna-7B-v1.5 · Malicious InstructASR: +0.13 (generalized Ships); +0.15 (specific-query Ships)Hurt
Ablate safety heads selected using Ships and Scaling Contribution (ablation)Vicuna-7B-v1.5 · JailbreakBenchASR: +0.08 (generalized Ships); +0.10 (specific-query Ships)Hurt

Surprising findings

Limitations

Experimental setup

Datasets: AdvBench JailbreakBench MaliciousInstruct

Benchmarks: AdvBench JailbreakBench MaliciousInstruct

Metrics: attack success rate Ships

Baselines: Safety-rank

Builds on: Safety-rank URIAL

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy