UCSC-NLP at SemEval-2026 Task 13: Multi-View Generalization and Diagnostic Analysis of Machine-Generated Code Detection
Kargi Chauhan, Sadiba Nusrat Nur

TL;DR
This paper presents a system for detecting machine-generated code across multiple languages and LLMs, using a multi-view training framework to improve robustness and address class imbalance issues.
Contribution
It introduces a multi-view training approach with structural and augmentation techniques for code detection and analyzes class imbalance effects on multi-class attribution.
Findings
Achieved 0.993 macro F1 on validation and 0.845 on test set for binary detection.
Standard fine-tuning fails on minority classes with macro F1 collapsing to 0.086.
Class-weighted training improves macro F1 to 0.345, showing the importance of imbalance-aware strategies.
Abstract
With the rapid growth of large language models for code generation, distinguishing between human-written and AI-generated code has become increasingly critical for academic integrity, hiring evaluations, and software security. We present our system for SemEval-2026 Task 13: Multilingual Machine-Generated Code Detection, participating in Subtask A (binary detection) and Subtask B (multi-class attribution across 10 LLM families). For Subtask A, we fine-tune UniXcoder-base with a multi-view training framework that promotes generator-invariant representations. The framework combines domain-specific structural prefixes, delexicalization with symmetric KL consistency loss, token dropout, and mixed-content augmentation. Our system achieves 0.993 macro F1 on validation and 0.845 macro F1 on the test set, which spans unseen languages and domains. For Subtask B, we show that severe class…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
