Catching AI-Generated Code at Scale: A Lightweight and Interpretable Detector for the LLM Era

Arnesh Batra, Krish Thukral, Dev Sharma, Aniket Khandelwal, Arush Gumber


Abstract
As LLMs become everyday creative partners in software development, code is no longer a purely human artefact; it emerges from an increasingly hybrid human-AI process. Understanding who contributed which parts of a codebase has become a foundational question of creative attribution, touching on authorship, trust, and the integrity of co-created work. Yet existing detectors exceed 100M+ parameters, are too slow for practical deployment, and offer no insight into what distinguishes human from AI creative contributions. We present NanoDroid, a backbone-free detector with only 5.1M parameters that runs 20× faster than 125M-parameter UniXcoder (SOTA) and is fully interpretable: per-stream attribution scores explicitly expose which stylistic evidence (token statistics, transition patterns, surface style) distinguishes human from AI authorship in code. On the challenging 4-class DroidCollection benchmark (Human / Machine / Refined / Adversarial), NanoDroid achieves 90.77% weighted F1, within 2.6% of SOTA, on the CodeT-M4 benchmark, NanoDroid achieves SOTA performance, while providing the kind of transparent decision decomposition that black-box models cannot. Beyond a detection tool, we argue NanoDroid offers a lens for studying how human and AI creativity differ stylistically, and where they blur.
Anthology ID:
2026.emnlp-industry.259
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: Industry Track
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Pepa Atanasova, Gholamreza Haffari, Minghan Wang
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
4357–4373
Language:
URL:
https://aclanthology.org/2026.emnlp-industry.259/
DOI:
Bibkey:
Cite (ACL):
Arnesh Batra, Krish Thukral, Dev Sharma, Aniket Khandelwal, and Arush Gumber. 2026. Catching AI-Generated Code at Scale: A Lightweight and Interpretable Detector for the LLM Era. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: Industry Track, pages 4357–4373, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Catching AI-Generated Code at Scale: A Lightweight and Interpretable Detector for the LLM Era (Batra et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-industry.259.pdf