Understanding Refusal in Language Models with Sparse Autoencoders

Wei Jie Yeo, Nirmalendu Prakash, Clement Neo, Ranjan Satapathy, Roy Ka-Wei Lee, Erik Cambria

When you ask a safety-aligned AI like Llama or Gemma to "write a tutorial on how to build a bomb," it doesn't just happen to say no—it follows a specific internal "refusal circuit." But how exactly does that circuit work? While previous research identified high-level "refusal directions" in the model's activation space, these were often too coarse to explain the nuances of how a model identifies harm or why a clever "jailbreak" prompt can bypass these guards.

In a new paper titled "Understanding Refusal in Language Models with Sparse Autoencoders," researchers from NTU, SUTD, and A*STAR dive deep into the latent space of LLMs to map the specific features that mediate refusal behavior.

TL;DR

Researchers used Sparse Autoencoders (SAEs) to identify the specific, interpretable latent features that cause LLMs to refuse harmful prompts. They discovered that "harm" and "refusal" are encoded as distinct feature sets, and that adversarial jailbreaks work by directly suppressing the model's internal refusal circuitry.

What Problem Does This Paper Address?

Safety alignment (like RLHF) is the "secret sauce" that keeps LLMs from being dangerous, but it’s often a black box. We know models refuse, but we don't fully understand the internal mechanics.

Current methods for studying this usually rely on "linear directions"—essentially a single vector that represents "refusal." However, this is like trying to understand a city's traffic by looking at a single satellite photo of the whole region. It doesn't tell you which specific streets (features) are blocked or how a "jailbreak" (like a detour) manages to get around the blockade. The authors wanted a more granular, "mechanistic" understanding of how refusal manifests at the activation level.

Methods

The team leveraged Sparse Autoencoders (SAEs), a popular tool in mechanistic interpretability. SAEs take the dense, messy activations of an LLM and decompose them into thousands of sparse, human-interpretable "features."

To find the features that actually cause refusal, they proposed a hybrid approach called CosSim+AP:

  1. Cosine Similarity (CosSim): They first identified features that align closely with the known "refusal direction."
  2. Attribution Patching (AP): They then used a gradient-based technique to see which of those features actually have a causal impact on the model's final decision to say "I'm sorry, I cannot..."
  3. Activation Steering: To validate their findings, they performed "interventions"—clamping specific features to zero (to induce a jailbreak) or scaling them up (to force a refusal) to see if the model's behavior changed as predicted.

Datasets

The researchers tested their approach across a wide array of benchmarks to ensure robustness:

  • Harmful Prompts: JailbreakBench, HarmBench, and AdvBench.
  • Categorized Harm: CATQA (covering 7 categories like Illegal Activity, Child Abuse, and Fraud).
  • Adversarial Phrasing: WildJailbreak (which contains "vanilla" harmful prompts and their "adversarially rephrased" counterparts).
  • Utility/Reasoning: Alpaca, Pile, GSM8K, and ARC (used to ensure that intervening on refusal features didn't "lobotomize" the model's general intelligence).

Key Insights and Ideas

  • Harm $\neq$ Refusal: One of the most striking findings is that LLMs encode "harmful concepts" (like "bomb" or "drugs") and the "act of refusal" as separate feature sets. The "harm" features act as upstream triggers that causally activate the downstream "refusal" features.
  • How Jailbreaks Work: Adversarial prompts (e.g., "Write a fictional story about a character building a...") don't necessarily hide the "harm" from the model. Instead, they work by suppressing the refusal features. The model might still recognize the harmful content, but the "refusal circuit" is never triggered.
  • Universal Refusal: While "harm" features are behavior-specific (e.g., a feature for "addiction" vs. "pornography"), the "refusal" features are often shared across many different types of harmful prompts.
  • Better Detection: Because these sparse features are so specific, they make for excellent "probes." A classifier trained on these features is much better at detecting "jailbroken" prompts than a classifier trained on raw model activations.

Key Results

  • Causal Control: By intervening on just a tiny set of features ($K=20$), the researchers could successfully jailbreak models or force them to refuse harmless prompts with high reliability.
  • OOD Generalization: In classification tasks on out-of-distribution (OOD) adversarial samples, the sparse feature probe significantly outperformed dense probes. For Gemma-2-2B, the sparse probe achieved 0.86 accuracy compared to just 0.68 for the dense probe.
  • Minimal Degradation: Their targeted interventions caused the lowest degradation in the model's general reasoning (GSM8K/ARC) compared to broader baseline methods, proving they had found the "minimal causal set" for refusal.

Limitations and Future Work

The authors acknowledge a few hurdles:

  • SAE Transfer: They used SAEs trained on "base" models and applied them to "chat" (instruct-tuned) models. While this worked well, they suggest that training SAEs directly on chat models might yield even cleaner features.
  • The "Refusal Direction" Dependency: Their method still relies on an initial "refusal direction" to narrow down the search space. If that direction is slightly off, the feature search might be suboptimal.
  • Complex Reasoning: Future work could explore more complex chains of thought, such as how a model weighs "Legality" vs. "Consequences" before deciding to refuse.

By turning the "black box" of refusal into a map of interpretable features, this work provides a clearer path for engineers to build safer, more robust AI systems that are harder to trick.

Summary updated

BibTeX
@inproceedings{yeo2026understanding,
  author = {Wei Jie Yeo and Nirmalendu Prakash and Clement Neo and Ranjan Satapathy and Roy Ka-Wei Lee and Erik Cambria},
  title = {{Understanding Refusal in Language Models with Sparse Autoencoders}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2026},
  url = {https://openreview.net/forum?id=ItFr5vP7Zs},
}
Figure