Saved in:
Bibliographic Details
Main Authors: Chen, Junkai, Pan, Zhiyuan, Hu, Xing, Li, Zhenhao, Li, Ge, Xia, Xin
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2403.16437
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916404987428864
author Chen, Junkai
Pan, Zhiyuan
Hu, Xing
Li, Zhenhao
Li, Ge
Xia, Xin
author_facet Chen, Junkai
Pan, Zhiyuan
Hu, Xing
Li, Zhenhao
Li, Ge
Xia, Xin
contents Large language models for code (i.e., code LLMs) have shown strong code understanding and generation capabilities. To evaluate the capabilities of code LLMs in various aspects, many benchmarks have been proposed (e.g., HumanEval and ClassEval). Code reasoning is one of the most essential abilities of code LLMs, but existing benchmarks for code reasoning are not sufficient. Typically, they focus on predicting the input and output of a program, ignoring the evaluation of the intermediate behavior during program execution, as well as the logical consistency (e.g., the model should not give the correct output if the prediction of execution path is wrong) when performing the reasoning. To address these problems, in this paper, we propose a framework, namely REval, for evaluating code reasoning abilities and consistency of code LLMs with program execution. We utilize existing code benchmarks and adapt them to new benchmarks within our framework. A large-scale empirical study is conducted and most LLMs show unsatisfactory performance on both Runtime Behavior Reasoning (i.e., an average accuracy of 44.4%) and Incremental Consistency Evaluation (i.e., an average IC score of 10.3). Evaluation results of current code LLMs reflect the urgent need for the community to strengthen the code reasoning capability of code LLMs. Our code, data, and \newname leaderboard are available at https://r-eval.github.io.
format Preprint
id arxiv_https___arxiv_org_abs_2403_16437
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Reasoning Runtime Behavior of a Program with LLM: How Far Are We?
Chen, Junkai
Pan, Zhiyuan
Hu, Xing
Li, Zhenhao
Li, Ge
Xia, Xin
Software Engineering
Computation and Language
Large language models for code (i.e., code LLMs) have shown strong code understanding and generation capabilities. To evaluate the capabilities of code LLMs in various aspects, many benchmarks have been proposed (e.g., HumanEval and ClassEval). Code reasoning is one of the most essential abilities of code LLMs, but existing benchmarks for code reasoning are not sufficient. Typically, they focus on predicting the input and output of a program, ignoring the evaluation of the intermediate behavior during program execution, as well as the logical consistency (e.g., the model should not give the correct output if the prediction of execution path is wrong) when performing the reasoning. To address these problems, in this paper, we propose a framework, namely REval, for evaluating code reasoning abilities and consistency of code LLMs with program execution. We utilize existing code benchmarks and adapt them to new benchmarks within our framework. A large-scale empirical study is conducted and most LLMs show unsatisfactory performance on both Runtime Behavior Reasoning (i.e., an average accuracy of 44.4%) and Incremental Consistency Evaluation (i.e., an average IC score of 10.3). Evaluation results of current code LLMs reflect the urgent need for the community to strengthen the code reasoning capability of code LLMs. Our code, data, and \newname leaderboard are available at https://r-eval.github.io.
title Reasoning Runtime Behavior of a Program with LLM: How Far Are We?
topic Software Engineering
Computation and Language
url https://arxiv.org/abs/2403.16437