构建首个公开AI生成代码检测数据集,助力识别代码作者身份
AIGCodeSet: A New Annotated Dataset for AI Generated Code Detection
- 收集2828条AI生成与4755条人工编写代码,覆盖多种主流模型
- 贝叶斯分类器在检测任务中表现最优,准确率显著领先其他方法
- 适合研究代码可解释性、学术诚信或模型溯源的开发者和研究人员
大型语言模型虽为软件开发带来便利,但可能引发求职面试和学生作业中的伦理问题。因此,判断代码是人类编写的还是人工智能生成的至关重要。本文提出AIGCodeSet,包含2.828万条由CodeLlama 34B、Codestral 22B和Gemini 1.5 Flash生成的AI代码,以及4.755万条人工编写的Python代码。同时,我们对基线检测方法进行了实验评估,结果表明贝叶斯分类器在检测性能上优于其他模型。
原文摘要 · Abstract (English)
While large language models provide significant convenience for software development, they can lead to ethical issues in job interviews and student assignments. Therefore, determining whether a piece of code is written by a human or generated by an artificial intelligence (AI) model is a critical issue. In this study, we present AIGCodeSet, which consists of 2.828 AI-generated and 4.755 human-written Python codes, created using CodeLlama 34B, Codestral 22B, and Gemini 1.5 Flash. In addition, we share the results of our experiments conducted with baseline detection methods. Our experiments show that a Bayesian classifier outperforms the other models.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。