M2G-Eval: Enhancing and Evaluating Multi-granularity Multilingual Code Generation
Not on the map. Why?
Abstract (arXiv)
The rapid advancement of code large language models (LLMs) has sparked significant research interest in systematically evaluating their code generation capabilities, yet existing benchmarks predominantly assess models at a single structural granularity and focus on limited programming languages, obscuring fine-grained capability variations across different code scopes and multilingual scenarios. We introduce M2G-Eval, a multi-granularity, multilingual framework for evaluating code generation in large language models (LLMs) across four levels: Class, Function, Block, and Line. Spanning 18 programming languages, M2G-Eval includes 17K+ training tasks and 1,286 human-annotated, contamination-controlled test instances. We develop M2G-Eval-Coder models by training Qwen3-8B with supervised fine-tuning and Group Relative Policy Optimization. Evaluating 30 models (28 state-of-the-art LLMs plus our two M2G-Eval-Coder variants) reveals three main findings: (1) an apparent difficulty hierarchy, with Line-level tasks easiest and Class-level most challenging; (2) widening performance gaps between full- and partial-granularity languages as task complexity increases; and (3) strong cross-language correlations, suggesting that models learn transferable programming concepts. M2G-Eval enables fine-grained diagnosis of code generation capabilities and highlights persistent challenges in synthesizing complex, long-form code.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 21 of its 34 references that are in the map. First posted on arXiv 27 Dec 2025.
Builds on
21 of 34 references.
References · 21
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2025Qwen3 Technical Reportcited by 8,195
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,674
- 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,154
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2023LLaMA-Adapter: Efficient Fine-tuning of Language Models with Zero-init Attentioncited by 776
9 more
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
- 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 181
- 2023Refining ChatGPT-Generated Code: Characterizing and Mitigating Code Quality Issuescited by 78
- 2023CodeTransOcean: A Comprehensive Multilingual Benchmark for Code Translationcited by 55
- 2024Evaluating and Aligning CodeLLMs on Human Preferencecited by 22
- 2024ExecRepoBench: Multi-level Executable Code Completion Evaluationcited by 19
- 2024ADC: Enhancing Function Calling Via Adversarial Datasets and Code Line-Level Feedbackcited by 5
- 2025Turning the Tide: Repository-based Code Reflectioncited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.