LLMs Lean on Priors, Not Programming Language Semantics
On the map: LLM reasoning → Reasoning benchmarks and evaluation
Abstract (arXiv)
Recent work asks whether large language models (LLMs) condition their reasoning on explicit rules rather than statistical regularities from pretraining. Program execution provides a canonical instance: formal semantics define behavior through symbolic transition rules that can be systematically altered under distribution shift. We investigate whether LLMs can condition their reasoning on formal semantics through program execution and introduce PLSemanticsBench, pairing featherweight C programs with two semantic systems -- small-step operational semantics and K semantics -- and probing four capabilities: composing rules for final states, selecting rules when state is unmutated, sustaining such conditioning over long traces, and following supplied rules under novel semantics. To decouple semantic reasoning from syntactic familiarity, we redefine familiar operators to induce symbol-meaning conflict and introduce novel symbols defined only through the supplied rules, and stress-test models on Human-Written, LLM-Translated, and Fuzzer-Generated splits with increasing structural complexity. Across 11 frontier LLMs, strong final-state accuracy under standard semantics (up to 90%) drops sharply -- by as much as 40--60% points -- under semantic mutations and increasing structural complexity. Only a handful of models achieve non-zero long-horizon conditioning accuracy, and even the best systems reach just 35%. Together, these results suggest that contemporary LLMs often rely on pretrained lexical associations rather than systematically conditioning on supplied formal rules. PLSemanticsBench is publicly available at https://EngineeringSoftware.github.io/PLSemanticsBench.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in Reasoning benchmarks and evaluation, one of 17 directions in LLM reasoning. Builds on 33 of its 74 references that are in the map. First posted on arXiv 3 Oct 2025.
Builds on
33 of 74 references.
Closest ancestors · 1
Same direction, newest first
- 2024RULEBREAKERS: Challenging LLMs at the Crossroads between Formal Logic and Human-like Reasoning21 Oct
Other references · 32
- 2023GPT-4 Technical Reportcited by 18,132
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2018ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustnesscited by 1,430
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2024Qwen2.5-Coder Technical Reportcited by 1,151
- 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 979
- 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 864
- 2024BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructionscited by 527
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
- 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
20 more
- 2018Stress Test Evaluation for Natural Language Inferencecited by 211
- 2025CWM: An Open-Weights LLM for Research on Code Generation with World Modelscited by 87
- 2024NExT: Teaching Large Language Models to Reason about Code Executioncited by 60
- 2025CodeI/O: Condensing Reasoning Patterns via Code Input-Output Predictioncited by 54
- 2024Reasoning Runtime Behavior of a Program with LLM: How Far Are We?cited by 44
- 2023Measuring The Impact Of Programming Language Distributioncited by 32
- 2024CRUXEval-X: A Benchmark for Multilingual Code Reasoning, Understanding and Executioncited by 31
- 2023Emergent Representations of Program Semantics in Language Models Trained on Programscited by 28
- 2023TRACED: Execution-aware Pre-training for Source Codecited by 27
- 2024Beyond Instruction Following: Evaluating Inferential Rule Following of Large Language Modelscited by 23
- 2025EquiBench: Benchmarking Large Language Models' Reasoning about Program Semantics via Equivalence Checkingcited by 23
- 2024EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuningcited by 15
- 2025CodeARC: Benchmarking Reasoning Capabilities of LLM Agents for Inductive Program Synthesiscited by 15
- 2024Semantic Sensitivities and Inconsistent Predictions: Measuring the Fragility of NLI Modelscited by 14
- 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 13
- 2024Large Language Models as Code Executors: An Exploratory Studycited by 12
- 2025CoCoNUT: Structural Code Understanding does not fall out of a treecited by 7
- 2025Evaluating the Generalization Capabilities of Large Language Models on Code Reasoningcited by 7
- 2025Are Large Language Models Robust in Understanding Code Against Semantics-Preserving Mutations?cited by 7
- 2025SURGE: On the Potential of Large Language Models as General-Purpose Surrogate Code Executorscited by 3
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Self-Execution Simulation Improves Coding Modelscited by 2
- 2026Predicting Program Exit Code with LLMs and Programming Language Semanticscited by 0
- 2026CordisBench: Can Language Models Reason About Component Lifecycles in Dynamic Agent Harnesses?cited by 0
- 2026Retrofitting Code Using LLMs to Support Exceptional Behaviorcited by 0
- 2026From Verification Failures to Reusable Guidance for Coding Agentscited by 0
- 2026From Verification Failures to Reusable Guidance for Coding Agents30 Sep 2026
- 2026Retrofitting Code Using LLMs to Support Exceptional Behavior9 Sep 2026
- 2026CordisBench: Can Language Models Reason About Component Lifecycles in Dynamic Agent Harnesses?1 Sep 2026
- 2026Predicting Program Exit Code with LLMs and Programming Language Semantics1 Sep 2026
- 2026Self-Execution Simulation Improves Coding Models11 Mar 2026
Similar, not cited
Close in wording, no citation either way
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inference
- 2025On Code-Induced Reasoning in LLMs
- 2026Beyond Surface Forms: Symbolic Edits as a Test for Logical Reasoning with LLMs
- 2026Beyond Memorization: Testing LLM Reasoning on Unseen Theory of Computation Tasks
- 2025The Illusion of Procedural Reasoning: Measuring Long-Horizon FSM Execution in LLMs
- 2023Large Language Models are In-Context Semantic Reasoners rather than Symbolic Reasoners
- 2025Semantic Deception: When Reasoning Models Can't Compute an Addition
- 2026How Robustly do LLMs Understand Execution Semantics?