arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.01050cs.LGcs.AIcs.CL
收藏

文本去毒化:数据效率、语义保持与模型泛化

Text Detoxification: Data Efficiency, Semantic Preservation and Model Generalization

School of Data Science and Engineering, East China Normal University(东华大学数据科学与工程学院);Shanghai EastWonder Info-tech Co., Ltd(上海东 wonder 信息科技有限公司)

Jing Yu, Yibo Zhao, Jiapeng Zhu, Wenming Shao, Bo Pang, Zhao Zhang, Xiang Li

AI总结:

本文提出两阶段训练框架,先用少量高质量平行数据微调,再用未标注有毒数据和定制奖励模型通过Group Relative Policy Optimization训练大语言模型,以提升文本去毒化的数据效率、语义保持和泛化能力。

摘要:

社交媒体上有毒内容的广泛传播对网络环境和公共话语构成严重威胁,凸显了对既能有效去除毒性又能保持原始语义的去毒化方法的迫切需求。然而,现有方法往往难以同时实现强去毒性能、语义保持和对分布外数据的鲁棒性。此外,它们通常依赖成本高昂、人工标注的平行语料,同时表现出较差的数据效率。为应对这些挑战,我们提出一个两阶段训练框架,联合优化数据效率、语义保持和模型泛化。我们首先在一小部分高质量、经过过滤的平行数据上进行监督微调,以建立强初始化。然后,我们利用未标注的有毒输入和一个定制设计的奖励模型,使用Group Relative Policy Optimization训练大语言模型。实验结果表明,我们的方法有效缓解了先前工作面临的权衡问题,在提高泛化能力和显著降低对标注数据依赖的同时,取得了最先进的性能。我们的代码可在以下地址获取:https://github.com/allacnobug/Detoxification-of-Text。

英文摘要:

The widespread dissemination of toxic content on social media poses a serious threat to both online environments and public discourse, highlighting the urgent need for detoxification methods that effectively remove toxicity while preserving the original semantics. However, existing approaches often struggle to simultaneously achieve strong detoxification performance, semantic preservation, and robustness to out-of-distribution data. Moreover, they typically rely on costly, manually annotated parallel corpora while showing poor data efficiency. To address these challenges, we propose a two-stage training framework that jointly optimizes for data efficiency, semantic preservation, and model generalization. We first perform supervised fine-tuning on a small set of high-quality, filtered parallel data to establish a strong initialization. Then, we leverage unlabeled toxic inputs and a custom-designed reward model to train the LLM using Group Relative Policy Optimization. Experimental results demonstrate that our method effectively mitigates the trade-offs faced by previous work, achieving state-of-the-art performance with improved generalization and significantly reduced dependence on annotated data. Our code is available at: https://github.com/allacnobug/Detoxification-of-Text.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑