← Latest papers
🤖 AI

Localizing Safety Alignment: MLP Layers and Mid-Network Blocks Encode Refusal Behavior in Large Language Models

This paper demonstrates that safety-aligned refusal behavior in large language models is primarily localized within mid-network MLP layers rather than being a distributed property, revealing that transplanting specific subsets of these weights can effectively transfer refusal capabilities while highlighting the non-additive and benchmark-dependent nature of safety alignment.

Original authors: Mingyu Zong, Sampad Mohanty, Bhaskar Krishnamachari

Published 2026-08-13
📖 5 min read🧠 Deep dive

Original authors: Mingyu Zong, Sampad Mohanty, Bhaskar Krishnamachari

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

Imagine you've built a super-smart robot that can write stories, solve math problems, and chat about anything. But there's a catch: you need to make sure it doesn't accidentally help someone build a bomb or write a mean letter. This is the world of Large Language Models (LLMs), the AI brains behind many of the chatbots we use today. To keep them safe, engineers "align" them, teaching them to say "No" to dangerous requests. For a long time, scientists thought this "safety" was like a soft, invisible fog spread evenly throughout the robot's entire brain. If you tweaked any part of the brain, the safety might wiggle a little, but it would stay mostly the same. However, in the real world, these safety shields are surprisingly fragile. A clever trick or a small change can sometimes make the robot forget its rules entirely. This raises a big, juicy mystery: Where exactly is the "No" button hidden inside the robot's brain? Is it scattered everywhere, or is it tucked away in a specific, tiny corner?

A team of researchers decided to play detective to solve this mystery. Instead of just guessing, they tried a wild experiment: weight transplantation. Imagine you have two identical robots. One is the "Good Robot" (safety-aligned), and the other is the "Unaligned Robot" (the original, unaligned version). The researchers started swapping parts of the Good Robot's brain into the Unaligned Robot, piece by piece, to see which parts actually carried the "refusal" power. They didn't just swap whole brains; they swapped specific types of connections, like the parts that focus on words (attention) versus the parts that process and think (MLP layers).

Here is what they found, and it's a bit like discovering that the robot's "No" isn't a whole team of guards, but a very specific, tiny squad of specialists:

1. The "Thinking" Parts Do the Heavy Lifting
The researchers expected that the parts of the brain that focus on context (called attention weights) might be the main safety guards. But they were wrong! When they swapped only the "thinking" parts (called MLP weights) from the Good Robot into the Unaligned one, the Unaligned Robot suddenly started refusing bad requests at least 2.7 times more often than when they swapped the "focusing" parts. It turns out, the safety "No" is mostly encoded in the MLP layers, the parts of the network that actually process and transform information.

2. The "Middle" is the Magic Zone
But it's not just any thinking part. The researchers discovered that the safety signal is concentrated in a very specific middle section of the brain. In the models they tested, the most powerful "refusal" power was found in Block 3, which corresponds to layers 8 through 11. If you look at the robot's brain as a 28-story building, the safety guards are mostly living on the 8th to 11th floors. When they swapped just these specific floors, the robot became much better at saying "No."

3. More Isn't Always Better (The "Goldilocks" Effect)
Here is the twist that makes the story even more interesting. The researchers thought that if one block of safety was good, then swapping all the safety blocks would be perfect. But it wasn't! In many cases, adding more aligned blocks actually made the robot worse at refusing bad requests. It's like having a team of security guards: if you bring in too many, they might start tripping over each other or arguing, and the security actually drops. The researchers found that a selective mix of just six blocks often worked better than swapping the entire safety system. Sometimes, adding a seventh block would actually reduce the robot's ability to say "No."

4. The "Over-Refusal" Trap
There's another catch. The same parts that make the robot say "No" to bad requests also make it say "No" to harmless ones. This is called over-refusal. When the researchers swapped the MLP weights, the robot became great at stopping bad guys, but it also started refusing to answer innocent questions like "What's the weather?" or "Tell me a joke." This suggests that the safety mechanism is a bit of a blunt instrument; it's hard to separate the "stop bad things" signal from the "stop everything" signal just by swapping parts.

Why Does This Matter?
This discovery suggests that safety in AI isn't a giant, unbreakable shield spread across the whole network. Instead, it's a localized and fragile feature, concentrated in a few specific layers. This explains why AI safety can be so brittle: if you accidentally tweak or remove those specific layers (layers 8–11), the whole safety system can collapse. It also means that if we want to fix AI safety in the future, we don't need to retrain the whole robot. We might just need to carefully tune or protect those specific "middle" layers.

The researchers didn't find a magic bullet that solves all safety problems. They found that safety is interaction-sensitive, meaning the parts of the brain work together in complex ways, and you can't just dump more safety parts in and expect a better result. But by pinpointing exactly where the "No" lives, they've given us a map to understand why AI sometimes fails and how we might build better, more robust safety systems in the future. It's a reminder that even in the vast, complex world of AI, the most important things often happen in the middle.

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 →