HARC: Coupling Harmfulness and Refusal Capabilities for Robust Safety Alignment
Shei Pern Chua, Fangzhao Wu
NeurIPS page · OpenReview · Open on the map
Category: AI Safety, Security & Alignment › LLM Safety Alignment · Type: new method · Keywords: LLM safety alignment, harmfulness refusal coupling, jailbreak robustness, language model alignment, safety fine-tuning
Areas: Safety & Security › Safe Alignment › Refusal and Activation Steering; Evaluation & Benchmarks › Language Model and Agent Safety › LLM Safety Evaluation
Summary
HARC couples harmfulness and refusal directions in LLMs to improve safety alignment while preserving capability.
Explained to a 5-year-old
We want AI to say no to bad requests. The AI stores two ideas: one for being bad and one for saying no. Attackers can trick the AI by turning off the "no" idea, so it says bad things. We found a way to link those two ideas together so that if one changes, the other changes too, making it harder to trick the AI. This helps the AI stay safe while still being helpful.
Explained to a 5-year-old, longer
Imagine a chatbot that is supposed to be nice and not say anything mean. It has two secret buttons inside its brain: one for "mean" and one for "stop". When you ask it something bad, it should press the "stop" button and say no. But some clever people can make the chatbot press the "stop" button too early, so it says something mean anyway. We looked at how the chatbot stores these two ideas and saw that they are separate. We also saw that even while the chatbot is typing an answer, it can still know that what it is writing is mean, even if it said no at the start. To fix this, we created a new method called HARC that ties the "mean" and "stop" ideas together, so they always move together. This way, if someone tries to turn off the "stop" idea, the "mean" idea also changes, making it much harder to get the chatbot to say something bad. HARC only changes these two special ideas, leaving everything else in the chatbot the same, so it stays helpful and doesn’t start saying no to everything. We tested HARC on many different chatbots and it worked better than all the other safety methods we tried.
For a technical reader
The paper finds that aligned language models store harmfulness and refusal as separate directions, which can be suppressed by jailbreaks either before generation or while the model is writing. It also shows that models can recognize harmful content during generation even when they refused it at the prompt. To address this, the authors introduce HARC, a fine-tuning technique that pairs the harmfulness and refusal directions across both prompt and response tokens, limiting changes to that subspace. HARC achieves the best trade-off among six baseline safety methods on robustness, capability, and usability across five model families and two scales. Because only the harmfulness-refusal subspace is altered, general capabilities remain intact and over-refusal does not increase.
Problem
Aligned language models often encode harmful and refusal information in separate directions, making them vulnerable to attacks that suppress one direction and cause harmful generation. This creates safety risks where models can be tricked into producing harmful content despite being intended to refuse.
Method
The approach identifies harmfulness and refusal directions in the model's residual stream and couples them by fine-tuning so that these directions are aligned across both prompt and response tokens, confining the intervention to the harmfulness-refusal subspace.
Results
The approach shows the strongest robustness-capability-usability trade-off among six baseline safety methods.
Contributions
It reveals that jailbreaks can suppress harmfulness or refusal directions at prompt encoding and that models can recognize harmful content during generation even when they refuse at input. It also introduces a technique to couple these directions across prompt and response positions, improving safety alignment while preserving general capabilities.
Practical relevance
Improves the safety of large language models, making them more robust against jailbreaks while maintaining their useful capabilities.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction