Graph-augmented black-box detection of Chinese text generated by large models
Online published: 2025-08-20
Copyright
The widespread use of large language models has led to an increase in the misuse of their generated text, including scenarios such as using these models to write academic papers, produce low-quality peer review comments, and create misleading news articles. Detecting text generated by large models is essential for ensuring the integrity of online information and combating misinformation. Given that commercial models are typically closed-source, black-box detection methods that do not require access to model parameters align better with practical needs and real-world applications. Additionally, most existing detection methods focus primarily on English text and are unsuitable for Chinese text due to significant differences in encoding. Current techniques also tend to rely heavily on the feature extraction capabilities of the models themselves, often overlooking the critical importance of logical structure in the text. This research introduced a systematic method for constructing a dataset of Chinese text generated by large models and proposed a graph-augmented black-box detection model to effectively identify such texts. Experiments revealed the significant role of logical structure features in detecting Chinese text produced by these models accurately. By incorporating logical structure into detection methods, researchers improved the ability to differentiate between human-written and machine-generated content significantly. The proposed approach not only addresses the challenges posed by the closed nature of large models but also highlights the effectiveness of focusing on the logical structure of texts to enhance detection accuracy. The findings underscore the necessity of developing specialized detection methods for various languages and demonstrate that an emphasis on text structure can lead to more robust and reliable detection mechanisms. Effective identification of large model-generated Chinese text is crucial for maintaining the reliability of information in the digital landscape. The study concludes that refining detection techniques to account for linguistic and structural differences is vital for keeping pace with advancements in large language model technology, ensuring a safer and more trustworthy online environment.
DONG Lingzhong , ZHANG Zhuosheng , MENG Kui , LIU Gongshen . Graph-augmented black-box detection of Chinese text generated by large models[J]. Journal of Cybersecurity, 2025 , 3(3) : 68 -78 . DOI: 10.20172/j.issn.2097-3136.250305
表 1 机器生成文本方法比较Table 1 Comparison of methods for machine-generated text |
| 生成方法 | 输入信息 | 与原文差异 |
| 转述 | 完整原文,转述要求 | 较小 |
| 扩写 | 原文主要内容,扩写要求 | 较大 |
表 2 转述提示词Table 2 Paraphrase prompts |
| 转述提示词 |
| '尝试用更具体的词汇来描述你的想法。', |
| '简化句子,使之更容易理解。', |
| '确保你的段落过渡自然流畅。', |
| '使用更多的同义词来避免重复。', |
| '删除冗长或不必要的表述。', |
| '确保你的观点清晰明了。', |
| '删除或替换模棱两可或含糊不清的措辞。', |
| '给予读者更多的上下文信息。', |
| '确保你的论证具有逻辑连贯性。', |
| '用更具体的实例来支撑你的主张。', |
| '删除重复或不必要的信息。', |
| '确保每个段落都有一个清晰的主题句。', |
| '使用变化丰富的句型来增加文章的吸引力。', |
| '通过改变句子的顺序来增加流畅度。', |
| '使用引用和引用来源来支持你的观点。', |
| '用更具体的数字和数据来增强论证的说服力。', |
| '删除不必要的重复观点或论证。', |
| '修改任何不准确或模棱两可的声明。', |
| '提供更多背景信息以便读者了解背景。', |
| '用生动形象的语言来描述场景或情境。', |
| '检查并修改不恰当或不专业的用词。', |
| '检查并修改任何片面或不完整的论述。', |
| '删除或替换任何不必要的修饰语。', |
| '修改任何不必要的复杂句子。' |
表 4 实验环境配置Table 4 Experimental environment configuration |
| 名称 | 配置 |
| 处理器 | NVIDIA GeForce RTX |
| 显存 | 24.00GB |
| 操作系统 | Ubuntu 20.04 |
| 软件环境 | Python 3.9.19、PyTorch 2.2.1+cu121、 Transformers 4.44.2、scikit-learn1.5.1 dgl2.4.0+cu121、CoreNLP4.5.7 |
| 开发语言 | Python |
表 5 模型参数设置Table 5 Model parameter settings |
| 名称 | 参数 | 设置 |
| RoBERTa | 名称 | Chinese-roberta-wwm-ext |
| 训练维度 | 768 | |
| 最大长度 | 512 | |
| GCN | 训练维度 | 768 |
| 层数 | 2 | |
| 最大节点数 | 50 | |
| 最大边数 | 100 | |
| Dropout层 | 比率 | 0.5 |
| 全连接层 | 输出空间维度 | 2 |
| 激活函数 | ReLU | |
| 训练参数 | 批处理大小 | 16 |
| 学习率 | 2×10−5 | |
| 训练轮数 | 2 | |
| 优化策略 | Adam |
| 算法1 提取实体关系图特征 |
| Input: 实体节点信息 nodes、实体图边信息edges、RoBERTa输出词表示 Output: 实体关系图特征 |
| 1. if 文本有实体图 then 2. 新建实体图 3. 添加节点 |
| 4. 添加实体关系边 |
| 5. 添加自环关系边; 6. for 7. 计算节点 8. end 9. 计算GCN融合节点特征; 10. 计算实体关系图特征; 11. else 12. 实体关系图特征 13. end |
表 6 书面文风中文数据集实验结果Table 6 Experimental results of Chinese dataset |
表 7 口语文风中文数据集实验Table 7 The Chinese dataset experiment of colloquial style |
| 模型 | 准确率 | F1分数 |
| GLTR基线 | 86.65% | 86.65% |
| RoBERTa基线 | 90.97% | 91.71% |
| RoBERTa图增强 | 92.17% | 92.73% |
表 8 消融实验Table 8 Ablation experiment |
| 模型 | 准确率 | F1分数 |
| RoBERTa图增强 | 94.80% | 95.05% |
| - 图增强特征 | 94.38% | 94.68% |
| - 全局表示特征 | 94.61% | 94.84% |
表 9 模型跨域测试集检测准确率Table 9 Model cross-domain test accuracy |
| 训练集/测试集 | 准确率 | |
| 新闻- Llama | 新闻-QWEN | |
| 新闻- Llama | 96.60% | 96.75% |
| 新闻-QWEN | 95.32% | 98.17% |
表 10 主题跨域测试集检测准确率Table 10 Topic cross-domain test accuracy |
| 训练集/测试集 | 准确率 | |
| 新闻-QWEN | 百科-QWEN | |
| 新闻-QWEN | 98.17% | 50.21% |
| 百科-QWEN | 74.42% | 96.06% |
表 11 混合数据集准确率检测结果Table 11 Result of mixed dataset experiments |
| 训练集/测试集 | 准确率 | |
| 新闻-QWEN | 百科-QWEN | |
| 混合数据集 | 96.38% | 94.84% |
| 1 |
MIRSKY Y, DEMONTIS A, KOTAK J, et al. The threat of offensive ai to organizations[J]. Computers & Security, 2023, 124, 103006.
|
| 2 |
KIRCHENBAUER J, GEIPING J, WEN Y, et al. A watermark for large language models[C]//Proceedings of the 40th International Conference on Machine Learning. PMLR, 2023: 17061-17084.
|
| 3 |
SHI W, AJITH A, XIA M, et al. Detecting pretraining data from large language models[J].arXiv preprint, arXiv: 2310.16789
|
| 4 |
DUGAN L, IPPOLITO D, KIRUBARAJAN A, et al. Real or fake text: Investigating human ability to detect boundaries between human-written and machine-generated text[C]// Proceedings of the AAAI Conference on Artificial Intelligence, 2023, 37(11): 12763-12771.
|
| 5 |
LIANG W, IZZO Z, ZHANG Y, et al. Monitoring AI-modified content at scale: A case study on the impact of ChatGPT on AI conference peer reviews[C]//Proceedings of the 41st International Conference on Machine Learning. PMLR, 2024: 29575-29620.
|
| 6 |
FANG X, CHE S, MAO M, et al. Bias of AI-generated content: An examination of news produced by large language models[J]. Scientific Reports, 2024, 14 (1): 5224.
|
| 7 |
LIU Y, OTT M, GOYAL N, et al. RoBERTa: A robustly optimized BERT pretraining approach[J] .arXiv preprint, arXiv: 1907.11692
|
| 8 |
GUO B, ZHANG X, WANG Z, et al. How close is ChatGPT to human experts? comparison corpus, evaluation, and detection[J].arXiv preprint, arXiv: 2301.07597
|
| 9 |
LIU X, ZHANG Z, WANG Y, et al. CoCo: Coherence-enhanced machine-generated text detection under low resource with contrastive learning[C]// Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, 2023: 16167-16188.
|
| 10 |
CHEN Y, KANG H, ZHAI V, et al. Token prediction as implicit classification to identify LLM-generated text[C]// Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, 2023: 13112-13120.
|
| 11 |
SHI Y, SHENG Q, CAO J, et al. Ten words only still help: Improving black-box AI-generated text detection via proxy-guided efficient re-sampling[J]. arXiv preprint, arXiv: 2402.09199v1
|
| 12 |
LI Y, LI Q, CUI L, et al. MAGE: Machine-generated text detection in the wild[C]/ Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics, 2024: 36-53.
|
| 13 |
LIU S, LIU X, WANG Y, et al. Does DetectGPT fully utilize perturbation? bridging selective perturbation to fine-tuned contrastive learning detector would be better[C]// Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics, 2024: 1874-1889.
|
| 14 |
熊盼, 杨浠, 郑旭飞, 等. AI生成与人类作者撰写论文要素的检测研究[J]. 人工智能科学与工程, 2024, (4): 21- 30.
XIONG P, YANG X, ZHENG X F, et al. Detection research on elements of AI-generated and human-written academic papers[J]. Artificial Intelligence Science and Engineering, 2024, (4): 21- 30.
|
| 15 |
WANG Y, MANSUROV J, IVANOV P, et al. M4GT-Bench: Evaluation benchmark for black-box machine-generated text detection[C]//Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics, 2024: 3964-3992.
WANG Y, MANSUROV J, IVANOV P, et al. M4GT-Bench: Evaluation benchmark for black-box machine-generated text detection[C]//Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics, 2024: 3964-3992.
|
| 16 |
CUI Y, CHE W, LIU T, et al. Pre-training with whole word masking for Chinese BERT[J]. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 2021, 29, 3504- 3514.
|
| 17 |
Neural deepfake detection with factual structure of text - ACL anthology[C]//Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP).Association for Computational Linguistics, 2020: 2461–2470
|
| 18 |
LI Y, WANG Z, CUI L, et al. Spotting AI’s touch: Identifying LLM-paraphrased spans in text[C]// Findings of the Association for Computational Linguistics ACL 2024. Association for Computational Linguistics, 2024: 7088-7107.
|
| 19 |
WANG S, ZHENG Y, WANG G, et al. Llama3.1-8B-Chinese-chat[Z]. Hugging Face, 2024.
|
| 20 |
BAI J, BAI S, CHU Y, et al. Qwen technical report[J]. arXiv preprint, arXiv: 2309.16609.
|
| 21 |
WOLF T, DEBUT L, SANH V, et al. Transformers: State-of-the-art natural language processing[C]// Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations. Association for Computational Linguistics, 2020: 38-45.
|
| 22 |
MANNING C, SURDEANU M, BAUER J, et al. The stanford CoreNLP natural language processing Toolkit[C]//Proceedings of 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations. Baltimore, Association for Computational Linguistics, 2014: 55-60.
|
| 23 |
WANG M, ZHENG D, YE Z, et al. Deep graph library: A graph-centric, highly-performant package for graph neural networks[J]. arXiv preprint, arXiv: 1909.01315.
|
| 24 |
BAO G, ZHAO Y, TENG Z, et al. Fast-DetectGPT: Efficient zero-shot detection of machine-generated text via conditional probability curvature[C]//The Twelfth International Conference on Learning Representations. 2023.
|
| 25 |
GAO L, BIDERMAN S, BLACK S, et al. The pile: An 800GB dataset of diverse text for language modeling[J]. arXiv preprint, arXiv: 2101.00027.
|
| 26 |
GEHRMANN S, STROBELT H, RUSH A. GLTR: Statistical detection and visualization of generated text[C]// Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: System Demonstrations. Association for Computational Linguistics, 2019: 111-116.
|
| 27 |
ZHANG Z, QIN W, PLUMMER B. Machine-generated text localization[C]// Findings of the Association for Computational Linguistics ACL 2024. Association for Computational Linguistics, 2024: 8357-8371.
|
/
| 〈 |
|
〉 |