Team Duo at SemEval-2026 Task 13: Fine-tuning CodeBERT for Out-of-Distribution AI-Generated Code Detection

· Source: Paper Index on ACL Anthology · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Expert, quick

Summary

Team Duo's participation in SemEval-2026 Task 13 focused on detecting AI-generated code in out-of-distribution (OOD) settings. Their approach involved fine-tuning CodeBERT on algorithmic code written in C++, Python, and Java. While the model achieved a near-perfect F1 score of 0.9935 on training data, its performance significantly degraded to an F1 score of 0.3532 when tested on unseen languages and domains. The OOD results showed high recall (0.8789) but low precision (0.2210), indicating an over-prediction of machine-generated code. Error analysis identified domain mismatch, unfamiliar syntax patterns, and insufficient training as key failure modes, suggesting multi-epoch training and domain-specific augmentation are necessary for improved OOD generalization.

Key takeaway

For Machine Learning Engineers deploying AI-generated code detection models, recognize that fine-tuned models like CodeBERT exhibit substantial performance degradation on out-of-distribution data. You should prioritize robust evaluation across diverse domains and languages, and consider implementing multi-epoch training alongside domain-specific data augmentation to enhance generalization and mitigate over-prediction of machine-generated code in real-world scenarios.

Key insights

Detecting AI-generated code in out-of-distribution settings presents significant challenges, even for fine-tuned models.

Principles

Method

Fine-tuning CodeBERT on algorithmic code from C++, Python, and Java for AI-generated code detection.

In practice

Topics

Best for: AI Engineer, Research Scientist, AI Scientist, NLP Engineer, Machine Learning Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Paper Index on ACL Anthology.