mlsanityData to 14 Oct 2026

Adaptive Detoxification: Safeguarding General Capabilities of LLMs through Toxicity-Aware Knowledge Editing

arXiv 2505.22298 ↗First posted 28 May 2025cs.CLcited by 5

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

Abstract (arXiv)

Large language models (LLMs) exhibit impressive language capabilities but remain vulnerable to malicious prompts and jailbreaking attacks. Existing knowledge editing methods for LLM detoxification face two major challenges. First, they often rely on entity-specific localization, making them ineffective against adversarial inputs without explicit entities. Second, these methods suffer from over-editing, where detoxified models reject legitimate queries, compromising overall performance. In this paper, we propose ToxEdit, a toxicity-aware knowledge editing approach that dynamically detects toxic activation patterns during forward propagation. It then routes computations through adaptive inter-layer pathways to mitigate toxicity effectively. This design ensures precise toxicity mitigation while preserving LLMs' general capabilities. To more accurately assess over-editing, we also enhance the SafeEdit benchmark by incorporating instruction-following evaluation tasks. Experimental results on multiple LLMs demonstrate that our ToxEdit outperforms previous state-of-the-art methods in both detoxification performance and safeguarding general capabilities of LLMs.

Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Safety alignment, refusal and guardrails, one of 12 directions in LLM safety and security. Builds on 30 of its 48 references that are in the map. First posted on arXiv 28 May 2025.

Builds on

30 of 48 references.

Closest ancestors · 1

Same direction, newest first

  1. 2025Safety Alignment via Constrained Knowledge Unlearning24 May

Other references · 29

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2024The Llama 3 Herd of Modelscited by 14,715
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  4. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  5. 2023Mistral 7Bcited by 3,164
  6. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,955
  7. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  8. 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
  9. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
  10. 2018Don't Give Me the Details, Just the Summary! Topic-Aware Convolutional Neural Networks for Extreme Summarizationcited by 1,317
  11. 2021A General Language Assistant as a Laboratory for Alignmentcited by 1,055
  12. 2022Mass-Editing Memory in a Transformercited by 1,001
17 more
  1. 2022Memory-Based Model Editing at Scalecited by 447
  2. 2024A StrongREJECT for Empty Jailbreakscited by 385
  3. 2023Editing Large Language Models: Problems, Methods, and Opportunitiescited by 372
  4. 2023Can We Edit Factual Knowledge by In-Context Learning?cited by 285
  5. 2023The Unlocking Spell on Base LLMs: Rethinking Alignment via In-Context Learningcited by 257
  6. 2024AlphaEdit: Null-Space Constrained Knowledge Editing for Language Modelscited by 236
  7. 2023Transformer-Patcher: One Mistake worth One Neuroncited by 197
  8. 2024Secrets of RLHF in Large Language Models Part II: Reward Modelingcited by 171
  9. 2023Defending Large Language Models Against Jailbreaking Attacks Through Goal Prioritizationcited by 170
  10. 2024How Alignment and Jailbreak Work: Explain LLM Safety through Intermediate Hidden Statescited by 98
  11. 2024Detoxifying Large Language Models via Knowledge Editingcited by 87
  12. 2023Using In-Context Learning to Improve Dialogue Safetycited by 42
  13. 2022Detoxifying Text with MaRCo: Controllable Revision with Experts and Anti-Expertscited by 36
  14. 2023Separate the Wheat from the Chaff: Model Deficiency Unlearning via Parameter-Efficient Module Operationcited by 33
  15. 2023A Two-Stage Adaptation of Large Language Models for Text Rankingcited by 18
  16. 2024Knowledge Fusion By Evolving Weights of Language Modelscited by 16
  17. 2025Neural Parameter Search for Slimmer Fine-Tuned Models and Better Transfercited by 11

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 3; 2026: 2.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Precision Knowledge Editing: Enhancing Safety in Large Language Models
  2. 2026Detoxifying LLMs via Representation Erasure-Based Preference Optimization
  3. 2025Breaking Bad Tokens: Detoxification of LLMs Using Sparse Autoencoders
  4. 2025Detoxifying Large Language Models via Autoregressive Reward Guided Representation Editing
  5. 2024Model Surgery: Modulating LLM's Behavior Via Simple Parameter Editing
  6. 2025Swallowing the Poison Pills: Insights from Vulnerability Disparity Among LLMs
  7. 2026Cleansing the Artificial Mind: A Self-Reflective Detoxification Framework for Large Language Models
  8. 2026Do Prompts Guarantee Safety? Mitigating Toxicity from LLM Generations through Subspace Intervention