Prior works on detoxification are scattered in the sense that they do not cover all aspects of detoxification needed in a real-world scenario. Notably, prior works restrict the task of developing detoxification models to only a seen subset of platforms, leaving the question of how the models would perform on unseen platforms unexplored. Additionally, these works do not address non-detoxifiability, a phenomenon whereby the toxic text cannot be detoxified without altering the meaning. We propose GreenLLaMA, the first comprehensive end-to-end detoxification framework, which attempts to alleviate the aforementioned limitations. We first introduce a cross-platform pseudo-parallel corpus applying multi-step data processing and generation strategies leveraging ChatGPT. We then train a suite of detoxification models with our cross-platform corpus. We show that our detoxification models outperform the SoTA model trained with human-annotated parallel corpus. We further introduce explanation to promote transparency and trustworthiness. GreenLLaMA additionally offers a unique paraphrase detector especially dedicated for the detoxification task to tackle the non-detoxifiable cases. Through experimental analysis, we demonstrate the effectiveness of our cross-platform corpus and the robustness of GreenLLaMA against adversarial toxicity.
翻译:以往关于去毒化的研究工作较为零散,未能涵盖真实场景中所需的所有方面。值得注意的是,先前的研究将开发去毒化模型的任务限制在已知平台的子集上,而未探索模型在未知平台上的表现。此外,这些工作未解决"不可去毒化"现象——即在不改变语义的前提下无法对毒性文本进行去毒处理。我们提出GreenLLaMA,这是首个全面的端到端去毒化框架,旨在缓解上述局限性。我们首先引入一种跨平台伪平行语料库,通过多步数据处理和生成策略利用ChatGPT构建。随后基于该跨平台语料库训练一系列去毒化模型。实验表明,我们的去毒化模型性能优于使用人工标注平行语料训练的当前最优模型。我们进一步引入解释机制以提升透明度和可信度。GreenLLaMA还特别为去毒化任务设计了独特的释义检测器,用于处理不可去毒化案例。通过实验分析,我们证明了跨平台语料库的有效性以及GreenLLaMA对抗对抗性毒性的鲁棒性。