mlsanityData to 14 Oct 2026

CodeSense: a Real-World Benchmark and Dataset for Code Semantic Reasoning

arXiv 2506.00750 ↗First posted 31 May 2025cs.SE cs.AIcited by 13

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

Understanding and reasoning about code semantics is essential for enhancing code LLMs' abilities to solve real-world software engineering (SE) tasks. Although several code reasoning benchmarks exist, most rely on synthetic datasets or educational coding problems and focus on coarse-grained reasoning tasks such as input/output prediction, limiting their effectiveness in evaluating LLMs in practical SE contexts. To bridge this gap, we propose CodeSense, the first benchmark that makes available a spectrum of fine-grained code reasoning tasks concerned with the software engineering of real-world code. We collected Python, C and Java software projects from real-world repositories. We executed tests from these repositories, collected their execution traces, and constructed a ground truth dataset for fine-grained semantic reasoning tasks. We then performed comprehensive evaluations on state-of-the-art LLMs. Our results show a clear performance gap for the models to handle fine-grained reasoning tasks. Although prompting techniques such as chain-of-thought and in-context learning helped, the lack of code semantics in LLMs fundamentally limits models' capabilities of code reasoning. Besides dataset, benchmark and evaluation, our work produced an execution tracing framework and tool set that make it easy to collect ground truth for fine-grained SE reasoning tasks, offering a strong basis for future benchmark construction and model post training. Our code and data are located at https://codesense-bench.github.io/.

Key facts. Cited by 13 papers in the map (data through 14 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 22 of its 40 references that are in the map. First posted on arXiv 31 May 2025.

Builds on

22 of 40 references.

Closest ancestors · 7

Same direction, newest first

  1. 2025Dynamic Benchmarking of Reasoning Capabilities in Code Large Language Models Under Data Contamination6 Mar
  2. 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Execution23 Aug
  3. 2024SemCoder: Training Code Language Models with Comprehensive Semantics Reasoning3 Jun
  4. 2024To Err is Machine: Vulnerability Detection Challenges LLM Reasoning25 Mar
  5. 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?25 Mar
  6. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code12 Mar
  7. 2024CodeMind: Evaluating Large Language Models for Code Reasoning15 Feb

Other references · 15

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2021Program Synthesis with Large Language Modelscited by 3,637
  3. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,373
  4. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  5. 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 546
  6. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 300
  7. 2024CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challengescited by 282
  8. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
  9. 2023CrossCodeEval: A Diverse and Multilingual Benchmark for Cross-File Code Completioncited by 183
  10. 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 168
  11. 2025SWE-PolyBench: A multi-language benchmark for repository level evaluation of coding agentscited by 85
  12. 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 72
3 more
  1. 2023CodeScope: An Execution-based Multilingual Multitask Multidimensional Benchmark for Evaluating LLMs on Code Understanding and Generationcited by 39
  2. 2023TRACED: Execution-aware Pre-training for Source Codecited by 27
  3. 2024CodeBenchGen: Creating Scalable Execution-based Code Generation Benchmarkscited by 23

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 5; 2026: 8.

13 papers.

Sort:

By area:

Similar, not cited

Close in wording, no citation either way

  1. 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks
  2. 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs
  3. 2024CodeMMLU: A Multi-Task Benchmark for Assessing Code Understanding & Reasoning Capabilities of CodeLLMs
  4. 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Action
  5. 2026CoRE: A Fine-Grained Code Reasoning Benchmark Beyond Output Prediction
  6. 2025Think Like Human Developers: Harnessing Community Knowledge for Structured Code Reasoning
  7. 2026An Execution-Verified Multi-Language Benchmark for Code Semantic Reasoning
  8. 2026Beyond Output Correctness: Benchmarking and Evaluating Large Language Model Reasoning in Coding Tasks