Reproduce “Dspy-based Neural-Symbolic Pipeline to Enhance Spatial Reasoning in LLMs” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Rong Wang, Kun Sun, Jonas Kuhn

A neural-symbolic pipeline, integrating Large Language Models (LLMs) with an Answer Set Programming (ASP) solver via iterative feedback, improved spatial reasoning capabilities. This DSPy-orchestrated framework achieved higher accuracy on StepGame and SparQA datasets by refining LLM-generated logical programs based on execution errors.

Key insights

  • Iterative feedback between the LLM and symbolic solver is crucial, substantially improving the executability and correctness of generated logical programs.
  • The neural-symbolic integration effectively bridges the gap in LLMs' spatial reasoning, demonstrating robust performance on multi-hop and complex relational tasks.
  • DSPy provides a powerful and efficient framework for orchestrating and optimizing complex LLM-based pipelines, simplifying the development of self-improving systems.
  • A lightweight "Facts+Rules" prompting method can achieve competitive performance on certain complex spatial reasoning tasks, offering a simpler alternative to a full neural-symbolic pipeline.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.