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

GPT-DETOX:一种基于上下文学习的文本去毒化改写器

GPT-DETOX: An In-Context Learning-Based Paraphraser for Text Detoxification

LG Electronics(LG电子);Toronto AI Lab(多伦多人工智能实验室)

Ali Pesaranghader, Nikhil Verma, Manasa Bharadwaj

AI总结:

本文提出 GPT-DETOX 框架,利用 GPT-3.5 Turbo 的零样本、少样本及集成上下文学习方法进行文本去毒化,在 ParaDetox 和 APPDIA 数据集上取得优于现有模型的性能。

摘要:

有害和冒犯性的交流或内容会损害社交媒体平台上用户的社会联系和心理健康。文本去毒化是自然语言处理(NLP)中的一项关键任务,其目标是在保留文本内容的同时去除其中的亵渎和毒性内容。监督学习和无监督学习是设计文本去毒化解决方案的常见方法。然而,这些方法需要进行微调,从而导致计算开销。在本文中,我们提出 GPT-DETOX 作为一个基于提示的上下文学习框架,利用 GPT-3.5 Turbo 进行文本去毒化。我们采用零样本和少样本提示技术来对输入句子进行去毒化处理。为了生成少样本提示,我们提出了两种方法:词匹配示例选择(WMES)和上下文匹配示例选择(CMES)。我们还考虑了集成上下文学习(EICL),其中集成由来自零样本和所有少样本设置的基础提示构成。我们使用 ParaDetox 和 APPDIA 作为基准去毒化数据集。我们的实验结果表明,零样本解决方案取得了有前景的性能,而我们最佳的少样本设置在 ParaDetox 上优于最先进的模型,并在 APPDIA 上显示出可比的结果。我们的 EICL 解决方案在两个数据集上都获得了最佳性能,至少提高了 10%。

英文摘要:

Harmful and offensive communication or content is detrimental to social bonding and the mental state of users on social media platforms. Text detoxification is a crucial task in natural language processing (NLP), where the goal is removing profanity and toxicity from text while preserving its content. Supervised and unsupervised learning are common approaches for designing text detoxification solutions. However, these methods necessitate fine-tuning, leading to computational overhead. In this paper, we propose GPT-DETOX as a framework for prompt-based in-context learning for text detoxification using GPT-3.5 Turbo. We utilize zero-shot and few-shot prompting techniques for detoxifying input sentences. To generate few-shot prompts, we propose two methods: word-matching example selection (WMES) and context-matching example selection (CMES). We additionally take into account ensemble in-context learning (EICL) where the ensemble is shaped by base prompts from zero-shot and all few-shot settings. We use ParaDetox and APPDIA as benchmark detoxification datasets. Our experimental results show that the zero-shot solution achieves promising performance, while our best few-shot setting outperforms the state-of-the-art models on ParaDetox and shows comparable results on APPDIA. Our EICL solutions obtain the greatest performance, adding at least 10% improvement, against both datasets.

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

↑