A Formal Approach to Explainability

Lior Wolf, Tomer Galanti, Tamir Hazan

Abstract

Explainable AI (XAI) has traditionally relied on qualitative, human-centric evaluations that lack mathematical rigor. This paper addresses this gap by proposing a formal framework for explainability based on the properties of consistency, validity, and completeness. We demonstrate that explainability is a structural property that propagates across neural network layers and prove that valid explanations—those sufficient to recover a model's prediction—are mathematically complete. This work provides a theoretical foundation for common XAI techniques, such as gradient-based saliency, and introduces an "arithmetic" for combining explanations.

Introduction

Deep neural networks are often criticized as "black boxes" due to the opacity of their internal decision-making processes. While various Explanation Functions (EFs), such as saliency maps or textual justifications, have been developed to mitigate this, their evaluation remains largely subjective. Most research judges an explanation by whether it "looks right" to a human observer rather than its mathematical relationship to the model's internal state. This paper seeks to move XAI from heuristic-based approaches to a rigorous mathematical foundation, asking how we can formally define a "good" explanation and how such explanations relate to the learned representations of a model.

A Formal Framework for Explanations

The authors propose a formal model where an explanation is defined as a "blending" of the input ($x$) and the model's output ($h(x)$). This relationship is captured in the following diagram:

Formal model of an explanation function $g$ as a blending of input $x$ and output $h(x)$.

In this framework, $f(x)$ represents the internal state or activation of a specific layer, and $h(x)$ is the final output. The explanation function $g(x, h(x))$ synthesizes information from both the input and the decision to provide a justification. To evaluate these explanations, the paper introduces four key definitions:

  • Consistency: A representation is consistent with an EF if similar explanations imply similar internal states.
  • Explainability: The reverse of consistency—if two inputs have similar internal representations, they should produce similar explanations.
  • Validity: An explanation is valid if the model's original label can be predicted solely from the explanation.
  • Completeness: An explanation is complete if it captures all information from the input relevant to the model's decision.

Theoretical Insights and Results

The formalization allows for the derivation of several significant theorems regarding the behavior of explanations in layered architectures:

Property Propagation

One of the most significant insights is that explainability is not isolated to a single layer. The authors prove that if the activations of a specific layer are consistent with an explanation, then all subsequent (downstream) layers are also consistent (Theorem 1 & 2). Conversely, if a layer is explainable, all previous (upstream) layers share that property. This suggests that explainability is a structural feature of the network's path, preserved under Lipschitz continuity conditions.

Validity and Completeness

The authors establish a "Valid $\implies$ Complete" theorem (Theorem 4). Specifically, they provide a quantitative bound showing that a valid explanation (with low error $\epsilon_0$) is $(\epsilon, \alpha)$-complete. If an explanation is sufficient to recover the model's prediction, it mathematically follows that it has captured all relevant information from the input.

The Arithmetic of Explanations

The paper introduces the concept of performing operations on explanations using "Intersection" and "Union" operators. This allows researchers to theoretically combine simple explanations into complex ones or identify the common ground between different explanatory methods. For instance, Theorem 5 proves that the intersection of a valid explanation and a complete explanation results in a new valid explanation.

Formalizing Saliency

As a case study, the authors apply their framework to multiclass neural networks where the explanation is the gradient of the output. Theorem 3 formally links gradient-based explanations to learned representations, justifying why the derivative of the output with respect to the input is a mathematically sound way to "explain" a representation.

Conclusion and Future Work

While this framework provides a robust mathematical basis for XAI, it does not yet account for the "human element"—the subjective understandability of an explanation. A mathematically complete explanation might still be unintelligible to a person. Additionally, the framework primarily focuses on "outcome explanations" (specific predictions) rather than "global explanations" of general model behavior. Future work remains in bridging these gaps and in the practical, algorithmic implementation of the proposed "EF Operators." Nonetheless, by establishing formal bounds and propagation properties, this work moves the field closer to a principled science of explainability.

Summary updated

BibTeX
@inproceedings{wolf2019formal,
  author = {Lior Wolf and Tomer Galanti and Tamir Hazan},
  title = {{A Formal Approach to Explainability}},
  booktitle = {AIES},
  year = {2019},
  doi = {10.1145/3306618.3314260},
}
Figure