LangProp:一种应用于驾驶的基于大型语言模型的代码优化框架
LangProp: A code optimization framework using Large Language Models applied to driving
AI总结:
LangProp框架利用大型语言模型,通过指标驱动和数据驱动的训练范式迭代优化代码生成,在数独、CartPole及CARLA自动驾驶中验证了其有效性,并能生成可解释且透明的策略。
摘要:
我们提出 LangProp,一个在监督学习和强化学习设置下迭代优化由大型语言模型(LLMs)生成的代码的框架。虽然 LLMs 能够零样本生成合理的编码解决方案,但它们往往不是最优的。尤其是对于代码生成任务,初始代码很可能在某些边界情况上失败。LangProp 自动评估代码在输入-输出对数据集上的性能,捕获任何异常,并将结果反馈到训练循环中的 LLM,从而使 LLM 能够迭代改进其生成的代码。通过为这一代码优化过程采用指标驱动和数据驱动的训练范式,人们可以轻松地借鉴传统机器学习技术中的发现,例如模仿学习、DAgger 和强化学习。我们展示了 LangProp 在数独和 CartPole 等一般领域的适用性,并首次在 CARLA 中展示了面向自动驾驶的自动化代码优化的概念验证。我们表明,LangProp 能够生成可解释且透明的策略,这些策略可以通过指标驱动和数据驱动的方式进行验证和改进。我们的代码可在 https://github.com/shuishida/LangProp 获取。
英文摘要:
We propose LangProp, a framework for iteratively optimizing code generated by large language models (LLMs), in both supervised and reinforcement learning settings. While LLMs can generate sensible coding solutions zero-shot, they are often sub-optimal. Especially for code generation tasks, it is likely that the initial code will fail on certain edge cases. LangProp automatically evaluates the code performance on a dataset of input-output pairs, catches any exceptions, and feeds the results back to the LLM in the training loop, so that the LLM can iteratively improve the code it generates. By adopting a metric- and data-driven training paradigm for this code optimization procedure, one could easily adapt findings from traditional machine learning techniques such as imitation learning, DAgger, and reinforcement learning. We show LangProp's applicability to general domains such as Sudoku and CartPole, as well as demonstrate the first proof of concept of automated code optimization for autonomous driving in CARLA. We show that LangProp can generate interpretable and transparent policies that can be verified and improved in a metric- and data-driven way. Our code is available at https://github.com/shuishida/LangProp.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。