Papers › Refusal in Language Models Is Mediated by a Single Direction

Refusal in Language Models Is Mediated by a Single Direction

17 Jun 2024arXiv:2406.11717archive 2025-07-28

Andy Arditi, Oscar Obeso, Aaquib Syed, Daniel Paleka, Nina Panickssery, Wes Gurnee, Neel Nanda

Conversational large language models are fine-tuned for both instruction-following and safety, resulting in models that obey benign requests but refuse harmful ones. While this refusal behavior is widespread across chat models, its underlying mechanisms remain poorly understood. In this work, we show that refusal is mediated by a one-dimensional subspace, across 13 popular open-source chat models up to 72B parameters in size. Specifically, for each model, we find a single direction such that erasing this direction from the model's residual stream activations prevents it from refusing harmful instructions, while adding this direction elicits refusal on even harmless instructions. Leveraging this insight, we propose a novel white-box jailbreak method that surgically disables refusal with minimal effect on other capabilities. Finally, we mechanistically analyze how adversarial suffixes suppress propagation of the refusal-mediating direction. Our findings underscore the brittleness of current safety fine-tuning methods. More broadly, our work showcases how an understanding of model internals can be leveraged to develop practical methods for controlling model behavior.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology: its repositories, every harvested function with whether it ran, its licence and the call to fetch it.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.11717")

Code

Syntology Ran 12 of 15 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 12 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 12 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

andyrdt/refusal_direction officialmentioned in papermentioned on GitHubjaxApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 12 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-25; that is when this build read the record, not when the samples ran.

12ran
3unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from andyrdt/refusal_direction. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

format_instruction_gemma_chat andyrdt/refusal_direction/pipeline/model_utils/gemma_model.py official repository ran Apache-2.0 (permissive) · cfecd6ef02a68616 · report
format_instruction_llama2_chat andyrdt/refusal_direction/pipeline/model_utils/llama2_model.py official repository ran Apache-2.0 (permissive) · e433774fbe719204 · report
format_instruction_llama3_chat andyrdt/refusal_direction/pipeline/model_utils/llama3_model.py official repository ran Apache-2.0 (permissive) · 79d4e41de6f143f3 · report
format_instruction_qwen_chat andyrdt/refusal_direction/pipeline/model_utils/qwen_model.py official repository ran Apache-2.0 (permissive) · 91bb65bbcbe02944 · report
format_instruction_yi_chat andyrdt/refusal_direction/pipeline/model_utils/yi_model.py official repository ran Apache-2.0 (permissive) · 2f0cbbb3c1d6dfcf · report
refusal_score andyrdt/refusal_direction/pipeline/submodules/select_direction.py official repository ran Apache-2.0 (permissive) · af35abde0810ea46 · report
substring_matching_judge_fn andyrdt/refusal_direction/pipeline/submodules/evaluate_jailbreak.py official repository ran Apache-2.0 (permissive) · 5ccac6a33ca73bb5 · report
tokenize_instructions_gemma_chat andyrdt/refusal_direction/pipeline/model_utils/gemma_model.py official repository ran Apache-2.0 (permissive) · 57abe23529aab499 · report
tokenize_instructions_llama2_chat andyrdt/refusal_direction/pipeline/model_utils/llama2_model.py official repository ran Apache-2.0 (permissive) · 00bf117f8b25ddae · report
tokenize_instructions_llama3_chat andyrdt/refusal_direction/pipeline/model_utils/llama3_model.py official repository ran Apache-2.0 (permissive) · c180a112405739dc · report
tokenize_instructions_qwen_chat andyrdt/refusal_direction/pipeline/model_utils/qwen_model.py official repository ran Apache-2.0 (permissive) · 2ea9d470cff77a2b · report
tokenize_instructions_yi_chat andyrdt/refusal_direction/pipeline/model_utils/yi_model.py official repository ran Apache-2.0 (permissive) · e43f427d3fdea028 · report
llamaguard2_judge_fn andyrdt/refusal_direction/pipeline/submodules/evaluate_jailbreak.py official repository unverified Apache-2.0 (permissive) · 9676feab77ab828b · report
load_dataset andyrdt/refusal_direction/dataset/load_dataset.py official repository unverified Apache-2.0 (permissive) · 1e052ccbbf393dbe · report
load_dataset_split andyrdt/refusal_direction/dataset/load_dataset.py official repository unverified Apache-2.0 (permissive) · a746c0ec00a96511 · report

Tasks

Instruction Following

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections