Abstract
Natural Language Inference (NLI) requires models to determine if a hypothesis follows logically from premises. While Large Language Models (LLMs) excel at classification, they often lack transparency. This paper introduces Diff-Comb Explainer, a neuro-symbolic framework that integrates Differentiable BlackBox Combinatorial Solvers (DBCS) into deep learning pipelines. By making Integer Linear Programming (ILP) solvers differentiable, the model can learn to construct precise, rule-based explanation graphs while maintaining the end-to-end trainability of neural networks.
The Challenge of Explainable NLI
Traditional NLI approaches often treat reasoning as a black-box task. To improve transparency, researchers have used Integer Linear Programming (ILP) to build "explanation graphs"—structured sets of facts that logically support an answer. However, a fundamental "wall" exists between neural models (which use continuous gradients) and symbolic ILP solvers (which use discrete logic).
Previous attempts to bridge this gap relied on continuous relaxation, which often blurred logical constraints and led to unfaithful explanations. The goal of this work is to maintain the strict precision of symbolic logic within a differentiable framework.
Methods: The Diff-Comb Explainer
The Diff-Comb Explainer architecture overcomes the non-differentiability of ILP by utilizing a Differentiable BlackBox Combinatorial Solver (DBCS). This allows the model to pass gradients through the discrete optimization step during training.
The process follows three stages:
- Graph Construction: A Sentence-Transformer (bi-encoder) calculates semantic relevance between the hypothesis and a pool of facts, combined with lexical overlap to weight potential edges.
- Subgraph Selection: The model treats fact selection as an ILP problem with strict constraints (e.g., "the graph must be connected," "limit the number of abstract scientific laws used"). The DBCS enables end-to-end training without needing to relax these discrete constraints during the forward pass.
- Answer and Explanation Selection: The model calculates an objective score for each candidate answer based on the "best" subgraph found. It then uses a joint loss function to simultaneously optimize both the answer choice and the quality of the explanation.
Experimental Setup
The model was evaluated on two challenging benchmarks:
- WorldTree Corpus: A collection of 4,400 questions and explanation graphs involving ~5,000 abstract scientific facts and over 100,000 grounding facts.
- ARC Challenge: A set of difficult grade-school science questions requiring multi-step reasoning that are notoriously challenging for simple retrieval-based models.
Key Insights: Robustness and Faithfulness
A critical advantage of this neuro-symbolic approach is its robustness to noise. Purely neural models like BERT often struggle when the search space of facts grows, as they may overfit on spurious correlations in irrelevant "distractor" facts.
As shown in the figure above, while BERT's accuracy plummets as the number of candidate facts ($K$) increases, Diff-Comb Explainer remains stable. The symbolic constraints act as a logical filter, ensuring the model stays focused on relevant reasoning chains. Furthermore, the model demonstrates high faithfulness (74.47%), meaning the predicted answer is strongly dependent on the provided explanation, rather than being a lucky guess.
Results
- Accuracy: On the ARC Challenge, Diff-Comb Explainer reached 43.21%, significantly outperforming BERT-Large (35.11%) and the best non-differentiable ILP baseline (40.21%).
- Explanation Quality: The model reached a Precision@1 of 63.23% in explanation selection, a notable improvement over the 51.99% achieved by previous non-differentiable versions.
- Consistency: The framework provides stable, consistent explanations for similar queries, a hallmark of robust reasoning missing in pure neural architectures.
Limitations and Future Work
While promising, the approach faces challenges in computational complexity, as ILP is NP-complete. As the number of facts and variables increases, the time required to solve the optimization problem grows exponentially. Additionally, while it outperforms standard Transformers in explainability, there remains a performance gap compared to the largest generative LLMs. Future research will focus on integrating domain-specific priors and more complex logical constraints to enhance efficiency in specialized fields like medicine or law.
Summary updated