paper-with-me

Papers

Detoxifying Large Language Models via Knowledge Editing

2024-03-21 · Mengru Wang, Ningyu Zhang, Ziwen Xu, Zekun Xi, Shumin Deng, Yunzhi Yao, Qishen Zhang, Linyi Yang, Jindong Wang, Huajun Chen

This paper investigates using knowledge editing techniques to detoxify Large Language Models (LLMs). We construct a benchmark, SafeEdit, which covers nine unsafe categories with various powerful attack prompts and equips comprehensive metrics for systematic evaluation. We conduct experiments with several knowledge editing approaches, indicating that knowledge editing has the potential to detoxify LLMs with a limited impact on general performance efficiently. Then, we propose a simple yet effective baseline, dubbed Detoxifying with Intraoperative Neural Monitoring (DINM), to diminish the toxicity of LLMs within a few tuning steps via only one instance. We further provide an in-depth analysis of the internal mechanism for various detoxifying approaches, demonstrating that previous methods like SFT and DPO may merely suppress the activations of toxic parameters, while DINM mitigates the toxicity of the toxic parameters to a certain extent, making permanent adjustments. We hope that these insights could shed light on future work of developing detoxifying approaches and the underlying knowledge mechanisms of LLMs. Code and benchmark are available at https://github.com/zjunlp/EasyEdit.

📄 PDF Abstract BibTeX arXiv:2403.14472

Code (1)

zjunlp/easyedit 공식 구현 pytorch

Tasks

knowledge editing

Methods 이 논문이 사용한 방법론

DPO 설명 없음
SFT Shrink and Fine-Tune, or SFT, is a type of distillation that avoids explicit distillation by copying parameters to a student student model and then fine-tuning.…

Similar Papers 제목 키워드 기반

Precision Knowledge Editing: Enhancing Safety in Large Language Models

2024-10-02 · Xuying Li, Zhuo Li, Yuji Kosuga, Yasuhiro Yoshida 외

Large language models (LLMs) have demonstrated remarkable capabilities, but they also pose risks related to the generation of toxic or harmful content. This work introduces Precision Knowledge Editing (PKE), an advanced …

knowledge editingManagement

Contrastive Perplexity for Controlled Generation: An Application in Detoxifying Large Language Models

2024-01-16 · Tassilo Klein, Moin Nabi

The generation of undesirable and factually incorrect content of large language models poses a significant challenge and remains largely an unsolved issue. This paper studies the integration of a contrastive learning obj…

Contrastive Learningknowledge editingReading ComprehensionText Generation

UniDetox: Universal Detoxification of Large Language Models via Dataset Distillation

2025-04-29 · Huimin Lu, Masaru Isonuma, Junichiro Mori, Ichiro Sakata

We present UniDetox, a universally applicable method designed to mitigate toxicity across various large language models (LLMs). Previous detoxification methods are typically model-specific, addressing only individual mod…

Dataset DistillationLanguage ModelingLanguage Modelling

Unified Detoxifying and Debiasing in Language Generation via Inference-time Adaptive Optimization

2022-10-10 · Zonghan Yang, Xiaoyuan Yi, Peng Li, Yang Liu 외

Warning: this paper contains model outputs exhibiting offensiveness and biases. Recently pre-trained language models (PLMs) have prospered in various natural language generation (NLG) tasks due to their ability to genera…

Text Generation

Detoxifying Large Language Models via Autoregressive Reward Guided Representation Editing

2025-09-24 · Yisong Xiao, Aishan Liu, Siyuan Liang, Zonghao Ying 외 arxiv

Large Language Models (LLMs) have demonstrated impressive performance across various tasks, yet they remain vulnerable to generating toxic content, necessitating detoxification strategies to ensure safe and responsible d…