Keywords: large language models, code execution
Abstract: Auto-regressive language models have made significant inroads in code generation, reasoning, and execution in recent years. Despite the recent progress, however, even the most capable models have been shown to perform significantly worse than humans in the task of predicting what a given piece of code does. This has fueled concerns about the tendency of models that seemingly generate and reason over code to learn shortcuts without developing any deeper understanding of code. Unlike reasoning, the meaning of a line of code is determined entirely by the effect it has on the state of the machine on which it is executed. Inspired by this observation, we propose measuring code understanding as the ability to predict the effects of line-by-line execution of a piece of code. We perform an empirical study which suggests that the inability to track machine state is a key contributor to the deficiencies of existing models to understand code. We also propose a simple solution based on fine-tuning a model on auxiliary state supervision, and we demonstrate the effectiveness of this approach.
Primary Area: foundation or frontier models, including LLMs
Code Of Ethics: I acknowledge that I and all co-authors of this work have read and commit to adhering to the ICLR Code of Ethics.
Submission Guidelines: I certify that this submission complies with the submission instructions as described on https://iclr.cc/Conferences/2025/AuthorGuide.
Reciprocal Reviewing: I understand the reciprocal reviewing requirement as described on https://iclr.cc/Conferences/2025/CallForPapers. If none of the authors are registered as a reviewer, it may result in a desk rejection at the discretion of the program chairs. To request an exception, please complete this form at https://forms.gle/Huojr6VjkFxiQsUp6.
Anonymous Url: I certify that there is no URL (e.g., github page) that could be used to find authors’ identity.
No Acknowledgement Section: I certify that there is no acknowledgement section in this submission for double blind review.
Submission Number: 10164
Loading