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

Atharva Naik
4/26/2024
cs.SEcs.AI

No confident code implementation found for this paper.

Abstract

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 to a lack of reliable metrics for functional correctness. While popular benchmarks like HumanEval have test cases to enable reliable evaluation of correctness, it is time-consuming and requires human effort to collect test cases. As an alternative several reference-based evaluation metrics have been proposed, with embedding-based metrics like CodeBERTScore being touted as having a high correlation with human preferences and functional correctness. In our work, we analyze the ability of embedding-based metrics like CodeBERTScore to measure functional correctness and other helpful constructs like editing effort by analyzing outputs of ten models over two popular code generation benchmarks. Our results show that while they have a weak correlation with functional correctness (0.16), they are strongly correlated (0.72) with editing effort.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{naik2024limitations,
  title  = {On the Limitations of Embedding Based Methods for Measuring Functional Correctness for Code Generation},
  author = {Atharva Naik},
  year   = {2024},
  eprint = {2405.01580},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.01580v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.01580.svg)](https://codeofpaper.com/paper/2405.01580)

Discussion