← Latest papers
💻 computer science

Willing but Unable: Separating Refusal from Capability in Code LLMs via Abliteration

This paper demonstrates that "abliteration," a low-rank weight editing technique that orthogonally projects out refusal directions, can effectively decouple safety-aligned code LLMs' refusal to generate vulnerable code from their actual generation capabilities, thereby enabling the scalable production of labeled vulnerable code for vulnerability detection research without compromising syntactic validity.

Original authors: Cristina Carleo, Pietro Liguori, Naghmeh Ivaki, Domenico Cotroneo

Published 2026-06-05
📖 5 min read🧠 Deep dive

Original authors: Cristina Carleo, Pietro Liguori, Naghmeh Ivaki, Domenico Cotroneo

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Problem: The "Over-Protective" Robot

Imagine you are trying to teach a robot how to spot security holes in computer code. To do this, you need a huge library of examples showing both "safe" code and "broken" (vulnerable) code.

However, there's a catch. The robots (AI models) we have today are trained to be very safe. If you ask them, "Hey, can you show me how to break a database?" they immediately say, "No! I can't do that. That's dangerous."

This is a problem for researchers. They need the robot to make the mistake so they can study it and build better defenses. But the robot refuses to play the role of the "bad guy," even if the researcher just wants to study the mistake in a controlled lab setting.

The Experiment: Turning Off the "Stop" Button

The researchers in this paper wanted to see if they could turn off that "Stop" button without breaking the robot's brain. They used a technique called Abliteration.

Think of the AI's brain as a giant library of thoughts. When the robot sees a request to create a security hole, a specific "refusal signal" (like a red alarm light) flashes in its mind, and it shuts down the conversation.

Abliteration is like a surgeon carefully removing just that one red alarm light from the robot's wiring. They didn't retrain the robot or teach it new things; they just surgically edited the weights (the connections) to stop the refusal signal from firing.

The Three Key Findings

The researchers tested this on three different sizes of AI models (Small, Medium, and Large) using Python code and a specific type of security hole called SQL Injection (which is like tricking a database into revealing secrets).

1. The "Refusal" Depends on Size and Context

Before they did any surgery, they noticed something interesting:

  • The Giant Model (14B): It refused 100% of the time. No matter what you asked, it said "No."
  • The Medium Model (7B): It was picky. It refused most of the time on long, complex code, but it would sometimes say "Yes" on short, simple code snippets.
  • The Small Model (3B): It barely refused at all. It was willing to try almost anything.

The Analogy: Imagine three security guards. The big guard is so strict he stops everyone. The medium guard stops people with big bags but lets people with small envelopes through. The small guard is very relaxed and lets almost everyone pass.

2. The Surgery Worked (The "Willing" Part)

After they performed the "Abliteration" surgery:

  • The Refusal Disappeared: The Giant and Medium models stopped saying "No." They were now willing to try to create the security hole.
  • The Brain Was Still Healthy: Crucially, the surgery didn't break the robot. The code they produced was still grammatically correct and made sense. They hadn't lobotomized the AI; they just removed the "I won't do that" reflex.

The Analogy: It's like taking a "Do Not Enter" sign off a door. The door was always open and the hallway inside was fine; the sign was just telling people they couldn't walk through. Once the sign was gone, people could walk through, and the hallway was still perfectly intact.

3. Willingness \neq Ability (The "Unable" Part)

This is the most important discovery. Just because the robot was now willing to make the mistake, didn't mean it was able to do it well.

  • The Giant Model (14B): Once the "No" sign was removed, it was great at making the security hole. It succeeded about 90% of the time.
  • The Medium Model (7B): Also very good, succeeding about 90% of the time.
  • The Small Model (3B): Even though it was willing and didn't refuse, it was bad at the actual task. It only succeeded about 25–48% of the time.

The Analogy: Imagine three artists asked to paint a picture of a broken vase.

  • The Giant Artist was told "You can't paint this!" but after being told "You can," they painted a masterpiece.
  • The Medium Artist was also told "You can," and they painted a great picture.
  • The Small Artist was never told "No" to begin with, but when they tried to paint the broken vase, they just couldn't get the details right. They wanted to do it, but they lacked the skill.

The Conclusion: Two Different Things

The paper proves that Refusal (willingness) and Capability (skill) are two separate things.

  1. Refusal is a safety setting that can be turned off (via Abliteration).
  2. Capability is a measure of how smart the model is. Turning off the safety setting doesn't make a "dumb" model "smart."

Why does this matter?

  • For Researchers: If you want to generate data to train security tools, you can't just use a small model and hope it works. Even if you turn off its safety filters, it might not be smart enough to create the realistic errors you need. You need a bigger model.
  • For Safety: It shows that safety filters are very specific. You can remove the "refusal" without breaking the model's ability to write good code. This means safety alignment is a specific layer on top of the model's intelligence, not the intelligence itself.

A Note on Ethics

The authors are very careful. They released the tools to measure this and the data, but they did not release the "surgically modified" models that can actually create these security holes. They believe that while the idea of how to do this is known, releasing the actual "hacked" models would be too dangerous. They want to help researchers study security, not give hackers a new weapon.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →