AI
New Benchmark Reveals How Large Language Models Struggle With Long Program Traces
Researchers created a test to measure whether AI models can correctly predict what programs will output and their internal states, finding significant performance drops when tracing longer execution paths.
A team of researchers from academia has introduced a comprehensive benchmark designed to test how well large language models can forecast both the final output and intermediate checkpoint states of real programs by examining only their source code and input data.
The Benchmark Design#
The evaluation framework extends prior work in output prediction by incorporating multiple layers of complexity. The dataset comprises 400 test cases drawn from 371 Python and C++ programs, with each scenario including paired scenarios: one tracing a shorter execution path and another following the same code through a longer sequence of operations. This allows researchers to isolate how additional computational context affects model accuracy. Rather than testing models with active code execution capabilities, the study examined seven different configurations across four distinct model families working from code inspection alone.
Performance Across Model Configurations#
Models equipped with reasoning capabilities significantly outperformed their counterparts without such features, with improvements ranging from 33.1 to 55.2 percentage points across completed tasks. The best-performing configuration achieved 93% accuracy on predicting final outputs for shorter traces, though this performance degraded to 77% when processing longer traces. When measuring checkpoint state prediction—capturing the program's internal status at specific points—accuracy fell further to 65.5% and 63.5% for the two state-tracking tasks respectively.
The Trace-Length Challenge#
A critical finding emerged from comparing matched pairs across nearly 2,400 Python programs. When input length increased to extend the execution trace, the models produced 528 instances where previously correct predictions became incorrect. This gap persisted even after the researchers adjusted for differences between model families and clustered analysis by common source code patterns. The analysis suggests that managing longer sequences of program state represents a genuine obstacle for current models rather than a simple scaling issue.
Implications for Model Evaluation#
The benchmark exposes limitations that remain hidden when evaluating models solely on shorter outputs. By incorporating both intermediate checkpoint states and variable-length traces, the work demonstrates that raw accuracy figures on simple prediction tasks can mask deeper difficulties with sustained state reasoning and extended computational sequences.

