AI
Language Models Show Promise for Identifying Code Authors, Study Finds
New research evaluates how transformer-based models can recognize programming styles to attribute code authorship—with implications for bug tracking, plagiarism detection, and software forensics.
Identifying who wrote a given piece of code based on its style—a technique known as code authorship attribution—has practical value across multiple domains, from automating software engineering workflows to investigating copyright disputes and uncovering plagiarism. Researchers have now turned to modern language models to see whether they can do the job more effectively than existing methods.
The Challenge with Traditional Approaches#
Conventional code authorship attribution techniques rely on hand-crafted features that capture aspects of how individual programmers code. These approaches have significant drawbacks: they often fail to capture the full scope of a programmer's style, and they can be vulnerable to adversarial manipulation. As software development practices evolve, especially with the rise of AI-assisted coding, understanding how to reliably identify authorship has become increasingly important.
A Fresh Empirical Investigation#
A new empirical study examined whether state-of-the-art transformer-based language models—tools that have already proven their worth in natural language processing and various software engineering tasks—could excel at recognizing coding patterns. The team tested seven different code language models on six varied datasets containing roughly 12,000 code snippets from 463 developers. Beyond simply measuring accuracy, the researchers conducted detailed quantitative and qualitative analyses to understand how these models approach the problem and what they learn about stylometric patterns in code.
Why This Matters#
The implications span several important areas. In software engineering, authorship attribution can help streamline bug triage, locate faults more efficiently, and prioritize testing. In cybersecurity and forensics, reliable attribution supports intellectual property protection and plagiarism detection. The study represents the first comprehensive investigation of modern language models on this task, shedding light on whether deep learning approaches can overcome the limitations of hand-crafted feature methods.

