Evaluating Code Reasoning Abilities of Large Language Models Under Real-World Settings
On the map: LLM reasoning → Reasoning for agents, planning and code
Abstract (arXiv)
Code reasoning tasks are becoming prevalent in large language model (LLM) assessments. Yet, there is a dearth of studies on the impact of real-world complexities on code reasoning, e.g., inter- or intra-procedural dependencies, API calls, deeply nested constructs, and non-primitive complex types. Evaluating LLMs under such a simplistic setting poses a significant threat to assumptions about their generalizability in practice. To enable a more realistic evaluation of code reasoning, we construct a dataset of 1200 reasoning problems from two sources: existing code reasoning benchmarks and popular GitHub Python repositories. Our pipeline leverages static and dynamic program analysis to automatically serialize/deserialize compound, complex, and custom types galore in real-world code, going far beyond only primitive types used in prior studies. A key feature of our dataset is categorizing each reasoning problem as Lower Complexity (LC) or Higher Complexity (HC) via a principled majority-vote mechanism over nine diverse and interpretable code-complexity metrics, yielding two well-separated, semantically meaningful categories of problem difficulty suitable for precise calibration of LLM reasoning ability. This categorization shows that the problems used in existing code-reasoning evaluation mostly belong to the LC category, failing to represent real-world complexity.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 30 of its 70 references that are in the map. First posted on arXiv 16 Dec 2025.
Builds on
30 of 70 references.
Closest ancestors · 14
Same direction, newest first
- 2025Counting Without Running: Evaluating LLMs' Reasoning About Code Complexity4 Dec
- 2025Assessing Coherency and Consistency of Code Execution Reasoning by Large Language Models16 Oct
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Tasks3 Jul
- 2025CodeSense: a Real-World Benchmark and Dataset for Code Semantic Reasoning31 May
- 2025Evaluating the Generalization Capabilities of Large Language Models on Code Reasoning7 Apr
- 2025L0-Reasoning Bench: Evaluating Procedural Correctness in Language Models via Simple Program Execution28 Mar
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Language25 Mar
- 2025RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Code10 Mar
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inference22 Feb
- 2025S*: Test Time Scaling for Code Generation20 Feb
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checking18 Feb
- 2025A Tool for In-depth Analysis of Code Execution Reasoning of Large Language Models30 Jan
2 more
Other references · 16
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
- 2022A Survey on In-context Learningcited by 717
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
- 2023Inverse Scaling: When Bigger Isn't Bettercited by 205
- 2023ClassEval: A Manually-Crafted Benchmark for Evaluating LLMs on Class-level Code Generationcited by 166
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Modelscited by 87
- 2021AVATAR: A Parallel Corpus for Java-Python Program Translationcited by 59
- 2025Inverse Scaling in Test-Time Computecited by 49
- 2024Easy Problems That LLMs Get Wrongcited by 29
4 more
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2024Do Large Code Models Understand Programming Concepts? Counterfactual Analysis for Code Predicatescited by 14
- 2025CoCoNUT: Structural Code Understanding does not fall out of a treecited by 7
- 2025Code Simulation as a Proxy for High-order Tasks in Large Language Modelscited by 6
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2026Evaluating LLMs Code Reasoning Under Real-World Context
- 2026CodeGlance: Understanding Code Reasoning Challenges in LLMs through Multi-Dimensional Feature Analysis
- 2025On Code-Induced Reasoning in LLMs
- 2026CodeEval: A pedagogical approach for targeted evaluation of code-trained Large Language Models
- 2026Narrowing the Complexity Gap in the Evaluation of Large Language Models ↗
- 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMs
- 2025Demystifying Errors in LLM Reasoning Traces: An Empirical Study of Code Execution Simulation
- 2026Evaluating Language Models on Cross-Language Code Functional Equivalence