Md. Naim Parvez


2026

We propose a CodeBERT-based system for detecting AI-generated code under severe cross-language and cross-domain distribution shift. Our approach conducts a controlled comparison between a fully frozen backbone and a partially fine-tuned configuration that unfreezes only the final transformer layer with discriminative learning rates. While partial fine-tuning substantially improves in-domain performance, the frozen backbone demonstrates stronger robustness under out-of-distribution evaluation. Our results highlight a trade-off between task adaptation and cross-language generalization in machine-generated code detection.