arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.11237cs.AIcs.CLcs.SE
收藏

协作即全部所需:LLM辅助的安全代码翻译

Collaboration is all you need: LLM Assisted Safe Code Translation

University Of Houston(休斯顿大学);Mysten Labs(Mysten实验室);Kent State University(肯特州立大学)

Rabimba Karanjai, Sam Blackshear, Lei Xu, Weidong Shi

AI总结:

该研究提出UniTranslator多智能体协作代码翻译框架,协调专注不同翻译环节的紧凑型LLM智能体,借助NLI grounding与迭代反馈机制,在多样语言对翻译中达到媲美大型单体模型的效果,释放小模型代码翻译潜力。

摘要:

本文提出了UniTranslator,这是一个具有前瞻性的框架,它将代码翻译重新构想为多个紧凑型大语言模型(LLM)之间的协作任务。通过协调各专用智能体的交互——每个智能体专注于翻译过程的不同方面,且以对编程概念的深刻理解为基础,UniTranslator达到了可与更大的单体模型相媲美的准确率与效率。我们的初步评估表明,UniTranslator有望克服现有方法的局限,释放小型LLM处理复杂代码翻译任务的能力。我们探究了这种动态多智能体范式在处理包括低资源语言在内的多样语言对,以及通过自然语言推理(NLI) grounding和迭代反馈机制缓解代码伪影、幻觉等常见问题方面的有效性。

英文摘要:

This paper introduces UniTranslator, a visionary framework that re-imagines code translation as a collaborative endeavor among multiple, compact LLMs. By orchestrating the interaction of specialized agents, each focused on different aspects of the translation process and grounded in a deep understanding of programming concepts, UniTranslator achieves a level of accuracy and efficiency that rivals larger, monolithic models. Our preliminary evaluation demonstrates the potential of UniTranslator to overcome the limitations of existing approaches and unlock the power of smaller LLMs for complex code translation tasks. We explore the effectiveness of this dynamic multi-agent paradigm in handling diverse language pairs, including low-resource languages, and in mitigating common issues such as code artifacts and hallucinations through the use of Natural Language Inference (NLI) grounding and iterative feedback mechanisms

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑