SemEval-2026 Task 13: Fine-tuned CodeBERT with Stratified Balancing, Dynamic Threshold Optimization, and Logit Bias Correction for Robust Multi-Language AI Code Detection

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

Summary

A CodeBERT-based system was developed for SemEval-2026 Task 13 Subtask A, focusing on detecting AI-generated code. This system integrates stratified balanced subsampling, dynamic per-epoch F1-macro threshold optimization, and label-flip bias correction to specifically address challenges like class imbalance and model overconfidence. The model, trained using TPU-accelerated fine-tuning, achieved a validation F1-macro of 0.874 and a private leaderboard F1-macro of 0.53. Ablation studies confirmed the effectiveness of these balancing and calibration strategies, demonstrating their ability to maintain robust performance even under distribution shift for multi-language AI code detection.

Key takeaway

For Machine Learning Engineers building AI code detection systems, addressing class imbalance and model overconfidence is critical for robust performance. You should consider integrating stratified balanced subsampling, dynamic F1-macro threshold optimization, and label-flip bias correction into your fine-tuning pipeline. This approach enhances model reliability, especially when facing distribution shifts in multi-language code environments.

Key insights

Robust AI code detection requires addressing class imbalance and model overconfidence through specialized calibration techniques.

Principles

Method

Fine-tuning CodeBERT with stratified balanced subsampling, dynamic F1-macro threshold optimization, and label-flip bias correction for AI code detection.

In practice

Topics

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

Related on AIssential

Open in AIssential →

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