DS-1000:数据科学代码生成的自然可靠基准
DS-1000: A Natural and Reliable Benchmark for Data Science Code Generation
摘要:
我们介绍DS-1000,这是一个代码生成基准测试,包含了跨越七个Python库(如NumPy和Pandas)的一千个数据科学问题。与以前的作品相比,DS-1000包含三个核心功能。首先,我们的问题反映了多样的,现实的,实际的用例,因为我们从StackOverflow收集它们。其次,我们的自动评估是高度具体的(可靠的)-在我们的评估接受的所有Codex-002预测的解决方案中,只有1.8%是不正确的;我们通过多标准指标实现这一点,通过运行测试用例检查功能正确性,并通过限制API使用或关键字来检查表面形式约束。最后,我们通过稍微修改我们的问题以与原始StackOverflow源不同来主动防御记忆;因此,模型无法通过记忆预训练的解决方案来正确回答它们。目前最好的公共系统(Codex-002)的准确率为43.3%,有很大的改进空间。我们在https://ds1000-code-gen.github.io上发布了我们的基准测试。
英文摘要:
We introduce DS-1000, a code generation benchmark with a thousand data science problems spanning seven Python libraries, such as NumPy and Pandas. Compared to prior works, DS-1000 incorporates three core features. First, our problems reflect diverse, realistic, and practical use cases since we collected them from StackOverflow. Second, our automatic evaluation is highly specific (reliable) -- across all Codex-002-predicted solutions that our evaluation accept, only 1.8% of them are incorrect; we achieve this with multi-criteria metrics, checking both functional correctness by running test cases and surface-form constraints by restricting API usages or keywords. Finally, we proactively defend against memorization by slightly modifying our problems to be different from the original StackOverflow source; consequently, models cannot answer them correctly by memorizing the solutions from pre-training. The current best public system (Codex-002) achieves 43.3% accuracy, leaving ample room for improvement. We release our benchmark at https://ds1000-code-gen.github.io.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。