paper-with-me

홈 › Papers

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

2025-05-28 · Yifan Lu, Jing Li, Yigeng Zhou, Yihui Zhang, Wenya Wang, Xiucheng Li, Meishan Zhang, Fangming Liu, Jun Yu, Min Zhang

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.

📄 PDF Abstract BibTeX arXiv:2505.22298

Code (0)

등록된 구현이 없습니다.

Tasks

Instruction Followingknowledge editing

Similar Papers 제목 키워드 기반

A Framework for Real-time Safeguarding the Text Generation of Large Language Model

2024-04-29 · Ximing Dong, Dayi Lin, Shaowei Wang, Ahmed E. Hassan

Large Language Models (LLMs) have significantly advanced natural language processing (NLP) tasks but also pose ethical and societal risks due to their propensity to generate harmful content. Existing methods have limitat…

Language ModelingLanguage ModellingLarge Language ModelText Generation+1

DSCD: Large Language Model Detoxification with Self-Constrained Decoding

2025-10-15 · Ming Dong, Jinkui Zhang, Bolong Zheng, Xinhui Tu 외 arxiv

Detoxification in large language models (LLMs) remains a significant research challenge. Existing decoding detoxification methods are all based on external constraints, which require additional resource overhead and lose…

Separate the Wheat from the Chaff: Model Deficiency Unlearning via Parameter-Efficient Module Operation

2023-08-16 · Xinshuo Hu, Dongfang Li, Baotian Hu, Zihao Zheng 외

Large language models (LLMs) have been widely used in various applications but are known to suffer from issues related to untruthfulness and toxicity. While parameter-efficient modules (PEMs) have demonstrated their effe…

Language ModelingLanguage ModellingMathematical Reasoning

Cleansing the Artificial Mind: A Self-Reflective Detoxification Framework for Large Language Models

2026-01-16 · Kaituo Zhang, Zhimeng Jiang, Na Zou arxiv

Recent breakthroughs in Large Language Models (LLMs) have revealed remarkable generative capabilities and emerging self-regulatory mechanisms, including self-correction and self-rewarding. However, current detoxification…

Text Generation

Breaking mBad! Supervised Fine-tuning for Cross-Lingual Detoxification

2025-05-22 · Himanshu Beniwal, Youngwoo Kim, Maarten Sap, Soham Dan 외

As large language models (LLMs) become increasingly prevalent in global applications, ensuring that they are toxicity-free across diverse linguistic contexts remains a critical challenge. We explore "Cross-lingual Detoxi…