arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2303.03004cs.CL

xCodeEval:面向代码理解、生成、翻译与检索的大规模多语言多任务基准

xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrieval

Islamic University of Technology (IUT)(伊斯兰科技大学);Nanyang Technological University (NTU)(南洋理工大学);Qatar Computing Research Institute (QCRI)(卡塔尔计算研究所);Bosch Research(博世研究院);Salesforce Research(赛富时研究院)

Mohammad Abdullah Matin Khan, M Saiful Bari, Xuan Long Do, Weishi Wang, Md Rizwan Parvez, Shafiq Joty

AI总结:

本研究推出大规模可执行多语言多任务代码基准xCodeEval,覆盖11种语言、7类代码任务,配套执行引擎与新型数据划分方案,实验显示其对当前大语言模型极具挑战性。

摘要:

近年来,预训练大语言模型(LLM)在根据自然语言描述生成代码、修复有缺陷的代码、跨语言翻译代码以及检索相关代码片段方面展现出了令人瞩目的能力。然而,对这些模型的评估往往较为零散,通常仅针对一两个特定任务,覆盖少数编程语言,仅在部分粒度(如函数级)上开展,且很多情况下缺乏合适的训练数据。更值得关注的是,大多数情况下对生成代码的评估仅依据其与参考代码的词汇重叠度,而非实际执行效果。\n我们推出了xCodeEval,这是目前规模最大的可执行多语言多任务基准,包含来自约7500个独立问题的2500万个文档级代码示例(共165亿个token),覆盖多达11种编程语言,具备执行级并行性。该基准共设7项任务,涵盖代码理解、生成、翻译与检索四大方向。xCodeEval采用基于执行的评估方式,并提供了多语言代码执行引擎ExecEval,支持全部11种语言的基于单元测试的执行验证。为解决验证集与测试集中文本-代码样本在多个属性上的分布平衡难题,我们提出了一种基于几何均值与图论原理的新型数据划分及数据选择方案。\n我们使用OpenAI的大语言模型(零样本设置)以及开源大语言模型(零样本与微调设置)在各项任务与语言上开展了实验,结果表明,以当前语言模型的技术水平来看,xCodeEval极具挑战性。

英文摘要:

Recently, pre-trained large language models (LLMs) have shown impressive abilities in generating codes from natural language descriptions, repairing buggy codes, translating codes between languages, and retrieving relevant code segments. However, the evaluation of these models has often been performed in a scattered way on only one or two specific tasks, in a few languages, at a partial granularity (e.g., function) level, and in many cases without proper training data. Even more concerning is that in most cases the evaluation of generated codes has been done in terms of mere lexical overlap with a reference code rather than actual execution. We introduce xCodeEval, the largest executable multilingual multitask benchmark to date consisting of $25$M document-level coding examples ($16.5$B tokens) from about $7.5$K unique problems covering up to $11$ programming languages with execution-level parallelism. It features a total of $7$ tasks involving code understanding, generation, translation and retrieval. xCodeEval adopts an execution-based evaluation and offers a multilingual code execution engine, ExecEval that supports unit test based execution in all the $11$ languages. To address the challenge of balancing the distributions of text-code samples over multiple attributes in validation/test sets, we propose a novel data splitting and a data selection schema based on the geometric mean and graph-theoretic principle. Our experiments with OpenAI's LLMs (zero-shot) and open-LLMs (zero-shot and fine-tuned) on the tasks and languages demonstrate **xCodeEval** to be quite challenging as per the current advancements in language models.

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

↑