The Shape of Explanations: A Topological Account of Rule-Based Explanations in Machine Learning

Brett MullinsarXiv 2023

TL;DR

This paper introduces a formal topological framework to explain why rule-based explanation methods (like Anchors or LORE) work across different machine learning models. By defining explainability as a topological property, the author proves that common model types—including voting ensembles like Random Forests—are inherently explainable and provides design principles for creating more robust explanation algorithms.

What Problem Does This Paper Address?

In the field of Explainable AI (XAI), rule-based explanations are popular because they provide simple, human-readable "if-then" conditions for a model's decision. However, the field lacks a unified theoretical foundation. Practitioners use various shapes for explanations (rectangles, balls, etc.) and different algorithms, but there is no clear mathematical definition of what it actually means for a classifier to be "explainable."

The author seeks to bridge this gap by answering: What are the necessary mathematical conditions for a rule-based explanation to exist? And why do these heuristic algorithms seem to work on almost any "black-box" model?

Methods

The paper shifts the perspective from algorithmic heuristics to Point-Set Topology. The core methodology involves three new definitions:

  1. Scalable Rules: The author defines a "rule" as a predicate that defines a region in feature space. For these to be useful, they must be "scalable"—meaning they can cover the entire space and can be refined to be as small as needed. Mathematically, these rules act as a topological basis.
  2. Explanation Schemes: An explanation is formalized as a tuple $(X, \phi, \mu)$, where $X$ is the feature space, $\phi$ is the rule type (the "shape"), and $\mu$ is a measure of "coverage" (how much of the data the rule accounts for).
  3. Topological Explainability: A classifier is defined as "explainable" if the regions it assigns to each label are composed of an "open set" (in the explanation topology) plus a negligible set of "edge cases." Edge cases are defined strictly as sets that are both topologically "meagre" and measure-theoretically "null."

Datasets

Not discussed in the paper. As this is a theoretical work focusing on mathematical proofs and framework definitions, no empirical datasets or benchmarks were used.

Key Insights and Ideas

  • Explainability as a Topological Property: The most significant insight is that explainability isn't just a feature of an algorithm, but an inherent property of the classifier's decision geometry relative to a chosen topology. If a model's decision boundaries are "well-behaved," it is mathematically guaranteed to be explainable.
  • The "In-the-Wild" Conjecture: The author posits that almost all classifiers used in real-world applications satisfy this topological definition of explainability. Pathological cases (like a classifier that assigns labels based on whether a number is rational or irrational) are the only ones that fail, and these don't occur in practical ML.
  • Ensembles Preserve Explainability: The paper provides a formal proof (Theorem 2) that if individual classifiers are explainable, a voting ensemble (like a Random Forest) is also explainable. This provides a theoretical justification for why we can successfully explain complex ensemble models.
  • Shape Equivalence: A surprising takeaway for practitioners is that the specific "shape" of an explanation (e.g., a hyper-rectangle vs. a hyper-sphere) doesn't matter as long as they generate the same topology. In continuous spaces, boxes and balls are theoretically interchangeable.

Key Results

  • Theorem 1 (Characterization): Provides the "if and only if" condition for explainability, linking the existence of local explanations to the open-set structure of the classifier’s preimages.
  • Design Principle for Unbounded Features: The author derives a practical rule: if you don't know the probability distribution of your data and your features are unbounded, your explanation rules must be bounded (i.e., they must specify both a floor and a ceiling for features) to remain meaningful.
  • Model Agnosticism: The framework suggests that rule-based XAI methods are truly model-agnostic because explainability depends on the topology of the feature space, not the internal functional form of the model (e.g., neural net vs. SVM).

Limitations and Future Work

  • Coverage Guarantees: The author notes that requiring an explanation to cover at least $X\%$ of the data (a common practical requirement) actually breaks the mathematical "scalable rule" definition. Finding a way to integrate minimum coverage without destroying the topological structure is an open problem.
  • Fuzzy Explanations: Most current XAI tools allow for some "noise" (e.g., a rule that is 95% accurate rather than 100%). The current topological framework struggles with these "fuzzy" explanations because the resulting sets can become arbitrarily complex, moving beyond simple open sets.
  • User Preference: The framework defines what is explainable but doesn't yet account for which explanation a human would prefer (e.g., a shorter rule vs. a more accurate one).

Summary updated

BibTeX
@misc{mullins2023shape,
  author = {Brett Mullins},
  title = {{The Shape of Explanations: A Topological Account of Rule-Based Explanations in Machine Learning}},
  year = {2023},
  eprint = {2301.09042},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2301.09042},
}
Figure