Abstract
Evaluating an explanation's faithfulness is desired for many reasons such as trust, interpretability and diagnosing the sources of model's errors. In this work, which focuses on the NLI task, we introduce the methodology of Faithfulness-through-Counterfactuals, which first generates a counterfactual hypothesis based on the logical predicates expressed in the explanation, and then evaluates if the model's prediction on the counterfactual is consistent with that expressed logic (i.e., if the new formula is logically satisfiable). In contrast to existing approaches, this does not require any explanations for training a separate verification model. We first validate the efficacy of automatic counterfactual hypothesis generation, leveraging on the few-shot priming paradigm. Next, we show that our proposed metric distinguishes between human-model agreement and disagreement on new counterfactual input. In addition, we conduct a sensitivity analysis to validate that our metric is sensitive to unfaithful explanations.
Introduction
In Natural Language Inference (NLI), models are tasked with determining if a premise entails, contradicts, or is neutral toward a hypothesis. Beyond simple classification, there is a growing demand for "faithful" explanations—rationales that accurately reflect the model's internal decision-making process. However, evaluating faithfulness is notoriously difficult. Existing metrics often suffer from "label leakage," where they reward explanations containing keywords correlated with the label rather than the reasoning. Other methods rely on external "simulator" models, which introduce their own biases and black-box complexities. This research proposes a logically grounded alternative that queries the task model directly.
Methodology: Faithfulness-Through-Counterfactuals (FTC)
The authors introduce the Faithfulness-Through-Counterfactuals (FTC) framework, which evaluates explanations based on the principle of logical satisfiability. The process involves three distinct stages:
- Extraction: The system identifies logical predicates within a provided explanation. For instance, an explanation stating "A dog is an animal" yields the relationship Dog $\iff$ Animal.
- Transformation (Counterfactual Generation): The original hypothesis is rewritten into a counterfactual hypothesis by substituting terms according to the extracted logic. If the original hypothesis was "The dog is barking," the counterfactual becomes "The animal is barking."
- Verification: The NLI model is prompted to predict a label for this new counterfactual. If the model’s prediction aligns with the logic expressed in the explanation (e.g., if "dog" entails "animal," the label should remain "Entailment"), the explanation is deemed faithful.
To accommodate the nuances of natural language, the framework utilizes First-Order Free Logic, which can handle "truth-valueless" statements corresponding to the "Neutral" label in NLI. The extraction and transformation steps are performed using Large Language Models (e.g., GPT-Neo 2.7B) via few-shot priming.
Key Insights and Logical Applications
A core contribution of this work is the use of formal logic as a diagnostic "unit test" for neural networks. By observing how a model reacts to logically derived counterfactuals, researchers can determine if the model's internal reasoning matches its stated explanation.
As shown in the examples above, the framework handles various logical relationships. However, the "Neutral" label presents unique challenges. In formal logic, neutrality often arises from a lack of sufficient information, making it harder to construct definitive counterfactuals compared to the binary opposition found in Entailment or Contradiction.
Experimental Results
The study evaluated FTC using the e-SNLI and e-SNLI-VE (Visual Entailment) datasets. Key findings include:
- Generation Quality: Few-shot priming proved highly effective, with the system achieving METEOR scores between 0.71 and 0.88 for counterfactual generation.
- Discriminative Power: FTC variants outperformed existing baselines like Label Adjusted Simulation (LAS). In validation tests using the Wilcoxon rank-sum test, FTC achieved a $\rho$-statistic of 0.58 to 0.75, indicating superior ability to distinguish between human-model agreement and disagreement.
- Sensitivity: Sensitivity analysis confirmed that FTC correctly penalizes "pathological" explanations (e.g., those generated without full input access), whereas other metrics were often misled by superficial textual similarities.
Conclusion and Future Work
While FTC provides a robust, logically grounded metric for faithfulness, it currently focuses on relatively simple predicates. Future research will explore complex, multi-step logical chains and the integration of FTC into the training loop to incentivize the development of inherently faithful models. Additionally, the authors noted that human-provided "gold standard" explanations are occasionally logically inconsistent, highlighting that faithfulness is a challenge for both artificial and human intelligence.
Summary updated