arrow
Return

SCG-Agent: A Scheduler-Driven Code Generation Framework with Multi-Checker

delete2026-08-20
delete0
PRE
AI
Y
Yinan Chen
黄袁 cover
黄袁 (Yuan Huang)
X
Xiangping Chen
Z
Zibin Zheng
DOI:10.1109/tse.2026.3725731delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
With the rapid advancement of large language models (LLMs), AI coding assistants like GitHub Copilot have become integral to modern development workflows. However, most prior works prioritize the functional correctness of generated code, often overlooking critical security aspects. Consequently, such code may harbor vulnerabilities or trigger runtime errors. If developers adopt insecure code from these assistants, projects may inherit new vulnerabilities—and even propagate them into future LLM training data. While recent multi-agent collaboration methods aim to enhance LLM-generated code quality, they often execute all available checkers regardless of necessity, incurring unnecessary API calls and computational overhead. To address these limitations, we propose SCG-Agent, a scheduler-driven framework for LLM-based code generation. SCG-Agent integrates supplementary checkers—unit tester, static analyst, and fuzz tester—driven by a collaborative scheduling mechanism combining a CodeBERT-MoE small model and an LLM-based large model. This scheduler dynamically determines which checks to apply, and in what order, enabling SCG-Agent to efficiently balance code quality and computational overhead. A key advantage of SCG-Agent is its modular and extensible design—the unit tester, static analyst, and fuzz tester can be seamlessly replaced with state-of-the-art alternatives. We evaluate SCG-Agent across 6 LLMs using HumanEval and SecurityEval benchmarks, demonstrating superior performance with an average UT-Pass@1 of 88.72%, SA-Pass@1 of 93.10%, and FT-Pass@1 of 82.98%. In addition, SCG-Agent’s scheduler helps reduce API calls, and the ablation results show that the scheduler—s optimized order of checkers is beneficial to code generation performance. We further validate SCG-Agent on the contamination-free LiveCodeBench to rule out data-leakage bias.
Keywords:
Code Generation
Secure Coding
Agentic AI Systems
AI-Driven Programming

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.9K
Citations:
1.1W

Organization

S
sun yat-sen university
Scholars:
653
Papers: 207
Citations: 0
Cited Papers

Cited Papers

No cited papers available