EX-CODE: A Robust and Explainable Model to Detect AI-Generated Code
Open Access
- 20 December 2024
- journal article
- research article
- Published by MDPI AG in Information
- Vol. 15 (12) , 819
Abstract
Distinguishing whether some code portions were implemented by humans or generated by a tool based on artificial intelligence has become hard. However, such a classification would be important as it could point developers towards some further validation for the produced code. Additionally, it holds significant importance in security, legal contexts, and educational settings, where upholding academic integrity is of utmost importance. We present EX-CODE, a novel and explainable model that leverages the probability of the occurrence of some tokens, within a code snippet, estimated according to a language model, to distinguish human-written from AI-generated code. EX-CODE has been evaluated on a heterogeneous real-world dataset and stands out for its ability to provide human-understandable explanations of its outcomes. It achieves this by uncovering the features that for a snippet of code make it classified as human-written code (or AI-generated code).Keywords
This publication has 31 references indexed in Scilit:
- Explainable Artificial Intelligence for Autonomous Driving: A Comprehensive Overview and Field Guide for Future Research DirectionsIEEE Access, 2024
- GPTSniffer: A CodeBERT-based classifier to detect source code written by ChatGPTJournal of Systems and Software, 2024
- Interpreting Black-Box Models: A Review on Explainable Artificial IntelligenceCognitive Computation, 2023
- A systematic review of Explainable Artificial Intelligence models and applications: Recent developments and future trendsDecision Analytics Journal, 2023
- Explainable artificial intelligence: a comprehensive reviewArtificial Intelligence Review, 2021
- Explainable artificial intelligence: an analytical reviewWIREs Data Mining and Knowledge Discovery, 2021
- A historical perspective of explainable Artificial IntelligenceWIREs Data Mining and Knowledge Discovery, 2020
- Comparing performances of logistic regression, classification and regression tree, and neural networks for predicting coronary artery diseaseExpert Systems with Applications, 2008
- Semantic clustering: Identifying topics in source codeInformation and Software Technology, 2007
- Review: A gentle introduction to imputation of missing valuesJournal of Clinical Epidemiology, 2006