mlsanityData to 7 Oct 2026

Why Do Large Language Models Generate Harmful Content?

arXiv 2604.11663 ↗First posted 13 Apr 2026cs.AIcited by 0

On the map: LLM safety and security → Safety alignment, refusal and guardrails

Abstract (arXiv)

Large Language Models (LLMs) have been shown to generate harmful content. However, the underlying causes of such behavior remain under explored. We propose a causal mediation analysis-based approach to identify the causal factors responsible for harmful generation. Our method performs a multi-granular analysis across model layers, modules (MLP and attention blocks), and individual neurons. Extensive experiments on state-of-the-art LLMs indicate that harmful generation arises in the later layers of the model, results primarily from failures in MLP blocks rather than attention blocks, and is associated with neurons that act as a gating mechanism for harmful generation. The results indicate that the early layers in the model are used for a contextual understanding of harmfulness in a prompt, which is then propagated through the model, to generate harmfulness in the late layers, as well as a signal indicating harmfulness through MLP blocks. This is then further propagated to the last layer of the model, specifically to a sparse set of neurons, which receives the signal and determines the generation of harmful content accordingly.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 25 of its 28 references that are in the map. First posted on arXiv 13 Apr 2026.

Builds on

25 of 28 references.

Closest ancestors · 4

Same direction, newest first

  1. 2025Guardians and Offenders: A Survey on Harmful Content Generation and Safety Mitigation of LLM7 Aug
  2. 2024On the Role of Attention Heads in Large Language Model Safety17 Oct
  3. 2024Refusal in Language Models Is Mediated by a Single Direction17 Jun
  4. 2024Uncovering Safety Risks of Large Language Models through Concept Activation Vector18 Apr

Other references · 21

  1. 2024Qwen2 Technical Reportcited by 2,076
  2. 2021Towards Causal Representation Learningcited by 207
  3. 2024A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicitycited by 179
  4. 2024Safety Layers in Aligned Large Language Models: The Key to LLM Securitycited by 126
  5. 2024How Alignment and Jailbreak Work: Explain LLM Safety through Intermediate Hidden Statescited by 92
  6. 2023A Mechanistic Interpretation of Arithmetic Reasoning in Language Models using Causal Mediation Analysiscited by 88
  7. 2021Desiderata for Representation Learning: A Causal Perspectivecited by 76
  8. 2025AdaSteer: Your Aligned LLM is Inherently an Adaptive Jailbreak Defendercited by 37
  9. 2024Understanding Jailbreak Success: A Study of Latent Space Dynamics in Large Language Modelscited by 34
  10. 2024A Comprehensive Survey of Bias in LLMs: Current Landscape and Future Directionscited by 27
  11. 2024What Features in Prompts Jailbreak LLMs? Investigating the Mechanisms Behind Attackscited by 24
  12. 2024JailbreakLens: Interpreting Jailbreak Mechanism in the Lens of Representation and Circuitcited by 21
9 more
  1. 2024Detecting and Understanding Vulnerabilities in Language Models via Mechanistic Interpretabilitycited by 13
  2. 2025A Survey of Attacks on Large Language Modelscited by 13
  3. 2025Guiding AI to Fix Its Own Flaws: An Empirical Study on LLM-Driven Secure Code Generationcited by 12
  4. 2025From LLMs to MLLMs to Agents: A Survey of Emerging Paradigms in Jailbreak Attacks and Defenses within LLM Ecosystemcited by 11
  5. 2024Advancing Content Moderation: Evaluating Large Language Models for Detecting Sensitive Content Across Text, Images, and Videoscited by 10
  6. 2023Causality Analysis for Evaluating the Security of Large Language Modelscited by 9
  7. 2025Using Mechanistic Interpretability to Craft Adversarial Attacks against Large Language Modelscited by 9
  8. 2025Probing Neural Topology of Large Language Modelscited by 4
  9. 2025Correlation or Causation: Analyzing the Causal Structures of LLM and LRM Reasoning Processcited by 3

Built on by

Not cited yet.