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

基于Transformer深度学习算法的大语言模型(LLM)AI文本生成检测

Large Language Model (LLM) AI text generation detection based on transformer deep learning algorithm

Carnegie Mellon University(卡内基梅隆大学);University of Maryland(马里兰大学);New York University(纽约大学);Texas A&M University(德克萨斯A&M大学)

Yuhong Mo, Hao Qin, Yushan Dong, Ziyi Zhu, Zhenglin Li

AI总结:

本研究基于Transformer融合LSTM、CNN构建深度学习检测工具,经文本预处理后用于LLM生成文本检测,在测试集上实现99%准确率、0.99精确率、1召回率及0.99的F1值,为AI文本检测提供参考。

摘要:

本文基于Transformer模型开发了一款用于检测LLM AI文本生成的工具,旨在提升AI文本生成检测的准确率,为后续研究提供参考。首先对文本进行Unicode归一化,转换为小写形式,通过正则表达式去除非字母字符和标点符号之外的字符,在标点符号周围添加空格,去除首尾空格,将连续省略号替换为单个空格,并使用指定分隔符连接文本。接着去除非字母字符和多余空白字符,将多个连续空白字符替换为单个空格,并再次转换为小写形式。该深度学习模型融合了LSTM、Transformer和CNN等层,用于文本分类或序列标注任务。训练集和验证集结果显示,模型损失从0.127下降至0.005,准确率从94.96提升至99.8,表明模型对AI生成文本具备良好的检测与分类能力。测试集的混淆矩阵和准确率结果显示,模型对AI生成文本的预测准确率达99%,精确率为0.99,召回率为1,F1值为0.99,实现了极高的分类准确率。展望未来,该工具在AI文本检测领域具有广泛的应用前景。

英文摘要:

In this paper, a tool for detecting LLM AI text generation is developed based on the Transformer model, aiming to improve the accuracy of AI text generation detection and provide reference for subsequent research. Firstly the text is Unicode normalised, converted to lowercase form, characters other than non-alphabetic characters and punctuation marks are removed by regular expressions, spaces are added around punctuation marks, first and last spaces are removed, consecutive ellipses are replaced with single spaces and the text is connected using the specified delimiter. Next remove non-alphabetic characters and extra whitespace characters, replace multiple consecutive whitespace characters with a single space and again convert to lowercase form. The deep learning model combines layers such as LSTM, Transformer and CNN for text classification or sequence labelling tasks. The training and validation sets show that the model loss decreases from 0.127 to 0.005 and accuracy increases from 94.96 to 99.8, indicating that the model has good detection and classification ability for AI generated text. The test set confusion matrix and accuracy show that the model has 99% prediction accuracy for AI-generated text, with a precision of 0.99, a recall of 1, and an f1 score of 0.99, achieving a very high classification accuracy. Looking forward, it has the prospect of wide application in the field of AI text detection.

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

↑