Skip to main content
QUICK REVIEW

[Paper Review] A Survey on Evaluating Large Language Models in Code Generation Tasks

Liguo Chen, Qi Guo|arXiv (Cornell University)|Aug 29, 2024
Natural Language Processing TechniquesComputer Science9 citations
TL;DR

A comprehensive review of methods and metrics for evaluating LLMs in code generation, including benchmarks, evaluation schemes, and future challenges.

ABSTRACT

This paper provides a comprehensive review of the current methods and metrics used to evaluate the performance of Large Language Models (LLMs) in code generation tasks. With the rapid growth in demand for automated software development, LLMs have demonstrated significant potential in the field of code generation. The paper begins by reviewing the historical development of LLMs and their applications in code generation. Next, it details various methods and metrics for assessing the code generation capabilities of LLMs, including code correctness, efficiency, readability, and evaluation methods based on expert review and user experience. The paper also evaluates the widely used benchmark datasets, identifying their limitations and proposing directions for future improvements. Specifically, the paper analyzes the performance of code generation models across different tasks by combining multiple evaluation metrics, such as code compilation/interpretation success rates, unit test pass rates, and performance and efficiency metrics, to comprehensively assess the practical application of LLMs in code generation. Finally, the paper discusses the challenges faced in evaluating LLMs in code generation, particularly how to ensure the comprehensiveness and accuracy of evaluation methods and how to adapt to the evolving practices of software development. These analyses and discussions provide valuable insights for further optimizing and improving the application of LLMs in code generation tasks.

Motivation & Objective

  • Assess how LLMs are evaluated for code generation across correctness, efficiency, and readability.
  • Summarize benchmark datasets and their limitations for code generation tasks.
  • Analyze evaluation methodologies, including expert reviews and user experience.
  • Identify challenges and future directions in scalable, multilingual, secure, and robust evaluation.

Proposed method

  • Classify evaluation metrics into similarity-based, execution-based, and feedback-based categories.
  • Review code-specific metrics such as CodeBLEU and data-flow/AST-based assessments.
  • Summarize benchmark suites like HumanEval, MBPP, CodeXGLUE, and CoderUJB and discuss their limitations.
  • Discuss challenges in scalability, multilingual generalization, security, robustness, and practicality.
Fig.​​ 3 : Pass@1 Performance of LLMs on HumanEval Over Time.
Fig.​​ 3 : Pass@1 Performance of LLMs on HumanEval Over Time.

Experimental results

Research questions

  • RQ1What evaluation metrics are used to assess LLMs in code generation and what are their limitations?
  • RQ2What benchmarks are used for code generation evaluation and how well do they reflect real-world coding tasks?
  • RQ3What challenges exist in evaluating LLMs for code generation and what directions are proposed for future work?
  • RQ4How do different evaluation approaches (similarity, execution, feedback) complement each other in assessing code generation quality?

Key findings

  • CodeBLEU improves over BLEU by incorporating syntactic and semantic code aspects.
  • Compilation/interpretation success rate and unit test pass rate are central execution-based metrics.
  • Feedback-based evaluation includes blind peer review and real-world application testing to enhance objectivity.
  • Benchmarks like HumanEval and MBPP are Python-focused and may not fully reflect practical software tasks.
  • Variants of benchmarks (e.g., CoderUJB for Java) reveal task-specific strengths and limitations of LLMs.
Fig.​​ 4 : Pass@1 Performance of LLMs on MBPP Over Time.
Fig.​​ 4 : Pass@1 Performance of LLMs on MBPP Over Time.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.