Skip to main content
QUICK REVIEW

[论文解读] LLM-Detector: Improving AI-Generated Chinese Text Detection with Open-Source LLM Instruction Tuning

Rongsheng Wang, Haoming Chen|arXiv (Cornell University)|Feb 2, 2024
Natural Language Processing TechniquesComputer Science被引用 5
一句话总结

提出了 LLM-Detector,一种对开源 LLM 进行指令微调的方法,用于在句子级和文档级检测 AI 生成的中文文本,在域内和域外泛化表现出色。它构建了一个大型中文检测数据集,并显示指令微调带来相比基线方法的最先进结果。

ABSTRACT

ChatGPT and other general large language models (LLMs) have achieved remarkable success, but they have also raised concerns about the misuse of AI-generated texts. Existing AI-generated text detection models, such as based on BERT and RoBERTa, are prone to in-domain over-fitting, leading to poor out-of-domain (OOD) detection performance. In this paper, we first collected Chinese text responses generated by human experts and 9 types of LLMs, for which to multiple domains questions, and further created a dataset that mixed human-written sentences and sentences polished by LLMs. We then proposed LLM-Detector, a novel method for both document-level and sentence-level text detection through Instruction Tuning of LLMs. Our method leverages the wealth of knowledge LLMs acquire during pre-training, enabling them to detect the text they generate. Instruction tuning aligns the model's responses with the user's expected text detection tasks. Experimental results show that previous methods struggle with sentence-level AI-generated text detection and OOD detection. In contrast, our proposed method not only significantly outperforms baseline methods in both sentence-level and document-level text detection but also demonstrates strong generalization capabilities. Furthermore, since LLM-Detector is trained based on open-source LLMs, it is easy to customize for deployment.

研究动机与目标

  • 在多样化领域和语言背景下,推动对中文 AI 生成文本的鲁棒检测。
  • 创建一个全面的多领域中文检测数据集,包含人工和 AI 生成的响应。
  • 开发一个指令微调的 LLM 检测器,具备文档级和句子级检测能力。
  • 展示指令微调相较于现有方法在检测性能上的提升,并能对域外数据实现泛化。

提出的方法

  • 构建一个大型中文检测数据集,包含来自人工专家的151.7k个样本和来自9个LLM的数据,跨7个领域。
  • 通过在基础 LLM 上使用教练指令框架对其进行指令微调来训练 LLM-Detector,其中输入 x_c 引导模型输出文本源标签(Human 或 AI)。
  • 使用 QLoRA,在检测数据上对不同规模的模型进行微调,使用 4 个 A100 GPU 和 fp16,学习率为 5e-5,训练 3 轮,LoRA 阶数 8。
  • 在域内数据(M4 seed problems)和域外数据(News domain)上进行评估,并进行带注释句子的句子级检测。
  • 与零-shot 检测器(Fast-DetectGPT、GLTR、PPL)和监督分类器(BERT/RoBERTa、MPU、LLaMA2、Mixtral)进行对比评估。
  • 评估对短文本和混合 AI-人工内容的鲁棒性;通过使用中文训练的 LLM 来分析语言相关效应。

实验结果

研究问题

  • RQ1开源 LLM 的指令微调是否能在文档级和句子级上提升对 AI 生成中文文本的检测?
  • RQ2相对于基线检测器,LLM-Detector 在域内与域外数据上的表现如何?
  • RQ3使用目标语言(中文)训练的数据是否比使用英文训练的检测器在性能上更优?
  • RQ4文本长度和混合 AI-人工内容对检测准确率的影响?
  • RQ5在特定 LLM 生成文本上训练的检测器是否能泛化到其他 LLM 和不同规模?

主要发现

  • LLM-Detector-Large 在域内准确率达到 98.52%,超越了先前的监督和零-shot 检测器。
  • 在域外数据上,LLM-Detector-Large 达到 96.70% 的准确率,显示出强大的泛化。
  • 使用 LLM-Detector-Small 的句子级检测达到 71.36% 精确率和 72.62% 召回率(Macro-F1 73.50)。
  • 与 Fast-DetectGPT、GLTR 和 PPL 相比,LLM-Detector 在域内和域外场景均表现更优。
  • 短文本并不会显著降低 LLM-Detector 的性能,与许多监督或统计检测器不同。
  • 在中文数据上训练的检测器比在英文数据上训练的对等方法表现更好,凸显语言对齐训练的好处。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。