Lune

EMNLP Findings2024

Can LLMs Reason in the Wild with Programs?

Yuan Yang, Siheng Xiong, Ali Payani, Ehsan Shareghi, Faramarz Fekri

Abstract

Large Language Models (LLMs) have shown superior capability to solve reasoning problems with programs. While being a promising direction, most of such frameworks are trained and evaluated in settings with a prior knowledge of task requirements. However, as LLMs become more capable, it is necessary to assess their reasoning abilities in more realistic scenarios where many real-world problems are open-ended with ambiguous scope, and often require multiple formalisms to solve. To investigate this, we introduce the reasoning in the wild task, where an LLM is tasked to solve a reasoning problem of unknown type by identifying the sub-problems and their corresponding formalisms, and writing a program to solve each sub-problem, guided by a tactic. We create a large tactic-guided trajectory dataset containing detailed solutions to a diverse set of reasoning problems, ranging from well-defined single-form reasoning (e.g., math, logic), to ambiguous and hybrid ones (e.g., commonsense, combined math and logic). This allows us to test various aspects of LLMs reasoning at the fine-grained level such as the selection and execution of tactics, and the tendency to take undesired shortcuts. In experiments, we highlight that existing LLMs fail significantly on problems with ambiguous and mixed scope, revealing critical limitations and overfitting issues (e.g. accuracy on GSM8K drops by at least 50%). We further show fine-tuning a local LLM on the trajectories data leads to better performance. Project repo is available here.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem Solving cites PAL: Program-aided Language Models
  • Toolformer: Language Models Can Teach Themselves to Use Tools cites PAL: Program-aided Language Models
  • R1-Code-Interpreter: LLMs Reason with Code via Supervised and Multi-stage Reinforcement Learning cites PAL: Program-aided Language Models
  • Deliberate Reasoning in Language Models as Structure-Aware Planning with an Accurate World Model cites ReClor: A Reading Comprehension Dataset Requiring Logical Reasoning
  • ToolkenGPT: Augmenting Frozen Language Models with Massive Tools via Tool Embeddings cites PAL: Program-aided Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Deliberate Reasoning in Language Models as Structure-Aware Planning with an Accurate World ModelSiheng Xiong, Ali Payani, Yuan Yang, Faramarz FekriACL 2025 · 25 citations
  2. AgentReview: Exploring Peer Review Dynamics with LLM AgentsYiqiao Jin, Qinlin Zhao, Yiyang Wang, Hao Chen et al.EMNLP 2024 · 24 citations
  3. TableMaster: A Recipe to Advance Table Understanding with Language ModelsLang Cao, Hanbing LiuICLR 2026 · 20 citations
  4. Large Language Models Can Be Contextual Privacy Protection LearnersYijia Xiao, Yiqiao Jin, Yushi Bai, Yue Wu et al.EMNLP 2024 · 18 citations
  5. R1-Code-Interpreter: LLMs Reason with Code via Supervised and Multi-stage Reinforcement LearningYongchao Chen, Yueying Liu, Junwei Zhou, Yilun Hao et al.ICLR 2026 · 6 citations

Builds on11

  1. Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu et al.NeurIPS 2023 · 5,989 citations
  2. PAL: Program-aided Language ModelsLuyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon et al.ICML 2023 · 700 citations
  3. ReClor: A Reading Comprehension Dataset Requiring Logical ReasoningWeihao Yu, Zihang Jiang, Yanfei Dong, Jiashi FengICLR 2020 · 325 citations
  4. ToolkenGPT: Augmenting Frozen Language Models with Massive Tools via Tool EmbeddingsShibo Hao, Tianyang Liu, Zhen Wang, Zhiting HuNeurIPS 2023 · 315 citations
  5. ToRA: A Tool-Integrated Reasoning Agent for Mathematical Problem SolvingZhibin Gou, Zhihong Shao, Yeyun Gong, Yelong Shen et al.ICLR 2024 · 289 citations

Related papers

  1. DOTS: Learning to Reason Dynamically in LLMs via Optimal Reasoning Trajectories SearchMurong Yue, Wenlin Yao, Haitao Mi, Dian Yu et al.ICLR 2025
  2. Open-World LLM Logical ReasoningYe Mo, Chuan Zhou, Fengxiang Cheng, Jialin Yu et al.ICML 2026
  3. RMath: A Logic Reasoning-Focused Datasets Toward Mathematical Multistep Reasoning TasksZiyi Hu, Jun Liu, Zhongzhi Liu, Yuzhong Liu et al.AAAI 2025 · 4 citations
  4. Do Large Language Models excel in Complex Logical Reasoning with Formal Language?Jin Jiang, Jianing Wang, Yuchen Yan, Yang Liu et al.EMNLP 2025 · 3 citations
  5. Rethinking LLM Reasoning: From Explicit Trajectories to Latent RepresentationsCong Jiang, Xiaofeng Zhang, Fangzhi Zhu, XiaoWei Chen et al.ICLR 2026
Dusk over the sea between two cliffs drawn in fine vertical lines