arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2311.09835cs.CLcs.AI
收藏

ML-Bench:评估大型语言模型与智能体在仓库级代码上的机器学习任务表现

ML-Bench: Evaluating Large Language Models and Agents for Machine Learning Tasks on Repository-Level Code

Nanjing University(南京大学);Peking University(北京大学);Yale University(耶鲁大学)
Xiangru Tang, Yuliang Liu, Zefan Cai, Yanjun Shao, Junjie Lu, Yichi Zhang, Zexuan Deng, Helan Hu, Kaikai An, Ruijun Huang, Shuzheng Si, Sheng Chen, Haozhe Zhao,… 展开作者

Xiangru Tang, Yuliang Liu, Zefan Cai, Yanjun Shao, Junjie Lu, Yichi Zhang, Zexuan Deng, Helan Hu, Kaikai An, Ruijun Huang, Shuzheng Si, Sheng Chen, Haozhe Zhao, Liang Chen, Yan Wang, Tianyu Liu, Zhiwei Jiang, Baobao Chang, Yin Fang, Yujia Qin, Wangchunshu Zhou, Yilun Zhao, Arman Cohan, Mark Gerstein

AI总结:

ML-Bench是一个基于真实仓库代码的基准,评估LLMs和智能体在机器学习任务上的表现,包含9,641个示例,发现GPT-4o在Pass@5上超过50%,但在智能体设置中达到76.47%的成功率。

摘要:

尽管像GPT-4这样的大型语言模型(LLMs)在函数级代码生成方面取得了令人瞩目的成果,但它们在仓库级代码理解方面仍面临挑战(例如,为调用例程生成正确的参数),这需要对复杂的文件交互有更深入的理解。此外,近期人们开发了试图与仓库代码交互(例如,编译并评估其执行)的LLM智能体,这促使了对它们性能进行评估的需求。这些差距促使我们开发了ML-Bench,一个基于真实世界编程应用的基准,利用现有代码仓库来执行任务。为了满足LLMs解释长代码上下文并将指令转化为精确、可执行脚本的需求,ML-Bench涵盖了来自18个GitHub仓库的9,641个标注示例,挑战LLMs有效适应特定于用户的参数和文档细节。为了评估LLMs和AI智能体,我们采用了两种设置:ML-LLM-Bench用于评估LLMs在预定义部署环境中的文本到代码转换能力,而ML-Agent-Bench用于测试自主智能体在Linux沙箱环境中的端到端任务执行。我们的研究结果表明,尽管GPT-4o以超过50%的Pass@5率领先,但仍有显著的改进空间,这突出表现在诸如幻觉输出和bash脚本生成困难等问题上。值得注意的是,在更具挑战性的ML-Agent-Bench中,GPT-4o实现了76.47%的成功率,反映了迭代行动和反馈在复杂任务解决中的有效性。我们的代码、数据集和模型可在https://github.com/gersteinlab/ML-bench获取。

英文摘要:

Despite Large Language Models (LLMs) like GPT-4 achieving impressive results in function-level code generation, they struggle with repository-scale code understanding (e.g., coming up with the right arguments for calling routines), requiring a deeper comprehension of complex file interactions. Also, recently, people have developed LLM agents that attempt to interact with repository code (e.g., compiling and evaluating its execution), prompting the need to evaluate their performance. These gaps have motivated our development of ML-Bench, a benchmark rooted in real-world programming applications that leverage existing code repositories to perform tasks. Addressing the need for LLMs to interpret long code contexts and translate instructions into precise, executable scripts, ML-Bench encompasses annotated 9,641 examples across 18 GitHub repositories, challenging LLMs to accommodate user-specified arguments and documentation intricacies effectively. To evaluate both LLMs and AI agents, two setups are employed: ML-LLM-Bench for assessing LLMs' text-to-code conversion within a predefined deployment environment, and ML-Agent-Bench for testing autonomous agents in an end-to-end task execution within a Linux sandbox environment. Our findings indicate that while GPT-4o leads with a Pass@5 rate surpassing 50%, there remains significant scope for improvement, highlighted by issues such as hallucinated outputs and difficulties with bash script generation. Notably, in the more demanding ML-Agent-Bench, GPT-4o achieves a 76.47% success rate, reflecting the efficacy of iterative action and feedback in complex task resolution. Our code, dataset, and models are available at https://github.com/gersteinlab/ML-bench.

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

↑