A Neural-Symbolic Approach to Natural Language Understanding

Zhixuan Liu, Zihao Wang, Yuan Lin, Hang Li

Abstract

Deep neural networks, empowered by pre-trained language models, have achieved remarkable results in natural language understanding (NLU) tasks. However, their performances can drastically deteriorate when logical reasoning is needed. This is because NLU in principle depends on not only analogical reasoning, which deep neural networks are good at, but also logical reasoning. According to the dual-process theory, analogical reasoning and logical reasoning are respectively carried out by System 1 and System 2 in the human brain. Inspired by the theory, we present a novel framework for NLU called Neural-Symbolic Processor (NSP), which performs analogical reasoning based on neural processing and logical reasoning based on both neural and symbolic processing. As a case study, we conduct experiments on two NLU tasks, question answering (QA) and natural language inference (NLI), when numerical reasoning (a type of logical reasoning) is necessary. The experimental results show that our method significantly outperforms state-of-the-art methods in both tasks.

Introduction

While Large Language Models (LLMs) excel at "analogical reasoning"—identifying patterns and extracting information—they often struggle with tasks requiring strict logic or arithmetic. For instance, while a standard model can easily locate a date in a text, its performance "drastically deteriorates" when asked to perform arithmetic operations on multiple values found within that text.

This research posits that effective NLU requires two distinct modes of thought, inspired by Daniel Kahneman’s Dual-Process Theory:

  1. System 1 (Analogical Reasoning): Fast, instinctive, and pattern-based.
  2. System 2 (Logical/Numerical Reasoning): Slower, deliberative, and rule-based.

Current AI architectures primarily function as System 1. This paper introduces the Neural-Symbolic Processor (NSP) to provide a functional System 2 capability.

Methods: The Neural-Symbolic Processor (NSP)

The NSP architecture integrates neural pattern matching with symbolic logical execution through three main stages:

  1. Shared Encoder: A Transformer-based model (e.g., RoBERTa or BART) converts input text into high-dimensional embeddings.
  2. Parallel Reasoning Paths:
    • Analogical Path (System 1): Neural predictors attempt direct answers via span extraction or classification.
  3. Logical Path (System 2): A neural decoder translates text into a symbolic program (e.g., diff(N1, N2)). This program is then executed by a non-neural Symbolic Executor, ensuring 100% precision for mathematical or logical operations.
  4. Gating Network: A Mixture-of-Experts component evaluates the input and various predictions to determine the most reliable path for a given query.
The NSP architecture featuring parallel analogical and logical reasoning paths governed by a gating network.

Datasets and Evaluation

The framework was evaluated on two primary tasks requiring numerical reasoning:

  • DROP (Discrete Reasoning Over Paragraphs): A QA dataset where math is essential. The authors utilized a subset of ~32,000 instances, manually annotated with symbolic programs for training.
  • AWPNLI: A Natural Language Inference dataset focused on numerical entailment (e.g., determining if one mathematical statement follows from another).

The researchers are releasing these newly annotated "program-aware" versions of the datasets to the research community.

Key Results

The integration of a symbolic "brain" provides a significant performance edge over purely neural baselines.

Performance comparison of NSP against state-of-the-art models on the DROP-subset.

On the DROP-subset, NSP outperformed state-of-the-art (SOTA) models by 2.4% in F1 score. The impact was most pronounced in complex categories: for questions involving multiplication, division, or averaging, NSP improved performance by 56.42% compared to baselines like QDGAT, which scored near zero. On the AWPNLI dataset, NSP exceeded the best baseline by 20.7%.

The study highlights that neural predictors are effective at "finding" numbers (spans), while the symbolic path is superior at "processing" them. The Gating Network effectively manages these complementary strengths, knowing when to rely on neural intuition versus symbolic logic.

Conclusion and Future Work

NSP demonstrates that explicit symbolic execution makes reasoning processes more interpretable and accurate for logical tasks. However, challenges remain regarding the high cost of manual program annotation and the current symbolic language's limitations with highly complex, multi-step nested logic. Future research will explore more sophisticated programming languages and methods to generate these programs with reduced human supervision, such as through reinforcement learning.

Summary updated

BibTeX
@inproceedings{liu2022neural,
  author = {Zhixuan Liu and Zihao Wang and Yuan Lin and Hang Li},
  title = {{A Neural-Symbolic Approach to Natural Language Understanding}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  url = {https://openreview.net/forum?id=FEZys68BAB},
}
Figure