Saved in:
Bibliographic Details
Main Authors: Abdollahi, Mohammad, Tasnia, Khandaker Rifah, Saha, Soumit Kanti, Yang, Jinqiu, Wang, Song, Hemmati, Hadi
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2512.00215
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915644605202432
author Abdollahi, Mohammad
Tasnia, Khandaker Rifah
Saha, Soumit Kanti
Yang, Jinqiu
Wang, Song
Hemmati, Hadi
author_facet Abdollahi, Mohammad
Tasnia, Khandaker Rifah
Saha, Soumit Kanti
Yang, Jinqiu
Wang, Song
Hemmati, Hadi
contents Understanding a program's runtime reasoning behavior, meaning how intermediate states and control flows lead to final execution results, is essential for reliable code generation, debugging, and automated reasoning. Although large language models (LLMs) can accurately predict program outputs, most prior work has focused on output accuracy and performance, treating reasoning as a black box. As a result, little is known about the structure or failure modes of their reasoning traces. To address this gap, we conduct the first empirical study on runtime behavior inference with reasoning LLMs, aiming to uncover and characterize errors in their reasoning traces. We curate a benchmark from HumanEval Plus and LiveCodeBench, containing 427 code snippets. For each snippet, we test three input types: regular, edge, and invalid. Twelve input values are selected per snippet, each paired with its ground-truth execution result. We evaluate four state-of-the-art reasoning LLMs. Our results show that these models reach accuracies between 85 percent and 98 percent across input types. We also analyze the produced reasoning traces and develop a taxonomy with nine categories of inference errors. Finally, we explore tool-augmented reasoning. Using failures in the Computation Errors category as a case study, our experiments show that this approach corrects 58 percent of such errors, demonstrating the potential of tool support for improving LLM reasoning.
format Preprint
id arxiv_https___arxiv_org_abs_2512_00215
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Demystifying Errors in LLM Reasoning Traces: An Empirical Study of Code Execution Simulation
Abdollahi, Mohammad
Tasnia, Khandaker Rifah
Saha, Soumit Kanti
Yang, Jinqiu
Wang, Song
Hemmati, Hadi
Software Engineering
Understanding a program's runtime reasoning behavior, meaning how intermediate states and control flows lead to final execution results, is essential for reliable code generation, debugging, and automated reasoning. Although large language models (LLMs) can accurately predict program outputs, most prior work has focused on output accuracy and performance, treating reasoning as a black box. As a result, little is known about the structure or failure modes of their reasoning traces. To address this gap, we conduct the first empirical study on runtime behavior inference with reasoning LLMs, aiming to uncover and characterize errors in their reasoning traces. We curate a benchmark from HumanEval Plus and LiveCodeBench, containing 427 code snippets. For each snippet, we test three input types: regular, edge, and invalid. Twelve input values are selected per snippet, each paired with its ground-truth execution result. We evaluate four state-of-the-art reasoning LLMs. Our results show that these models reach accuracies between 85 percent and 98 percent across input types. We also analyze the produced reasoning traces and develop a taxonomy with nine categories of inference errors. Finally, we explore tool-augmented reasoning. Using failures in the Computation Errors category as a case study, our experiments show that this approach corrects 58 percent of such errors, demonstrating the potential of tool support for improving LLM reasoning.
title Demystifying Errors in LLM Reasoning Traces: An Empirical Study of Code Execution Simulation
topic Software Engineering
url https://arxiv.org/abs/2512.00215