Measuring The Impact Of Programming Language Distribution

Gabriel Orlanski, Kefan Xiao, Xavier Garcia, Jeffrey Hui, Joshua Howland +4 more
2/3/2023
cs.LGcs.CLcs.PL

No official code found. Best implementation: google-research/babelcode (56 stars, Apache-2.0, last commit 2026-04-13).

Abstract

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$.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
569Shell, PythonOct 20, 20226 months agoApache-2.0

Cite this paper

@article{orlanski2023measuring,
  title  = {Measuring The Impact Of Programming Language Distribution},
  author = {Gabriel Orlanski and Kefan Xiao and Xavier Garcia and Jeffrey Hui and Joshua Howland and Jonathan Malmaud and Jacob Austin and Rishabh Singh and Michele Catasta},
  year   = {2023},
  eprint = {2302.01973},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.01973v3},
  journal = {ICML 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2302.01973.svg)](https://codeofpaper.com/paper/2302.01973)

Discussion