Manuscript Offprint

arXiv:2610.05481

CodeForge-MA: Execution-Verified Multi-Agent Learning with Language-Conditioned LoRA for Multilingual Code Generation

Zhizhou Gu, Xianting Wu, Siyu Gu, Tian Zhang, Kejian Tong

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Zhizhou Gu ∗^{*}

Northeastern University

Bellevue, USA

gu.zhiz@northeastern.edu

Xianting Wu

Columbia University

New York, USA

xianting.wu@outlook.com

Siyu Gu

University of Pennsylvania

Philadelphia, USA

gusiyu88@engineering.upenn.edu

Tian Zhang

University of Southern California

San Jose, USA

0tianzhang0@gmail.com

Kejian Tong

Independent Researcher

Mukilteo, USA

tongcs2021@gmail.com

Abstract—Large language models for code generation often fail on execution, multilingual coverage, and contamination control, especially under frozen backbone constraints. We present CodeForge-MA, a unified framework that improves code synthesis through a multi-agent data forge, execution verified reinforced instruction tuning, and a language conditioned mixture of LoRA adapters. Four specialized agents, Composer, Reviewer, Executor, and Curator, iteratively refine instruction code pairs, validate them with tests, and filter duplicates and benchmark leakage. During training, we combine masked supervised fine tuning with a test driven reinforcement objective to align generations with executable correctness. For the larger model, we use sparse expert routing over low rank adapters to improve cross language transfer while keeping the base model unchanged at inference. Experiments show that joint data, objective, and adapter design yields robust gains across programming languages.

Index Terms—code generation, multi-agent learning, instruction tuning, parameter-efficient fine-tuning, reinforcement learning, multilingual programming

I. INTRODUCTION

Generating correct code from natural language remains a critical challenge because success requires more than fluent text production, it demands syntactic validity, semantic correctness, and robust behavior across diverse programming languages. In practice, many systems produce answers that appear plausible but fail at compilation or unit testing, which makes execution grounded evaluation indispensable for real code tasks [1]. Analogous reliability concerns arise in high-stakes LLM deployments such as financial anti-fraud systems, where hallucinations and unverifiable numerical or logical claims motivate layered verification and guardrail mechanisms [2].

Recent advances in prompting and large language model reasoning have improved code synthesis, yet they still struggle with long tail languages, prompt contamination, and the mismatch between reference style and executable correctness. Instruction tuning alone often optimizes surface form, while test time search and reasoning strategies add cost without directly fixing data quality or adapter efficiency [3]. At the same time, scaling model size is not always feasible when the backbone must remain frozen and inference overhead must stay low [4]. These efficiency concerns are especially acute for edge-class Arm CPU deployment, where memory capacity, bandwidth pressure, low-precision throughput, and kernel-level optimization jointly constrain practical LLM inference [5]. This emphasis on architecture-level efficiency under realistic deployment constraints is consistent with recent evidence that different LLM reasoning architectures can exhibit markedly different accuracy, auditability, and cost trade-offs in resource-constrained settings [6].

To address these constraints, we introduce CodeForge MA, a framework that jointly improves training data, optimization objective, and parameter efficient adaptation. Our approach uses a multi agent data forge to create and verify code samples, an execution verified reinforced instruction tuning objective to reward passing tests, and a language conditioned mixture of low rank adapters to specialize efficiently across programming languages. The result is a frozen backbone pipeline that concentrates learning where it matters most, in the data, the reward signal, and the adapters.

References (14)

  • Chain-of-thought prompting elicits reasoning in large language models
  • Suppressing hallucinations in anti-fraud llm agents: The robust dual-verification (rdv) architecture
  • Self-Consistency Improves Chain of Thought Reasoning in Language Models
  • Direct preference optimization: Your language model is secretly a reward model
  • Roofline-guided mixed quantization and kernel co-optimization for efficient large language model inference on arm cpus
  • Architecture matters more than scale: A comparative study of retrieval and memory augmentation for financial qa under sme compute constraints
  • Evaluating Large Language Models Trained on Code
  • The stack: 3 tb of permissively licensed source code (opens arXiv in a new tab)
  • Lora-ga: Low-rank adaptation with gradient approximation
  • Qlora: Efficient finetuning of quantized llms
  • Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity
  • Glam: Efficient scaling of language models with mixture-of-experts
  • Robust financial fraud detection via causal intervention and multi-view contrastive learning on dynamic hypergraphs
  • Efficient multimodal generative forecasting of cloud host metrics with calibrated uncertainty