A proper code evaluation metric (CEM) profoundly impacts the evolution of code generation, which is an important research field in NLP and software engineering. Prevailing match-based CEMs (e.g., BLEU, Accuracy, and CodeBLEU) suffer from two significant drawbacks. 1. They primarily measure the surface differences between codes without considering their functional equivalence. However, functional equivalence is pivotal in evaluating the effectiveness of code generation, as different codes can perform identical operations. 2. They are predominantly designed for the Ref-only input format. However, code evaluation necessitates versatility in input formats. Aside from Ref-only, there are NL-only and Ref\&NL formats, which existing match-based CEMs cannot effectively accommodate. In this paper, we propose CodeScore, a large language model (LLM)-based CEM, which estimates the functional correctness of generated code on three input types. To acquire CodeScore, we present UniCE, a unified code generation learning framework, for LLMs to learn code execution (i.e., learning PassRatio and Executability of generated code) with unified input. Extensive experimental results on multiple code evaluation datasets demonstrate that CodeScore absolutely improves up to 58.87% correlation with functional correctness compared to other CEMs, achieves state-of-the-art performance, and effectively handles three input formats.
TRACE: Evaluating Execution Efficiency of LLM-Based Code Translation
Key Lab of HCST (PKU), MOE(北京大学智能语言研究实验室(教育部);计算机科学与技术系);SCS, Peking University(中国科学院软件研究所);Institute of Software, Chinese Academy of Sciences(新加坡国立大学);National University of Singapore(伦敦国王学院);King’s College London(北京大学深圳研究生院电子与计算机工程学院);School of Electronic and Computer Engineering, PKU Shenzhen Graduate School
CodeScope: An Execution-based Multilingual Multitask Multidimensional Benchmark for Evaluating LLMs on Code Understanding and Generation
University of California, Santa Barbara(加利福尼亚大学圣巴巴拉分校);School of Software Engineering, Xi’an Jiaotong University(西安交通大学软件学院);Zhejiang University(浙江大学);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Alibaba Group(阿里巴巴集团);TU Wien(维也纳技术大学);University of Chinese Academy of Sciences(中国科学院大学)
GitChameleon 2.0: Evaluating AI Code Generation Against Python Library Version Incompatibilities
ELLIS Institute Tübingen(图宾根ELLIS研究所);MPI-IS Tübingen(图宾根MPI研究所);Mila Quebec AI Institute(魁北克AI研究所);Google(谷歌);Polytechnique Montréal(蒙特利尔高等理工学院);McGill University(麦吉尔大学);Moderne(Moderne公司);Gologic(Gologic公司);Tübingen AI Center(图宾根人工智能中心);Université de Montréal(蒙特利尔大学);ServiceNow Research(ServiceNow研究)