用LoRA微调大模型检测中文假文本,效果远超传统方法。
LLM Encoder vs. Decoder: Robust Detection of Chinese AI-Generated Text with LoRA
- 用提示词掩码建模法微调编码器,用指令输入+轻量头微调解码器。
- 解码器模型在测试集上达到95.94%准确率,显著优于其他方法。
- 适合关注中文假文本检测、想用小参数高效适配大模型的研究者。
大规模语言模型的快速发展使中文假文本检测需求激增,但语言细微差别给现有方法带来挑战。本研究系统比较了基于编码器的Transformer(Chinese BERT-large 和 RoBERTa-wwm-ext-large)、仅解码器的LLM(阿里Qwen2.5-7B与DeepSeek-R1-Distill-Qwen-7B,均通过低秩适应LoRA微调)以及FastText基线,在NLPCC 2025公开数据集上的表现。编码器模型采用新型提示词掩码语言建模微调,而Qwen2.5-7B使用指令格式输入与轻量分类头,通过LoRA进行训练。实验显示,尽管编码器模型几乎记忆训练数据,但在分布外场景下性能严重下降(RoBERTa: 76.3% 测试准确率;BERT: 79.3%),FastText虽具词汇鲁棒性(83.5% 准确率)但缺乏语义理解。相比之下,LoRA微调的Qwen2.5-7B实现95.94%测试准确率,且精确率与召回率平衡,展现出更强泛化能力与对数据集特异性噪声的抗性。结果表明,结合参数高效微调的解码器模型在中文假文本检测中更具优势。未来将探索Qwen3、蒸馏变体及集成策略以提升跨域鲁棒性。
原文摘要 · Abstract (English)
The rapid growth of large language models (LLMs) has heightened the demand for accurate detection of AI-generated text, particularly in languages like Chinese, where subtle linguistic nuances pose significant challenges to current methods. In this study, we conduct a systematic comparison of encoder-based Transformers (Chinese BERT-large and RoBERTa-wwm-ext-large), a decoder-only LLM (Alibaba's Qwen2.5-7B/DeepSeek-R1-Distill-Qwen-7B fine-tuned via Low-Rank Adaptation, LoRA), and a FastText baseline using the publicly available dataset from the NLPCC 2025 Chinese AI-Generated Text Detection Task. Encoder models were fine-tuned using a novel prompt-based masked language modeling approach, while Qwen2.5-7B was adapted for classification with an instruction-format input and a lightweight classification head trained via LoRA. Experiments reveal that although encoder models nearly memorize training data, they suffer significant performance degradation under distribution shifts (RoBERTa: 76.3% test accuracy; BERT: 79.3%). FastText demonstrates surprising lexical robustness (83.5% accuracy) yet lacks deeper semantic understanding. In contrast, the LoRA-adapted Qwen2.5-7B achieves 95.94% test accuracy with balanced precision-recall metrics, indicating superior generalization and resilience to dataset-specific artifacts. These findings underscore the efficacy of decoder-based LLMs with parameter-efficient fine-tuning for robust Chinese AI-generated text detection. Future work will explore next-generation Qwen3 models, distilled variants, and ensemble strategies to enhance cross-domain robustness further.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。