TeamOmega at SemEval-2026 Task 13: Frozen vs. Trainable Representations for Out-of-Distribution AI-Generated Code Detection: A CodeBERT Fine-Tuning Study
Summary
TeamOmega developed a CodeBERT-based system for SemEval-2026 Task 13, focusing on detecting AI-generated code, particularly under significant cross-language and cross-domain distribution shifts. Their research compared two configurations: a fully frozen CodeBERT backbone and a partially fine-tuned setup where only the final transformer layer was unfrozen, utilizing discriminative learning rates. The study found that while partial fine-tuning significantly enhanced in-domain performance, the fully frozen backbone exhibited superior robustness when evaluated on out-of-distribution data. These results underscore a critical trade-off between achieving high task adaptation and maintaining strong cross-language generalization capabilities in the context of machine-generated code detection.
Key takeaway
For Machine Learning Engineers developing AI-generated code detection systems, if your application requires strong robustness against cross-language and cross-domain shifts, prioritize using a fully frozen CodeBERT backbone. While partial fine-tuning improves in-domain accuracy, your system's ability to generalize to out-of-distribution code will be stronger with a frozen model, directly impacting reliability in diverse real-world scenarios. Evaluate this trade-off carefully based on your specific deployment environment.
Key insights
Frozen CodeBERT backbones offer better out-of-distribution robustness for AI-generated code detection than partially fine-tuned models, despite lower in-domain performance.
Principles
- Fine-tuning improves in-domain task adaptation.
- Frozen backbones enhance OOD robustness.
- A trade-off exists between adaptation and generalization.
Method
The method involves comparing a fully frozen CodeBERT backbone against a partially fine-tuned configuration, unfreezing only the final transformer layer with discriminative learning rates for AI-generated code detection.
In practice
- Consider frozen backbones for OOD code detection.
- Use partial fine-tuning for in-domain tasks.
- Evaluate trade-offs for cross-language generalization.
Topics
- AI-Generated Code Detection
- CodeBERT Fine-Tuning
- Out-of-Distribution Robustness
- Cross-Language Generalization
- Transformer Models
- SemEval-2026
Best for: Research Scientist, AI Engineer, AI Scientist, Machine Learning Engineer, NLP Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Paper Index on ACL Anthology.