contestant001 at SemEval-2026 Task 13 Stylometric and TF-IDF-Based Detection of Machine-Generated Code
Summary
contestant001 presented an ensemble approach for SemEval-2026 Task 13, Subtask A, focusing on the binary classification of machine-generated code. This method combines TF-IDF lexical representations with 23 hand-crafted stylometric features to detect AI-generated code. The system aims for cross-language generalization by extracting language-agnostic patterns. While transformer-based models like CodeBERT and UniXcoder showed noticeable underperformance under distribution shift, the analysis revealed distinct stylometric patterns in AI-generated code. The TF-IDF ensemble achieved a 0.5175 Macro F1 score on the task submission, highlighting the potential of stylometric and TF-IDF features for this critical detection challenge, which is increasingly important for academic integrity and software quality.
Key takeaway
For Machine Learning Engineers developing code authorship or integrity tools, if you are facing challenges with distribution shift, consider integrating stylometric and TF-IDF features. This approach, which achieved 0.5175 Macro F1 in SemEval-2026 Task 13, proved more robust than transformer-based models like CodeBERT and UniXcoder under such conditions. You should explore language-agnostic stylometric patterns to enhance cross-language generalization in your detection systems.
Key insights
Combining stylometric features and TF-IDF effectively detects machine-generated code, even outperforming transformer models under distribution shift.
Principles
- AI-generated code exhibits distinct stylometric patterns.
- Language-agnostic patterns improve cross-language detection.
- Transformers underperform with distribution shift.
Method
An ensemble method combines TF-IDF lexical representations with 23 hand-crafted stylometric features for binary classification of AI-generated code, focusing on language-agnostic patterns.
In practice
- Employ stylometric features for code analysis.
- Integrate TF-IDF for lexical representation.
- Use ensemble methods for robust detection.
Topics
- Machine-Generated Code Detection
- Stylometric Analysis
- TF-IDF
- Ensemble Learning
- SemEval-2026
- Code Authorship
Best for: 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.