mcdok at SemEval-2026 Task 13: Finetuning LLMs for Detection of Machine-Generated Code
The mcdok system for SemEval-2026 Task 13 adapts the mdok text detection approach by fine-tuning code-specific large language models to competitively address machine-generated code detection, attribution, and hybrid code identification, though significant performance gaps remain compared to top systems.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are a detective trying to solve a mystery: Who wrote this piece of code? Was it a human programmer, or was it generated by an Artificial Intelligence (AI)?
In the past, it was easy to tell the difference. But today, AI models are so good at writing code that they can sound almost exactly like a human. To tackle this, a global competition called SemEval-2026 created a challenge (Task 13) for researchers to build "AI detectors" specifically for computer code.
A team from Slovakia and the Czech Republic, calling their system "mcdok," entered the competition. Here is how they did it, explained simply.
The Three Challenges (Subtasks)
The competition wasn't just one big test; it was broken down into three different levels of difficulty, like video game levels:
Level 1 (Subtask A): The "Is it AI?" Test.
- The Goal: Look at a snippet of code and say, "Yes, this is AI" or "No, this is human."
- The Analogy: Imagine a teacher grading essays. They just need to spot if the essay was written by a student or copied from a robot.
- The Languages: The code came in three languages: C++, Python, and Java.
Level 2 (Subtask B): The "Who is the Robot?" Test.
- The Goal: If the code is AI, which specific family of AI made it? There were 10 different AI families (like "OpenAI," "Google," "Meta") plus the "Human" category.
- The Analogy: This is like a forensic expert looking at a fingerprint and saying, "This wasn't just a robot; it was a specific robot named 'Qwen' or 'Gemma'."
Level 3 (Subtask C): The "Tricky Mix" Test.
- The Goal: Distinguish between four types: Human, Pure AI, Hybrid (a human started it, AI finished it), and Adversarial (AI trying to trick the detector by pretending to be human).
- The Analogy: This is the hardest level. It's like a chef trying to taste a soup and figure out: "Did a human cook this? Did a robot cook this? Did they cook it together? Or did the robot try to disguise its flavor to look like a human dish?"
How mcdok Solved It
The team didn't invent a brand new super-computer from scratch. Instead, they took an existing tool they had built for detecting AI text (called mdok) and gave it a "code makeover."
- The Makeover: They realized that a model trained to read novels might not understand Python or C++. So, they swapped the "brain" of their system for models specifically designed to understand code (like Gemma, CodeGemma, and Qwen).
- The Training: They taught these new brains using a technique called Fine-tuning. Think of this as taking a general knowledge expert and giving them a crash course specifically on "How to spot AI code."
- The Strategy: They didn't use a complicated team of different detectors (an "ensemble"). They kept it simple: one strong brain per task.
The Results
The team did very well, but they weren't perfect.
- Level 1: They were quite good at spotting AI code, especially when they adjusted their "confidence settings." Interestingly, a general-purpose model (Gemma-3) actually worked better than the specialized code models!
- Level 2: This was tough. Identifying which specific AI family wrote the code was hard. Their system was better than random guessing, but it sometimes confused one AI family for another.
- Level 3: They did surprisingly well here, ranking in the top 20% of all participants. They could tell the difference between pure AI and "Hybrid" code, though they sometimes got confused between "Machine" and "Hybrid" (which makes sense, since they are very similar).
The Big Takeaway
The paper concludes that AI detectors built for text can be successfully adapted for code, but you have to be careful. You can't just use any model; you need one that understands programming logic.
However, the "margins" (the gap between the winners and the rest) were still significant. The team admits that while their system is competitive, there is still room for improvement. The "cat and mouse" game between AI writers and AI detectors is far from over.
In short: The mcdok team built a specialized "code detective" that is getting better at catching AI imposters, but the imposters are getting smarter, too.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.