Skip to main content
QUICK REVIEW

[Paper Review] Evaluating Step-by-Step Reasoning through Symbolic Verification

Hanlin Zhang, Yifan Zhang|arXiv (Cornell University)|Dec 16, 2022
Intelligent Tutoring Systems and Adaptive LearningComputer Science4 citations
TL;DR

This paper proposes Language Models as Logic Programmers (LMLP), a neuro-symbolic framework that uses symbolic first-order logic rules and knowledge bases to enable few-shot in-context learning for relational reasoning. LMLP outperforms chain-of-thought (CoT) prompting by over 25% on length generalization benchmarks despite using smaller models, demonstrating that symbolic representations enhance compositional generalization and reasoning reliability.

ABSTRACT

Pre-trained language models (LMs) have shown remarkable reasoning performance using explanations or chain-of-thoughts (CoT)) for in-context learning. On the other hand, these reasoning tasks are usually presumed to be more approachable for symbolic programming. To understand the mechanism of reasoning of LMs, we curate synthetic datasets containing equivalent (natural, symbolic) data pairs, where symbolic examples contain first-order logic rules and predicates from non-parametric knowledge bases (KBs), supporting automated verification of intermediate reasoning results. Then we revisit neuro-symbolic approaches and propose to learn from demonstrations containing logic rules and corresponding examples to iteratively reason over KBs, recovering Prolog's backward chaining algorithm and supporting automated verification of LMs' outputs. Comprehensive experiments are included to systematically compare LMLP with CoT in deductive reasoning settings, showing that LMLP enjoys more than $25\%$ higher accuracy than CoT on length generalization benchmarks even with smaller model sizes.

Motivation & Objective

  • To investigate whether symbolic representations improve in-context learning for relational reasoning tasks.
  • To address the compositionality challenge in few-shot reasoning, where models fail on novel combinations of information.
  • To compare the effectiveness of natural language explanations (CoT) versus symbolic logic rules in few-shot prompting.
  • To evaluate whether language models can effectively ground reasoning in knowledge bases using symbolic demonstrations.
  • To explore if symbolic prompting enables more reliable and scalable reasoning than natural language prompting.

Proposed method

  • The method uses synthetic datasets with paired natural language and symbolic (first-order logic) examples to enable controlled comparison.
  • LMLP employs logic rule templates and knowledge base (KB) predicates to guide reasoning, confining each generated step to valid KB relations.
  • At each reasoning step, a masked translation model maps natural language generations to (subject, relation, object) triples in the KB, ensuring semantic grounding.
  • The model iteratively applies backward chaining over the KB, using retrieved logic rules and examples as in-context demonstrations.
  • It uses GPT-2 and Sentence-BERT as backbones, which are smaller than typical CoT models, to test performance under low-resource symbolic prompting.
  • The reasoning path is evaluated manually, with success defined by correct derivation of the target relation through valid KB steps.

Experimental results

Research questions

  • RQ1Does symbolic prompting with first-order logic rules improve compositional generalization in few-shot reasoning compared to natural language explanations?
  • RQ2Can language models effectively learn to reason over knowledge bases using symbolic demonstrations without large-scale pretraining on KBs?
  • RQ3How does the performance of symbolic prompting (LMLP) compare to chain-of-thought (CoT) on length generalization benchmarks?
  • RQ4To what extent do symbolic representations reduce catastrophic performance degradation when testing on longer reasoning sequences than seen during training?
  • RQ5Can symbolic prompting enable more reliable and explainable reasoning paths than natural language prompting?

Key findings

  • LMLP achieves over 25% higher accuracy than CoT on length generalization benchmarks, even when using smaller models like GPT-2.
  • LMLP demonstrates superior compositional generalization, maintaining high performance as reasoning length increases beyond training sequences.
  • CoT prompting suffers from catastrophic performance degradation on longer sequences, failing to generalize compositionally despite strong performance on shorter ones.
  • The use of symbolic demonstrations enables more reliable and explainable reasoning paths, as each step is grounded in KB predicates.
  • LMLP is effective even with smaller models and non-KB-pretrained backbones, indicating that symbolic prompting compensates for limited model scale.
  • The results show that symbolic representations explicitly separate logic and control, enabling more stable and scalable reasoning than natural language-based CoT.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.