工业级基于LLM的代码优化在监管下的实现:一种多智能体混合方法
Industrial LLM-based Code Optimization under Regulation: A Mixture-of-Agents Approach
AI总结:
本研究提出多智能体混合方法,在监管约束下利用开源LLM实现工业代码优化,节省14.3%-22.2%成本并提速28.6%-32.2%,为合规与性能平衡提供指导。
摘要:
大型语言模型(LLM)在代码优化方面的最新进展使得工业平台能够以前所未有的规模和速度自动化软件性能工程。然而,受监管行业中的组织对可以使用哪些LLM面临严格限制——许多组织由于数据隐私法规和合规要求而无法使用商业模型,这为在保持成本效益的同时实现高质量代码优化带来了重大挑战。我们通过实施一种多智能体混合(Mixture-of-Agents, MoA)方法来解决这一问题,该方法直接从多个专门化的LLM中合成代码,并将其与TurinTech AI的基于遗传算法(GA)的普通集成系统以及单个LLM优化器在真实工业代码库上进行比较。我们的主要贡献包括:(1)首次将MoA应用于使用真实代码库的工业代码优化;(2)实证证据表明MoA在开源模型中表现出色,在受监管环境中实现了14.3%至22.2%的成本节省和28.6%至32.2%的更快优化时间;(3)部署指南展示了GA在商业模型中的优势,而两种集成方法均优于单个LLM;(4)在50个代码片段和七种LLM组合上的真实世界验证,生成了超过8,700个变体,填补了工业LLM集成评估的空白。这为在生产环境中平衡监管合规与优化性能的组织提供了可操作的指导。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。