NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Hard to Explain: On the Computational Hardness of In-Distribution Model Interpretation

Guy Amir, Shahaf Bassan, Guy Katz

Introduction

In the field of eXplainable AI (XAI), a common piece of "folklore" suggests that simple models—such as decision trees or linear classifiers—are inherently more interpretable because we can compute explanations for them quickly. However, this intuition often ignores a critical factor: the data distribution. This paper provides a rigorous theoretical analysis demonstrating that the computational cost of explaining a model is not just a function of the model itself, but is heavily dictated by the complexity of the data distribution it operates within.

The Problem: Social Alignment vs. Computational Efficiency

Most explanation methods, such as counterfactuals ("What is the smallest change needed to flip this prediction?") or feature importance, rely on perturbing input data. A significant issue arises when these perturbations create "Out-of-Distribution" (OOD) samples—inputs that are mathematically possible but practically impossible in the real world.

Explanations derived from OOD samples are often "socially misaligned," providing technically accurate but practically useless or misleading information to human users. To remedy this, researchers use OOD detectors to ensure that explanations remain "socially aligned" (in-distribution). This paper asks a fundamental question: Does the requirement for social alignment turn the "easy" task of explaining a simple model into a computationally "hard" problem?

A Formal Framework for Explanations

The authors utilize Computational Complexity Theory and Second-Order Logic (SOL) to analyze the hardness of generating explanations. They define a unified mathematical framework for three primary types of explanation queries:

  1. Minimum Sufficient Reason (MSR): Identifying the smallest set of features that guarantees a specific prediction.
  2. Minimum Change Required (MCR): Finding the smallest perturbation needed to change a model's output (counterfactuals).
  3. Count Completions (CC): Determining how many ways a partial input can result in a specific prediction.

To represent the data distribution, they introduce a context indicator (denoted as $\pi$), which acts as a binary OOD detector. An explanation is only considered valid if it satisfies $\pi$, ensuring it remains within the relevant data distribution.

Key Insights: The Distribution Dominates

The paper’s most significant finding is that the complexity of the OOD detector effectively "swallows" the simplicity of the base model. If a simple decision tree is paired with a complex neural network acting as the OOD detector, the task of explaining that tree becomes as computationally difficult as explaining the neural network itself.

The Perceptron Paradox

Linear classifiers, or Perceptrons, are traditionally viewed as the gold standard for interpretability. However, the authors prove that Perceptrons are not self-aligned. This means that to generate a socially aligned explanation for a Perceptron, one might require a more expressive model (like a Multi-Layer Perceptron) to define the distribution. Paradoxically, this makes the "simple" Perceptron much harder to interpret than previously assumed.

Self-Alignment in FBDDs and MLPs

In contrast to Perceptrons, Free Binary Decision Diagrams (FBDDs) and Multi-Layer Perceptrons (MLPs) are found to be self-aligned. These model classes are expressive enough to incorporate the distribution logic directly into their structure. Consequently, their complexity does not necessarily jump when alignment is required, as they can represent both the classifier and the distribution logic within the same complexity class.

Summary of Complexity Results

The authors demonstrate several "complexity jumps" when alignment is introduced:

  • FBDDs: While finding the Minimum Change Required (MCR) for an FBDD is normally efficient (PTIME), pairing it with an MLP-based OOD detector causes the problem to jump to NP-complete.
  • Linear Classifiers: While MCR for a single Perceptron is in PTIME, finding an MCR for a Perceptron aligned with another Perceptron is NP-complete.
  • General Hardness: For any model class that is "naively constructible" (including MLPs), generating an aligned explanation is at least as hard as interpreting the OOD detector itself.

Limitations and Future Directions

This research focuses on worst-case complexity and binary context indicators. The authors acknowledge that in practice, some "hard" problems may have efficient average-case solutions. Furthermore, real-world distributions are often probabilistic rather than binary.

Future work may involve extending this framework to probabilistic explanation forms, such as $\delta$-relevant sets, and exploring the relationship between Kolmogorov complexity and explanation length. By moving from folklore to mathematical rigor, this paper establishes a new foundation for understanding the true cost of interpretability in machine learning.

Summary updated

BibTeX
@inproceedings{amir2024hard,
  author = {Guy Amir and Shahaf Bassan and Guy Katz},
  title = {{Hard to Explain: On the Computational Hardness of In-Distribution Model Interpretation}},
  booktitle = {ECAI},
  year = {2024},
  url = {https://openreview.net/forum?id=SdILfdxE8z},
}
Figure