[Paper Review] xCodeEval: A Large Scale Multilingual Multitask Benchmark for Code Understanding, Generation, Translation and Retrieval
xCodeEval is the largest executable multilingual multitask benchmark for code, spanning 7.5K problems and 17 languages, with 7 tasks and an execution-based evaluation engine ExecEval. It enables cross-language, cross-task, and execution-level assessment of code understanding, generation, translation, and retrieval for LLMs.
Recently, pre-trained large language models (LLMs) have shown impressive abilities in generating codes from natural language descriptions, repairing buggy codes, translating codes between languages, and retrieving relevant code segments. However, the evaluation of these models has often been performed in a scattered way on only one or two specific tasks, in a few languages, at a partial granularity (e.g., function) level, and in many cases without proper training data. Even more concerning is that in most cases the evaluation of generated codes has been done in terms of mere lexical overlap with a reference code rather than actual execution. We introduce xCodeEval, the largest executable multilingual multitask benchmark to date consisting of $25$M document-level coding examples ($16.5$B tokens) from about $7.5$K unique problems covering up to $11$ programming languages with execution-level parallelism. It features a total of $7$ tasks involving code understanding, generation, translation and retrieval. xCodeEval adopts an execution-based evaluation and offers a multilingual code execution engine, ExecEval that supports unit test based execution in all the $11$ languages. To address the challenge of balancing the distributions of text-code samples over multiple attributes in validation/test sets, we propose a novel data splitting and a data selection schema based on the geometric mean and graph-theoretic principle. Our experiments with OpenAI's LLMs (zero-shot) and open-LLMs (zero-shot and fine-tuned) on the tasks and languages demonstrate **xCodeEval** to be quite challenging as per the current advancements in language models.
Motivation & Objective
- Assess multilingual program understanding, generation, translation, and retrieval using an execution-based framework.
- Provide a large-scale, diverse benchmark covering multiple programming languages and problem difficulties.
- Enable fair evaluation through a novel data splitting strategy and an execution engine that runs unit tests across languages.
Proposed method
- Construct a 25M-sample dataset from codeforces with 7.5K problems across up to 17 languages.
- Develop ExecEval, a secure, distributed execution engine supporting 44 compilers/interpreters in 11 languages for unit-test based evaluation.
- Define 7 tasks (2 classification, 3 generation, 2 retrieval) with execution-based assessment.
- Use a novel data-splitting and sample-selection strategy based on geometric mean and a circulation problem to balance validation/test distributions across problems and tags.
- Evaluate OpenAI and open-LLMs on the benchmark to gauge current capabilities and identify gaps.
- Provide training data and evaluation resources (datasets, GitHub/Hub, and documentation).

Experimental results
Research questions
- RQ1How do multilingual LLMs perform on code understanding, generation, translation, and retrieval when evaluated with execution-based unit tests?
- RQ2What are the cross-language transfer and zero-shot capabilities for executable code tasks across 17 languages?
- RQ3How do different problem difficulties and language resources affect program synthesis, repair, and translation performance?
- RQ4Can the proposed data-splitting and sampling strategies yield balanced, representative validation/test sets across multiple attributes?
- RQ5What insights can be drawn about executable code proficiency and reasoning across languages for current LLMs?
Key findings
- xCodeEval is challenging for state-of-the-art LLMs, including zero-shot and fine-tuned models across tasks and languages.
- Tag Classification shows decent general performance, with improvements when a problem description is included; web languages perform poorer.
- Code Compilation is strong for Go, PHP, Python, Ruby, and C# but near-random for Java, Kotlin, and Rust.
- Program Synthesis achieves higher pass@k on some languages but lags behind on Rust and other less-resourced languages; APR shows relatively stronger performance in some languages.
- Code Translation indicates Kotlin and Go translate well to many targets, while C++ and Python are strong targets; cross-language translation performance varies significantly by language pair.
- Code-Code and NL-Code retrieval with StarEncoder shows language-resource dependent results, with better NL-Code performance overall; larger corpora and language-resource imbalances affect Code-Code retrieval.
- Experiments with smaller models (Starcoderbase-3B, CodeLlama variants) demonstrate data efficacy: smaller fine-tuned models can benefit from xCodeEval data, while large instruct models still outperform smaller counterparts in many cases.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.