We gratefully acknowledge support from
the Simons Foundation and member institutions.
Full-text links:

Download:

Current browse context:

cs.SE

Change to browse by:

References & Citations

DBLP - CS Bibliography

Bookmark

(what is this?)
CiteULike logo BibSonomy logo Mendeley logo del.icio.us logo Digg logo Reddit logo

Computer Science > Software Engineering

Title: CodeBLEU: a Method for Automatic Evaluation of Code Synthesis

Abstract: Evaluation metrics play a vital role in the growth of an area as it defines the standard of distinguishing between good and bad models. In the area of code synthesis, the commonly used evaluation metric is BLEU or perfect accuracy, but they are not suitable enough to evaluate codes, because BLEU is originally designed to evaluate the natural language, neglecting important syntactic and semantic features of codes, and perfect accuracy is too strict thus it underestimates different outputs with the same semantic logic. To remedy this, we introduce a new automatic evaluation metric, dubbed CodeBLEU. It absorbs the strength of BLEU in the n-gram match and further injects code syntax via abstract syntax trees (AST) and code semantics via data-flow. We conduct experiments by evaluating the correlation coefficient between CodeBLEU and quality scores assigned by the programmers on three code synthesis tasks, i.e., text-to-code, code translation, and code refinement. Experimental results show that our proposed CodeBLEU can achieve a better correlation with programmer assigned scores compared with BLEU and accuracy.
Comments: 8 pages, 6 figures
Subjects: Software Engineering (cs.SE); Computation and Language (cs.CL)
Cite as: arXiv:2009.10297 [cs.SE]
  (or arXiv:2009.10297v2 [cs.SE] for this version)

Submission history

From: Shuo Ren [view email]
[v1] Tue, 22 Sep 2020 03:10:49 GMT (435kb,D)
[v2] Sun, 27 Sep 2020 04:07:11 GMT (505kb,D)

Link back to: arXiv, form interface, contact.