Local Explanations via Necessity and Sufficiency: Unifying Theory and Practice

David Watson, Limor Gultchin, Ankur Taly

Abstract

Necessity and sufficiency are the building blocks of all successful explanations. Yet despite their importance, these notions have been conceptually underdeveloped and inconsistently applied in explainable artificial intelligence (XAI), a fast-growing research area that is so far lacking in firm theoretical foundations. Building on work in logic, probability, and causality, we establish the central role of necessity and sufficiency in XAI, unifying seemingly disparate methods in a single formal framework. We provide a sound and complete algorithm for computing explanatory factors with respect to a given context, and demonstrate its flexibility and competitive performance against state of the art alternatives on various tasks.

Introduction

The field of Explainable AI (XAI) is currently a "Wild West" of competing techniques, ranging from feature attributions (SHAP) to rule-based anchors and counterfactual explanations. These tools often produce inconsistent results, leaving practitioners unsure of which to trust. This paper argues that the lack of theoretical foundations is the root cause of this inconsistency. By returning to the philosophical roots of explanation—necessity and sufficiency—the authors introduce LENS (Local Explanations via Necessity and Sufficiency), a framework that unifies these disparate methods under a single theoretical roof.

The LENS Framework

LENS formalizes explanations using a structure called a Basis $\langle f, \mathcal{D}, \mathcal{C}, \preceq \rangle$, where $f$ is the model, $\mathcal{D}$ is the context (data distribution), $\mathcal{C}$ is a set of factors, and $\preceq$ is a partial ordering that prefers simpler explanations. The framework relies on two key metrics:

  1. Probability of Sufficiency (PS): The likelihood of the predicted outcome given the presence of a factor.
  2. Probability of Necessity (PN): The likelihood that a factor was present given that the outcome occurred.
Figure 1: Visualizing necessity and sufficiency in the LENS framework.

The core contribution is the LENS algorithm, which is sound and complete. Unlike stochastic methods, LENS exhaustively searches the factor space to find "$\tau$-minimal" sufficient factors—the most concise sets of features meeting a user-defined sufficiency threshold. The authors prove that existing methods like Shapley values and Anchors are actually special cases of this unified framework.

Empirical Evaluation and Results

The authors evaluated LENS against standard benchmarks including German Credit (tabular), SpamAssassins (text), and IMDB (sentiment analysis).

Better Sparsity and Efficiency

In comparisons with SHAP on the German Credit and SpamAssassins datasets, LENS identified feature sets with significantly higher sufficiency at the same levels of sparsity. As shown in the performance plots, LENS consistently achieves a higher "degree" of explanation for lower cardinalities compared to SHAP.

Figure 2: Comparison of LENS and SHAP across Credit and Spam datasets.

Reliability and Recourse

Beyond sparsity, LENS demonstrates superior reliability. While the popular Anchors algorithm failed to meet its own sufficiency thresholds on 14% of samples in the German Credit test due to its stochastic nature, LENS guaranteed 100% compliance. Furthermore, when compared to DiCE for algorithmic recourse, LENS consistently found lower-cost paths to successful outcomes by searching for intervention targets rather than just shifting feature values.

Discussion and Future Work

LENS provides a "Rosetta Stone" for XAI, allowing practitioners to understand the trade-offs between different explanation types. It also supports Structural Causal Models (SCMs), enabling "causal recourse" that propagates interventions through a causal graph for more realistic explanations.

The primary limitation is computational complexity, as enumerating feature subsets is NP-hard. While feasible for 10-20 features using pruning techniques, future work will focus on scalable approximations and domain-specific abstractions (like word embeddings) to handle high-dimensional data like images without sacrificing theoretical rigor.

Summary updated

BibTeX
@article{watson2022local,
  author = {David Watson and Limor Gultchin and Ankur Taly},
  title = {{Local Explanations via Necessity and Sufficiency: Unifying Theory and Practice}},
  journal = {Minds Mach.},
  year = {2022},
  doi = {10.1007/s11023-022-09598-7},
}
Figure