CoDet-M4: Detecting Machine-Generated Code in Multi-Lingual, Multi-Generator and Multi-Domain Settings
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have revolutionized code generation, automating programming with remarkable efficiency. However, these advancements challenge programming skills, ethics, and assessment integrity, making the detection of LLM-generated code essential for maintaining accountability and standards. While, there has been some research on this problem, it generally lacks domain coverage and robustness, and only covers a small number of programming languages. To this end, we propose a framework capable of distinguishing between human- and LLM-written code across multiple programming languages, code generators, and domains. We use a large-scale dataset from renowned platforms and LLM-based code generators, alongside applying rigorous data quality checks, feature engineering, and comparative analysis using evaluation of traditional machine learning models, pre-trained language models (PLMs), and LLMs for code detection. We perform an evaluation on out-of-domain scenarios, such as detecting the authorship and hybrid authorship of generated code and generalizing to unseen models, domains, and programming languages. Moreover, our extensive experiments show that our framework effectively distinguishes human- from LLM-written code and sets a new benchmark for this task.
Key facts. Cited by 11 papers in the map (data through 14 Oct 2026). Builds on 39 of its 55 references that are in the map. First posted on arXiv 17 Mar 2025.
Builds on
39 of 55 references.
References · 39
- 2023GPT-4 Technical Reportcited by 18,396
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 2,004
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2021Measuring Coding Challenge Competence With APPScited by 902
27 more
- 2023StarCoder: may the source be with you!cited by 799
- 2023DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvaturecited by 726
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
- 2024ORPO: Monolithic Preference Optimization without Reference Modelcited by 562
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
- 2019GLTR: Statistical Detection and Visualization of Generated Textcited by 496
- 2023How Close is ChatGPT to Human Experts? Comparison Corpus, Evaluation, and Detectioncited by 481
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 452
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 361
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 300
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
- 2023Fast-DetectGPT: Efficient Zero-Shot Detection of Machine-Generated Text via Conditional Probability Curvaturecited by 287
- 2018Learning to Mine Aligned Code and Natural Language Pairs from Stack Overflowcited by 165
- 2022Multi-lingual Evaluation of Code Generation Modelscited by 159
- 2018Mapping Language to Code in Programmatic Contextcited by 104
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 103
- 2022Execution-Based Evaluation for Open-Domain Code Generationcited by 91
- 2023OUTFOX: LLM-Generated Essay Detection Through In-Context Learning with Adversarially Generated Examplescited by 80
- 2022Execution-based Evaluation for Data Science Code Generation Modelscited by 32
- 2023StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Codecited by 32
- 2024ChatGPT "contamination": estimating the prevalence of LLMs in the scholarly literaturecited by 26
- 2024LLM-DetectAIve: a Tool for Fine-Grained Machine-Generated Text Detectioncited by 25
- 2023AI vs. Human -- Differentiation Analysis of Scientific Content Generationcited by 21
- 2024Assessing AI Detectors in Identifying AI-Generated Code: Implications for Educationcited by 18
- 2024Distinguishing LLM-generated from Human-written Code by Contrastive Learningcited by 16
- 2024Whodunit: Classifying Code as Human Authored or GPT-4 Generated -- A case study on CodeChef problemscited by 13
Built on by
Citing papers per year: 2025: 4; 2026: 7.
11 papers.
- 2025textttDroid: A Resource Suite for AI-Generated Code Detectioncited by 9
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generationcited by 8
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMscited by 6
- 2025MultiAIGCD: A Comprehensive dataset for AI Generated Code Detection Covering Multiple Languages, Models,Prompts, and Scenarioscited by 2
- 2026AICD Bench: A Challenging Benchmark for AI-Generated Code Detectioncited by 2
- 2026Hitting a Moving Target: Test-Time Adaptation for AI Text Detection under Continual Distribution Shiftcited by 1
- 2026Whitespaces Don't Lie: Feature-Driven and Embedding-Based Approaches for Detecting Machine-Generated Codecited by 0
- 2026Code Fingerprints: Disentangled Attribution of LLM-Generated Codecited by 0
- 2026GoCoMA: Hyperbolic Multimodal Representation Fusion for Large Language Model-Generated Code Attributioncited by 0
- 2026FMI_SU_Yotkova_Kastreva at SemEval-2026 Task 13: Lightweight Detection of LLM-Generated Code via Stylometric Signalscited by 0
- 2026Dream at SemEval-2026 Task 13: SALSA for Single-Pass Machine-Generated Code Detectioncited by 0
- 2026Hitting a Moving Target: Test-Time Adaptation for AI Text Detection under Continual Distribution Shift23 Jun 2026
- 2026Dream at SemEval-2026 Task 13: SALSA for Single-Pass Machine-Generated Code Detection23 Jun 2026
- 2026FMI_SU_Yotkova_Kastreva at SemEval-2026 Task 13: Lightweight Detection of LLM-Generated Code via Stylometric Signals5 May 2026
- 2026GoCoMA: Hyperbolic Multimodal Representation Fusion for Large Language Model-Generated Code Attribution24 Mar 2026
- 2026Code Fingerprints: Disentangled Attribution of LLM-Generated Code4 Mar 2026
- 2026AICD Bench: A Challenging Benchmark for AI-Generated Code Detection2 Feb 2026
- 2026Whitespaces Don't Lie: Feature-Driven and Embedding-Based Approaches for Detecting Machine-Generated Code27 Jan 2026
- 2025Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation30 Oct 2025
- 2025MultiAIGCD: A Comprehensive dataset for AI Generated Code Detection Covering Multiple Languages, Models,Prompts, and Scenarios29 Jul 2025
- 2025textttDroid: A Resource Suite for AI-Generated Code Detection11 Jul 2025
- 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMs27 May 2025