arrow
返回

GPTSniffer: A CodeBERT-based classifier to detect source code written by ChatGPT

delete2024-08-01
delete7
delete
OA
AI
P
Phuong T. Nguyen
J
Juri Di Rocco
C
Claudio Di Sipio
R
Riccardo Rubei
D
Davide Di Ruscio *
M
Massimiliano Di Penta
DOI:10.1016/j.jss.2024.112059delete
delete原文链接
delete分享
delete收藏
查看原文
摘要

摘要

En 中文
Since its launch in November 2022, ChatGPT has gained popularity among users, especially programmers who use it to solve development issues. However, while offering a practical solution to programming problems, ChatGPT should be used primarily as a supporting tool (e.g., in software education) rather than as a replacement for humans. Thus, detecting automatically generated source code by ChatGPT is necessary, and tools for identifying AI -generated content need to be adapted to work effectively with code. This paper presents GPTSniffer- a novel approach to the detection of source code written by AI - built on top of CodeBERT. We conducted an empirical study to investigate the feasibility of automated identification of AI -generated code, and the factors that influence this ability. The results show that GPTSniffer can accurately classify whether code is human -written or AI -generated, outperforming two baselines, GPTZero and OpenAI Text Classifier. Also, the study shows how similar training data or a classification context with paired snippets helps boost the prediction. We conclude that GPTSniffer can be leveraged in different contexts, e.g., in software engineering education, where teachers use the tool to detect cheating and plagiarism, or in development, where AI -generated code may require peculiar quality assurance activities.
Keyword:
ChatGPT
Code classification
CodeBERT
Pre-trained Models
AI总结

AI总结

对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。

期刊

Journal of Systems and Software 封面图
Journal of Systems and Software
IF:
4.1
论文数:
5.5K
被引数:
8.4K

机构

University of LAquila 封面图
University of LAquila
学者数:
7.4K
论文数: 6.6K
被引数: 6.7K
University of Sannio 封面图
University of Sannio
学者数:
2.3K
论文数: 2.2K
被引数: 2.3K
引用论文

引用论文

err分享
err收藏
Environmental Performance Index to Assess the Situation in Regions of Ukraine in Terms of their Competitiveness
err2021-03-01
err0
errOAAI
errWladyslawa Luczka; Nadiia Shmygol; Irina Varlamova; Joanna Smoluk-Sikorska; Mariusz Malinowski
err分享
err收藏
RePOR: Mimicking humans on refactoring tasks. Are we there yet?
err2020-06-07
err4
errOAAI
errMorales, Rodrigo; Khomh, Foutse; Antoniol, Giuliano
err分享
err收藏
Local versus Global Lessons for Defect Prediction and Effort Estimation
err2013-06-01
err169
PREAI
errMenzies, Tim; Butcher, Andrew; Cok, David; Marcus, Andrian; Layman, Lucas; Shull, Forrest; Turhan, Burak; Zimmermann, Thomas
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
Micropuncture and Microanalytic Studies of the Rat Testis and Epididymis
err1975-01-01
err0
PREAI
errStuart S. Howards; Anne Johnson; Sandra Jessee
err分享
err收藏
Epitaxial Al/GaAs/Al tri-layers fabricated using a novel wafer-bonding technique
err2020-09-15
err0
errOAAI
errAnthony P. McFadden; Aranya Goswami; Michael Seas; Corey Rae H. McRae; Ruichen Zhao; David P. Pappas; Christopher J. Palmstrøm
err分享
err收藏
err分享
err收藏
学者 查看更多内容