LLMSniffer: Detecting LLM-Generated Code via GraphCodeBERT and Supervised Contrastive Learning

Researchers introduced LLMSniffer, a detection system using GraphCodeBERT and contrastive learning to distinguish AI-generated code from human-written code. The framework improved detection accuracy to 78% on GPTSniffer and 94.65% on Whodunit, addressing growing concerns around academic integrity and code quality in software development.
Modelwire context
ExplainerThe 16-point accuracy gap between the two benchmarks is the detail worth sitting with: GPTSniffer and Whodunit test different distributions of code, so a model that scores 94.65% on one and 78% on the other is telling you something about how fragile detection is when the training distribution shifts. The paper's real contribution may be less about the headline numbers and more about whether contrastive learning produces representations that generalize across those gaps.
This sits in a growing cluster of work on AI output reliability and attribution. The 'Diagnosing LLM Judge Reliability' paper from April 16 raised a structurally similar concern: aggregate metrics can look strong while per-instance behavior is inconsistent. LLMSniffer faces the same problem in reverse, trying to make confident per-instance calls about authorship from aggregate training signal. Meanwhile, OpenAI's Codex update covered the same week shows the supply side accelerating, which means detection benchmarks built on today's model outputs will need continuous refreshing as generation styles shift.
Watch whether LLMSniffer's accuracy holds when tested against code produced by models released after its training cutoff, specifically GPT-4o or Claude 3.5 Sonnet outputs. If performance drops significantly on post-cutoff samples, the framework is tracking stylistic artifacts of specific model versions rather than any durable signal of AI authorship.
Coverage we drew on
This analysis is generated by Modelwire’s editorial layer from our archive and the summary above. It is not a substitute for the original reporting. How we write it.
MentionsLLMSniffer · GraphCodeBERT · GPTSniffer · Whodunit
Modelwire Editorial
This synthesis and analysis was prepared by the Modelwire editorial team. We use advanced language models to read, ground, and connect the day’s most significant AI developments, providing original strategic context that helps practitioners and leaders stay ahead of the frontier.
Modelwire summarizes, we don’t republish. The full content lives on arxiv.org. If you’re a publisher and want a different summarization policy for your work, see our takedown page.