paper-with-me

홈 › Papers

CodeBERTScore: Evaluating Code Generation with Pretrained Models of Code

2023-02-10 · Shuyan Zhou, Uri Alon, Sumit Agarwal, Graham Neubig

Since the rise of neural natural-language-to-code models (NL->Code) that can generate long expressions and statements rather than a single next-token, one of the major problems has been reliably evaluating their generated output. In this paper, we propose CodeBERTScore: an evaluation metric for code generation, which builds on BERTScore (Zhang et al., 2020). Instead of encoding only the generated tokens as in BERTScore, CodeBERTScore also encodes the natural language input preceding the generated code, thus modeling the consistency between the generated code and its given natural language context as well. We perform an extensive evaluation of CodeBERTScore across four programming languages. We find that CodeBERTScore achieves a higher correlation with human preference and with functional correctness than all existing metrics. That is, generated code that receives a higher score by CodeBERTScore is more likely to be preferred by humans, as well as to function correctly when executed. We release five language-specific pretrained models to use with our publicly available code. Our language-specific models have been downloaded more than 1,000,000 times from the Huggingface Hub. Our code and data are available at https://github.com/neulab/code-bert-score

📄 PDF Abstract BibTeX arXiv:2302.05527

Code (1)

neulab/code-bert-score 공식 구현 pytorch

Tasks

Code Generation

Methods 이 논문이 사용한 방법론

BASE 설명 없음
CodeBERT 설명 없음

Similar Papers 제목 키워드 기반

On the Limitations of Embedding Based Methods for Measuring Functional Correctness for Code Generation

2024-04-26 · Atharva Naik

The task of code generation from natural language (NL2Code) has become extremely popular, especially with the advent of Large Language Models (LLMs). However, efforts to quantify and track this progress have suffered due…

Code GenerationHumanEval

MATCH: Task-Driven Code Evaluation through Contrastive Learning

2025-10-27 · Marah Ghoummaid, Vladimir Tchuiev, Ofek Glick, Michal Moshkovitz 외 arxiv

AI-based code generation is increasingly prevalent, with GitHub Copilot estimated to generate 46% of the code on GitHub. Accurately evaluating how well generated code aligns with developer intent remains a critical chall…

Contrastive LearningCode Generation

VerilogEval: Evaluating Large Language Models for Verilog Code Generation

2023-09-14 · Mingjie Liu, Nathaniel Pinckney, Brucek Khailany, Haoxing Ren

The increasing popularity of large language models (LLMs) has paved the way for their application in diverse domains. This paper proposes a benchmarking framework tailored specifically for evaluating LLM performance in t…

BenchmarkingCode Generation

Effectiveness of Data Augmentation and Pretraining for Improving Neural Headline Generation in Low-Resource Settings

2022-06-01 · LREC 2022 6 · Matej Martinc, Syrielle Montariol, Lidia Pivovarova, Elaine Zosa

We tackle the problem of neural headline generation in a low-resource setting, where only limited amount of data is available to train a model. We compare the ideal high-resource scenario on English with results obtained…

Data AugmentationDecoderHeadline Generation

Can Code Evaluation Metrics Detect Code Plagiarism?

2026-04-28 · Fahad Ebrahim, Mike Joy arxiv

Source Code Plagiarism Detection (SCPD) plays an important role in maintaining fairness and academic integrity in software engineering education. Code Evaluation Metrics (CEMs) are developed for assessing code generation…

Code Generation