cs.SEMar 16, 2026

SEMAG: Self-Evolutionary Multi-Agent Code Generation

Authors: Yulin Peng, Haowen Hou, Xinxin Zhu, Ying Tiffany He, F. Richard Yu

Organizations: College of Computer Science and Software Engineering, Shenzhen University, China · Guangdong Laboratory of Artificial Intelligence and Digital Economy (SZ), China · School of Information Technology, Carleton University, Canada

Abstract

Large Language Models (LLMs) have made significant progress in handling complex programming tasks. However, current methods rely on manual model selection and fixed workflows, which limit their ability to adapt to changing task complexities. To address this, we propose SEMAG, a Self-Evolutionary Multi-Agent code Generation framework that mimics human coding practices. It decomposes programming tasks into stages, including planning, coding, debugging, and discussion, while adapting workflows to task difficulty. Its self-evolutionary agents can access the latest models in real time and automatically upgrade the backbone model. SEMAG sets new state-of-the-art Pass@1 accuracy across benchmarks. Using identical backbone models, SEMAG outperforms prior methods by 3.3% on CodeContests. When augmented with self-evolutionary model selection that automatically identifies optimal backbones, SEMAG reaches 52.6%, showcasing both framework effectiveness and adaptability to evolving LLM capabilities.

Figures & tables

Appendix figures & tables28 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Solvita: Enhancing Large Language Models for Competitive Programming via Agentic Evolution

    May 14, 2026Han Li, Jinyu Tian, Rili Feng +10RL for Code GenerationContinual Learning for LLM Agents

  2. CoRe-Code: Collaborative Reinforcement Learning for Code Generation

    May 24, 2026Zhihao Dou, Qinjian Zhao, Zhongwei Wan +2RL for Code GenerationMulti-Agent Coordination

  3. Self-Execution Simulation Improves Coding Models

    Mar 11, 2026Gallil Maimon, Ori Yoran, Felix Kreuk +4Execution-Guided Code GenerationLLM Self-Correction