A Formal Approach to Explainability

Lior Wolf, Tomer Galanti, Tamir Hazan

TL;DR

This paper moves "Explainable AI" (XAI) from subjective heuristics to a rigorous mathematical framework. By defining formal properties like consistency, validity, and completeness, the authors prove that if a specific layer in a neural network is explainable, that property naturally propagates to other layers, and they demonstrate that valid explanations are inherently complete.

What Problem Does This Paper Address?

Machine learning models, particularly deep neural networks, are often treated as "black boxes." While we can see the input and the output, the internal "reasoning" remains opaque. To solve this, researchers have developed various Explanation Functions (EFs)—like saliency maps that highlight parts of an image or textual justifications.

However, most XAI research is qualitative: we judge an explanation by whether it "looks right" to a human. This paper addresses the lack of a formal, mathematical foundation for explainability. It asks: How can we formally define what makes an explanation "good"? How do these explanations relate to the internal representations (the activations) of the model? And if one part of a model is explainable, what does that say about the rest of the architecture?

Methods

The authors propose a formal model where an explanation is a "blending" of the input ($x$) and the model's output ($h(x)$). They introduce several key definitions to evaluate this blend:

  • 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 you can actually predict the model's original label just by looking at the explanation.
  • Completeness: An explanation is complete if it captures all information from the input that is relevant to the model's decision, leaving nothing "on the table."

The authors then use these definitions to prove theorems about how these properties behave in layered architectures (like Deep Learning) and how they apply to common XAI techniques like gradient-based saliency.

Datasets

Not discussed in the paper. This is a purely theoretical paper focused on establishing mathematical proofs and definitions rather than empirical benchmarking on specific datasets.

Key Insights and Ideas

  • Property Propagation: One of the most significant insights is that explainability isn't 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. Conversely, if a layer is explainable, all previous (upstream) layers share that property.
  • Validity Implies Completeness: The authors prove a "Valid $\implies$ Complete" theorem. If an explanation is sufficient to recover the model's prediction (validity), it mathematically follows that the explanation has captured all relevant information from the input (completeness).
  • The "Arithmetic" of Explanations: The paper introduces the idea that we can perform operations on explanations. By using "Intersection" and "Union" operators, researchers can theoretically combine simple, elementary explanations into complex ones or find the common ground between two different explanatory methods.
  • Formalizing Saliency: They provide a case study on multiclass neural networks where the explanation is the gradient of the output. They prove that in these common cases, the internal representation is "second-order explainable," providing a theoretical link between the popular practice of using gradients for heatmaps and the model's internal logic.

Key Results

  • Theorem 1 & 2: Established that consistency and explainability are preserved across layers under Lipschitz continuity conditions. This means explainability is a structural property of the network's path, not just a fluke of one layer.
  • Theorem 3: Formally linked 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.
  • Theorem 4: Provided a quantitative bound showing that a valid explanation (with low error $\epsilon_0$) is $(\epsilon, \alpha)$-complete.
  • Theorem 5: Proved that the intersection of a valid explanation and a complete explanation results in a new valid explanation.

Limitations and Future Work

  • The Human Element: The authors acknowledge that while they can formalize the mathematical properties of an explanation, they cannot yet formalize what makes an explanation "understandable" to a human. An explanation could be mathematically "complete" but still look like noise to a person.
  • Practical Implementation: The "EF Operators" (Intersection and Union) are introduced theoretically. The authors leave the practical, algorithmic construction of these combined explanations for future research.
  • Local vs. Global: The framework primarily focuses on "outcome explanations" (explaining a specific prediction for a specific input) rather than "global explanations" (explaining how the model works in general across all possible inputs).

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