arXiv:2610.29555cs.LGOct 2026

Manuscript Offprint

arXiv:2610.29555

WRDO: Weighted Refusal Direction Optimization in Aligned Language Models

Grigoriy Evseev, Vladimir Solodkin, Dmitry Bylinkin, Daniil Medyakov, Vladimir Aletov, Aleksandr Beznosikov

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Grigoriy Evseev1,2^{1,2}, Vladimir Solodkin1,2,3^{1,2,3}, Dmitry Bylinkin1,2^{1,2}, Daniil Medyakov1,2^{1,2}, Vladimir Aletov1,2^{1,2}, Aleksandr Beznosikov1,2,4^{1,2,4}

1^{1}Moscow Independent Research Institute of Artificial Intelligence

2^{2}Basic Research of Artificial Intelligence Laboratory (BRAIn Lab)

3^{3}T-Technologies

4^{4}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. Code is available at https://github.com/brain-lab-research/WRDO

Introduction

Large language models deployed in user-facing settings are aligned to follow benign instructions and to refuse harmful ones, with this behavior shaped by a combination of supervised fine-tuning, instruction tuning and preference optimization [1, 2]. The resulting refusal mechanism is, in practice, brittle under both prompt-level adversarial attacks [3, 4] and direct interventions on the model itself, which has motivated a mechanistic line of work that asks how refusal is represented internally and which components of the model implement it. A central finding of this line is that refusal is, to a first approximation, mediated by a single direction in the residual stream of the transformer [5]: ablating one difference-of-means vector, computed between activations on harmful and harmless prompts at a chosen layer, is sufficient to disable refusal in a broad set of open-weight aligned models. The same work establishes an equivalence between activation ablation and weight-space orthogonalization of the attention output and feed-forward down projections, which makes the intervention a one-shot edit of the model with no inference-time overhead, and public toolkits such as Heretic [6] operationalize this recipe end-to-end.

The standard procedure averages every harmful prompt into a single axis. A disinformation prompt, a malware prompt and a privacy-violation prompt all enter the same mean, and the resulting direction is diffuse in the sense that it conflates phenomena that need not be aligned in the residual stream. A natural alternative is to retain a per-prompt direction rir_i for each training prompt and to combine them with a coefficient vector ww. The simplest combination is the uniform average, r=normalize(∑iri/N)r = \text{normalize}(\sum_i r_i/N), but there is no a priori reason for every prompt to contribute equally. Performance-aware weighted aggregation is known to beat uniform averaging whenever the aggregated components differ in quality, from ensembling ranked classifiers [7] to federated averaging [8] and adapter selection [9], and per-prompt refusal directions are heterogeneous in exactly that way. In this work, we research the question of whether computing refusal direction using the aggregation weights yields a stronger intervention than the single-direction recipe.

References (28)