arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.10718cs.SEcs.CL
收藏

CodeJudge-Eval:大语言模型能成为代码理解领域的优秀评判者吗?

CodeJudge-Eval: Can Large Language Models be Good Judges in Code Understanding?

Hong Kong Baptist University(香港浸会大学);Beihang University(北京航空航天大学);University of Tokyo(东京大学)

Yuwei Zhao, Ziyang Luo, Yuchen Tian, Hongzhan Lin, Weixiang Yan, Annan Li, Jing Ma

AI总结:

针对现有代码基准难以全面衡量大语言模型代码理解能力的问题,研究提出从代码评判角度设计的CodeJudge-Eval基准,覆盖多类错误与编译问题,实验显示12款知名大模型在该基准上表现不佳,验证了其深度评估代码理解能力的价值。

摘要:

大语言模型(LLM)近期的发展展现出了出色的代码生成能力,这类能力主要通过语言转代码基准进行评估。但这类基准或许无法全面衡量模型的代码理解能力。我们提出了CodeJudge-Eval(简称CJ-Eval),这是一个全新的基准,旨在从代码评判而非代码生成的角度评估LLM的代码理解能力。CJ-Eval要求模型判断给定代码解决方案的正确性,涵盖多种错误类型和编译问题。通过借助多样化的问题集和细粒度评判系统,CJ-Eval解决了传统基准的局限性,包括可能存在的解决方案记忆问题。在CJ-Eval上对12个知名LLM的评估显示,即便是最先进的模型也表现不佳,凸显了该基准深入探究模型代码理解能力的效用。我们的代码和基准可在https://github.com/CodeLLM-Research/CodeJudge-Eval 获取。

英文摘要:

Recent advancements in large language models (LLMs) have showcased impressive code generation capabilities, primarily evaluated through language-to-code benchmarks. However, these benchmarks may not fully capture a model's code understanding abilities. We introduce CodeJudge-Eval (CJ-Eval), a novel benchmark designed to assess LLMs' code understanding abilities from the perspective of code judging rather than code generation. CJ-Eval challenges models to determine the correctness of provided code solutions, encompassing various error types and compilation issues. By leveraging a diverse set of problems and a fine-grained judging system, CJ-Eval addresses the limitations of traditional benchmarks, including the potential memorization of solutions. Evaluation of 12 well-known LLMs on CJ-Eval reveals that even state-of-the-art models struggle, highlighting the benchmark's ability to probe deeper into models' code understanding abilities. Our codes and benchmark are available at \url{https://github.com/CodeLLM-Research/CodeJudge-Eval}.

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

↑