LLMs Lean on Priors, Not Programming Language Semantics. Thimmaiah, A., Zhang, J., Srinivasa, J., Li, J. J., & Gligoric, M. In Proceedings of the 43rd International Conference on Machine Learning (ICML), Seoul, South Korea, May, 2026. arXiv:2510.03415 [cs.PL]
LLMs Lean on Priors, Not Programming Language Semantics [link]Paper  doi  abstract   bibtex   
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 FuzzerGenerated splits with increasing structural complexity. Across 11 frontier LLMs, strong finalstate 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://EngineeringS oftware.github.io/PLSemanticsBench.
@inproceedings{thimmaiah_llms_2026,
	address = {Seoul, South Korea},
	title = {{LLMs} {Lean} on {Priors}, {Not} {Programming} {Language} {Semantics}},
	url = {http://arxiv.org/abs/2510.03415},
	doi = {10.48550/arXiv.2510.03415},
	abstract = {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 FuzzerGenerated splits with increasing structural complexity. Across 11 frontier LLMs, strong finalstate 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://EngineeringS oftware.github.io/PLSemanticsBench.},
	language = {en},
	urldate = {2026-08-06},
	booktitle = {Proceedings of the 43rd {International} {Conference} on {Machine} {Learning} ({ICML})},
	author = {Thimmaiah, Aditya and Zhang, Jiyang and Srinivasa, Jayanth and Li, Junyi Jessy and Gligoric, Milos},
	month = may,
	year = {2026},
	note = {arXiv:2510.03415 [cs.PL]},
	keywords = {Computer Science - Artificial Intelligence, Computer Science - Computation and Language, Computer Science - Programming Languages, Computer Science - Software Engineering, WG: Explorable},
}

Downloads: 0