From Proof to Program: Characterizing Tool-Induced Reasoning Hallucinations in Large Language Models

Farima Fatahi Bayat, Pouya Pezeshkpour, Estevam Hruschka

TL;DR

While giving Large Language Models (LLMs) access to tools like Python interpreters boosts their accuracy, it often degrades the quality of their internal reasoning. This paper characterizes Tool-Induced Myopia (TIM)—a phenomenon where models swap rigorous logical proofs for shallow empirical "checks"—and introduces a new benchmark and alignment strategy to ensure tools assist reasoning rather than replace it.

What Problem Does This Paper Address?

We’ve entered the era of Tool-augmented Language Models (TaLMs). By using a Code Interpreter, an LLM can solve complex math problems that exceed its "parametric" (internal) knowledge. However, the authors identify a hidden cost: reasoning degradation.

Even when a model selects and executes a tool perfectly to get the right answer, it often skips essential logical steps, substituting a formal proof with a "brute-force" search or a few numerical examples. The authors call this Tool-Induced Myopia (TIM). Because the final answer is correct, standard benchmarks fail to detect this "hallucination" of the reasoning process. This creates a false sense of reliability in systems that might fail when a problem can't be solved by simple computation.

Methods

The researchers tackled this by creating a multi-dimensional framework to "audit" the reasoning process:

  1. Characterization of TIM: They defined TIM as a failure mode where tool access biases a model toward exploratory, tool-driven search rather than deductive derivation.
  2. 4D Evaluation Suite: Instead of just looking at accuracy, they measured:
  3. Win Rate: A pairwise comparison (using GPT-5 as a judge) between tool-using and non-tool-using versions of the same model.
  4. Miss Rate: The proportion of logical steps from a "gold" reference solution that are missing in the model's output.
  5. PRM Accuracy: Using a Process Reward Model (Qwen2.5-Math-PRM) to score the correctness of individual reasoning steps.
  6. Mitigation Strategies:
    • Prompting: A lightweight instruction telling the model to treat code as "helpful hints" rather than the final word.
  7. DPO Alignment: Using Direct Preference Optimization to fine-tune models on pairs of "good" (interleaved reasoning + tool) and "bad" (TIM-heavy) solutions.

Datasets

The authors introduced PYMATH, a benchmark of 1,679 competition-level mathematical problems.

  • Source: Curated from high-level datasets like AIME (2024-2025), OlympiadBench, OlympicArena, and Omni-Math.
  • The "Goldilocks" Criteria: Problems were specifically filtered to be ones where Python is helpful but not sufficient. This forces the model to reason on top of the code output to reach a complete solution.

Key Insights and Ideas

  • The Accuracy Trap: TaLMs can achieve massive gains in final-answer accuracy (up to 19.3 percentage points) while their reasoning consistency actually drops.
  • The "Thinking Model" Paradox: Advanced "thinking" models (like GPT-5 or Claude-3.5-Sonnet) actually invoke tools 50% more often than their non-thinking counterparts. Consequently, these high-power models face a higher risk of TIM because they rely more heavily on computational shortcuts.
  • Error Shifting: Tool use doesn't just eliminate errors; it shifts them. Models make fewer arithmetic mistakes (delegated to Python) but more global reasoning failures—logical fallacies, unjustified leaps, and "creativity" errors where the model assumes a pattern from a few data points is a universal law.
  • Linguistic Cues: Models suffering from TIM often use specific "precursor phrases" like "one numerically finds," "systematic checks show," or "let's verify programmatically" right before skipping a complex proof.

Key Results

  • Reasoning Degradation: In pairwise comparisons, non-tool LLMs won up to 41.5% more often than TaLMs in terms of reasoning depth.
  • TIM Prevalence: A manual audit found that TIM was present in ~55% of high-risk cases where the model got the right answer but was flagged by the evaluation suite.
  • DPO Success: The DPO-aligned model (GPT-4.1) achieved the "best of both worlds": it surpassed the vanilla TaLM in accuracy (+0.6%) while significantly improving the Win Rate (58.2% vs 45.6%) and reducing the Miss Rate.

Limitations and Future Work

  • Single Tool Focus: The study focused exclusively on the Code Interpreter. The authors acknowledge that other tools (web search, retrieval-augmented generation) might induce different types of myopia or hallucinations.
  • Model Specificity: Due to resource constraints, the DPO alignment was only tested on GPT-4.1. Whether these results generalize across all open-source architectures remains to be seen.
  • Human Evaluation: While the LLM-as-a-judge (GPT-5) showed strong alignment with human intuition, a larger-scale human study would further validate the "reasoning depth" metrics.

The authors suggest that future work should extend this framework to broader toolsets and explore how to make models "self-aware" of when a tool-driven shortcut is insufficient for a rigorous proof.

Summary updated

BibTeX
@inproceedings{bayat2026from,
  author = {Farima Fatahi Bayat and Pouya Pezeshkpour and Estevam Hruschka},
  title = {{From Proof to Program: Characterizing Tool-Induced Reasoning Hallucinations in Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.acl-long.1951},
}
Figure