WRDO: Weighted Refusal Direction Optimization in Aligned Language Models
Authors: Grigoriy Evseev, Vladimir Solodkin, Dmitry Bylinkin, Daniil Medyakov, Vladimir Aletov, Aleksandr Beznosikov
Organizations: Moscow Independent Research Institute of Artificial Intelligence · Basic Research of Artificial Intelligence Laboratory (BRAIn Lab) · T-Technologies · Innopolis University
Aligned large language models are trained to comply with benign requests while refusing harmful ones. However, recent work shows that this refusal behavior is fragile and can often be disrupted by simple activation- or weight-space interventions. In particular, refusal has been shown to be largely mediated by a single residual-stream direction, typically computed as a difference-of-means vector between harmful and harmless prompts. However, this standard construction aggregates heterogeneous harmful prompts into one uniform average, potentially conflating distinct refusal-related phenomena. In this work, we study whether refusal interventions can be strengthened by learning how to combine prompt-specific refusal directions. We propose Weighted Refusal Direction Optimization (WRDO), a procedure that constructs a composite refusal direction from a bank of per-prompt directions using learned aggregation weights. This approach allows different harmful prompts to contribute unequally to the final intervention direction. We evaluate WRDO against prior single-direction methods on three open-weight language models using three guard judges and HarmBench as an external evaluator. We further measure the effect of the intervention on general model capability through standard utility benchmarks. Finally, we investigate a defense-oriented setting in which the same optimization machinery is used in reverse to restore refusal behavior in an abliterated model checkpoint. Our results show that weighted aggregation provides a more effective and flexible mechanism for manipulating refusal representations.
Figures & tables
α=1.0
α=3.0
Model
Method
WG
Q3G
LG3
WG
Q3G
LG3
Qwen3-8B-Base
No intervention
0.02
0.02
0.02
0.02
0.02
0.02
Basic RD
0.22 ± 0.02
0.11 ± 0.03
0.44 ± 0.02
0.81 ± 0.03
0.80 ± 0.03
0.91 ± 0.04
Heretic
0.77 ± 0.04
0.83 ± 0.05
0.81 ± 0.05
0.77 ± 0.04
0.83 ± 0.05
0.81 ± 0.05
RDO
0.34 ± 0.05
0.41 ± 0.04
0.48 ± 0.05
0.34 ± 0.05
0.41 ± 0.04
0.48 ± 0.05
Uniform-avg WRD
0.08 ± 0.001
0.25 ± 0.01
0.32 ± 0.02
0.002 ± 0.0003
0.89 ± 0.03
0.92 ± 0.02
Table 1: Attack setup. Test ASR (in [0,1] ) on held-out harmful prompts, reported at the two extremes of the intensity grid, α∈{1.0,3.0} . Judges: WG = WildGuard, Q3G = Qwen3Guard-Gen-8B, LG3 = Llama-Guard-3-8B. Rows for α -independent methods are repeated across columns for layout consistency. Bold marks the best result in each column within each model block. Higher is a stronger attack. The intermediate intensities α∈{1.5,2.0} are reported in Table 5 of Appendix D . Every intervened cell is the mean over three independent repetitions of the full pipeline, with the standard deviation over those repetitions. Cells that would round to 0.00 are reported at three decimals; none is an exact zero.
α=1.0
α=3.0
Model
Method
ARC-e
ARC-c
MMLU
GSM8K
PPL
ARC-e
ARC-c
MMLU
GSM8K
PPL
Qwen3-8B-Base
No intervention
0.63 ± 0.01
0.38 ± 0.01
0.67 ± 0.004
0.84 ± 0.01
11.11
0.63 ± 0.01
0.38 ± 0.01
0.67 ± 0.004
0.84 ± 0.01
11.11
Basic RD
0.59 ± 0.01
0.36 ± 0.01
0.64 ± 0.004
0.67 ± 0.01
13.81
0.26 ± 0.01
0.23 ± 0.01
0.23 ± 0.004
0.00 ± 0.00
>1012
Heretic
0.51 ± 0.01
0.30 ± 0.01
0.27 ± 0.004
0.19 ± 0.01
13.44
0.51 ± 0.01
0.30 ± 0.01
0.27 ± 0.004
0.19 ± 0.01
13.44
RDO
0.63 ± 0.01
0.37 ± 0.01
0.67 ± 0.004
0.82 ± 0.01
11.16
0.63 ± 0.01
0.37 ± 0.01
0.67 ± 0.004
0.82 ± 0.01
11.16
WRD-CMAES
0.53 ± 0.01
0.34 ± 0.01
0.67 ± 0.003
0.01 ± 0.003
161.18
0.37 ± 0.01
0.29 ± 0.01
0.51 ± 0.004
0.004 ± 0.002
>104
Table 2: Utility preservation per base model, reported at α∈{1.0,3.0} . Higher is better for ARC-e, ARC-c, MMLU and GSM8K (accuracy as a fraction in [0,1] ); lower is better for PPL (WikiText word-level perplexity). Rows for α -independent methods are repeated across columns for layout consistency. Intermediate values α∈{1.5,2.0} are reported in Table 6 of Appendix E .
Qwen/Qwen3-8B
Olmo-3-7B-Instruct
Method
1.0
1.5
2.0
3.0
1.0
1.5
2.0
3.0
No intervention
0.07
0.07
0.07
0.07
0.00
0.00
0.00
0.00
Basic RD
0.22
0.31
0.46
0.48
0.51
0.77
0.68
0.66
Heretic
0.87
0.87
0.87
0.87
0.77
0.77
0.77
0.77
RDO
0.39
0.39
0.39
0.39
0.20
0.20
0.20
0.20
WRD-CMAES
0.87
0.92
0.97
0.82
0.81
0.85
0.88
0.89
Table 3: HarmBench Standard ASR (in [0,1] ) computed with cais/HarmBench-Llama-2-13b-cls , varying α and model. Bold marks the best result in each column within each model block. Higher is a stronger attack.
α=−1.0
α=−1.5
α=−2.0
α=−3.0
Method
WG
Q3G
LG3
WG
Q3G
LG3
WG
Q3G
LG3
WG
Q3G
LG3
Abliterated (no defense)
0.85
0.83
0.84
0.85
0.83
0.83
0.85
0.83
0.84
0.85
0.83
0.84
Basic RD
0.84 ± 0.02
0.85 ± 0.03
0.82 ± 0.02
0.79 ± 0.03
0.84 ± 0.02
0.79 ± 0.03
0.80 ± 0.03
0.87 ± 0.02
0.87 ± 0.03
0.63 ± 0.02
0.68 ± 0.03
0.74 ± 0.02
WRD-CMAES
0.47 ± 0.05
0.56 ± 0.04
0.53 ± 0.06
0.011 ± 0.004
0.023 ± 0.005
0.073 ± 0.004
0.021 ± 0.005
0.053 ± 0.006
0.042 ± 0.004
0.014 ± 0.005
0.086 ± 0.006
0.079 ± 0.008
WRD-GRPO-IS
0.50 ± 0.08
0.52 ± 0.07
0.47 ± 0.09
0.014 ± 0.007
0.034 ± 0.008
0.047 ± 0.006
0.015 ± 0.007
0.014 ± 0.003
0.020 ± 0.005
0.019 ± 0.009
0.015 ± 0.003
0.022 ± 0.008
Table 4: Defense setup. Test ASR (in [0,1] ) on the abliterated checkpoint, across the sign-reversed intensity α and the three judges. Lower is a stronger defense. The three intervened rows are means over three independently optimized w⋆ , with the standard deviation over those runs; the Abliterated row receives no intervention and is reported from a single evaluation. Bold marks the strongest defense per column.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
α=1.5
α=2.0
Model
Method
WG
Q3G
LG3
WG
Q3G
LG3
Qwen3-8B-Base
No intervention
0.02
0.02
0.02
0.02
0.02
0.02
Basic RD
0.33 ± 0.01
0.47 ± 0.01
0.67 ± 0.02
0.39 ± 0.03
0.87 ± 0.02
0.95 ± 0.03
Heretic
0.77 ± 0.04
0.83 ± 0.05
0.81 ± 0.05
0.77 ± 0.04
0.83 ± 0.05
0.81 ± 0.05
RDO
0.34 ± 0.05
0.41 ± 0.04
0.48 ± 0.05
0.34 ± 0.05
0.41 ± 0.04
0.48 ± 0.05
Uniform-avg WRD
0.003 ± 0.0002
0.83 ± 0.02
0.81 ± 0.01
0.002 ± 0.0002
0.89 ± 0.01
0.85 ± 0.03
Appendix
Table 5: Attack setup at the intermediate intensities α∈{1.5,2.0} , complementing the main Table 1 . Judges: WG = WildGuard, Q3G = Qwen3Guard-Gen-8B, LG3 = Llama-Guard-3-8B. Every intervened cell is a three-seed mean with the standard deviation over those repetitions; the Heretic and RDO rows repeat the values of Table 1 because neither method consumes α . Bold marks the best result in each column within each model block. Higher is a stronger attack.
α=1.5
α=2.0
Model
Method
ARC-e
ARC-c
MMLU
GSM8K
PPL
ARC-e
ARC-c
MMLU
GSM8K
PPL
Qwen3-8B-Base
No intervention
0.63 ± 0.01
0.38 ± 0.01
0.67 ± 0.004
0.84 ± 0.01
11.11
0.63 ± 0.01
0.38 ± 0.01
0.67 ± 0.004
0.84 ± 0.01
11.11
Basic RD
0.42 ± 0.01
0.26 ± 0.01
0.23 ± 0.004
0.008 ± 0.002
113.98
0.29 ± 0.01
0.22 ± 0.01
0.23 ± 0.004
0.00 ± 0.00
>107
Heretic
0.51 ± 0.01
0.30 ± 0.01
0.27 ± 0.004
0.19 ± 0.01
13.44
0.51 ± 0.01
0.30 ± 0.01
0.27 ± 0.004
0.19 ± 0.01
13.44
RDO
0.63 ± 0.01
0.37 ± 0.01
0.67 ± 0.004
0.82 ± 0.01
11.16
0.63 ± 0.01
0.37 ± 0.01
0.67 ± 0.004
0.82 ± 0.01
11.16
WRD-CMAES
0.63 ± 0.01
0.38 ± 0.01
0.64 ± 0.004
0.84 ± 0.01
11.25
0.51 ± 0.01
0.30 ± 0.01
0.47 ± 0.004
0.04 ± 0.005
64.84
Appendix
Table 6: Utility preservation per base model at the intermediate intensities α∈{1.5,2.0} , complementing the main Table 2 . Higher is better for ARC-e, ARC-c, MMLU and GSM8K; lower is better for PPL.
Method
Hyperparameter
Value
Basic RD
kl_threshold
0.1
induce_refusal_threshold
0.0
prune_layer_percentage
0.2
Heretic
n_trials / n_startup_trials
200 / 60
kl_divergence_scale / _target
1.0 / 0.01
refusal_threshold_count
0
Appendix
Table 7: Training hyperparameters for the six methods of Section 3 . Values are read verbatim from the configuration files in the released codebase. Hyperparameters shared across methods (sampling seed 42 , batch size 16 or 32 , maximum response length, system prompt) are listed in Appendix C .
Method
Approx. runtime, hours
Basic RD
∼2
Heretic
∼7
RDO
∼3
Uniform-avg WRD
∼2
WRD-CMAES
∼4
WRD-GRPO-IS
∼11
Appendix
Table 8: Approximate wall-clock runtime per method on the attack-setup experiments of Section 5.1 , on a single NVIDIA H100 80 GB GPU.
α=1.0
α=1.5
α=2.0
α=3.0
Model
Method
Opt. judge
WG
Q3G
LG3
WG
Q3G
LG3
WG
Q3G
LG3
WG
Q3G
LG3
Qwen3-8B-Base
WRD-CMAES
WG
0.89
0.89
0.92
0.91
0.92
0.95
0.95
0.96
0.96
0.90
0.93
0.92
Q3G
0.00
0.84
0.97
0.00
0.98
0.96
0.00
1.00
0.97
0.00
1.00
0.97
LG3
0.00
0.73
0.88
0.02
0.94
0.93
0.16
0.96
0.98
0.01
0.98
0.98
WRD-GRPO-IS
WG
0.91
0.94
0.90
0.93
0.95
0.92
0.95
0.96
0.94
0.95
0.96
0.93
Q3G
0.91
0.94
0.90
0.94
0.95
0.92
0.01
0.96
0.98
0.94
0.95
0.93
Appendix
Table 9: Cross-judge transfer. Test ASR (in [0,1] ) when w⋆ is optimized against the row judge and evaluated against the column judge, reported per base model, for every α∈{1.0,1.5,2.0,3.0} . Within each α block, diagonal cells coincide with the corresponding entries of Table 1 or, for α∈{1.5,2.0} , of Table 5 .
β
1
10
102
103
104
ASR (WG)
0.95
0.92
0.91
0.91
0.78
Appendix
Table 10: Attack side of the β sweep. Test ASR under WildGuard for WRD-GRPO-IS on Qwen3-8B-Base at α=1.0 . Higher is a stronger attack.
Method
−1.0
−1.5
−2.0
−3.0
Abliterated (no defense)
0.94
0.94
0.94
0.94
Basic RD
0.94
0.92
0.91
0.31
WRD-CMAES
0.47
0.03
0.00
0.03
WRD-GRPO-IS
0.47
0.02
0.00
0.00
Appendix
Table 11: Defense setup evaluated externally. HarmBench Standard ASR computed with cais/HarmBench-Llama-2-13b-cls on the abliterated checkpoint, across the sign-reversed intensity α . HarmBench is never used during optimization. Lower is a stronger defense.
Model
Method
ASR
Qwen3-8B-Base
RDO-CONE
0.953
WRD-GRPO-IS
0.93 ± 0.09
OLMo-3-1025-7B
RDO-CONE
0.865
WRD-GRPO-IS
0.92 ± 0.02
Olmo-3-7B-Instruct
RDO-CONE
0.845
WRD-GRPO-IS
0.93 ± 0.01
Appendix
Table 12: Concept-cone comparison. Test ASR under WildGuard; WRDO rows are taken at α=3.0 . The WRD-GRPO-IS rows of the upper blocks repeat the corresponding cells of Table 1 and carry its three-seed spread; the RDO-CONE and gpt-oss-20b rows are single runs. Higher is a stronger attack.
β
ARC-e
ARC-c
MMLU
GSM8K
PPL
1
0.52
0.34
0.25
0.38
261.32
10
0.51
0.36
0.34
0.43
260.13
102
0.60
0.36
0.59
0.67
150.72
103
0.63
0.38
0.65
0.83
11.15
104
0.63
0.38
0.65
0.84
11.12
Appendix
Table 13: Utility side of the β sweep, same runs as Table 10 . Higher is better for the four accuracies, lower is better for WikiText perplexity. Standard errors are 0.01 for ARC-e, ARC-c and GSM8K and 0.004 for MMLU. Bold marks the best value per column.