ZeroTraceGPT: A Robust Framework for Identifying Human VS AI-Generated Code
DOI:
https://doi.org/10.56979/1201/2026/1645Keywords:
AI Generated Code, Code Classification, AI Code Detection, CodeBERT, Pre-trained Models, Abstract Syntax TreeAbstract
Artificial intelligence tools such as ChatGPT emerged in the software development space as useful resources for effectively providing solutions to complex programming problems. These tools can ease and help with writing code; however, with the evolution of AI-generated source code, there is a growing need to identify whether code is written by a human or AI. To address this challenge, we proposed a novel model called ZeroTraceGPT. It has been built upon a new variant of GraphCodeBERT model called GBERT-EVO. Where GBERT-EVO is GraphCodeBERT Evolution that is the innovative variant model introduced in this research. Which uses the data flow patterns and structural integrity to trace the AI-code. ZeroTraceGPT model consists of four key components that contribute to the detection of AI and human-generated code, including: 1) Scraper, which extracts the code data initially, 2) Segmenter, tokenizes the code after the extraction task, 3) Train Guard, component evaluates and trains the model for the detection of the AI and human-written code, and 4) a Labeler, component assesses the train model results and classifies the code as either AI-written or human-written. During our evaluation, ZeroTraceGPT performed better than the previous state of the art GPTSniffer model, which performed poorly and had significant drawbacks. ZeroTraceGPT produced faster, accurate, and more reliable results and outperformed GPTSniffer with an average improvement of 11.75 percentage points across accuracy, precision, recall and F1-score under identical experimental conditions.
Downloads
Published
How to Cite
Issue
Section
License
This is an open Access Article published by Research Center of Computing & Biomedical Informatics (RCBI), Lahore, Pakistan under CCBY 4.0 International License




