Logical Negation Augmenting and Debiasing for Prompt-based Methods

Yitian Li, Jidong Tian, Hao He, Yaohui JinarXiv 2024 · DOI · OpenReview

Introduction

While Large Language Models (LLMs) have demonstrated remarkable capabilities in knowledge extraction and natural language understanding, they frequently falter when encountering basic logical negation. Prompt-based methods, which leverage natural language templates to query Pre-trained Language Models (PLMs), are particularly susceptible to what researchers call logically negative bias. This bias leads models to treat the word "not" as a simple keyword for "false" or "contradiction" rather than a logical operator that inverts a truth value.

The Negation Bottleneck

The core issue is that PLMs often fail to process negation as a logical operation. Analysis across various first-order logic (FOL) expressions reveals a significant performance gap. While models maintain reasonable accuracy (around 65%) for conjunctions, disjunctions, and implications, their performance plummets to near-random levels (approximately 45%) when logical negation is introduced.

Figure 2: Accuracy of PLMs across different first-order logic (FOL) types, highlighting the dramatic performance drop for negation.

This suggests that models rely on spurious correlations: the presence of "not" is biased toward a "Contradiction" label, while its absence is biased toward "Entailment." This prevents prompt-based methods from achieving reliable results in complex reasoning tasks.

The NAND Framework

To address these shortcomings, the authors introduce NAND (Negation Augmenting and Negation Debiasing), a zero-shot, plug-and-play framework designed to "unlock" the latent reasoning capabilities of models like BERT and RoBERTa without requiring additional training.

Figure 4: The NAND framework architecture, illustrating how Negation Augmentation and Debiased Prediction are integrated into the prompting pipeline.

The NAND framework consists of two primary components:

  1. Negation Augmenting (NA): For every proposition $x$ (e.g., "Is Bob green?"), the system generates its negation $\neg x$ ("Is Bob not green?"). By evaluating the model's response to both versions, the inherent keyword bias associated with "not" is effectively neutralized.
  2. Negation Debiasing (ND): In Open World Assumption (OWA) settings, where a statement can be True, False, or Neutral, the bias is more nuanced. NAND introduces an empirical offset ($\gamma$) to the "Neutral" label's probability, helping the model distinguish between logical falsehood and lack of provability.

Experimental Results

NAND was evaluated on three major benchmarks: RuleTaker, ProofWriter, and LogicNLI. The results demonstrate substantial improvements across the board:

  • Accuracy Gains: On LogicNLI, accuracy rose from 52.1% to 61.4% for BERT. On ProofWriter, gains of 10 to 15 percentage points were observed.
  • Consistency: Beyond raw accuracy, NAND significantly reduces the variance caused by different prompt templates, making prompt engineering more stable.
  • Zero-Shot Power: In complex reasoning tasks (e.g., depth-5 inference), the zero-shot NAND method approached the performance of models specifically fine-tuned on the task data.

Conclusion

NAND provides a mathematically grounded and computationally efficient solution to a fundamental flaw in language model reasoning. By treating negation as a logical operation rather than a linguistic indicator, it enables more reliable and consistent performance in complex logical tasks. Future work may explore the application of NAND to even larger models like GPT-4 to see if similar debiasing benefits persist at scale.

Summary updated

Abstract

Prompt-based methods have gained increasing attention on NLP and shown validity on many downstream tasks. Many works have focused on mining these methods' potential for knowledge extraction, but few explore their ability to make logical reasoning. In this work, we focus on the effectiveness of the prompt-based methods on first-order logical reasoning and find that the bottleneck lies in logical negation. Based on our analysis, logical negation tends to result in spurious correlations to negative answers, while propositions without logical negation correlate to positive answers. To solve the problem, we propose a simple but effective method, Negation Augmenting and Negation Debiasing (NAND), which introduces negative propositions to prompt-based methods without updating parameters. Specifically, these negative propositions can counteract spurious correlations by providing "not" for all instances so that models cannot make decisions only by whether expressions contain a logical negation. Experiments on three datasets show that NAND not only solves the problem of calibrating logical negation but also significantly enhances prompt-based methods of logical reasoning without model retraining.
BibTeX
@misc{li2024logical,
  author = {Yitian Li and Jidong Tian and Hao He and Yaohui Jin},
  title = {{Logical Negation Augmenting and Debiasing for Prompt-based Methods}},
  year = {2024},
  eprint = {2405.04872},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.04872},
}
Figure