Training Language Models to Use Prolog as a Tool
On the map: LLM reasoning → Reinforcement learning for reasoning
Abstract (arXiv)
Language models frequently produce plausible yet incorrect reasoning traces that are difficult to verify. We investigate fine-tuning models to use Prolog as an external symbolic reasoning tool, training Qwen2.5-3B-Instruct with Group Relative Policy Optimization (GRPO) on a cleaned version of GSM8K (which we release as gsm8k-prolog-prover). We systematically vary prompt structure, reward composition (execution, syntax, semantics, structure), and inference protocol (single-try, multiple-try, and two agentic modes). Our reinforcement learning approach outperforms supervised fine-tuning on GSM8K, and the resulting 3B model achieves zero-shot performance on MMLU-STEM and MMLU-Pro competitive with 7B few-shot baselines. Most importantly, we identify an accuracy--auditability trade-off: configurations tuned for correctness alone learn to delegate reasoning to natural language and use Prolog only for the final computation, while configurations rewarded for symbolic structure produce fully auditable programs at a cost in accuracy. We interpret this trade-off as a form of reward hacking and discuss its implications for deploying neurosymbolic systems in safety-critical domains. The source code for our experiments is available under https://github.com/aisilab/Prolog-as-a-Tool
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Reinforcement learning for reasoning, one of 17 directions in LLM reasoning. Builds on 19 of its 51 references that are in the map. First posted on arXiv 8 Dec 2025.
Builds on
19 of 51 references.
Closest ancestors · 2
Same direction, newest first
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning22 Jan
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Model29 May
Other references · 17
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,758
- 2025s1: Simple test-time scalingcited by 1,311
- 2015Scheduled Sampling for Sequence Prediction with Recurrent Neural Networkscited by 779
- 2023Measuring Faithfulness in Chain-of-Thought Reasoningcited by 668
- 2025SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-trainingcited by 655
- 2018Pyro: Deep Universal Probabilistic Programmingcited by 379
5 more
- 2020Curriculum Learning for Reinforcement Learning Domains: A Framework and Surveycited by 350
- 2025Chain of Thought Monitorability: A New and Fragile Opportunity for AI Safetycited by 222
- 2025Emergent Misalignment: Narrow finetuning can produce broadly misaligned LLMscited by 158
- 2024Making Reasoning Matter: Measuring and Improving Faithfulness of Chain-of-Thought Reasoningcited by 108
- 2024Arithmetic Reasoning with LLM: Prolog Generation & Permutationcited by 17
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026NeuroProlog: Multi-Task Fine-Tuning for Neurosymbolic Mathematical Reasoning via the Cocktail Effect
- 2024RLSF: Fine-tuning LLMs via Symbolic Feedback
- 2026Proof-Carrying Cognition: Closing the Verification Gap with Reality-Settled Reward
- 2026The Art of Efficient Reasoning: Data, Reward, and Optimization
- 2025A Sober Look at Progress in Language Model Reasoning: Pitfalls and Paths to Reproducibility
- 2024Thought-Like-Pro: Enhancing Reasoning of Large Language Models through Self-Driven Prolog-based Chain-of-Thought
- 2025The Challenge of Teaching Reasoning to LLMs Without RL or Distillation
- 2025Reinforcing General Reasoning without Verifiers