PapersSelected

Benchmarking AI-Generated vs Human Code Quality

What is the Difference Between Me and You? Benchmarking the Quality Gap Between Human-Written and AI-Generated Code

Why we picked it

This research provides concrete data on how AI-generated code differs from human code in terms of complexity, style, and defects, which is useful for developers evaluating AI tools.

A new study compares 787,562 function pairs of human-written and AI-generated code from Python, Java, and C.

Body

It finds AI-generated code is structurally compressed and stylistically templated, roughly half the size and branching of human code.

Defect profiles differ: human code has issues from mature codebases, while AI code has repetitive boilerplate.

The study releases CQBench, a benchmark for quality assurance and security testing.

Original · arXiv: DeepSeek

What is the Difference Between Me and You? Benchmarking the Quality Gap Between Human-Written and AI-Generated Code

AI coding assistants are becoming co-authors of production software, yet their evaluation centers on functional correctness, leaving open whether their code differs from human code in the quality dimensions dominating lifecycle cost. We compare human-written and AI-generated code at scale: 787,562 function pairs across Python, Java, and C, each human function mined from open-source repositories paired with implementations generated from its docstring by three AI assistants (OpenAI GPT models, DeepSeek-Coder, Qwen2.5-Coder). We characterize structural complexity and statistical naturalness, and map static-analysis findings onto Orthogonal Defect Classification for defects and the Common Weakness Enumeration for vulnerabilities, making authors and languages directly comparable. AI-generated code is structurally compressed and stylistically templated: roughly half the size and branching of human code, clustering apart at the style level. Defect profiles differ in kind: human code concentrates issues of mature codebases, AI code repetitive boilerplate; security is language-dependent, with LLMs producing more, and more severe, findings in Python and Java but fewer high-severity memory-safety findings than humans in C. Once size is controlled for, complexity metrics carry little signal, while naturalness separates authors. Finally, we release CQBench, a benchmark of 27,346 issue-prone tasks with baselines and an evaluation pipeline for quality assurance and security testing.

Industry Coordinates & Source Verification

This report is categorized under AITOP's "Papers" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows and US-China foundation model benchmarks and commercialization comparison and AI regulation, compliance frameworks, and sovereign compute policy. Key entities and technical topics under continuous tracking include Qwen2.5-Coder, DeepSeek-Coder, GPT, code quality.

Primary source verification: published directly by arXiv: DeepSeek with first-party authority.