arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.18904cs.CLcs.AIcs.IRcs.LG

DuoLens:一种面向机器生成多语言文本与代码的鲁棒检测框架

DuoLens: A Framework for Robust Detection of Machine-Generated Multilingual Text and Code

Shriyansh Agrawal, Aidan Lau, Sanyam Shah, Ahan M R, Kevin Zhu, Sunishchal Dev, Vasu Sharma

AI总结:

针对现有机器生成内容检测器准确性与计算效率难以兼顾的问题,提出DuoLens框架,通过微调仅编码器结构的小语言模型实现多语言文本与代码的鲁棒检测,性能大幅优于大语言模型且计算成本显著更低。

摘要:

大语言模型(LLMs)被广泛用于生成多语言文本与源代码,这愈发凸显了机器生成内容检测器需在跨领域场景下兼具准确性与高效性的必要性。当前主流检测器多采用零样本方法,例如Fast DetectGPT或GPTZero,要么计算成本高昂,要么准确性不足,且二者往往存在权衡关系,仍有较大提升空间。为填补这些空白,我们提出对仅编码器结构的小语言模型(SLMs)进行微调,具体采用RoBERTa和CodeBERTa预训练模型,结合源代码及其他自然语言领域的专用数据集开展实验,证明在二分类任务中,SLMs以远低于LLMs的计算量实现了大幅更优的性能。我们的编码器在输入为512个token时,AUROC达0.97至0.99,宏F1值为0.89至0.94,同时延迟降低8至12倍,峰值显存占用降低3至5倍。在跨生成器偏移和对抗性变换(释义、回译;代码格式化/重命名)场景下,性能仍保留干净样本AUROC的92%以上。我们开源了包含随机种子与配置的训练及评估脚本,同时附带可复现性检查清单。

英文摘要:

The prevalence of Large Language Models (LLMs) for generating multilingual text and source code has only increased the imperative for machine-generated content detectors to be accurate and efficient across domains. Current detectors, predominantly utilizing zero-shot methods, such as Fast DetectGPT or GPTZero, either incur high computational cost or lack sufficient accuracy, often with a trade-off between the two, leaving room for further improvement. To address these gaps, we propose the fine-tuning of encoder-only Small Language Models (SLMs), in particular, the pre-trained models of RoBERTA and CodeBERTa using specialized datasets on source code and other natural language to prove that for the task of binary classification, SLMs outperform LLMs by a huge margin whilst using a fraction of compute. Our encoders achieve AUROC $= 0.97$ to $0.99$ and macro-F1 $0.89$ to $0.94$ while reducing latency by $8$-$12\times$ and peak VRAM by $3$-$5\times$ at $512$-token inputs. Under cross-generator shifts and adversarial transformations (paraphrase, back-translation; code formatting/renaming), performance retains $\geq 92%$ of clean AUROC. We release training and evaluation scripts with seeds and configs; a reproducibility checklist is also included.

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

↑