mlsanityData to 7 Oct 2026

Between Lines of Code: Unraveling the Distinct Patterns of Machine and Human Programmers

arXiv 2401.06461 ↗First posted 12 Jan 2024cs.SE cs.AI cs.CLcited by 27

Not on the map. Why?

Abstract (arXiv)

Large language models have catalyzed an unprecedented wave in code generation. While achieving significant advances, they blur the distinctions between machine- and human-authored source code, causing integrity and authenticity issues of software artifacts. Previous methods such as DetectGPT have proven effective in discerning machine-generated texts, but they do not identify and harness the unique patterns of machine-generated code. Thus, its applicability falters when applied to code. In this paper, we carefully study the specific patterns that characterize machine- and human-authored code. Through a rigorous analysis of code attributes such as lexical diversity, conciseness, and naturalness, we expose unique patterns inherent to each source. We particularly notice that the syntactic segmentation of code is a critical factor in identifying its provenance. Based on our findings, we propose DetectCodeGPT, a novel method for detecting machine-generated code, which improves DetectGPT by capturing the distinct stylized patterns of code. Diverging from conventional techniques that depend on external LLMs for perturbations, DetectCodeGPT perturbs the code corpus by strategically inserting spaces and newlines, ensuring both efficacy and efficiency. Experiment results show that our approach significantly outperforms state-of-the-art techniques in detecting machine-generated code.

Key facts. Cited by 27 papers in the map (data through 7 Oct 2026). Builds on 51 of its 75 references that are in the map. First posted on arXiv 12 Jan 2024.

Builds on

51 of 75 references.

References · 51

  1. 2017Attention Is All You Needcited by 59,932
  2. 2023GPT-4 Technical Reportcited by 18,132
  3. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  4. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  5. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  6. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  7. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  8. 2021Program Synthesis with Large Language Modelscited by 3,509
  9. 2019The Curious Case of Neural Text Degenerationcited by 2,881
  10. 2023A Survey of Large Language Modelscited by 2,537
  11. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  12. 2023Code Llama: Open Foundation Models for Codecited by 2,105
38 more
  1. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  2. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  3. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  4. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
  5. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  6. 2023StarCoder: may the source be with you!cited by 790
  7. 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
  8. 2023DetectGPT: Zero-Shot Machine-Generated Text Detection using Probability Curvaturecited by 705
  9. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 638
  10. 2023Textbooks Are All You Needcited by 561
  11. 2019Release Strategies and the Social Impacts of Language Modelscited by 505
  12. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  13. 2019GLTR: Statistical Detection and Visualization of Generated Textcited by 490
  14. 2021Unified Pre-training for Program Understanding and Generationcited by 361
  15. 2022A Systematic Evaluation of Large Language Models of Codecited by 360
  16. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  17. 2023CodeT5+: Open Code Large Language Models for Code Understanding and Generationcited by 327
  18. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
  19. 2023Fast-DetectGPT: Efficient Zero-Shot Detection of Machine-Generated Text via Conditional Probability Curvaturecited by 278
  20. 2019Automatic Detection of Generated Text is Easiest when Humans are Fooledcited by 260
  21. 2023DetectLLM: Leveraging Log Rank Information for Zero-Shot Detection of Machine-Generated Textcited by 207
  22. 2023RADAR: Robust AI-Text Detection via Adversarial Learningcited by 187
  23. 2023SantaCoder: don't reach for the stars!cited by 169
  24. 2023CodeGen2: Lessons for Training LLMs on Programming and Natural Languagescited by 124
  25. 2023Who Wrote this Code? Watermarking for Code Generationcited by 116
  26. 2023A Survey on LLM-Generated Text Detection: Necessity, Methods, and Future Directionscited by 101
  27. 2023Evaluating the Code Quality of AI-Assisted Code Generation Tools: An Empirical Study on GitHub Copilot, Amazon CodeWhisperer, and ChatGPTcited by 71
  28. 2023A Survey on Detection of LLMs-Generated Contentcited by 70
  29. 2023Multiscale Positive-Unlabeled Detection of AI-Generated Textscited by 59
  30. 2023LLMDet: A Third Party Large Language Models Generated Text Detection Toolcited by 44
  31. 2023GPT-Sentinel: Distinguishing Human and ChatGPT Generated Contentcited by 40
  32. 2023Smaller Language Models are Better Black-box Machine-Generated Text Detectorscited by 35
  33. 2022CoCo: Coherence-Enhanced Machine-Generated Text Detection Under Data Limitation With Contrastive Learningcited by 32
  34. 2023CodeMark: Imperceptible Watermarking for Code Datasets against Neural Code Completion Modelscited by 28
  35. 2023Zero-Shot Detection of Machine-Generated Codescited by 24
  36. 2023The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generationcited by 20
  37. 2024Assessing AI Detectors in Identifying AI-Generated Code: Implications for Educationcited by 18
  38. 2023G3Detector: General GPT-Generated Text Detectorcited by 17

50 most cited of 51 All 51 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 10; 2026: 15.

27 papers.

Sort:

By area:

  1. 2025SWE-Exp: Experience-Driven Software Issue Resolutioncited by 64
  2. 2025SWE-Debate: Competitive Multi-Agent Debate for Software Issue Resolutioncited by 52
  3. 2024From Code to Correctness: Closing the Last Mile of Code Generation with Hierarchical Debuggingcited by 46
  4. 2025LongCodeZip: Compress Long Context for Code Language Modelscited by 38
  5. 2026SWE-Explore: Benchmarking How Coding Agents Explore Repositoriescited by 20
  6. 2026In Line with Context: Repository-Level Code Generation via Context Inliningcited by 18
  7. 2026Seeing is Coding: On the Effectiveness of Vision Language Models in Code Understandingcited by 13
  8. 2026EffiSkill: Agent Skill Based Automated Code Efficiency Optimizationcited by 9
  9. 2025Marking Code Without Breaking It: Code Watermarking for Detecting LLM-Generated Codecited by 7
  10. 2025CodeMirage: A Multi-Lingual Benchmark for Detecting AI-Generated and Paraphrased Source Code from Production-Level LLMscited by 6
  11. 2026Test vs Mutant: Adversarial LLM Agents for Robust Unit Test Generationcited by 6
  12. 2026SWE-Bench ProMax: Benchmarking Agents on Large-Scale Multilingual Code Refactoringcited by 5
15 more
  1. 2025Detection of LLM-Paraphrased Code and Identification of the Responsible LLM Using Coding Style Featurescited by 4
  2. 2026Code Is More Than Text: Uncertainty Estimation for Code Generationcited by 4
  3. 2026LLM Agents Can See Code Repositoriescited by 3
  4. 2025HyperAgent: Leveraging Hypergraphs for Topology Optimization in Multi-Agent Communicationcited by 2
  5. 2025Robust Preference Alignment via Directional Neighborhood Consensuscited by 2
  6. 2026ClassEval-Pro: A Cross-Domain Benchmark for Class-Level Code Generationcited by 2
  7. 2026An Exploratory Study on LLM-Generated Code and Comments in Code Repositoriescited by 2
  8. 2026SWE-Pruner Pro: The Coder LLM Already Knows What to Prunecited by 2
  9. 2024Automatic Detection of LLM-Generated Code: A Comparative Case Study of Contemporary Models Across Function and Class Granularitiescited by 1
  10. 2025Zero-Shot Detection of LLM-Generated Code via Approximated Task Conditioningcited by 1
  11. 2026Who Wrote This Line? Evaluating the Detection of LLM-Generated Classical Chinese Poetrycited by 1
  12. 2026Hitting a Moving Target: Test-Time Adaptation for AI Text Detection under Continual Distribution Shiftcited by 1
  13. 2025code_transformed: The Influence of Large Language Models on Codecited by 0
  14. 2026Whitespaces Don't Lie: Feature-Driven and Embedding-Based Approaches for Detecting Machine-Generated Codecited by 0
  15. 2026HybridCodeAuthorship: A Benchmark Dataset for Line-Level Code Authorship Detectioncited by 0