MIUN BiasPatrol at SemEval-2026 Task 13: Why TF-IDF can Beat Transformers for OOD Code Detection
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
- Transformer embeddings are fragile to distribution shifts.
- Lexical features enhance OOD detection stability.
- Whitespace bias impacts transformer code analysis.
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
- Normalize code whitespace for robustness.
- Prioritize TF-IDF for OOD code detection.
- Evaluate models on diverse OOD datasets.
Topics
- Code Detection
- Out-of-Distribution
- Transformers
- TF-IDF
- SemEval-2026
- Machine-Generated Code
Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Paper Index on ACL Anthology.