使用k-gram软件特征检测大语言模型辅助的代码抄袭
Detection of LLM-assisted Code Plagiarism Using k-gram Software Birthmarks
AI总结:
研究大语言模型辅助下代码抄袭问题,用基于Java操作码唯一k-gram的软件特征,结合三个当代大语言模型及五个相似度度量进行检测,证明其对检测此类抄袭有效。
摘要:
大语言模型显著降低了软件抄袭的技术壁垒。现代大语言模型通过转换现有源代码同时保留其功能,可以生成语义相同但可能逃避传统抄袭检测技术的程序。本文研究软件特征是否能检测这种大语言模型辅助的抄袭行为。我们使用基于Java操作码唯一k-gram的k-gram软件特征,k范围从1到6。我们使用三个当代大语言模型:ChatGPT-5.1-Codex-Mini、DeepSeek-V4-Flash和Claude-Haiku-4.5。数据集由从积极维护的BSD-2-Clause许可的Java项目中提取的可单独编译的源文件组成。我们进一步比较了用于特征匹配的五个相似度度量:余弦相似度、Dice指数、Jaccard系数、Simpson指数和基于编辑距离的相似度。结果表明,k-gram软件特征对于检测大语言模型辅助的抄袭行为仍然有效。在评估的模型中,ChatGPT-5.1-Codex-Mini生成了最难检测的克隆。此外,研究结果证实了面向编码的模型在抄袭任务中的更高性能。
英文摘要:
Large language models (LLMs) have significantly lowered the technical barrier to software plagiarism. By transforming existing source code while preserving its functionality, modern LLMs can generate semantically identical program that may evade traditional plagiarism detection techniques. Among such attacks, code paraphrasing modifies the syntax and structure of a program while preserving its behavior. This paper investigates whether software birthmarks can detect such LLM-assisted plagiarism. As a starting point, we employ k-gram software birthmarks based on unique k-grams of Java opcodes, with k ranging from 1 to 6. We employ three contemporary LLMs: ChatGPT-5.1-Codex-Mini, DeepSeek-V4-Flash, and Claude-Haiku-4.5. The dataset consists of individually compilable source files extracted from actively maintained BSD-2-Clause licensed Java projects. We further compare five similarity measures for birthmark matching: cosine similarity, Dice index, Jaccard coefficient, Simpson index, and edit-distance-based similarity. The results demonstrate that k-gram software birthmarks remain effective for detecting LLM-assisted plagiarism. Among the evaluated models, ChatGPT-5.1-Codex-Mini generated the most difficult-to-detect clones. Furthermore, the findings confirm the higher performance of coding-oriented models for plagiarism task.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。