arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2508.13152cs.CLcs.AI
收藏

RepreGuard:通过揭示隐藏表示模式检测LLM生成文本

RepreGuard: Detecting LLM-Generated Text by Revealing Hidden Representation Patterns

NLP(自然语言处理);CT Lab, Department of Computer and Information Science, University of Macau(计算机与信息科学系,澳门大学);Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences(深圳先进技术研究院,中国科学院);Provable Responsible AI and Data Analytics Lab, KAUST(可证明责任AI与数据分析实验室,卡尔斯兰大学);Hong Kong Baptist University(香港 Baptist 大学)

Xin Chen, Junchao Wu, Shu Yang, Runzhe Zhan, Zeyu Wu, Ziyang Luo, Di Wang, Min Yang, Lidia S. Chao, Derek F. Wong

AI总结:

本文提出RepreGuard,一种基于LLM内部表示激活模式差异的统计检测方法,通过代理模型提取特征并计算投影分数进行分类,在分布内和分布外场景下平均AUROC达94.92%,优于现有基线且对文本规模和主流攻击具有鲁棒性。

摘要:

检测由大语言模型(LLMs)生成的内容对于防止滥用和构建可信的AI系统至关重要。尽管现有检测方法表现良好,但它们在分布外(OOD)场景下的鲁棒性仍然不足。在本文中,我们假设:与现有检测方法所使用的特征相比,LLMs的内部表示包含更全面、更原始的特征,能够更有效地捕捉和区分LLM生成文本(LGT)与人类撰写文本(HWT)之间的统计模式差异。我们在不同LLMs上验证了这一假设,并观察到在处理这两类文本时神经激活模式存在显著差异。基于此,我们提出RepreGuard,一种高效的基于统计的检测方法。具体而言,我们首先使用一个代理模型收集LGT和HWT的表示,并提取能够更好识别LGT的独特激活特征。通过计算文本表示沿该特征方向的投影分数,并与预先计算的阈值进行比较,即可对文本进行分类。实验结果表明,RepreGuard在分布内(ID)和OOD场景下均优于所有基线方法,平均AUROC达到94.92%,同时对各种文本规模和主流攻击表现出稳健的抵抗力。数据和代码已公开于:https://github.com/NLP2CT/RepreGuard

英文摘要:

Detecting content generated by large language models (LLMs) is crucial for preventing misuse and building trustworthy AI systems. Although existing detection methods perform well, their robustness in out-of-distribution (OOD) scenarios is still lacking. In this paper, we hypothesize that, compared to features used by existing detection methods, the internal representations of LLMs contain more comprehensive and raw features that can more effectively capture and distinguish the statistical pattern differences between LLM-generated texts (LGT) and human-written texts (HWT). We validated this hypothesis across different LLMs and observed significant differences in neural activation patterns when processing these two types of texts. Based on this, we propose RepreGuard, an efficient statistics-based detection method. Specifically, we first employ a surrogate model to collect representation of LGT and HWT, and extract the distinct activation feature that can better identify LGT. We can classify the text by calculating the projection score of the text representations along this feature direction and comparing with a precomputed threshold. Experimental results show that RepreGuard outperforms all baselines with average 94.92% AUROC on both in-distribution (ID) and OOD scenarios, while also demonstrating robust resilience to various text sizes and mainstream attacks. Data and code are publicly available at: https://github.com/NLP2CT/RepreGuard

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

↑