Verification and Refinement of Natural Language Explanations through LLM-Symbolic Theorem Proving

Xin Quan, Marco Valentino, Louise A. Dennis, André Freitas · DOI

Abstract

Large Language Models (LLMs) have shown remarkable capabilities in generating natural language explanations for their predictions. However, ensuring the logical validity and faithfulness of these explanations remains a significant challenge. This paper introduces Explanation-Refiner, a neuro-symbolic framework that leverages symbolic Theorem Proving (TP) to verify and iteratively refine LLM-generated explanations. By translating natural language into First-Order Logic (FOL) using Neo-Davidsonian semantics, the system creates a feedback loop that detects logical gaps and forces rigorous reasoning. Our results show substantial improvements in explanation validity across multiple datasets, with GPT-4 achieving up to an 84% validity rate on e-SNLI after refinement.

Introduction

In Natural Language Inference (NLI), the ability to provide a clear, logical justification for a conclusion is as critical as the prediction itself. Traditional evaluation metrics like BLEU or ROUGE are insufficient, as they measure surface-level text similarity rather than logical soundness. Furthermore, even human-annotated "gold standard" datasets often contain logical errors or missing premises, making them a flawed ceiling for model performance.

The core problem is the "semantic gap" between flexible natural language and the rigid requirements of formal logic. LLMs are prone to "hallucinating" plausible-sounding but logically incomplete explanations. To address this, we propose a system that treats natural language explanations as formal hypotheses to be proven by a symbolic engine, using the failure of those proofs to guide iterative refinement.

The Explanation-Refiner Framework

The Explanation-Refiner pipeline consists of four primary stages designed to move from raw text to verified logic:

  1. Autoformalization: The system uses an LLM to translate premises, hypotheses, and explanations into First-Order Logic. To preserve the nuance of natural language, it employs Neo-Davidsonian event semantics, which explicitly represents events and their participants (e.g., agents and patients).
  2. Syntax Refinement: Formal logic code is often prone to syntax errors. The system uses the Isabelle/HOL theorem prover to identify these errors, providing feedback to the LLM for iterative correction before logical verification begins.
  3. Proof Strategy Generation: The LLM generates a high-level "rough inference" strategy in natural language, which is then used to construct formal proof steps within the theorem prover.
  4. Verification & Iterative Refinement: The Theorem Prover attempts to validate the hypothesis. If a proof step fails, the resulting feedback is sent back to the LLM. The LLM then uses this feedback to "refine" the original natural language explanation—filling in missing information or correcting contradictions—and the process repeats.
Overview of the Explanation-Refiner framework, illustrating the iterative loop between the LLM and the symbolic Theorem Prover.

Experimental Results

The framework was evaluated on three datasets of increasing complexity: e-SNLI (simple, single-sentence explanations), QASC (multi-hop science questions), and WorldTree (complex multi-sentence reasoning requiring deep domain knowledge).

Validity Gains

The most striking result is the massive increase in logical validity after iterative refinement. For GPT-4, validity on e-SNLI rose from 36% to 84%. Even on the highly complex WorldTree dataset, where initial validity was a mere 2%, the refinement process pushed it to 37%. This suggests that automated formal verification can significantly enhance the quality of even high-performing models.

Comparison of initially valid vs. finally valid explanations across e-SNLI, QASC, and WorldTree datasets for various LLMs.

Model Hierarchy

A clear hierarchy emerged among the tested models. Closed-source models like GPT-4 and GPT-3.5 significantly outperformed open-source alternatives such as Llama2-70b and Mistral. GPT-4, in particular, demonstrated a superior ability to interpret logical feedback from the theorem prover and translate it into meaningful natural language refinements.

Discussion and Limitations

While Explanation-Refiner significantly improves explanation quality, it faces several challenges. The system's performance is heavily dependent on the quality of the initial autoformalization. If the translation into logic is fundamentally flawed, the theorem prover's feedback may not lead to a valid refinement. Additionally, symbolic theorem proving is computationally intensive, leading to potential scalability issues with very long explanations (e.g., those exceeding 10 sentences in WorldTree) where the prover may time out.

Conclusion

Explanation-Refiner demonstrates that symbolic verification is a powerful tool for grounding LLM reasoning. By tethering generative models to the strict rules of formal logic, we can move toward AI systems that provide not just plausible answers, but verifiable and trustworthy explanations. Future work will focus on making the autoformalization process more robust and extending the framework to handle more abstract or creative forms of natural language reasoning.

Summary updated

BibTeX
@inproceedings{quan2024verification,
  author = {Xin Quan and Marco Valentino and Louise A. Dennis and André Freitas},
  title = {{Verification and Refinement of Natural Language Explanations through LLM-Symbolic Theorem Proving}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=A3UYxoyWJG},
}
Figure