NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Large Language Models Generate Harmful Content Using a Unified Mechanism

Hadas Orgad, Boyi Wei, Kaden Zheng, Martin Wattenberg, Peter Henderson, Seraphina Goldfarb-Tarrant, Yonatan Belinkov

TL;DR

By surgically pruning a microscopic fraction of an LLM's parameters (around 0.0005% to 0.001%), researchers can drastically reduce its compliance with harmful jailbreak prompts without degrading its general capabilities. This reveals that safety alignment training compresses the mechanism for generating harm into a distinct, shared parameter subspace, separating the ability to produce dangerous content from the ability to understand it.

What Problem Does This Paper Address?

While state-of-the-art large language models (LLMs) undergo extensive safety alignment to refuse unsafe requests, these safeguards remain incredibly brittle. Simple adversarial techniques—such as pre-filling the model's response with a compliant prefix or slightly tweaking the decoding parameters—can easily bypass refusal behavior.

While prior mechanistic interpretability research has focused on how models refuse prompts, very little is known about the actual generative mechanism: how a model constructs a harmful response once its refusal guardrails are successfully bypassed. This paper investigates how harmful compliance is organized at the parameter level, exploring whether the capability to generate unsafe content is deeply intertwined with general utility or localized to a specific internal mechanism.

Methods

The authors introduce Behavior-Targeted Attribution and Pruning (B-TAP), a causal probing method inspired by neuroscience lesion studies. Instead of just observing model activations, B-TAP actively alters model behavior by identifying and zeroing out specific weights.

The B-TAP pipeline operates in three main steps:

  1. Gather Harmful Responses: Collect successful harmful prompt-response pairs from a jailbroken version of the target model.
  2. Compute Harm Scores: Use an adaptation of the SNIP pruning criterion to calculate a signed importance score for every individual parameter based on its gradient contribution to the harmful response. Negative scores highlight parameters that actively facilitate harmful generation.
  3. Dual-Calibration Pruning: To avoid destroying the model's general capabilities, the authors introduce a preservation dataset (benign tasks). Parameters crucial to general utility are assigned absolute importance scores and explicitly excluded from pruning. The model then prunes the remaining top-ranked weights that facilitate harm but are unimportant for benign tasks.
Overview of the Behavior-Targeted Attribution and Pruning (B-TAP) framework

Datasets

  • Pruning & Calibration: Harmful prompts were sourced from AdvBench, while the Alpaca dataset (filtered to remove safety-related prompts) served as the benign preservation dataset.
  • Harm Evaluation: The models were tested against HEx-PHI, a held-out dataset covering five distinct harm categories: malware, physical harm, hate speech, adult content, and privacy violations.
  • Utility Benchmarks: General capabilities were evaluated using standard benchmarks including TriviaQA (factual recall), MMLU/MMLU-Pro (knowledge), GSM8K/MATH (mathematics), and HumanEval/MBPP (coding).
  • Emergent Misalignment: Narrow-domain fine-tuning datasets covering bad medical advice, extreme sports, and risky financial advice were used to study out-of-domain alignment failures.

Key Insights and Ideas

  • Mechanistic Compression: Safety alignment training (like DPO or RLHF) does more than just teach a model a surface-level refusal behavior. It physically reorganizes the model's internal parameter structure, compressing the harmful response generation pathways into a small, highly separable subset of weights.
  • A Unified Harm Mechanism: Pruning parameters identified from a single harm category (e.g., malware generation) successfully reduces harmful outputs across completely unrelated domains (e.g., hate speech or physical harm). This indicates that different types of harmful generation share a core underlying parameter architecture.
  • Dissociation of Generation vs. Understanding: The ability to generate harmful text is parameter-isolated from the ability to comprehend harm. A pruned model loses its capacity to write functional malware or bomb-making instructions, yet it fully retains its ability to recognize unsafe prompts, refuse them naturally, and explain the associated risks.
  • Emergent Misalignment is Predictable: The dangerous phenomenon where narrow fine-tuning (e.g., teaching a model about extreme sports) causes a broad, out-of-domain spike in toxicity also relies on a sparse, shared set of parameters that can be targeted and pruned before fine-tuning occurs.

Key Results

  • Extreme Sparsity: Eliminating a mere 0.0005% to 0.001% of total model parameters was sufficient to sharply mitigate harmful compliance under aggressive jailbreaks like pre-filling and refusal ablation.
  • Preserved Utility: General utility benchmarks remained virtually unchanged after pruning, demonstrating a highly non-linear trade-off curve where safety is maximized with negligible cost to performance.
  • Cross-Domain Success: In cross-domain generalization experiments, pruning malware-derived weights reduced physical harm and privacy violation scores by 40% to over 80% depending on the base model architecture (Llama-3.1 vs. Qwen-2.5).
  • Structural Mimetics: When pruned models were subjected to adversarial fine-tuning, their recovery was often superficial. Rather than regaining dangerous capabilities, they produced "structurally mimetic" text—adopting the formatting and vocabulary of a harmful response (e.g., numbered steps) but replacing actionable details with vague, absurdist, or completely empty content.

Limitations and Future Work

  • Not a Production Defense: The authors emphasize that B-TAP is a diagnostic tool for mechanistic interpretability rather than a foolproof, deployable defense mechanism.
  • Collateral Over-Refusal: Pruning induces a predictable "spillover" effect, making the model overly cautious and prone to refusing benign queries that sit adjacent to sensitive topics (such as legitimate financial or medical questions).
  • Scaling Challenges: Future research is required to determine how these parameter-level insights scale to much larger model families and how they can be integrated directly into the initial alignment training pipeline rather than applied post-hoc.

Summary updated

BibTeX
@inproceedings{orgad2026large,
  author = {Hadas Orgad and Boyi Wei and Kaden Zheng and Martin Wattenberg and Peter Henderson and Seraphina Goldfarb-Tarrant and Yonatan Belinkov},
  title = {{Large Language Models Generate Harmful Content Using a Unified Mechanism}},
  booktitle = {LLM Reasoning @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=mIIwfjSXLV},
}
Figure