Introduction
Even the most advanced Large Language Models (LLMs) struggle with "Level-0" reasoning—the foundational ability to consistently apply simple, deterministic rules over multiple steps. While current benchmarks often focus on outcome correctness (whether a model reaches the right final answer), they frequently overlook the process used to get there. A model might arrive at a correct answer through statistical coincidence or "hallucination" rather than sound logic. This paper introduces L0-Bench, a synthetic benchmark designed to evaluate procedural correctness by requiring models to generate perfect, line-by-line execution traces for simple Python programs.
The L0-Bench Framework
The researchers developed L0-Bench using a generative grammar to create thousands of unique, simplified Python functions. To isolate pure reasoning from broad coding knowledge, the benchmark imposes strict constraints:
- Simple Operations: Only basic arithmetic (+, -), comparisons (==, !=), and list operations (append, pop) are utilized.
- Linear Logic: Complex expressions are broken down into trivial single-line steps.
- Trace Generation: Models must output a complete execution trace (e.g.,
L4, lst_x: [9,3,5,2,6]) rather than just a final return value.
The dataset categorizes programs by the number of execution steps required, ranging from Short (~13 steps) to Extra-Long (~246 steps). This allows for a granular analysis of how model performance scales with task horizon.
Key Results and the "Neural Computer" Gap
The evaluation of 20 prominent models—including GPT-4o, Claude 3.7-Sonnet, and various Qwen and Llama iterations—reveals a significant performance decay as trace length increases. This suggests that LLMs, acting as probabilistic pattern matchers, struggle to function as reliable "neural language computers" when errors compound over time.
As shown in the figure above, even top-tier models like Claude 3.7-Sonnet and GPT-4o show a clear downward trend in accuracy as they move from short to extra-long traces. Interestingly, models specifically trained with "thinking" patterns (such as QWQ-32B) tend to maintain higher integrity over longer horizons compared to standard instruct models.
Scaling Width and Context
The study also investigated whether test-time scaling—giving the model more examples (many-shot) or more attempts (majority voting)—could mitigate these foundational errors.
Key findings regarding scaling include:
- Scaling Width: Majority voting (taking the most common answer from multiple runs) provides a significant boost, often closing the gap between a single attempt and the theoretical "best" (pass@k).
- Diminishing Returns of Context: While "many-shot" prompting (providing up to 64 examples) helps initially, it often plateaus or even degrades performance on extra-long traces. This suggests that simply seeing more examples does not solve the underlying difficulty of long-horizon tracking.
Failure Modes and Insights
Manual inspection of model outputs revealed several "human-like" failure modes. Models frequently failed at simple item counting in lists, mis-evaluated basic boolean logic (e.g., claiming 10 == 10 is false), or prematurely exited loops by skipping final condition checks.
One notable finding was the "GPT-4o Paradox": while the model was accurate in the early stages of a trace, it often skipped steps toward the end. This behavior is likely a byproduct of human-centric training data, where brevity is often valued over exhaustive procedural detail. In contrast, "thinking" models like DeepSeek-R1-Distill-Qwen-32B saw a massive 35-point drop in accuracy when their internal reasoning process was disabled, highlighting that explicit chain-of-thought is essential for procedural reliability.
Conclusion and Future Work
L0-Bench serves as a vital diagnostic tool for assessing the reliability of LLMs in deterministic environments. While currently limited to the programming domain, the benchmark highlights a critical gap in "Level-0" reasoning that must be addressed before LLMs can be fully trusted for high-stakes agentic tasks. Future work will explore increasing programmatic depth and using synthetic traces to fine-tune more reliable, error-bounded reasoning systems.
Summary updated