TeamSLS at SemEval-2026 Task 13: Detecting Machine-Generated Code with CodeBERT and Structural Features

Sai Laasya Gorantla, Shreemithra Naveen, Steven Bethard


Abstract
We describe our system for SemEval-2026 Task 13 Subtask A, which focuses on detecting whether source code is written by a human or generated by an AI system. We propose a hybrid approach that combines semantic embeddings from CodeBERT with lightweight, language-agnostic structural features extracted using Tree-sitter. We compute normalized structural ratios such as nesting depth, logic density, complexity per line, average line length, and punctuation frequency. These structural signals are concatenated with CodeBERT embeddings and passed to a linear classifier for binary prediction. Experimental results on the official validation split show that combining semantic and normalized structural representations substantially improves the model’s detection performance on seen-language distributions. However, results on unseen test data reveal significant performance degradation under cross-language distribution shifts. On the official leaderboard, our system ranked 47th out of 81 participating teams.
Anthology ID:
2026.semeval-1.318
Volume:
Proceedings of the 20th International Workshop on Semantic Evaluation (2026)
Month:
July
Year:
2026
Address:
San Diego, California, USA
Editors:
Ekaterina Kochmar, Debanjan Ghosh, Kai North, Mamoru Komachi
Venues:
SemEval | WS
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
2520–2526
Language:
URL:
https://preview.aclanthology.org/ingest-acl-workshops/2026.semeval-1.318/
DOI:
Bibkey:
Cite (ACL):
Sai Laasya Gorantla, Shreemithra Naveen, and Steven Bethard. 2026. TeamSLS at SemEval-2026 Task 13: Detecting Machine-Generated Code with CodeBERT and Structural Features. In Proceedings of the 20th International Workshop on Semantic Evaluation (2026), pages 2520–2526, San Diego, California, USA. Association for Computational Linguistics.
Cite (Informal):
TeamSLS at SemEval-2026 Task 13: Detecting Machine-Generated Code with CodeBERT and Structural Features (Gorantla et al., SemEval 2026)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingest-acl-workshops/2026.semeval-1.318.pdf