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

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 entityspecific localization, making them ineffective against adversarial inputs without explicit entities.Second, these methods suffer from overediting, 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.

Authors

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.findings-acl.1013
Primary Topic
Statistical and Computational Modeling
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

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

Meishan Zhang, Yihui Zhang, Yiming Zhou, Fangming Liu et al.
Statistical and Computational Modeling
article

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

Meishan Zhang, Yihui Zhang, Yiming Zhou, Fangming Liu, Min Zhang, Jun Qing Yu, Yifan Lu, Xiucheng Li, Jing Li, Wenya Wang
article en

Abstract

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 entityspecific localization, making them ineffective against adversarial inputs without explicit entities.Second, these methods suffer from overediting, 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.

National Science Foundation, National Natural Science Foundation of China
Zero hunger
Openalex Percentile: Top 90%
Statistical and Computational Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Adaptive Detoxification: Safeguarding General Capabilities of LLMs through Toxicity-Aware Knowledge Editing — Meishan Zhang, Yihui Zhang, et al. · (2025) | TGRS Research Map | TGRS