arXiv:2508.03329cs.SEcs.AI2025-08被引 3

用多智能体融合开源模型,让受监管企业高效优化代码且省成本。

Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approach

  • 通过多个专用LLM协作生成代码,替代单一模型
  • 在受监管场景下节省14.3%~22.2%成本,提速28.6%~32.2%
  • 适合需合规又追求性能的工业级代码优化团队

大型语言模型(LLM)在代码优化上的进展使工业平台得以大规模、高速地自动化软件性能工程。然而,受监管行业的组织受限于数据隐私与合规要求,难以使用商业模型,导致高质量代码优化面临挑战。本文提出一种混合智能体(MoA)方法,直接整合多个专业化LLM生成代码,并在真实工业代码库上对比了其与TurinTech AI原生遗传算法(GA)集成系统及单个LLM优化器的表现。关键贡献包括:(1) 首次将MoA应用于真实工业代码优化;(2) 实证表明,在开源模型下,该方法可实现14.3%至22.2%的成本节约和28.6%至32.2%的优化加速;(3) 指出商业模型更适合遗传算法,而集成系统整体优于单个模型;(4) 在50个代码片段与7种LLM组合中验证,生成超8,700个代码变体,填补了工业级LLM集成评估的空白。研究为生产环境中兼顾合规与性能的优化提供了可落地指导。

原文摘要 · Abstract (English)

Recent advancements in Large Language Models (LLMs) for code optimization have enabled industrial platforms to automate software performance engineering at unprecedented scale and speed. Yet, organizations in regulated industries face strict constraints on which LLMs they can use - many cannot utilize commercial models due to data privacy regulations and compliance requirements, creating a significant challenge for achieving high-quality code optimization while maintaining cost-effectiveness. We address this by implementing a Mixture-of-Agents (MoA) approach that directly synthesizes code from multiple specialized LLMs, comparing it against TurinTech AI's vanilla Genetic Algorithm (GA)-based ensemble system and individual LLM optimizers using real-world industrial codebases. Our key contributions include: (1) First MoA application to industrial code optimization using real-world codebases; (2) Empirical evidence that MoA excels with open-source models, achieving 14.3% to 22.2% cost savings and 28.6% to 32.2% faster optimization times for regulated environments; (3) Deployment guidelines demonstrating GA's advantage with commercial models while both ensembles outperform individual LLMs; and (4) Real-world validation across 50 code snippets and seven LLM combinations, generating over 8,700 variants, addresses gaps in industrial LLM ensemble evaluation. This provides actionable guidance for organizations balancing regulatory compliance with optimization performance in production environments.

代码优化多智能体开源模型工业应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。