Abstract
Large Language Models (LLMs) often struggle with deep, multi-step logical reasoning due to the combinatorial explosion of irrelevant inferences in traditional forward-chaining approaches. We introduce LAMBADA (Language Model augmented Backward Chaining), a framework that flips the reasoning process by searching backward from a goal to supporting facts. By decomposing complex goals into verifiable sub-goals through modular LLM prompts, LAMBADA achieves significant accuracy gains—up to 113% over prior methods—while requiring over 10x fewer model queries.
Introduction
While "Chain-of-Thought" (CoT) prompting has enhanced the reasoning capabilities of LLMs, these models frequently fail on tasks requiring long logical chains. Most existing techniques rely on Forward Chaining, starting from known facts and rules to derive new information. In complex systems, this leads to a "needle in a haystack" problem where the model explores countless irrelevant paths, often resulting in logical hallucinations or failure to reach the conclusion. LAMBADA addresses this by implementing a goal-directed search strategy, focusing exclusively on paths relevant to the target statement.
Methodology: The LAMBADA Framework
LAMBADA implements classical Backward Chaining (BC) using LLMs as modular reasoning engines. The system starts with a Goal and recursively breaks it down into sub-goals using four specialized sub-functions, each implemented via few-shot prompting of a 540B parameter PaLM model:
- Fact Check: Verifies if the current goal is directly supported or refuted by existing facts.
- Rule Selection: Identifies rules whose conclusions match the current goal.
- Goal Decomposition: Extracts the premises (sub-goals) required for a selected rule to be valid.
- Sign Agreement: Ensures logical consistency, particularly when handling negations.
The framework employs a depth-first search algorithm to coordinate these modules, utilizing a "cache" to prevent redundant computations and a loop-detection mechanism to avoid circular reasoning.
Experimental Evaluation
The researchers evaluated LAMBADA on several rigorous logical reasoning benchmarks:
- ProofWriter (PUD & PD): Synthetic datasets requiring up to 5+ hops of reasoning, including "Unknown" labels.
- PrOntoQA: Tests proof planning in theories with multiple potential reasoning paths.
- ParaRules: A linguistically diverse version of ProofWriter featuring natural language variations and pronouns.
Results and Discussion
LAMBADA demonstrated substantial improvements over baselines such as Chain-of-Thought (CoT) and Selection-Inference (SI).
Key Findings:
- Accuracy and Robustness: On Depth-5 problems in ProofWriter-PUD, LAMBADA showed a 44% relative improvement over CoT. On PrOntoQA, it outperformed SI by 113%. The model also maintained performance when names and verbs were replaced with novel tokens, indicating high lexical robustness.
- Efficiency: For 5-hop reasoning, LAMBADA was 11.8x more query-efficient than the Selection-Inference method.
- Faithfulness: Unlike CoT, which often hallucinates rules to reach a label, LAMBADA produces verifiable proof chains by design.
Conclusion
LAMBADA proves that goal-directed backward chaining is a more efficient and robust strategy for complex logical reasoning in LLMs than traditional forward-searching methods. By modularizing the reasoning process, the system avoids combinatorial explosion and spurious correlations. Future work will focus on extending the framework to open-ended question answering and more complex logical structures like disjunctions.
Summary updated