LAFED at SemEval-2026 Task 13: Language-Agnostic Feature Engineering for Cross-Lingual AI-Generated Code Detection

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

Summary

LAFED (Language-Agnostic Feature Engineering Detector) addresses the challenge of robustly detecting AI-generated source code across diverse programming languages, particularly when facing language-specific cues and distribution shifts. This feature-engineering approach was trained on Python, Java, and C++ code, then evaluated on a multilingual test set including unseen languages like C, C#, Go, JavaScript, and PHP. LAFED integrates three types of features: structural skeletal features (indentation, control-flow density, and approximations of McCabe/Halstead complexity), character and whitespace statistics inspired by stylometry, and micro-style patterns such as operator spacing and indentation consistency. Utilizing XGBoost with Optuna hyperparameter search, the best model achieved a macro-F1 score of 0.7570 on a 1,000-sample test set. The official submission secured 5th place in SemEval-2026 Task 13 Subtask A with a macro-F1 of 0.75209, demonstrating strong transfer to C# (0.7753) and JavaScript (0.7683), though performance was weaker on Go (0.6400) and PHP (0.5238).

Key takeaway

For AI Security Engineers tasked with identifying AI-generated code across multiple programming languages, you should consider implementing language-agnostic feature engineering. This approach, which uses structural, stylometric, and micro-style patterns, offers robust cross-lingual transferability, even to unseen languages. Focus on features like control-flow density and indentation consistency, as these proved effective. Your detection systems can achieve strong performance, as demonstrated by LAFED's macro-F1 of 0.7570, but be aware of varying performance across different target languages like Go and PHP.

Key insights

Language-agnostic feature engineering can effectively detect AI-generated code across diverse programming languages, even unseen ones.

Principles

Method

LAFED combines structural skeletal features, character/whitespace statistics, and micro-style patterns, then trains an XGBoost model with Optuna for hyperparameter optimization to detect AI-generated code.

In practice

Topics

Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, AI Security Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Paper Index on ACL Anthology.