Atomic Inference for NLI with Generated Facts as Atoms

Joe Stacey, Pasquale Minervini, Haim Dubossarsky, Oana-Maria Camburu, Marek Rei

Abstract

With recent advances, neural models can achieve human-level performance on various natural language tasks. However, there are no guarantees that any explanations from these models are faithful, i.e. that they reflect the inner workings of the model. Atomic inference overcomes this issue, providing interpretable and faithful model decisions. This approach involves making predictions for different components (or atoms) of an instance, before using interpretable and deterministic rules to derive the overall prediction based on the individual atom-level predictions. We investigate the effectiveness of using LLM-generated facts as atoms, decomposing Natural Language Inference premises into lists of facts. While directly using generated facts in atomic inference systems can result in worse performance, with 1) a multi-stage fact generation process, and 2) a training regime that incorporates the facts, our fact-based method outperforms other approaches.

Introduction

While modern neural networks achieve human-level performance on language tasks, they remain "black boxes." We can ask them for explanations, but these post-hoc justifications are often unfaithful—meaning the explanation provided to the user might not actually reflect the reasoning the model used to reach its conclusion.

In high-stakes decision-making, we need inherently interpretable models. A promising approach is "atomic inference," where a model makes discrete predictions on small components (atoms) of an input and then uses hard logical rules to produce a final answer. However, previous work used sentences or word spans as atoms, which are often too coarse or lack the semantic clarity needed for precise reasoning. This paper introduces FGLR (Fact-Generated Logical Reasoning), a method that breaks down complex premises into LLM-generated "atomic facts" to perform Natural Language Inference (NLI).

Methods

The researchers propose using LLM-generated facts as the atoms for NLI. Their system, FGLR, follows a multi-stage pipeline:

  1. Fact Generation: GPT-3 is used to decompose a premise into a comprehensive list of atomic facts. To ensure no information is missed, strategies like concatenating multiple independent fact lists and generating "hypothesis-conditioned" facts are employed.
  2. Model Architecture: Each fact is paired with the hypothesis and encoded using a transformer (DeBERTa). The model uses two separate linear layers to calculate "entailment" and "contradiction" scores for every fact.
  3. Training with Atoms-in-the-Loop: Unlike previous methods that used off-the-shelf NLI models, FGLR is trained using a specialized loss function. This "fact-level loss" encourages the model to identify the specific facts responsible for the overall label.
  4. Deterministic Inference: During testing, the model follows strict rules: if any fact contradicts the hypothesis, the whole instance is a contradiction. If no contradiction is found but at least one fact entails the hypothesis, it is an entailment. Otherwise, it is neutral.

Datasets

The primary benchmark is Adversarial NLI (ANLI), which consists of three rounds (R1, R2, R3) of increasingly difficult examples designed to fool state-of-the-art models. To test robustness, the authors also evaluate on Out-of-Distribution (OOD) datasets: ConTRoL (logical reasoning), RTE (Recognizing Textual Entailment), and WNLI (Winograd NLI).

Key Results

FGLR demonstrates that facts are superior atoms because they are semantically self-contained. Because the final prediction is a deterministic function of the fact-level predictions, the "explanation" (which facts were flagged) is 100% faithful to the model's decision process.

Performance comparison of FGLR against baseline LLMs and other atomic inference methods.

As shown in the results table, FGLR achieved 60.7% accuracy on the ANLI-all benchmark, outperforming much larger generative models like GPT-3.5-turbo (59.4%), LLaMA2 70B (59.0%), and Mistral 7B (46.7%). It also significantly outperformed previous atomic methods like SENTLI (57.7%) and SLR-NLI (53.0%). Furthermore, FGLR showed strong performance on OOD datasets, particularly on RTE, where it achieved 80.8% accuracy, a significant jump over the FactAI baseline (77.2%).

Limitations and Future Work

Despite its success, the current framework has limitations. It assumes a single fact is enough to trigger an entailment or contradiction, meaning it does not yet support "multi-hop" reasoning where multiple facts must be combined. Additionally, generating facts via LLM APIs is currently expensive. Future work could explore using smaller, open-source models for decomposition and extending the framework to decompose complex, multi-sentence hypotheses.

Summary updated

BibTeX
@inproceedings{stacey2024atomic,
  author = {Joe Stacey and Pasquale Minervini and Haim Dubossarsky and Oana-Maria Camburu and Marek Rei},
  title = {{Atomic Inference for NLI with Generated Facts as Atoms}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=6qDCLdVRFx},
}
Figure