Empirical Investigation of Neural Symbolic Reasoning Strategies

Yoichi Aoki, Keito Kudo, Tatsuki Kuribayashi, Ana Brassard, Masashi Yoshikawa, Keisuke Sakaguchi, Kentaro Inui · DOI

TL;DR

This paper dives into why neural models improve when generating intermediate reasoning steps for symbolic tasks. By dissecting reasoning strategies into "output" (how steps are generated) and "chaining" (the order of operations), they reveal that not all step generation is equal. Their findings highlight the critical role of fine-grained, iterative step generation for robust symbolic reasoning, even in out-of-domain scenarios.

What Problem Does This Paper Address?

Artificial intelligence researchers have long sought to integrate neural networks with symbolic reasoning capabilities. A common observation is that neural models perform better on tasks requiring logical deduction (like math word problems or symbolic manipulation) when they generate intermediate reasoning steps, akin to showing their work. However, the exact reasons why this "chain-of-thought" or step-by-step approach boosts performance have remained unclear. Previous studies often employed these strategies somewhat ad-hoc. This paper aims to systematically investigate and disentangle the benefits of intermediate step generation by breaking down the reasoning process into distinct strategic components.

Methods

The authors propose a framework to analyze neural reasoning strategies by decomposing them into two key aspects:

  • Output Strategy: This defines how the intermediate steps are generated. They explore three granularities:
  • All-at-once: The entire reasoning chain and answer are generated in a single output.
  • Step-by-step: The model generates one reasoning step at a time, feeding the output back as input for the next step.
  • Token-by-token: Similar to step-by-step, but the model outputs only one token at a time.
  • Chaining Strategy: This dictates the order in which reasoning steps are executed. They compare:
  • Shortest-path: Solves equations sequentially from the first solvable one to the target.
  • Exhaustive: Greedily solves all available equations until the target is reached.
  • Backward: Starts from the target equation and backtracks through dependencies to find a known value, then solves forward.
  • No chaining: A baseline where the model directly predicts the answer without intermediate steps.

They use a controlled, simplified numerical reasoning dataset to isolate the effects of these strategies.

Datasets

The study utilizes a custom-built, simplified numerical reasoning dataset. This dataset is designed to allow for fine-grained control over reasoning depth and to avoid biases present in natural language math problems.

  • Training: 5,000 instances.
  • Testing: 2,400 instances.
  • Pre-training: A 10K simple dataset was used to teach primitive operations (assignment, reference, addition).

The dataset features equations with assignments and modular additions, including distractors, and randomly assigns numbers, variables, and equation order. Crucially, it allows for controlled extrapolation to greater reasoning depths (1-12) than seen during training (1-5).

Key Insights and Ideas

  • Granularity Matters: The way intermediate steps are generated significantly impacts performance. Fine-grained, iterative generation (step-by-step) is demonstrably better than generating everything at once.
  • Chaining Strategy is Crucial for Generalization: While output strategy is important, the chaining strategy, particularly exhaustive and backward chaining, is key to achieving near-perfect performance even when extrapolating to unseen reasoning depths.
  • "All-at-once" Suffers from Overfitting: The authors hypothesize that the "all-at-once" strategy's poor performance on longer reasoning chains is due to the decoder overfitting to the shorter sequence lengths seen in the training data.
  • Breaking Down Problems is Beneficial: The advantage of step-by-step over token-by-token suggests that modeling reasoning as meaningful units (steps) rather than individual tokens is more effective.
  • NLP Objectives Might Not Directly Translate: T5 models, pre-trained with NLP-task objectives, generally outperformed BART models, suggesting that these specific pre-training objectives might be more conducive to symbolic reasoning.

Key Results

  • Step-by-step output strategy significantly outperforms "all-at-once", especially as reasoning depth increases. For example, at depth 12, step-by-step strategies show much higher accuracy than all-at-once.
  • Exhaustive and backward chaining strategies enable successful generalization to reasoning depths up to 12, achieving near-perfect performance when combined with step-by-step output.
  • In contrast, the shortest-path chaining strategy shows performance degradation as reasoning depth increases, particularly when used with the "all-at-once" output strategy.
  • Error analysis revealed that copying errors were a common issue with the shortest-path strategy, suggesting a need for better copy mechanisms.
  • T5-large showed a similar trend to T5-base but with slightly lower accuracy on "all-at-once" and "step-by-step", while exhibiting higher accuracy on "token-by-token," indicating that larger models might benefit more from finer granularity in output.

Limitations and Future Work

  • Generalization to Natural Language: The authors acknowledge that their findings are based on a simplified, artificial dataset. It's unclear if these strategies will generalize to more complex symbolic reasoning tasks or problems presented in natural language.
  • Input Length Limits: Iterative strategies can be limited by the maximum input length of models (e.g., 512 tokens for T5), which can be a bottleneck for very deep reasoning chains.
  • Gigantic Language Models: The study did not include the latest generation of massive language models (like GPT-3), which could offer new insights.

Future work should focus on testing these strategies on more complex and naturalistic reasoning tasks, exploring ways to overcome input length limitations, and investigating the performance of current state-of-the-art large language models.

Summary updated

BibTeX
@inproceedings{aoki2023empirical,
  author = {Yoichi Aoki and Keito Kudo and Tatsuki Kuribayashi and Ana Brassard and Masashi Yoshikawa and Keisuke Sakaguchi and Kentaro Inui},
  title = {{Empirical Investigation of Neural Symbolic Reasoning Strategies}},
  booktitle = {EACL (Findings)},
  year = {2023},
  doi = {10.18653/v1/2023.findings-eacl.86},
}
Figure