How Robustly do LLMs Understand Execution Semantics?
On the map: World models → World models for language agents
also in 1 more
Abstract (arXiv)
LLMs demonstrate remarkable reasoning capabilities, yet whether they utilize internal world models or rely on sophisticated pattern matching remains open. We study LLMs through the lens of robustness of their code understanding using a standard program-output prediction task. Our results reveal a stark divergence in model behavior: while open-source reasoning models (DeepSeek-R1 family) maintain stable, albeit somewhat lower accuracies (38% to 67%) under code transformations & input perturbations, the frontier model GPT-5.2 exhibits significant brittleness. Despite achieving a near-perfect score of 99% on the original, unperturbed CRUXEval benchmark, perturbed inputs trigger accuracy declines between 20% and 24%. In addition, we find that many models perform much worse at predicting behavior on perturbed inputs that raise exceptions, and that prediction performance depends on the kind of exception. We study remedies to address this deficiency in exception prediction, and evaluate the effect of these remedies on the ability to predict non-exception behaviors. Our findings both point to limitations in the way all models understand code, and establish the value of using perturbation to evaluate code models.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in World models for language agents, one of 11 directions in World models. Builds on 16 of its 50 references that are in the map. First posted on arXiv 24 Feb 2026.
Builds on
16 of 50 references.
References · 16
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2024Qwen2.5 Technical Reportcited by 4,942
- 2024Qwen2.5-Math Technical Report: Toward Mathematical Expert Model via Self-Improvementcited by 1,090
- 2025OpenCodeReasoning: Advancing Data Distillation for Competitive Codingcited by 113
- 2025A Survey of LLM-based Automated Program Repair: Taxonomies, Design Paradigms, and Applicationscited by 25
- 2025CoRe: Benchmarking LLMs Code Reasoning Capabilities through Static Analysis Taskscited by 24
- 2025CodeSense: a Real-World Benchmark and Dataset for Code Semantic Reasoningcited by 13
- 2022Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptionscited by 11
- 2022QReg: On Regularization Effects of Quantizationcited by 11
- 2025Disproving Program Equivalence with LLMscited by 5
- 2025Code Reasoning for Software Engineering Tasks: A Survey and A Call to Actioncited by 4
4 more
- 2025Less Precise Can Be More Reliable: A Systematic Evaluation of Quantization's Impact on VLMs Beyond Accuracycited by 3
- 2025ThrowBench: Benchmarking LLMs by Predicting Runtime Exceptionscited by 2
- 2025STEPWISE-CODEX-Bench: Evaluating Complex Multi-Function Comprehension and Fine-Grained Execution Reasoningcited by 1
- 2025Open the Oyster: Empirical Evaluation and Improvement of Code Reasoning Confidence in LLMscited by 1
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Demystifying Errors in LLM Reasoning Traces: An Empirical Study of Code Execution Simulation
- 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?
- 2025On Code-Induced Reasoning in LLMs
- 2026Can LLMs Reason About Runtime Behavior? A Repository-Level Dynamic Benchmark
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inference
- 2026CodeGlance: Understanding Code Reasoning Challenges in LLMs through Multi-Dimensional Feature Analysis
- 2025CodeCrash: Exposing LLM Fragility to Misleading Natural Language in Code Reasoning