arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.16458cs.LGcs.AIcs.CL
收藏

BioCoder:面向大语言模型的生物信息学代码生成基准

BioCoder: A Benchmark for Bioinformatics Code Generation with Large Language Models

Yale University(耶鲁大学);Google Deepmind(谷歌DeepMind)

Xiangru Tang, Bill Qian, Rick Gao, Jiakang Chen, Xinyun Chen, Mark Gerstein

AI总结:

本研究提出生物信息学代码生成基准BioCoder,覆盖领域全范围计算任务,通过模糊测试评估多款大语言模型,发现长上下文处理与领域知识是性能关键,且微调可提升模型表现。

摘要:

预训练大语言模型(LLMs)已显著提升代码生成能力。随着模型规模扩大,人们愈发需要其输出能处理更复杂的任务,并能针对特定领域实现恰当的专业化。本文聚焦生物信息学领域,原因在于该学科需要大量领域知识、算法与数据操作。我们提出了BioCoder,这是一款用于评估大语言模型生成生物信息学专用代码能力的基准。BioCoder覆盖该领域的广泛内容,包含跨文件依赖、类声明与全局变量。它纳入了从GitHub提取的1026个Python函数和1243个Java方法,以及来自Rosalind Project(罗莎琳德项目)的253个示例,所有内容均与生物信息学相关。通过主题建模,我们证明所纳入代码的整体覆盖度能够代表生物信息学计算的全范围。BioCoder内置一套模糊测试框架用于评估。我们已用它评估了多种模型,包括InCoder、CodeGen、CodeGen2、SantaCoder、StarCoder、StarCoder+、InstructCodeT5+、GPT-3.5和GPT-4。此外,我们对其中一个模型(StarCoder)进行了微调,证明我们的训练数据集能够提升其在该测试基准上的表现——在特定提示配置下Pass@K指标提升超过15%,且始终高于3%。结果凸显了成功模型的两个关键特征:(1)成功模型能处理包含完整上下文(包括功能依赖)的长提示(超过2600个token);(2)它们除了通用编码能力外,还具备生物信息学领域的特定知识。这一点从GPT-3.5/4在我们的基准上相比更小模型的性能提升(50%对比最高25%)中可见一斑。可用性与实现:代码可在以下地址获取:https://github.com/gersteinlab/biocoder 和 https://biocoder-benchmark.github.io/。

英文摘要:

Pre-trained large language models (LLMs) have significantly improved code generation. As these models scale up, there is an increasing need for the output to handle more intricate tasks and to be appropriately specialized to particular domains. Here, we target bioinformatics due to the amount of domain knowledge, algorithms, and data operations this discipline requires. We present BioCoder, a benchmark developed to evaluate LLMs in generating bioinformatics-specific code. BioCoder spans much of the field, covering cross-file dependencies, class declarations, and global variables. It incorporates 1,026 Python functions and 1,243 Java methods extracted from GitHub, along with 253 examples from the Rosalind Project, all pertaining to bioinformatics. Using topic modeling, we show that the overall coverage of the included code is representative of the full spectrum of bioinformatics calculations. BioCoder incorporates a fuzz-testing framework for evaluation. We have applied it to evaluate various models including InCoder, CodeGen, CodeGen2, SantaCoder, StarCoder, StarCoder+, InstructCodeT5+, GPT-3.5, and GPT- 4. Furthermore, we fine-tuned one model (StarCoder), demonstrating that our training dataset can enhance the performance on our testing benchmark (by >15% in terms of Pass@K under certain prompt configurations and always >3%). The results highlight two key aspects of successful models: (1) Successful models accommodate a long prompt (> 2,600 tokens) with full context, including functional dependencies. (2) They contain domain-specific knowledge of bioinformatics, beyond just general coding capability. This is evident from the performance gain of GPT-3.5/4 compared to the smaller models on our benchmark (50% vs. up to 25%). Availability and implementation: Code is available at: https://github.com/gersteinlab/biocoder and https://biocoder-benchmark. github.io/.

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

↑