XplaiNLI: Explainable Natural Language Inference through Visual Analytics

Aikaterini-Lida Kalouli, Rita Sevastjanova, Valeria de Paiva, Richard S. Crouch, Mennatallah El-AssadyCOLING 2020

Introduction

Natural Language Inference (NLI) is the task of determining the logical relationship between a premise and a hypothesis—typically categorized as entailment, contradiction, or neutral. While deep learning models, such as BERT, have achieved state-of-the-art performance in NLI, they often operate as "black boxes." These models frequently rely on shallow heuristics or dataset biases, such as associating negation words exclusively with contradiction, rather than performing genuine logical reasoning. XplaiNLI addresses this lack of transparency by providing an interactive, web-based tool that combines deep learning with symbolic logic to offer human-readable explanations for NLI decisions.

System Architecture

The XplaiNLI system bridges the gap between high-performing but opaque deep learning models and transparent but rigid symbolic systems. The architecture consists of a multi-component backend and a visual analytics frontend designed to expose the underlying logic of NLI predictions.

Overview of the XplaiNLI architecture, showing the backend model components and the interactive visual interface.

Backend Components

The backend is composed of three primary engines:

  1. Deep Learning (DL) Component: This uses a fine-tuned BERT-base model. To facilitate explainability, the system tracks four specific heuristics: negation (e.g., "no", "never"), lexical overlap, relative sentence length, and specific word "triggers" (e.g., "animal" often indicating entailment).
  2. Symbolic Component: This engine is based on Natural Logic and Graphical Knowledge Representation (GKR). It maps sentences to graphs and utilizes external knowledge bases like WordNet and SUMO to determine semantic relationships, such as subclass or superclass matches. It reasons through monotonicity to determine truth conditions.
  3. Hybrid Component: A "meta-classifier" implemented as a Random Forest (using 30 estimators and Gini impurity) acts as a judge. It analyzes semantic features to decide whether to trust the DL label, the Symbolic label, or a combination of both, effectively learning which engine is better suited for specific linguistic phenomena.

Visual Analytics Interface

The frontend provides a comprehensive view of the NLI process. It displays the sentence pair, highlights the features or rules that triggered a specific decision, and allows researchers to "stress-test" the model. Users can input custom heuristics or words they suspect are artifacts of dataset bias to see how the DL model responds, enabling a human-in-the-loop diagnostic process.

Data and Evaluation

The system was developed and evaluated using the SICK (Sentences Involving Compositional Knowledge) corpus. The authors utilized a corrected version of SICK to avoid issues related to event and entity coreference found in the original dataset. By focusing on SICK rather than larger datasets like MNLI, the researchers aimed to expose the specific heuristic biases that their tool is designed to detect.

Key Insights

The primary contribution of XplaiNLI is the demonstration of complementary strengths between different modeling paradigms. While deep learning excels at capturing fuzzy conceptual meanings and word associations, symbolic logic is superior for handling "hard" linguistic phenomena like negation, quantifiers, and modals. By explicitly visualizing known DL biases—such as the "negation = contradiction" shortcut—the tool transforms a model's inherent weaknesses into explanatory features.

Conclusion and Future Work

XplaiNLI provides a functional architecture for making NLI models more transparent. Future work aims to expand the scope of user-defined heuristics to include complex linguistic features like Part-Of-Speech (POS) tags and to allow for the comparison of various state-of-the-art deep learning models. Additionally, the researchers plan to improve the transparency of the Hybrid component by visualizing the internal decision-making process of the Random Forest classifier to make the "meta-decision" even clearer to the user.

Summary updated

BibTeX
@inproceedings{kalouli2020xplainli,
  author = {Aikaterini-Lida Kalouli and Rita Sevastjanova and Valeria de Paiva and Richard S. Crouch and Mennatallah El-Assady},
  title = {{XplaiNLI: Explainable Natural Language Inference through Visual Analytics}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.coling-demos.9},
}
Figure