YNU-HPCC at SemEval-2026 Task 13: Robust Machine-Generated Code Detection under Distribution Shifts

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

Summary

The YNU-HPCC team developed a system for SemEval-2026 Task 13, focusing on robust machine-generated code detection under distribution shifts, including cross-language, multi-generator, and hybrid scenarios. The system systematically examined three modeling paradigms: encoder-based fine-tuning, feature-based machine learning, and task-specific robustness strategies. For Subtask A (Binary Detection), frozen pre-trained encoders and shallow stylometric features demonstrated superior cross-domain robustness compared to full fine-tuning, with indentation entropy identified as a crucial discriminative signal. Subtask B (Multi-Class Attribution) utilized a hierarchical two-stage framework to separate human–machine discrimination from fine-grained generator attribution, effectively addressing class imbalance. For Subtask C (Hybrid Detection), a token-level splicing augmentation strategy, combined with Supervised Contrastive Learning and Focal Loss, was employed to model intra-sample stylistic variation. The system achieved notable rankings: 12th out of 81 teams in Subtask A, 14th out of 34 in Subtask B, and 8th out of 32 in Subtask C.

Key takeaway

For AI Engineers developing code origin detection systems, prioritize robust strategies against distribution shifts. You should consider using frozen pre-trained encoders and shallow stylometric features, like indentation entropy, for better cross-domain performance. When tackling multi-generator attribution, implement a hierarchical two-stage framework to manage class imbalance effectively. For hybrid code detection, explore token-level splicing augmentation with Supervised Contrastive Learning and Focal Loss to capture stylistic variations.

Key insights

Robust machine-generated code detection benefits from specialized strategies for distribution shifts and class imbalance.

Principles

Method

A hierarchical two-stage framework for multi-class attribution, and token-level splicing augmentation with Supervised Contrastive Learning and Focal Loss for hybrid detection.

In practice

Topics

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

Related on AIssential

Open in AIssential →

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