Log date · Fri
Detecting LLM-assisted code plagiarism with k-gram software birthmarks
An arXiv paper tested whether Java opcode k-gram birthmarks can catch LLM-paraphrased plagiarism; the authors report they remain effective.
What happened on this date
On 2026-07-03 (06:49 UTC), Nikolay Fedorov, Akito Monden and co-authors submitted "Detection of LLM-assisted Code Plagiarism Using k-gram Software Birthmarks" (arXiv 2607.03014, v1). The premise is that large language models can rewrite code's syntax and structure while preserving behavior, which may evade traditional plagiarism detectors. The authors used k-grams of Java opcodes, with k from 1 to 6, as software birthmarks. They took individually compilable files from actively maintained BSD-2-Clause Java projects, had ChatGPT-5.1-Codex-Mini, DeepSeek-V4-Flash and Claude-Haiku-4.5 produce paraphrased versions, and compared five similarity measures: cosine, Dice, Jaccard, Simpson and an edit-distance-based measure. They report that k-gram birthmarks remain effective, that ChatGPT-5.1-Codex-Mini produced the hardest clones to detect, and that coding-oriented models performed better at the task.
What it means for assessing AI-assisted cloning
Asking a model to rewrite someone else's code is now cheap, and this paper offers a relatively hopeful signal from the detection side: in the authors' setup, compiled opcode sequences still carried comparable features. For independent developers, the value is mainly in evidence and enforcement, not prevention. Birthmark comparison requires obtaining the suspect product's binary and having a reference from your own versions. The limits matter too. The study covers Java bytecode, open-source projects under one license, and three models, so the conclusions do not transfer directly to Swift, Dart AOT or obfuscated native code. How heavily code is rewritten, or whether an algorithm is redesigned, would also affect results. It is not a protection measure: once code is copied, detection can help you prove it, not stop it.
Preparations to make in your own projects
First, archive build artifacts and hashes for every release together with the matching source commit, so any future comparison has a reliable reference and timeline. Second, if your product runs on the JVM, you can trial a similar opcode-similarity comparison internally, starting between your own versions to learn the similarity range of normal evolution and avoid false conclusions. Third, keep evidence of your development process, such as commit history, design documents and release records; in a dispute these often carry more weight than a single similarity score. Fourth, keep genuinely valuable rules server-side to reduce the client logic that can be copied wholesale. Fifth, watch whether follow-up work extends to other languages and to obfuscated code before making this kind of detection part of long-term monitoring.
Your checklist
- Archive artifacts, hashes and source commits for every release
- Measure a similarity baseline between your own versions first
- Keep commit history and design documents as provenance evidence
- Do not mistake detection for protection; keep core rules server-side
Primary sources
- arXiv: Detection of LLM-assisted Code Plagiarism Using k-gram Software Birthmarks (2607.03014) · Source date 2026-07-03 · Checked 2026-10-12