Why Safety Alignment is Fragile: The Removability of Refusal Mechanisms
Open-weight models typically undergo safety alignment, such as SFT, RLHF, and DPO, before release to ensure they refuse harmful requests. However, once weights are public, these behavioral constraints can be easily bypassed. This article explores how refusal behaviors are internally represented within models and the theoretical basis for their removal. It further examines the implications for model publishers and deployers, offering engineering practices for defense, hardening, and evaluation metrics to emphasize the shift from training-time alignment to system-level continuous security.
1. Background: How Much Alignment Constraint Remains After Weight Publication
Safety alignment in open-weight models is typically completed prior to release, commonly involving Supervised Fine-Tuning (SFT), Reinforcement Learning from Human Feedback (RLHF), and Direct Preference Optimization (DPO). This training ensures that models output refusal responses when faced with requests involving illegal activities, violence, discrimination, and other sensitive topics.
Once the weights are public, anyone can modify the parameters locally. The behavioral constraints established during the alignment phase are no longer controlled by the publisher. Recently, there have been multiple instances in the open-source community where “unrestricted” or “jailbroken” versions of models appeared shortly after release. These events demonstrate that relying solely on training-time behavioral constraints is insufficient to form a complete safety defense.
Therefore, we must address a technical question: In what form does refusal behavior exist within the model, and can it be removed?
2. How Refusal Behavior is Represented Internally
After large-scale pre-training, large language models form high-dimensional language and knowledge representations in their hidden layers. Alignment training essentially superimposes a behavioral tendency on top of these representations, causing the model to choose refusal for specific inputs.
Public research indicates that in many models, refusal behavior is highly correlated with a relatively stable direction in the hidden layer activation space. When an input is classified as a sensitive request, the projection of the activation vector along this direction significantly increases, often leading the model to respond with a fixed phrase, such as “I’m sorry, but I cannot provide assistance with that.”
This finding has two key implications:
- Refusal behavior is not a random result scattered across all parameters but may be carried by a few locatable representation structures.
- If behavior can be represented as a direction, then intervening with these representations can theoretically alter the behavior.
3. Conceptual Description of the Removal Approach
Public literature describes a class of intervention methods. The general steps involve comparing the activation differences between harmful and benign requests across several layers to estimate the refusal direction. Then, the relevant weights are adjusted to diminish the model’s output component along this direction. From a linear algebra perspective, this is equivalent to projecting certain weights onto a subspace orthogonal to that direction.
This article only outlines this conceptual approach without providing specific operational steps. Understanding its significance lies in the following points:
- Refusal representations are entangled with other model capabilities. Interventions often come with side effects, such as a decline in general Q&A quality or changes in output style.
- Different models have varying sensitivities to the same type of intervention, depending on their architecture, training data, and alignment methods.
- The effectiveness of the intervention must be confirmed through evaluation, rather than solely relying on whether the model “no longer refuses.”
4. Implications for Publishers and Deployers
Issues for Publishers
- After weights are public, training-time alignment should not be considered a long-term effective constraint.
- Adversarial evaluations should be conducted before release, and the evaluation scope and known limitations should be made public to prevent users from developing overconfidence.
- Licensing agreements and terms of use can only govern compliant usage; they cannot prevent technical abuse. These must be paired with technical measures.
Issues for Deployers
- If building services using open weights, assume that the model’s built-in refusal behavior may fail.
- Security policies should be placed at the system level, rather than relying solely on a single model’s self-discipline.
- Independent auditing of inputs and outputs is more reliable than relying purely on model refusals.
5. Engineering Practices for Defense and Hardening
1. Layered Defense: Perform request classification and risk identification on the input side, and content detection on the output side. Record audit logs throughout the process for post-event traceability.
2. Decoupled Safety Classification Models: Use an independent model for risk assessment to reduce the risk of both the generation model and the defense line failing simultaneously if the same set of parameters is entirely overwritten.
3. Regularized Red Teaming: Testing should cover multilingual, multimodal, long-context, and tool-calling scenarios. Test cases should be continuously updated alongside business changes.
4. Weight Integrity Verification: Verify the hash values of weight files before deployment to prevent the service from being replaced with an unreviewed version.
5. Principle of Least Privilege: For applications with tool-calling capabilities, restrict their executable operations and accessible data scopes.
Below is a sample evaluation code used to calculate the refusal rate of a model for a set of risk test requests. It is for evaluation purposes only and does not involve modifying the model:
def refusal_rate(generate, prompts, is_refusal):"""Calculate the refusal rate of a model for a set of risk test requests.generate: A function that takes a prompt and returns the model's responseprompts: A test set maintained by the team within authorized boundariesis_refusal: A function that determines if a response is a refusal"""if not prompts:return 0.0refused = 0for prompt in prompts:reply = generate(prompt)if is_refusal(reply):refused += 1return refused / len(prompts)
When using this, note two things. First, the determination function should not rely solely on keyword matching; otherwise, it may easily misclassify standard safety disclaimers as refusals or miss refusals with altered phrasing. A more robust approach is to combine classification models with sampled manual reviews. Second, the test set should be updated regularly to prevent the model from overfitting to known test cases.
6. Design Essentials for Evaluation Metrics
- Coverage: The test set must include multiple categories of risk scenarios, recording the pass rate for each category rather than just looking at the overall number.
- Judgment Accuracy: Regularly sample and check the false positive and false negative rates of the determination function.
- Regression Testing: Re-evaluate after every fine-tuning, quantization, or format conversion, as these operations can alter safety behavior.
- Capability Preservation: Simultaneously evaluate general task performance to avoid sacrificing usability for safety, and vice versa.
7. Conclusion
Refusal behavior can be located within a model and potentially removed. This requires the safety assurance of open-weight models to shift from “alignment completed during training” to “system-level continuous security.” For developers, models should be treated as modifiable components. An auditable, replaceable, and monitorable security architecture should be built around them, and evaluation should be integrated into the standard workflow for every model change.
