Aligning Offline Metrics and Human Judgments of Value for Code Generation Models

Victor Dibia, Adam Fourney, Gagan Bansal, Forough Poursabzi-Sangdeh, Han Liu, Saleema Amershi


Abstract
Large language models have demonstrated great potential to assist programmers in generating code. For such human-AI pair programming scenarios, we empirically demonstrate that while generated code are most often evaluated in terms of their functional correctness (i.e., whether generations pass available unit tests), correctness does not fully capture (e.g., may underestimate) the productivity gains these models may provide. Through a user study with N=49 experienced programmers, we show that while correctness captures high-value generations, programmers still rate code that fails unit tests as valuable if it reduces the overall effort needed to complete a coding task. Finally, we propose a hybrid metric that combines functional correctness and syntactic similarity and show that it achieves a 14% stronger correlation with value and can therefore better represent real-world gains when evaluating and comparing models.
Anthology ID:
2023.findings-acl.540
Volume:
Findings of the Association for Computational Linguistics: ACL 2023
Month:
July
Year:
2023
Address:
Toronto, Canada
Editors:
Anna Rogers, Jordan Boyd-Graber, Naoaki Okazaki
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
8516–8528
Language:
URL:
https://aclanthology.org/2023.findings-acl.540
DOI:
10.18653/v1/2023.findings-acl.540
Bibkey:
Cite (ACL):
Victor Dibia, Adam Fourney, Gagan Bansal, Forough Poursabzi-Sangdeh, Han Liu, and Saleema Amershi. 2023. Aligning Offline Metrics and Human Judgments of Value for Code Generation Models. In Findings of the Association for Computational Linguistics: ACL 2023, pages 8516–8528, Toronto, Canada. Association for Computational Linguistics.
Cite (Informal):
Aligning Offline Metrics and Human Judgments of Value for Code Generation Models (Dibia et al., Findings 2023)
Copy Citation:
PDF:
https://aclanthology.org/2023.findings-acl.540.pdf