paper-with-me

홈 › Papers

CodeMind: Evaluating Large Language Models for Code Reasoning

2024-02-15 · Changshu Liu, Yang Chen, Reyhaneh Jabbarvand

Large Language Models (LLMs) have been widely used to automate programming tasks. Their capabilities have been evaluated by assessing the quality of generated code through tests or proofs. The extent to which they can reason about code is a critical question revealing important insights about their true capabilities. This paper introduces CodeMind, a framework designed to gauge the code reasoning abilities of LLMs through the following explicit and implicit code reasoning tasks: Independent Execution Reasoning (IER), Specification Reasoning (SR) and Dynamic Semantics Reasoning (DSR). The first evaluates the abilities of LLMs to simulate the execution of given inputs to a code and predict the output (IER). The second assesses the abilities of LLMs to incorporate the simulation of test data in the specification into code generation (SR). Finally, CodeMind evaluates LLMs' abilities to understand overall code semantics only given a specific input/output (DSR). Our extensive evaluation of ten LLMs across four widely used benchmarks using CodeMind shows that LLMs, depending on their size and training strategy, can reason about some dynamic aspects of code. However, their performance drops for code with higher complexity, non-trivial logical and arithmetic operators, non-primitive types, and API calls. We show that these reasoning tasks evaluate LLMs differently, and a comprehensive evaluation of code reasoning requires them all. Finally, we show that the performance of LLMs in bug repair is not correlated with any of the code reasoning tasks, and except for advanced frontier models, other LLMs do not incorporate code reasoning when performing bug repair.

📄 PDF Abstract BibTeX arXiv:2402.09664

Code (1)

intelligent-cat-lab/codemind 공식 구현

Tasks

Code Generation

Similar Papers 제목 키워드 기반

CodeGolf Bench: A Multi-Language Benchmark for Evaluating Concise Code Generation Capabilities of Large Language Models

2026-05-28 · Vedant Padwal arxiv

This paper introduces Code Bench, a benchmark capable of evaluating Large Language Models (LLMs) concise code generation abilities in 60 programming languages. Based on code golf, a recreational programming competition f…

Code Generation

Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit

2023-12-30 · Yao Wan, Yang He, Zhangqian Bi, JianGuo Zhang 외

Code intelligence leverages machine learning techniques to extract knowledge from extensive code corpora, with the aim of developing intelligent tools to improve the quality and productivity of computer programming. Curr…

Deep LearningRepresentation LearningSurvey

Beyond Output Correctness: Benchmarking and Evaluating Large Language Model Reasoning in Coding Tasks

2026-04-14 · Yuangang Li, Justin Tian Jin Chen, Ethan Yu, David Hong 외 arxiv

Large language models (LLMs) increasingly rely on explicit reasoning to solve coding tasks, yet evaluating the quality of this reasoning remains challenging. Existing reasoning evaluators are not designed for coding, and…

Code Generation

Evaluating the Generalization Capabilities of Large Language Models on Code Reasoning

2025-04-07 · Rem Yang, Julian Dai, Nikos Vasilakis, Martin Rinard

We assess how the code reasoning abilities of large language models (LLMs) generalize to different kinds of programs. We present techniques for obtaining in- and out-of-distribution programs with different characteristic…

SV-TrustEval-C: Evaluating Structure and Semantic Reasoning in Large Language Models for Source Code Vulnerability Analysis

2025-05-27 · Yansong Li, Paula Branco, Alexander M. Hoole, Manish Marwah 외

As Large Language Models (LLMs) evolve in understanding and generating code, accurately evaluating their reliability in analyzing source code vulnerabilities becomes increasingly vital. While studies have examined LLM ca…

Logical ReasoningVulnerability Detection