MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languages

Zhiruo Wang, Grace Cuenca, Shuyan Zhou, Frank F. Xu, Graham Neubig


Abstract
While there has been a recent burgeoning of applications at the intersection of natural and programming languages, such as code generation and code summarization, these applications are usually English-centric. This creates a barrier for program developers who are not proficient in English. To mitigate this gap in technology development across languages, we propose a multilingual dataset, MCoNaLa, to benchmark code generation from natural language commands extending beyond English. Modeled off of the methodology from the English Code/Natural Language Challenge (CoNaLa) dataset, we annotated a total of 896 NL-Code pairs in three languages: Spanish, Japanese, and Russian. We present a systematic evaluation on MCoNaLa by testing state-of-the-art code generation systems. Although the difficulties vary across three languages, all systems lag significantly behind their English counterparts, revealing the challenges in adapting code generation to new languages.
Anthology ID:
2023.findings-eacl.20
Volume:
Findings of the Association for Computational Linguistics: EACL 2023
Month:
May
Year:
2023
Address:
Dubrovnik, Croatia
Editors:
Andreas Vlachos, Isabelle Augenstein
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
265–273
Language:
URL:
https://aclanthology.org/2023.findings-eacl.20
DOI:
10.18653/v1/2023.findings-eacl.20
Bibkey:
Cite (ACL):
Zhiruo Wang, Grace Cuenca, Shuyan Zhou, Frank F. Xu, and Graham Neubig. 2023. MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languages. In Findings of the Association for Computational Linguistics: EACL 2023, pages 265–273, Dubrovnik, Croatia. Association for Computational Linguistics.
Cite (Informal):
MCoNaLa: A Benchmark for Code Generation from Multiple Natural Languages (Wang et al., Findings 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.findings-eacl.20.pdf
Video:
 https://aclanthology.org/2023.findings-eacl.20.mp4