MIUN BiasPatrol at SemEval-2026 Task 13: Why TF-IDF can Beat Transformers for OOD Code Detection

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

Summary

MIUN BiasPatrol presented its system for SemEval-2026 Task 13: A, focusing on binary classification of human-written versus machine-generated code across diverse programming languages. The system systematically compared traditional classifiers, including Random Forest and XGBoost with statistical and TF-IDF features, against pipelines using frozen embeddings from advanced code transformers like UniXcoder and GraphCodeBERT. Results showed transformer-based pipelines achieved up to 0.89 Macro F1 in-distribution but suffered severe performance drops up to 77% on out-of-distribution languages. Conversely, TF-IDF models with tree-based classifiers demonstrated significantly greater stability. This fragility in transformers was attributed to a bias toward superficial formatting, specifically whitespace, which space normalization improved for traditional models but highlighted its ongoing influence on embeddings.

Key takeaway

For Machine Learning Engineers building AI-generated code detection systems, you should critically evaluate your model's out-of-distribution performance. While transformer models may excel in-distribution, their significant performance degradation on unseen languages or domains suggests prioritizing simpler, well-normalized lexical features like TF-IDF. Focus on robust feature engineering and rigorous OOD testing to ensure your detection systems are generalizable and reliable in real-world, diverse coding environments.

Key insights

Transformer-based code detection systems exhibit significant fragility to out-of-distribution data due to superficial feature bias.

Principles

Method

The system compares traditional classifiers using statistical and TF-IDF features against transformer pipelines with frozen embeddings for binary classification of human-written versus machine-generated code.

In practice

Topics

Best for: AI Engineer, Research Scientist, AI Scientist, 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.