Recent releases of Large Language Models (LLMs), e.g. ChatGPT, are astonishing at generating human-like texts, but they may get misused for fake scholarly texts, fake news, fake tweets, et cetera. Previous works have proposed methods to detect these multiscale AI-generated texts, including simple ML classifiers, pretrained-model-based training-agnostic methods, and finetuned language classification models. However, mainstream detectors are formulated without considering the factor of corpus length: shorter corpuses are harder to detect compared with longer ones for shortage of informative features. In this paper, a Multiscale Positive-Unlabeled (MPU) training framework is proposed to address the challenge of multiscale text detection. Firstly, we acknowledge the human-resemblance property of short machine texts, and rephrase text classification as a Positive-Unlabeled (PU) problem by marking these short machine texts as "unlabeled" during training. In this PU context, we propose the length-sensitive Multiscale PU Loss, where we use a recurrent model in abstraction to estimate positive priors of scale-variant corpuses. Additionally, we introduce a Text Multiscaling module to enrich training corpuses. Experiments show that our MPU method augments detection performance on long AI-generated text, and significantly improves short-corpus detection of language model detectors. Language Models trained with MPU could outcompete existing detectors by large margins on multiscale AI-generated texts. The codes are available at https://github.com/mindspore-lab/mindone/tree/master/examples/detect_chatgpt and https://github.com/YuchuanTian/AIGC_text_detector.
翻译:近期发布的大型语言模型(LLMs,如ChatGPT)在生成类人文本方面令人惊叹,但这些能力可能被滥用于伪造学术文本、虚假新闻、虚假推文等。先前的研究提出了检测这些多尺度AI生成文本的方法,包括简单机器学习分类器、基于预训练模型的免训练方法以及微调的语言分类模型。然而,主流检测器并未考虑语料长度因素:由于信息特征不足,短文本相较于长文本更难检测。本文提出了一种多尺度正-未标记(MPU)训练框架,以应对多尺度文本检测的挑战。首先,我们承认短机器文本具有类人特性,并将文本分类重新表述为正-未标记(PU)问题,通过在训练过程中将这些短机器文本标记为“未标记”来实现。在此PU背景下,我们提出了长度敏感的多尺度PU损失函数,通过抽象的递归模型估计不同尺度语料的正先验概率。此外,我们引入了文本多尺度模块来丰富训练语料。实验表明,我们的MPU方法增强了长AI生成文本的检测性能,并显著改进了语言模型检测器对短文本的检测能力。采用MPU训练的语言模型在多尺度AI生成文本的检测中能够大幅超越现有检测器。代码已开源至 https://github.com/mindspore-lab/mindone/tree/master/examples/detect_chatgpt 和 https://github.com/YuchuanTian/AIGC_text_detector。