Current benchmarks for evaluating neural code models focus on only a small subset of programming languages, excluding many popular languages such as Go or Rust. To ameliorate this issue, we present the BabelCode framework for execution-based evaluation of any benchmark in any language. BabelCode enables new investigations into the qualitative performance of models' memory, runtime, and individual test case results. Additionally, we present a new code translation dataset called Translating Python Programming Puzzles (TP3) from the Python Programming Puzzles (Schuster et al. 2021) benchmark that involves translating expert-level python functions to any language. With both BabelCode and the TP3 benchmark, we investigate if balancing the distributions of 14 languages in a training dataset improves a large language model's performance on low-resource languages. Training a model on a balanced corpus results in, on average, 12.34% higher $pass@k$ across all tasks and languages compared to the baseline. We find that this strategy achieves 66.48% better $pass@k$ on low-resource languages at the cost of only a 12.94% decrease to high-resource languages. In our three translation tasks, this strategy yields, on average, 30.77% better low-resource $pass@k$ while having 19.58% worse high-resource $pass@k$.


翻译:现有用于评估神经代码模型的基准测试仅涵盖少数编程语言,排除了Go或Rust等众多流行语言。为解决这一问题,我们提出了BabelCode框架,用于对任何基准测试中任意语言进行基于执行的评估。BabelCode支持对模型的内存、运行时间和单个测试用例结果的定性性能进行全新研究。此外,我们还从Python编程谜题(Schuster等人,2021)基准测试中构建了一个名为将Python编程谜题(TP3)的新代码翻译数据集,该数据集涉及将专家级Python函数翻译成任意语言。利用BabelCode和TP3基准测试,我们研究了在训练数据集中平衡14种语言的分布是否能够提升大型语言模型在低资源语言上的性能。与基线相比,在平衡语料库上训练模型使所有任务和语言的$pass@k$平均提高了12.34%。我们发现,这一策略在低资源语言上实现了66.48%的$pass@k$提升,仅以高资源语言降低12.94%为代价。在我们的三个翻译任务中,该策略在低资源$pass@k$上平均提高了30.77%,而高资源$pass@k$则下降了19.58%。

0
下载
关闭预览

相关内容

【2022新书】高效深度学习,Efficient Deep Learning Book
专知会员服务
128+阅读 · 2022年4月21日
【干货书】真实机器学习,264页pdf,Real-World Machine Learning
专知会员服务
162+阅读 · 2020年1月16日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
Capsule Networks解析
机器学习研究会
11+阅读 · 2017年11月12日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
Arxiv
6+阅读 · 2023年3月27日
Arxiv
0+阅读 · 2023年3月24日
Arxiv
14+阅读 · 2022年5月6日
Arxiv
38+阅读 · 2021年8月31日
VIP会员
最新内容
“史诗怒火”行动:现代多域作战的重要节点
专知会员服务
4+阅读 · 今天5:05
《下一代无线网络中的多无人机通信资源管理》
专知会员服务
4+阅读 · 今天5:00
《同步多无人机系统中的故障与通信》
专知会员服务
4+阅读 · 7月29日
面向国防作战的最佳自主与蜂群无人机技术
专知会员服务
7+阅读 · 7月28日
相关资讯
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
Capsule Networks解析
机器学习研究会
11+阅读 · 2017年11月12日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
1+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
Top
微信扫码咨询专知VIP会员