Probabilistic Explanations for Linear Models1

Bernardo Subercaseaux r⃝ bersub@cmu.eduMarcelo Arenas r⃝ marenas@ing.puc.cl
IMFD Chile
RelationalAIKuldeep S. Meel r⃝ meel@cs.toronto.edu
University of Toronto


Abstract

Formal XAI is an emerging field that focuses on providing explanations with mathematical guarantees for the decisions made by machine learning models. A significant amount of work in this area is centered on the computation of “sufficient reasons”. Given a model \(\mathcal{M}\) and an input instance \({\boldsymbol{x}}\), a sufficient reason for the decision \(\mathcal{M}({\boldsymbol{x}})\) is a subset \(S\) of the features of \({\boldsymbol{x}}\) such that for any instance \({\boldsymbol{z}}\) that has the same values as \({\boldsymbol{x}}\) for every feature in \(S\), it holds that \(\mathcal{M}({\boldsymbol{x}}) = \mathcal{M}({\boldsymbol{z}})\). Intuitively, this means that the features in \(S\) are sufficient to fully justify the classification of \({\boldsymbol{x}}\) by \(\mathcal{M}\). For sufficient reasons to be useful in practice, they should be as small as possible, and a natural way to reduce the size of sufficient reasons is to consider a probabilistic relaxation; the probability of \(\mathcal{M}({\boldsymbol{x}}) = \mathcal{M}({\boldsymbol{z}})\) must be at least some value \(\delta \in (0,1]\), for a random instance \({\boldsymbol{z}}\) that coincides with \({\boldsymbol{x}}\) on the features in \(S\). Computing small \(\delta\)-sufficient reasons (\(\delta\)-SRs) is known to be a theoretically hard problem; even over decision trees — traditionally deemed simple and interpretable models — strong inapproximability results make the efficient computation of small \(\delta\)-SRs unlikely. We propose the notion of \((\delta, \epsilon)\)-SR, a simple relaxation of \(\delta\)-SRs, and show that this kind of explanations can be computed efficiently over linear models.

1 Introduction↩︎

Explaining the decisions of Machine Learning classifiers is a fundamental problem in XAI (Explainable AI), and doing so with formal mathematical guarantees on the quality, size, and semantics of the explanations is in turn the core of Formal XAI [1]. Within formal XAI, one of the most studied kinds of explanations is that of sufficient reasons [2], which aim to explain a decision \(\mathcal{M}({\boldsymbol{x}}) = 1\) by presenting a subset \(S\) of the features of the input \({\boldsymbol{x}}\) that implies \(\mathcal{M}({\boldsymbol{z}}) = 1\) for any \({\boldsymbol{z}}\) that agrees with \({\boldsymbol{x}}\) on \(S\). In the language of theoretical computer science, these correspond to certificates for \(\mathcal{M}({\boldsymbol{x}})\).

Example 1. Consider a binary classifier \(\mathcal{M}\) defined as \[\mathcal{M}({\boldsymbol{x}}) = \left(x_1 \lor \overline{x_3}\right) \land \left(x_2 \lor \overline{x_1}\right) \land \left(x_4 \lor x_3\right),\] and the input instance \({\boldsymbol{x}}= \left( 1, \, 1, \, 0, \, 1 \right)\). We can say that \(\mathcal{M}({\boldsymbol{x}})\) “because” \(x_1 = 1, x_2 = 1\), and \(x_4 = 1\), as they are sufficient to determine the value of \(\mathcal{M}({\boldsymbol{x}})\) regardless of \(x_3\).

Let us start formalizing the framework for our work. First, we consider binary boolean models \(\mathcal{M}\colon \{0, 1\}^d \to \{0, 1\}\). Despite our domain being binary, we will need a third value, \(\bot\), to denote “unknown” values. For example, we may represent a person who does have a car, does not have a house, and for whom we do not know if they have a pet or not, as \(\left(1, \, 0, \, \bot\right)\). We say elements of \(\{0, 1, \bot\}^d\) are partial instances, while elements of \(\{0, 1\}^d\) are simply instances. To illustrate, in 1 we used the partial instance \({\boldsymbol{y}}= \left(1, \, 1, \, \bot, \, 1 \right)\) to explain \(\mathcal{M}({\boldsymbol{x}}) = 1\). We use the notation \({\boldsymbol{y}}\subseteq {\boldsymbol{x}}\) to denote that the (partial) instance \({\boldsymbol{x}}\) “fills in” values of the partial instance \({\boldsymbol{y}}\); more formally, we use \({\boldsymbol{y}}\subseteq {\boldsymbol{x}}\) to mean that \(y_i = \bot \lor y_i = x_i\) for every \(i \in [d]\). Finally, for any partial instance \({\boldsymbol{y}}\) we denote by \(\mathop{\mathrm{Comp}}({\boldsymbol{y}})\) the set of instances \({\boldsymbol{x}}\) such that \({\boldsymbol{y}}\subseteq {\boldsymbol{x}}\), thinking of \(\mathop{\mathrm{Comp}}({\boldsymbol{y}})\) as the set of completions of \({\boldsymbol{y}}\). One can define sufficient reasons as follows with this notation.

Definition 1 (Sufficient Reason [2]). We say \({\boldsymbol{y}}\) is a sufficient reason* for \({\boldsymbol{x}}\) if for any completion \({\boldsymbol{z}}\in \mathop{\mathrm{Comp}}({\boldsymbol{y}})\) it holds that \(\mathcal{M}({\boldsymbol{x}}) = \mathcal{M}({\boldsymbol{z}})\).*

A crucial factor for the helpfulness of sufficient reasons as explanations is their size; even though \({\boldsymbol{x}}\) is always a sufficient reason for its own classification, we long for explanations that are much smaller than \({\boldsymbol{x}}\) itself. [3], for instance, goes on to say that explanations consisting of more than \(9\) features are probably too large for human stakeholders. In general, empirical research suggests that explanations ought to be small [4], [5]. There are several ways of formalizing the succinctness we desire for sufficient reasons:

  • (Minimum Size) For a sufficient reason \({\boldsymbol{y}}\), we define its explanation size \(|{\boldsymbol{y}}|_e\) as the number of defined features in \({\boldsymbol{y}}\), or equivalently, \(|{\boldsymbol{y}}|_e := d - |{\boldsymbol{y}}|_\bot\), where \(|{\boldsymbol{y}}|_\bot\) is the number of features of \({\boldsymbol{y}}\) taking \(\bot\). See e.g., [6].2

  • (Subset minimality) We say a sufficient reason \({\boldsymbol{y}}\) for a pair \((\mathcal{M}, {\boldsymbol{x}})\) is minimal if there is no other sufficient reason \({\boldsymbol{y}}'\) for \((\mathcal{M}, {\boldsymbol{x}})\) such that \({\boldsymbol{y}}' \subsetneq {\boldsymbol{y}}\). In fact, the original definition of sufficient reasons of [2] includes minimality as a requirement, and so is the case under the “abductive explanation” naming [7].

  • (Relative to average explanation) [8] compute explanations that are small relative to the “certificate complexity” of the classifier \(\mathcal{M}\), meaning the average size of the minimum sufficient reason where the average is taken over all possible instances \({\boldsymbol{x}}\).

Nevertheless, there is a path toward even smaller explanations: probabilistic sufficient reasons [9], [10]. As will be shown in Example 2., and is noted as a remark by [8], these can be arbitrarily smaller than minimum size sufficient reasons.

2 Probabilistic Sufficient Reasons↩︎

The main idea of probabilistic sufficient reasons is to relax the condition “all completions of the explanation \({\boldsymbol{y}}\) have the same class as \({\boldsymbol{x}}\) to “a random completion of \({\boldsymbol{y}}\) has the same class as \({\boldsymbol{x}}\) with high probability”.

Let us use notation \({\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})\) to denote that \({\boldsymbol{z}}\) is a completion of \({\boldsymbol{y}}\) drawn uniformly at random. With this notation we can define \(\delta\)-sufficient reasons:3

Definition 2 ([9]). For any \(\delta \in [0, 1]\), a \(\delta\)-sufficient reason (\(\delta\)-SR) for an instance \({\boldsymbol{x}}\), is a partial instance \({\boldsymbol{y}}\subseteq {\boldsymbol{x}}\) such that \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}\big[\mathcal{M}({\boldsymbol{z}}) = \mathcal{M}({\boldsymbol{x}})\big] \geq \delta.\]

Naturally, a minimum \(\delta\)-SR is a \(\delta\)-SR of minimum size. Note immediately that 2 and 1 coincide when \(\delta = 1\).

2.1 The size of \(\delta\)-SRs↩︎

Interestingly, even a \(0.999999\)-SR can be arbitrarily smaller, in terms of defined features, than the smallest sufficient reason (i.e., \(1\)-SR) for a pair \((\mathcal{M}, {\boldsymbol{x}})\), even when \(\mathcal{M}\) is a linear model, as we will illustrate in 2. Before providing the example, let us define linear models.

Definition 3. A (binary) linear model \(\mathcal{L}\) of dimension \(d\) is a pair \(({\boldsymbol{w}}, t)\), where \({\boldsymbol{w}}\in \mathbb{Q}^d\) and \(t \in \mathbb{Q}\). Its classification over an instance \({\boldsymbol{x}}\) is defined simply as \[\mathcal{L}({\boldsymbol{x}}) = \begin{cases} 1 & \text{if } {\boldsymbol{x}}\cdot {\boldsymbol{w}}\geq t\\ 0 & \text{otherwise}. \end{cases}\]

Example 2. Consider a linear model \(\mathcal{L}\) of dimension \(d= 1000\) with parameters \(t = 1250\) and \[{\boldsymbol{w}}= ( 1000, \, 1, \, 1, \, 1, \, 1, \, \ldots, \, 1 ).\] Let the instance \({\boldsymbol{x}}\) be \(( 1, \, 1, \, 1, \, 1, \, 1, \, \ldots, \, 1 ),\) so that clearly \(\mathcal{L}({\boldsymbol{x}}) = 1\). One can easily see that any \(1\)-SR for \({\boldsymbol{x}}\) under \(\mathcal{L}\) has size \(251\), as it must include the first feature and any \(250\) other features. However, if we consider \({\boldsymbol{y}}= ( 1, \, \bot, \, \bot, \, \bot, \ldots, \, \bot )\), then a simple application of the Chernoff-Hoeffding concentration bound (in the appendix for the completeness) gives that \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}\Big[ \mathcal{L}({\boldsymbol{z}}) = 1\Big] \geq 0.999999.\] This suggests that we might say \(\mathcal{L}({\boldsymbol{x}}) = 1\) “because” \(x_1 = 1\); formally, \({\boldsymbol{y}}\) is a \(0.999999\)-SR, and \(251\) times smaller than any \(1\)-SR for \(\mathcal{L}({\boldsymbol{x}})\).

3 Approximating \(\delta\)-Sufficient Reasons↩︎

Unfortunately, computing small \(\delta\)-SRs is computationally challenging, even when attempting to find approximate solutions. Let us contextualize our main result by summarizing first what is known about the complexity of computing \(\delta\)-SRs and their deterministic predecessors, \(1\)-SRs.

[6] showed that computing a minimum \(1\)-SR is \(\Sigma_2^p\)-hard for neural networks, \(\mathrm{NP}\)-hard for decision trees, and polynomial-time solvable for linear models. Then, [9] showed that computing minimum \(\delta\)-SRs for neural networks is hard for \(\mathrm{NP}^{\mathrm{PP}}\), and [12] proved that even for the restricted class of decision trees, which are usually considered interpretable, minimum \(\delta\)-SRs cannot be computed in polynomial time unless \(\mathrm{P}= \mathrm{NP}\) (and neither can subset-minimal \(\delta\)-SRs for \(\delta < 1\), in contrast to the \(\delta = 1\) setting which is in \(\mathrm{P}\) [13], [14]). For linear models, even computing the value \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}\big[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})\big]\] exactly is \(\mathrm{\#P}\)-hard [6], from where the following is easy to show.45

Proposition 1. Given a linear model \(\mathcal{L}\), an instance \({\boldsymbol{x}}\), and \(\delta \in [0,1]\), the size of the smallest \(\delta\)-SR for \((\mathcal{L}, {\boldsymbol{x}})\) cannot be computed in polynomial time unless \(\mathrm{FP}= \mathrm{\#P}\).

Furthermore, the situation does not improve if we aim to efficiently approximate the value \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{M}, {\boldsymbol{x}}, \delta)\). [9] studied general classifiers (e.g., neural networks) and showed that no algorithm can achieve an approximation factor of \(d^{1-\alpha}\) for this problem, where \(d\) is the dimension of the classifier and \(\alpha > 0\), unless \(\mathrm{P}= \mathrm{NP}\). [16] proved that this approximation task is also hard for decision trees.

However, these hardness results do not preclude the existence of efficient algorithms for computing or approximating \(\delta\)-SR for linear models. Hence, the goal of this section is to explore these questions for such models, given their practical importance.

3.1 A Simple Relaxation: \((\delta, \varepsilon)\)-min-SR↩︎

In light of the hardness results for \(\delta\)-SRs, it is natural to consider a further relaxation that would allow for tractability. Consider for instance a customer of a bank who wants a \(0.95\)-SR for why their application for a loan was rejected. Such an explanation would consist of a small number of features of their application profile that are relevant to the decision since \(95\%\) of applicants with such a profile would also get rejected. We expect that, in such a scenario, the user would not particularly care if the explanation she obtains holds for \(95\%\) of potential applicants or for \(94.9997\%\) of them. In other words, the value of \(\delta\) is chosen in a trade-off between the size of the explanation and the desired level of confidence or “explanation power”. We posit that in such a trade-off, the user is more sensitive to increases in the explanation size than they are to a minor perturbation in \(\delta\), the probability guarantee. This motivates the following definition:

Definition 4 (\((\delta, \varepsilon)\)-min-SR). Given a model \(\mathcal{M}\), an instance \({\boldsymbol{x}}\), and values \(\delta, \varepsilon \in (0, 1)\), we say a partial instance \({\boldsymbol{y}}\) of size is a \((\delta, \varepsilon)\)-min-SR if there exists a value \(\delta^\star \in [\delta - \varepsilon, \delta + \varepsilon]\) such that \({\boldsymbol{y}}\) is a minimum \(\delta^\star\)-SR for \({\boldsymbol{x}}\) under \(\mathcal{M}\).

Note that, even though the guarantee of a \((\delta, \varepsilon)\)-min-SR is symmetric around \(\delta\), our definition is such that the ability of efficiently computing \((\delta, \varepsilon)\)-min-SRs is enough for the following two tasks:

  1. A user wants an explanation as small as possible and of probability “close” to \(\delta\). Then, by computing a \((\delta-\varepsilon/2, \varepsilon/2)\)-min-SR, they obtain an explanation whose probability guarantee is at most \(\varepsilon\) away from \(\delta\), and is no larger in size than the minimum \(\delta\)-SR.

  2. The owner of the model wants to offer a \(\delta\)-SR that is as small as possible to a customer, and they want to be strict on the \(\delta\) part, since offering a \((\delta - \varepsilon)\)-SR would be misleading and could lead to legal issues. Then, by computing a \((\delta+\varepsilon/2, \varepsilon/2)\)-min-SR, they can guarantee that the explanation is at least \(\delta\)-SR, while still being likely much smaller than a minimum \(1\)-SR.

The inapproximability result of [16] can be translated to the \((\delta, \varepsilon)\)-min-SR problem as follows:

Theorem 1 ([16], Theorem 1). Unless \(\mathrm{SAT}\) can be solved in quasi-polynomial time, one cannot compute a \((\delta, \varepsilon)\)-min-SR for decision trees in polynomial time, and furthermore, any polynomial-time algorithm that guarantees to provide a \(\delta'\)-SR for some \(\delta' \in [\delta-\varepsilon, \delta+\varepsilon]\) will produce explanations that are up to \(\Omega(d^{1-\alpha})\) times larger than any \((\delta, \varepsilon)\)-min-SR, for any \(\alpha > 0\).

Note that this hardness result for decision trees implies in turn hardness for neural networks by using standard compilation techniques [6]. Our main result is that, for linear models, we can efficiently compute \((\delta, \varepsilon)\)-min-SRs, making them the first class of models for which we have such a positive result. To state our runtime more cleanly, we use the standard notation \(\widetilde{O}(f)\) to mean \(O(f \cdot \log(f)^c)\) for some constant \(c \in \mathbb{R}\).

Theorem 2. Given a linear model \(\mathcal{L}\) and an input \({\boldsymbol{x}}\), we can compute a \((\delta, \varepsilon)\)-min-SR successfully with probability \(1 - \gamma\) in time \(\widetilde{O}\left( \frac{d}{\varepsilon^2\gamma^2}\right)\); that is, polynomial in \(d\), \(1/\varepsilon\), and \(1/\gamma\).

We remark that previous approaches for computing approximate probabilistic explanations lacked theoretical guarantees on the size of the explanations produced [11], [15], [17].

In order to prove 2 we will need two main ideas: (i) the fact that we can estimate the probabilities of models accepting a partial instance through Monte Carlo sampling6, and (ii) that under the uniform distribution it is easy to decide which features ought to be part of small explanations.

3.2 Estimating the Probability of Acceptance↩︎

The hardness of computing \(\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}[\mathcal{M}({\boldsymbol{z}}) = 1]\) is about computing it to arbitrarily high precision, i.e., with an additive error within \(O(2^{-d})\). However, computing a less precise estimation of \(\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}[\mathcal{M}({\boldsymbol{z}}) = 1]\) is simple, as the next fact (which is a direct consequence of [18]’s inequality) states.

Fact 1. Let \(f\) be an arbitrary boolean function on \(n\) variables. Let \(M\) be any positive integer, and let \({\boldsymbol{x}}_1, \ldots, {\boldsymbol{x}}_M\) be \(M\) uniformly random samples from \(\{0, 1\}^n\). Then \[\widehat{\mu}(M) := \frac{\sum_{i=1}^M [f({\boldsymbol{x}}_i) = 1]}{M}\] is an unbiased estimator for \[\mu := \Pr_{{\boldsymbol{x}}\in \{0, 1\}^n}[f({\boldsymbol{x}}) = 1],\] and \[\Pr[\left|\widehat{\mu}(M) - \mu \right| \leq t] \geq 1 - 2\exp(-2t^2 M),\] which is at least \(1 - \gamma\) for \(M = \frac{1}{2t^2} \log(2/\gamma)\).

As a consequence of the previous idea, although a minimum \(\delta\)-SR might be hard to compute, this crucially depends on the value of \(\delta\). In order to deal with this, our algorithm will sample a value \(\delta^\star\) uniformly at random from \([\delta-\varepsilon, \delta+\varepsilon]\), and then compute a minimum \(\delta^\star\)-SR. Intuitively, the idea is that as \(\delta^\star\) is chosen at random, it will be unlikely that a value that makes the computation hard is chosen.

Before proving 2, we need to prove a lemma concerning the easiness of selecting the features of the desired explanation.

3.3 Feature Selection↩︎

Even if we were granted an oracle computing the probabilities \(\Pr_{{\boldsymbol{z}}\in \mathbf{D}({\boldsymbol{y}})}[\mathcal{M}({\boldsymbol{z}}) = 1]\), that would not be necessarily enough to efficiently compute a minimum \(\delta\)-SR. Indeed, for decision trees, the counting problem can be easily solved in polynomial time [6], and yet the computation of \(\delta\)-SRs of minimum size is hard, even to approximate [12], [16]. Intuitively, the problem for decision trees is that, even if we were told that the minimum \(\delta\)-SR has exactly \(k\) features, it is not obvious how to search for it better than enumerating all \(\binom{d}{k}\) subsets. The case of linear models, however, is different, at least under the uniform distribution. In this case, every feature \(i\) that is not part of the explanation will take value \(0\) or \(1\) independently with probability \(\frac{1}{2}\), and contribute to the classification according to its weight \(w_i\). In other words, we can sort the features according to their weights (with some care about signs), and select them greedily to build a small \(\delta\)-SR. A proof for the deterministic case (\(\delta = 1\)) was already given in [6] and sketched earlier on by [19].

Definition 5. Given a linear model \(\mathcal{L}= ({\boldsymbol{w}}, t)\), and an instance \({\boldsymbol{x}}\), both having dimension \(d\), we define the score* of feature \(i \in [d]\) as \[s_i := w_i \cdot (2x_i - 1) \cdot (2\mathcal{L}({\boldsymbol{x}}) - 1).\]*

In other words, the sign of \(s_i\) is \(+1\) if the feature is “helping” the classification, and \(-1\) if it is “hurting” it. The magnitude of \(s_i\) is proportional to the weight of the feature \(i\). Changing the value of feature \(i\) in an instance \({\boldsymbol{x}}\) would decrease \({\boldsymbol{w}}\cdot {\boldsymbol{x}}\) by \(s_i\) if \(\mathcal{L}({\boldsymbol{x}}) = 1\), and increase it by \(s_i\) if \(\mathcal{L}({\boldsymbol{x}}) = 0\). For the uniform distribution (or more generally, any distribution in which all features are Bernoulli variables with the same parameter), we can prove the following lemma that basically states that, for linear models it is good to choose features greedily according to their score.

Lemma 1. Given a linear model \(\mathcal{L}\), and an instance \({\boldsymbol{x}}\), if \({\boldsymbol{y}}^{(0)}, \ldots, {\boldsymbol{y}}^{(d)}\) are the partial instances of \({\boldsymbol{x}}\) such that \({\boldsymbol{y}}^{(k)} \subseteq {\boldsymbol{x}}\) is defined only in the top \(k\) features of maximum score, then \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k+1)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] \geq \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})]\] for all \(k \in \{0, \ldots, d-1\}\), and naturally, \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(d)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = 1.\] Moreover, \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta) = k\) if and only if \({\boldsymbol{y}}^{(k)}\) is a \(\delta\)-SR for \({\boldsymbol{x}}\), and either \(k = 0\) or \({\boldsymbol{y}}^{(k-1)}\) is not a \(\delta\)-SR for \({\boldsymbol{x}}\).

Even though a proof of 1 is presented in the appendix, let us provide a self-contained example that should convince a reader of the veracity of the lemma.

Example 3. Consider an instance \({\boldsymbol{x}}= (1,\, 0, \, 0, \, 1, \, 1)\) and the linear model \(\mathcal{L}\) be defined by \[{\boldsymbol{w}}= (5, \, 1, \, -3,\, 2, -1) \quad ; \quad t = 5.\] It is easy to check that \({\boldsymbol{w}}\cdot {\boldsymbol{x}}= 6\), and thus \(\mathcal{L}({\boldsymbol{x}}) = 1\). The feature scores, according to 5, are: \[s_1 = 5, \; s_2 = -1, \; s_3 = 3, \; s_4 = 2, \; s_5 = -1.\] For the first part, the main idea is that a positive score \(s_i\) means that the feature is helping the classification (i.e., adding it to a partial instance does not decrease its probability guarantee), while a negative score means that the feature is hurting the classification (i.e., adding it to a partial instance does not increase its probability guarantee). Because the partial instances \[{\boldsymbol{y}}^{(0)} \subseteq {\boldsymbol{y}}^{(1)} \subseteq \cdots {\boldsymbol{y}}^{(d)}\] are obtained by adding a single feature at a time, and thus features are added in decreasing order of their scores, then this procedure will have two phases: (i) First, it will add features with a positive score, which raise or maintain the probability of the classification being the same as \({\boldsymbol{x}}\), as the lemma says, and then (ii) it will start adding features with a negative score, which would seem to contradict the lemma, but it turns out that at that point the partial instance \({\boldsymbol{y}}^{(k)}\) would have probability guarantee \(1\); this is because \({\boldsymbol{y}}^{(d)} = {\boldsymbol{x}}\), which trivially has probability guarantee \(1\). 2 presents the probabilities associated to the partial instances \({\boldsymbol{y}}^{(0)}, \ldots, {\boldsymbol{y}}^{(d)}\).

For the second part, consider the partial instances \({\boldsymbol{y}}^{\star} = (\bot, \, 0, \, 0, \, 1, \, 1)\) and \({\boldsymbol{y}}^{\dagger} = (1, \, \bot, \, 0, \, 1, \, 1)\). The instance \({\boldsymbol{x}}\) is a completion of both \({\boldsymbol{y}}^{\star}\) and \({\boldsymbol{y}}^{\dagger}\), but \({\boldsymbol{y}}^{\star}\) also has completion \[{\boldsymbol{x}}^{\star} = (0, \, 0, \, 0, \, 1, \, 1),\] whereas \({\boldsymbol{y}}^{\dagger}\) has also completion \[{\boldsymbol{x}}^{\dagger} = (1, \, 1, \, 0, \, 1, \, 1).\] Note that \({\boldsymbol{w}}\cdot {\boldsymbol{x}}^{\star} = 1 = {\boldsymbol{w}}\cdot {\boldsymbol{x}}- s_1\), whereas \({\boldsymbol{w}}\cdot {\boldsymbol{x}}^{\dagger} = 6 = {\boldsymbol{w}}\cdot {\boldsymbol{x}}- s_2\). Intuitively, this means that it is better to keep feature \(1\) as part of the explanation, but not feature \(2\). If we want an explanation with only two features, we should choose feature \(1\) and feature \(3\), as they have the highest scores. Indeed, 1 presents the probabilities to all possible explanations of size \(2\).

Table 1: Table of probabilities associated to 3.
Partial instance Features included Probability
\((1, \,\bot, \,0, \,\bot, \,\bot)\) \(\{1, \,3\}\) \(\frac{ 7 }{ 8 }\)
\((1, \,\bot, \,\bot, \,1, \,\bot)\) \(\{1, \,4\}\) \(\frac{ 5 }{ 8 }\)
\((\bot, \,\bot, \,0, \,1, \,\bot)\) \(\{3, \,4\}\) \(\frac{ 1 }{ 2 }\)
\((\bot, \,\bot, \,0, \,\bot, \,1)\) \(\{3, \,5\}\) \(\frac{ 3 }{ 8 }\)
\((\bot, \,0, \,0, \,\bot, \,\bot)\) \(\{2, \,3\}\) \(\frac{ 3 }{ 8 }\)
\((1, \,\bot, \,\bot, \,\bot, \,1)\) \(\{1, \,5\}\) \(\frac{ 3 }{ 8 }\)
\((1, \,0, \,\bot, \,\bot, \,\bot)\) \(\{1, \,2\}\) \(\frac{ 3 }{ 8 }\)
\((\bot, \,\bot, \,\bot, \,1, \,1)\) \(\{4, \,5\}\) \(\frac{ 1 }{ 4 }\)
\((\bot, \,0, \,\bot, \,1, \,\bot)\) \(\{2, \,4\}\) \(\frac{ 1 }{ 4 }\)
\((\bot, \,0, \,\bot, \,\bot, \,1)\) \(\{2, \,5\}\) \(\frac{ 1 }{ 8 }\)
Table 2: Table of probabilities associated to 3. The last column denotes the score of the feature added to the partial instance in that row with respect to the previous row.
Partial instance Features Probability Score
\({\boldsymbol{y}}^{(0)}\) \((\bot, \,\bot, \,\bot, \,\bot, \,\bot)\) \(\frac{ 1 }{ 4 }\) -
\({\boldsymbol{y}}^{(1)}\) \((1, \,\bot, \,\bot, \,\bot, \,\bot)\) \(\frac{ 1 }{ 2 }\) 5
\({\boldsymbol{y}}^{(2)}\) \((1, \,\bot, \,0, \,\bot, \,\bot)\) \(\frac{ 7 }{ 8 }\) 3
\({\boldsymbol{y}}^{(3)}\) \((1, \,\bot, \,0, \,1, \,\bot)\) \(\frac{ 1 }{ 1 }\) 2
\({\boldsymbol{y}}^{(4)}\) \((1, \,0, \,0, \,1, \,\bot)\) \(\frac{ 1 }{ 1 }\) -1
\({\boldsymbol{y}}^{(5)}\) \((1, \,0, \,0, \,1, \,1)\) \(\frac{ 1 }{ 1 }\) -1

With 1 in hand, we can proceed to prove 2.

Figure 1: LinearMonteCarloExplainer
Figure 2: MonteCarloEstimation

Proof of 2. We use 1. Let us define the partial instances \({\boldsymbol{y}}^{(0)}, {\boldsymbol{y}}^{(1)} \ldots, {\boldsymbol{y}}^{(d)}\) so that \({\boldsymbol{y}}^{(k)} \subseteq {\boldsymbol{x}}\) is the partial instance defined only in the \(k\) features with maximum score (line [line:greedy]). We then define a sequence of values \(v_k\) as \[v_k := \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})],\] and note that due to 1, the sequence \(v_0, \ldots, v_d\) is non-decreasing. Let \(M = \frac{\log^2{d}}{2\varepsilon^2 \gamma^2} \log(2 \log d / \gamma)\), as in line [line:mdef], and let us define random variables \(\widetilde{v_k}\) as follows: if 1 enters line [line:montecarlo] with \(m=k\), then \(\widetilde{v_k}\) is the output of 2 (i.e., \(\widehat{v}_k(M)\)), and otherwise \(\widetilde{v_k} = v_k\). We use binary search (lines [line:while]-[line:endwhile]), to find \(k^\star\), the smallest \(k\) such that \[\widetilde{v_k} \geq \delta^\star,\] and our goal is to show that with good probability \(k^\star\) is also the smallest \(k\) such that \(v_k \geq \delta^\star\), which would imply the correctness of the algorithm by 1. Note, however, that even though the sequence \(v_0, \ldots, v_d\) is non-decreasing (1), the estimated values \(\widehat{v_k}\) are not necessarily so. Let \(S\) be a random variable corresponding to the set of values \(k\) such that 1 enters line [line:montecarlo] with \(m=k\), and note that if for every \(k\) in \(S\) it happens that the events \[A_k := \left(v_k \geq \delta^\star \right) \text{ and } B_k := \left(\widetilde{v_k} \geq \delta^\star\right)\] are equivalent (i.e., either both occur or neither occurs), then the algorithm will succeed, as that would indeed imply that \(k^\star\) is the smallest \(k\) such that \(v_k \geq \delta^\star\).

Then, for \(k \in [d]\), define events \(E_k\) and \(F_k\) as follows: \[\begin{align} E_k &:= |\delta^\star - v_k| \geq \frac{\varepsilon \gamma}{\log d},\\ F_k &:= |\widetilde{v_k} - v_k| \leq \frac{\varepsilon \gamma}{\log d}. \end{align}\] We claim that if both \(E_k\) and \(F_k\) hold for some \(k\), then \(A_k\) and \(B_k\) are equivalent events for that \(k\). Indeed, \[\begin{align} A_k &\iff v_k \geq \delta^\star\\ &\iff v_k \geq \delta^\star + \frac{\varepsilon \gamma}{\log d} \\ &\iff v_k - \frac{\varepsilon \gamma}{\log d} \geq \delta^\star\\ &\iff \widetilde{v_k} \geq \delta^\star \\ &\iff B_k. \end{align}\]

Thus, if we show that \(E_k\) and \(F_k\) hold with good probability for every \(k \in S\), we can conclude the theorem. First, note that because of the condition on the variable \(\mathrm{\small steps}\) (lines [line:while], [line:steps]) we have \(|S| \leq \log d\), allowing us to do a binary search in case the desired events \(E_k\) and \(F_k\) hold, and preventing the algorithm from looping otherwise; this way the runtime is bounded not only on expectation but deterministically. 7 Then, note that for any \(k\) we have \[\begin{align} \Pr\left[ \, \overline{F_k} \,\right] \leq \Pr\left[ \, \overline{F_k} \mid k \in S \right] &= \Pr\left[|\widehat{v_k}(M) - v_k| > \frac{\varepsilon \gamma}{\log d}\right]\\ &\leq \frac{\gamma}{\log d}. } \end{align}\] Because \(S\) itself is a random variable, whose size is also a random variable, we need to be careful before applying a union bound or any related tricks. Let us refer to the elements of \(S\) as \(\{s_1, \ldots, s_\ell\}\), and let us call \(F(i)\), for \(i \in [\log d]\),8 to the event \(F_{s_i}\) if \(i \leq \ell\), and to the sample space \(\Omega\) (i.e., the event that always happens) otherwise. Then, we claim that for any \(0 \leq i \neq j \leq \lceil\log d\rceil\), we have \[\label{eq:quasi-independence} \Pr[F(i) \cap F(j)] = \Pr[F(i)] \cdot \Pr[F(j)],\tag{1}\] as either \(\max \{i, j\} \leq \ell\), in which case the claim holds by independence (since both events depend only on disjoint sets of independent random samples), or the claim holds trivially since \(\Pr[F(i)] = 1\) for \(i > \ell\). Therefore, we have \[\begin{align} \Pr\left[\bigcap_{k \in S} F_k\right] &= \Pr\left[F(0) \cap F(1) \cap \cdots \cap F(\lceil\log d\rceil)\right]\\ &= \prod_{i \in [\log d]} \Pr[F(i)]}\\ &\geq \left(1 - \frac{\gamma}{\log d}\right)^{\log d} \geq 1 - \gamma. \end{align}\]

We now argue that the event \(\bigcap_{k \in S} E_k\) happens with good probability. To see that, note first that for every \(k \in [d]\), line [line:delta] implies \[\Pr[\overline{E_k}] = \Pr\left[\delta^\star \in \left[v_k \pm \frac{\varepsilon \gamma}{\log d}\right]\right] \leq \frac{\frac{2\varepsilon \gamma}{\log d}}{2\varepsilon} = \frac{\gamma}{\log d}.\] Once again, we need to be careful as the events \(E_k\) are not independent of \(S\), nor between them this time. Using the law of total probabilities, we have \[\begin{align} \Pr\left[\bigcap_{k \in S} E_k\right] &= \sum_{S' \subseteq [d]} \Pr\left[S = S' \mid \bigcap_{k \in S'} E_k \right] \Pr\left[\bigcap_{k \in S'} E_k\right]\\ &= \sum_{\substack{S' \subseteq [d]\\ |S'| \leq \log d}} \Pr\left[S = S' \mid \bigcap_{k \in S'} E_k\right] \Pr\left[\bigcap_{k \in S'} E_k\right], \end{align}\] where we can now effectively use the union bound to say that for any fixed \(S'\) with \(|S'| \leq \log d\) we have \[\Pr\left[\bigcap_{k \in S'} E_k \right] \geq 1 - \gamma.\] Therefore, we conclude that \[\Pr\left[\bigcap_{k \in S} E_k\right] = \sum_{\substack{S' \subseteq [d]\\ |S'| \leq \log d}} \Pr\left[S = S'\mid \bigcap_{k \in S'} E_k\right] \Pr\left[\bigcap_{k \in S'} E_k\right] \geq (1-\gamma) \sum_{\substack{S' \subseteq [d]\\ |S'| \leq \log d}} \Pr\left[S = S' \mid \bigcap_{k \in S'} E_k\right]. \label{eq:align}\tag{2}\] It is not obvious, however, whether the sum on the right-hand side of 2  equals \(1\); we will, however, argue that it is at least \(1-\gamma\). Recall that \(\Pr[F_k | k \not\in S] \geq \Pr[F_k | k \in S]\) for any \(k\), from where it follows that for every set \(S'\) of size at most \(\log d\) we have \[\Pr\left[\bigcap_{k \in S'} F_k \right] \geq \Pr\left[\bigcap_{k \in S} F_k \right].\] Then, note that for any index \(k \in [d]\), the event \(F_k\) is conditionally independent of all events \(E_{j}\), with \(j \in [d]\) given the event \(k \in S\). That is, \[\Pr\left[F_k | k \in S\right] = \Pr\left[F_k | E_{j}, k \in S\right], \quad \text{for any } j \in [d].\] We thus deduce that for any fixed \(S'\) with \(|S'| \leq \log d\) we have \[\begin{align} \label{eq:2} \begin{aligned} \Pr\left[\bigcap_{k \in S'} F_k \mid \bigcap_{k \in S'} E_k\right] & \geq \Pr\left[\bigcap_{k \in S'} F_k \mid \bigcap_{k \in S'} E_k \text{ and } \bigcap_{k \in S'} {k \in S}\right] \\ &= \Pr\left[\bigcap_{k \in S'} F_k \mid \bigcap_{k \in S'} {k \in S}\right] \geq \Pr\left[\bigcap_{k \in S} F_k\right] \geq (1-\gamma). \end{aligned} \end{align}\tag{3}\] Then, our key observation is that there is a single value \(S^\star \subseteq [d]\), with \(|S^\star| \leq \log d\), that the binary search can take if we condition on all the events \(E_k\) and \(F_k\) happening, since in that case events \(A_k\) and \(B_k\) coincide. In other words, there exists \(S^\star\), with \(S^\star \subseteq [d]\) and \(|S^\star| \leq \log d\), such that \[\label{eq:prob1} \Pr\left[S = S^\star \mid \bigcap_{k \in S^\star} E_k \cap \bigcap_{k \in S^\star} F_k\right] = 1.\tag{4}\] We can then argue as follows: \[\begin{align} \Pr\left[\bigcap_{k \in S} E_k\right] &\geq (1-\gamma) \sum_{\substack{S' \subseteq [d]\\ |S'| \leq \log d}} \Pr\left[S = S' \mid \bigcap_{k \in S'} E_k\right]}\\ &\geq (1-\gamma) \Pr\left[S = S^\star \mid \bigcap_{k \in S^\star} E_k \right]\\ &\geq (1-\gamma) \Pr\left[S = S^\star \text{ and } \bigcap_{k \in S^\star} F_k \mid \bigcap_{k \in S^\star} E_k \right]\\ &= (1-\gamma) \Pr\left[S = S^\star \mid \bigcap_{k \in S^\star} E_k \cap \bigcap_{k \in S^\star} F_k\right] \cdot \Pr\left[\bigcap_{k \in S^\star} F_k \mid \bigcap_{k \in S^\star} E_k\right]\\ &\geq (1-\gamma)^2. } \end{align}\]

Therefore, the algorithm will succeed with probability at least \[\Pr\left[\bigcap_{k \in S} E_k\right] \cdot \Pr\left[\bigcap_{k \in S} F_k\right] \geq (1-\gamma)^3 \geq 1-3\gamma.\] The runtime is simply \(O(\log d \cdot M \cdot d )\); as (i) the binary search performs \(O(\log d)\) steps; (ii) each of the binary search steps requires \(M\) samples, and (iii) each sample requires evaluating the model \(\mathcal{L}\) and thus takes time \(O(d)\). Naturally, running the algorithm with \(\gamma' = 1/3 \cdot \gamma\) will yield a success probability of \(1-\gamma\) without changing the asymptotic runtime, and thus we conclude the proof. ◻

4 Locally Minimal Probabilistic Explanations↩︎

Due to the complexity of finding even subset-minimal \(\delta\)-SR, [17] have proposed to study “locally minimal” \(\delta\)-SR, which are \(\delta\)-SRs such that the removal of any feature from the explanation would decrease its probabilistic guarantee below \(\delta\). Interestingly, we can generalize a proof from [12] to show that, over lineal models even in the more general case of product distributions (distributions over \(\{0,1\}^d\) that are products of independent Bernoulli variables of potentially different parameters), every locally minimal \(\delta\)-SR is a subset-minimal \(\delta\)-SR. This allows leveraging the previous results of [17] to subset-minimal \(\delta\)-SRs in the case of linear models.

Theorem 3. For linear models, under any product distribution, every locally minimal \(\delta\)-SR is a subset-minimal \(\delta\)-SR.

Proof sketch. Define the “locality” gap \(\mathrm{\small lgap}({\boldsymbol{y}})\) of a locally minimal \(\delta\)-SR \({\boldsymbol{y}}\) as the smallest value \(g\) such that \(|{\boldsymbol{y}}^\star|_\bot - |{\boldsymbol{y}}|_\bot = g\) for some \({\boldsymbol{y}}^\star \subseteq {\boldsymbol{y}}\) that is a \(\delta\)-SR. If \(g = 0\), then \({\boldsymbol{y}}\) is globally minimal, and we are done. If \(g\) were to be \(1\), then \({\boldsymbol{y}}\) would not be locally minimal, a contradiction. Therefore, we can safely assume \(g \geq 2\) from now on. Let \(\mathcal{L}, {\boldsymbol{y}}\) be such that \({\boldsymbol{y}}\) is locally minimal \(\delta\)-SR and \(\mathrm{\small lgap}({\boldsymbol{y}}) \geq 2\). We will find a contradiction by the following method:

  • Let \({\boldsymbol{y}}^\star\) be the \(\delta\)-SR such that \(| {\boldsymbol{y}}\setminus {\boldsymbol{y}}^\star | = \mathrm{\small lgap}({\boldsymbol{y}})\).

  • Every feature in \({\boldsymbol{y}}\setminus {\boldsymbol{y}}^\star\) is either “good”, if its score is positive, or “bad” if its score is negative.

  • Fix any feature \(i\) in \({\boldsymbol{y}}\setminus {\boldsymbol{y}}^\star\). If \(i\) is good, then \({\boldsymbol{y}}^\star \oplus i\), meaning the partial instance obtained by taking \({\boldsymbol{y}}\) and setting its \(i\)-th feature to \(x_i\), has a probability guarantee greater or equal than that of \({\boldsymbol{y}}^\star\) (the proof of this fact is very similar to the proof of 1), and the gap has reduced. On the other hand, if \(i\) is bad, then \({\boldsymbol{y}}\ominus i\), meaning the partial instance obtained from \({\boldsymbol{y}}\) by setting \(y_i = \bot\), has greater-equal probability than \({\boldsymbol{y}}\), contradicting the fact that \({\boldsymbol{y}}\) is locally minimal.

 ◻

5 Approximations on the Size of Explanations↩︎

A natural question at this point is whether the size of a \((\delta, \varepsilon)\)-min-SR is necessarily similar to the size of a \((\delta, 0)\)-min-SR (i.e., a smallest \(\delta\)-SR). It turns out that this is not the case, and it can happen that in order to get a slightly better probabilistic guarantee (i.e., \(\delta + \varepsilon\) instead of \(\delta\)), the number of features needed under any explanation significantly increase. In general, if we let \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{M}, {\boldsymbol{x}}, \delta)\) denote the size of the smallest \(\delta\)-SR for \((\mathcal{M}, {\boldsymbol{x}})\), we can prove the following generalization of 2.

Proposition 2. For any \(\delta \in (0, 1)\), \(\gamma > 0\), and any \(\varepsilon > 0\) such that \(\delta + \varepsilon \leq 1\), there are pairs \((\mathcal{L}, {\boldsymbol{x}})\) where \(\mathcal{L}\) is a linear model of dimension \(d\), and \({\boldsymbol{x}}\) an instance of dimension \(d\), such that \[\frac{\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta+\varepsilon)}{\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta)} = \Omega\left(d^{\frac{1}{2} - \gamma}\right).\]

As a consequence, we may say informally that approximations on \(\delta\) do not neccesarily lead to approximations on the explanation size.

6 Conclusions and Future Work↩︎

We have proved a positive result for the case of linear models, showing that a \((\delta, \varepsilon)\)-min-SRs can be computed efficiently, and also a more abstract reason suggesting that linear models might be easier to explain than, e.g., decision trees. However, a variety of natural questions and directions of research remain open. First, in practical terms, even though the runtime of 2 is polynomial and only has a quasi-linear dependency on \(d\), our future work includes lowering the dependency in \(1/\varepsilon\) and \(1/\gamma\); on a dataset with \(d = 500\), setting \(\varepsilon = 0.1\) and \(\gamma = 0.01\) is already computationally expensive. We acknowledge, in terms of practical implementations, the work of [17], [20] that allows for computing small probabilistic explanations over decision trees significantly faster than the exact SAT approach of [12]. Similarly, [15] showed solid practical results with different kinds of classifiers, including linear models (i.e., Naive Bayes). Despite our results having better theoretical guarantees over linear models, a natural direction of future work is to improve the practical efficiency of our algorithm for high-dimensional models.

Second, our theoretical result has some natural directions for generalization. We considered only binary features, whereas in order to offer a practically useful tool to the community, we will need to understand how to compute (approximate) probabilistic explanations for mixtures real-valued features and categorical features, for example under the “extended linear classifier” definition of [21]. Another fascinating theoretical question is handling the generalization of our setting to that of product distributions (i.e., feature \(i\) takes value \(1\) with probability \(p_i\) and \(0\) otherwise) can also be solved efficiently. A straightforward extension of our techniques does not seem to work on such a generalized setting, since the feature selection argument of [subsec:feature_selection] no longer holds. Therefore, we believe that new techniques will be needed.

Third, it would be interesting to allow for a more declarative way of specifying the probabilistic guarantees or constraints on the explanations. While a recent line of research has studied the design of languages for defining explainability queries with a uniform algorithmic treatment [22][24], we are not aware of any work on that line that allows for probabilistic terms.

Appendix↩︎

6.1 Calculation for 2↩︎

Consider the following version of Chernoff bound.

Lemma 2 (Chernoff bound). Let \(X\) be a finite sum of independent Bernoulli variables, with \(\mathbb{E}[X] = \mu > 0\). Then for any \(t \geq 0\) we have \[\Pr \Big[ \left|X - \mu\right| \geq t \Big] \leq 2\exp\left(\frac{-t^2}{3 \mu} \right).\]

If we define the Bernoulli variables \(X_i := (z_i = 1)\) for \({\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})\) (the uniform distribution over \(\mathop{\mathrm{Comp}}({\boldsymbol{y}})\)), then the variables \(X_2, \ldots, X_{1000}\) are identical independent Bernoulli variables, and if \(X = \sum_{i = 2}^{1000} X_i\) we have \[\mu := \mathbb{E}[X] = 999\mathbb{E}[X_2] = \frac{999}{2},\] as each \(X_i\) has expectation \(\frac{1}{2}\) becuase \(\mathbf{U}\) is the uniform distribution. Then, using 2, we have that \[\begin{align} \Pr\left[ X < 250 \right] &\leq 2 \exp\left(\frac{-(445-250)^2 \cdot 2}{3 \cdot 999}\right)\\ &\approx 2 \exp(-32.29...)\\ &< 2 \cdot 10^{14}. \end{align}\] To conclude, note that \[\begin{align} \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})} \left[\mathcal{L}({\boldsymbol{z}}) = 1 \right] &= \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})} \left[{\boldsymbol{z}}\cdot {\boldsymbol{w}}\geq 1250 \right]\\ &= \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}\left[1000 + \sum_{i=2}^{1000}{z_i} \geq 1250\right]\\ &= 1 - \Pr\left[\sum_{i=2}^{1000}{z_i} < 250\right]\\ &= 1 - \Pr\left[ X < 250 \right] > 1 - 2\cdot 10^{14} > 0.999999. \end{align}\]

6.2 2↩︎

In order to prove 2 we will need some auxiliary lemmas concerning binomial distributions. The only previous result we will need is a simple upper bound on the central binomial coefficient, attributed to Erdős [25].

Lemma 3 (Erdős’ bound (see [25])). For every \(n \geq 1\) we have \[\binom{2n}{n} \leq \frac{4^n}{\sqrt{2n+1}}.\]

We can now proceed to prove our auxiliary lemmas.

Lemma 4. Let \(P(n, k)\) be the probability that a binomial random variable \(X \sim \text{Bin}(n, 1/2)\) is at least \(k\), and define \[g(n) = \max_{k \in \{1, \ldots, n\}} P(n-1, k-1) - P(n, k).\] Then, \(0 \leq g(n) \leq 1/\sqrt{n}\) for every \(n \geq 2\).

Proof. We can think of \(P(n, k)\) as the probability of getting at least \(k\) heads out of \(n\) tosses of a fair coin. By casing on the value (heads or tails) of the first coin we can see that for \(n \geq k \geq 1\) we have \[P(n, k) = \frac{1}{2}P(n-1, k-1) + \frac{1}{2}P(n-1, k),\] which we can rearrange into \[P(n, k) = P(n-1, k-1) + \frac{1}{2}\big[P(n-1, k) - P(n-1, k-1)\big],\] and thus \[P(n-1, k-1) - P(n, k) = \frac{1}{2}\big[P(n-1, k-1) - P(n-1, k)\big].\] But \(P(n-1, k-1) - P(n-1, k)\) is the probability of getting exactly \(k-1\) heads in \(n-1\) tosses, which is \(\frac{1}{2^{n-1}} \binom{n-1}{k-1}\), and clearly positive. Hence, using 3, we have \[0 \leq P(n-1, k-1) - P(n, k) \leq \frac{1}{2^{n}} \binom{n-1}{k-1} \leq \frac{1}{2^{n}} \binom{n-1}{\lfloor (n-1)/2 \rfloor} \leq \frac{1}{2^{n}} \frac{2^n}{\sqrt{ 2n - 1}} \leq \frac{1}{\sqrt{n}}.\] ◻

Lemma 5 (Binomial Approximation). Let \(P(n, k)\) be the probability that a binomial random variable \(X \sim \text{Bin}(n, 1/2)\) is at least \(k\). Then, given a probability \(\delta \in (0, 1)\) and a targer error \(\varepsilon > 0\), there exist values \(n \leq \varepsilon^{-2}\) and \(k \leq n\) such that \[|P(n, k) - \delta| < \varepsilon.\]

Proof. Fix any value of \(n\) and note that \(P(n, k-1) - P(n, k)\) is the probability of getting exactly \(k-1\) heads in \(n\) tosses of a fair coin. Thus, for any \(k \in \{1, \ldots, n\}\) we can use 3 to say \[\label{eq:prob-diff} P(n, k-1) - P(n, k) = \frac{1}{2^{n}} \binom{n}{k-1} \leq \frac{1}{2^{n}} \binom{n}{\lfloor n/2 \rfloor} \leq \frac{1}{2^{n}} \frac{2^n}{\sqrt{2n+1}} \leq \frac{1}{\sqrt{n}}.\tag{5}\] Now, choose a large enough \(n\) so that \(\frac{1}{\sqrt{n}} < \varepsilon\). Then, choose \(k\) as the largest integer such that \(P(n, k) \geq \delta\), which exists since \(P(n, 0) = 1\) and \(P(n, n+1) = 0\). This definition of \(k\) yields \[P(n, k) \geq \delta > P(n, k+1),\] and using 5 we can see that \[|P(n, k+1) - \delta| = \delta - P(n, k+1) \leq P(n, k) - P(n, k+1) \leq \frac{1}{\sqrt{n}} < \varepsilon,\] which completes the proof. ◻

We are finally ready to prove 2.

Proof of 2. Let \(\delta\) and \(\varepsilon\) be the values in the statement of the proposition. Let \(n\) and \(m\) be large integers whose precise value will be determined later. We will construct a linear model \(\mathcal{L}\) of dimension \(d = n+1\), with threshold \(t = 2\), and weights \(w_1 = 1\), \(w_i = 1/m\) for \(i \in \{2, \ldots, d\}\). Let \({\boldsymbol{x}}= (1, 1, \ldots, 1) \in \{0, 1\}^d\) be the instance to explain, and \({\boldsymbol{y}}= (1, \bot, \bot, \ldots, \bot) \subseteq {\boldsymbol{x}}\) be a partial instance. Now, use 5 with parameters \(\delta' = \delta + \varepsilon/4\) and \(\varepsilon' = \varepsilon/4\) to choose values for \(n, m\) such that \[\left|P\big(n,\, m\big) - \delta'\right| < \varepsilon',\] with \(m \leq n\). Note now that \(\mathcal{L}({\boldsymbol{x}}) = 1\), and that \[\label{eq:prob-lin} \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}\left[\mathcal{L}({\boldsymbol{z}}) = 1\right] = P\big(n,\, m\big),\tag{6}\] since in order for a completion of \({\boldsymbol{y}}\) to have \(\mathcal{L}({\boldsymbol{z}}) = 1\) it must have at least \(m\) features (besides the 1st one) set to \(1\), as that way its value according to the weights \(w_i\) will be at least \(1 + m \cdot 1/m = 2 = t\). As we have \[\left|P\big(n,\, m\big) - (\delta+ \varepsilon/4) \right| < \varepsilon/4,\] we can deduce \[\delta \leq P\big(n,\, m\big) \leq \delta + \varepsilon/2.\] Combining our last equation with 6 we have that \({\boldsymbol{y}}\) is a \(\delta\)-SR for \({\boldsymbol{x}}\) of size \(1\). Now, let us see how many more features need to be added to \({\boldsymbol{y}}\) in order to get a \((\delta+\varepsilon)\)-SR. Suppose that we add \(k\) features to \({\boldsymbol{y}}\) (as all features are equal, we add any \(k\) of them) obtaining a partial instance \({\boldsymbol{y}}'\). Then, we have that \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}')}\left[\mathcal{L}({\boldsymbol{z}}) = 1\right] = P\big(n - k,\, m - k\big),\] as now \(k\) features have been set to \(1\). We can now use 4 \(k\) times in a row: \[\begin{align} P(n-k, m - k) &\leq P(n-k+1, m - k+1) + \frac{1}{\sqrt{n-k}}\\ &\leq P(n-k+2, m - k+2) + \frac{1}{\sqrt{n-k}} + \frac{1}{\sqrt{n-k+1}}\\ & \leq P(n-k+2, m - k+2) + \frac{2}{\sqrt{n-k}}\\ & \vdots\\ & \leq P(n, m) + \frac{k}{\sqrt{n-k}}. \end{align}\]

Therefore, we have that \[P(n-k, m - k) \leq P(n, m) + \frac{k}{\sqrt{n-k}} \leq \delta + \varepsilon/2 + \frac{k}{\sqrt{n-k}}.\] It now remains to show that, unless \(k\) is large enough (relatively to \(n\)), the right-hand side of the previous inequality is less than \(\delta + \varepsilon\). Indeed, take \(k = n^{1/2 - \gamma}\) for any positive \(\gamma\). Then, we want to show that for sufficiently large \(n\) we have \[\frac{k}{\sqrt{n-k}} < \varepsilon/2.\] To do so, note that \[\frac{k}{\sqrt{n-k}} < \frac{k}{\sqrt{n}} = \frac{n^{1/2 - \gamma}}{n^{1/2}} = n^{-\gamma},\] from where taking \(n > \left(\frac{2}{\varepsilon}\right)^{1/\gamma}\) suffices to complete the proof. ◻

6.3 1↩︎

Proof of 1. The proof is a twist on  [6]; let \((s_1, \ldots, s_n, T) \in \mathbb{N}^{n+1}\) be an instance of the \(\# \mathrm{P}\)-complete problem \(\#\mathrm{\small Knapsack}\), that consists on counting the number of sets \(S \subseteq \{s_1, \ldots, s_n\}\) such that \(\sum_{s \in S}s \leq T\). We can assume that \(\sum_{i=1}^n s_i > T\), as otherwise the \(\# \mathrm{\small Knapsack}\) instance is trivial. Then, let \(\mathcal{L}\) be a linear model with weights \(w_i = s_i\), and threshold \(t = T+1\). Now, consider the problem of deciding whether \(\#\mathrm{\small Knapsack}(s_1, \ldots, s_n, T) \geq m\) for an input \(m\), which cannot be solved in polynomial time unless \(\mathrm{P}= \# \mathrm{P}\). Let \({\boldsymbol{x}}= (1, 1, \ldots, 1)\), and \(\delta = \frac{m}{2^{n}}\). We claim that \((\mathcal{L}, {\boldsymbol{x}}, \delta, k=0)\) is a Yes-instance for Uniform-Min-\(\delta\)-SR\((\mathrm{\small Linear})\) if and only if \(\#\mathrm{\small Knapsack}(s_1, \ldots, s_n, T) \geq m\). First, note that \(\mathcal{L}({\boldsymbol{x}}) = 1\), since \(\sum_{i=1}^n w_i x_i = \sum_{i=1}^n s_i \geq T+1 = t\). For every set \(S \subseteq \{s_1, \ldots, s_n\}\) such that \(\sum_{s \in S}s \leq T\), its complement \(\overline{S} := \{s_1, \ldots, s_n\} \setminus S\) holds \(\sum_{s \in \overline{S}}s > T\), and as all values are integers, this implies as well \[\sum_{s \in \overline{S}} s \geq T+1 = t.\] To each such set \(\overline{S}\), we associate the instance \({\boldsymbol{z}}(\overline{S})\) defined as \[z(\overline{S})_i = \begin{cases} 1 & \text{if } s_i \in \overline{S}\\ 0 & \text{otherwise}. \end{cases}\] Now note that \[\mathcal{L}({\boldsymbol{z}}(\overline{S})) = \begin{cases} 1 & \text{if } \sum_{s_i \in \overline{S}} w_i \geq T+1\\ 0 & \text{otherwise} \end{cases} = 1,\] and thus there is a bijection between the sets \(S\) whose sum is at most \(T\) and the instances \({\boldsymbol{z}}(\overline{S})\) such that \(\mathcal{L}({\boldsymbol{z}}(\overline{S})) = 1 = \mathcal{L}({\boldsymbol{x}})\). To conclude, simply note that the previous bijection implies \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}(\bot^d)}\Big[\mathcal{L}({\boldsymbol{z}}) = 1\Big] = \frac{\#\mathrm{\small Knapsack}(s_1, \ldots, s_n, T)}{2^n},\] and thus the “empty explanation” \(\bot^d := (\bot, \bot, \ldots, \bot)\) has probability at least \(\delta\) if and only if \[\#\mathrm{\small Knapsack}(s_1, \ldots, s_ n, T) \geq m.\] As the empty explanation is the only one with size \(\leq 0\), we conclude the proof. ◻

6.4 Lemma 1 and Theorem 4↩︎

Let us state the result about locally minimal \(\delta\)-SRs as a theorem, so we can proceed to prove it. In order to state it, however, we need to define what we mean by an arbitrary product distribution. Consider Bernoulli variables \(X_1, \ldots, X_d\) with probabilities \(p_1, \ldots, p_d\) respectively, and let us denote by \(\mathbf{D}= X_1 \times \cdots \times X_d\) their joint distribution, which we will call a product distribution. Then, \(\mathbf{D}\) induces a distribution over the set \(\{0, 1\}^d\) by the rule \[\Pr_{{\boldsymbol{z}}\sim \mathbf{D}}[{\boldsymbol{z}}= {\boldsymbol{x}}] = \prod_{i=1}^d p_i^{x_i} (1-p_i)^{1-x_i}, \quad \forall x \in \{0, 1\}^d.\] Naturally, this induces a distribution over \(\mathop{\mathrm{Comp}}({\boldsymbol{y}})\) for any partial instance \({\boldsymbol{y}}\) as follows: \[\Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}[{\boldsymbol{z}}= {\boldsymbol{x}}] = \frac{\Pr_{{\boldsymbol{z}}\sim \mathbf{D}}[{\boldsymbol{z}}= {\boldsymbol{x}}]}{\sum_{{\boldsymbol{w}}\in \mathop{\mathrm{Comp}}({\boldsymbol{y}})} \Pr_{{\boldsymbol{z}}\sim \mathbf{D}}[{\boldsymbol{z}}= {\boldsymbol{x}}]} \quad \forall {\boldsymbol{x}}\in \mathop{\mathrm{Comp}}({\boldsymbol{y}}),\] and naturally \(\Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}[{\boldsymbol{z}}= {\boldsymbol{x}}] = 0\) if \({\boldsymbol{x}}\not\in \mathop{\mathrm{Comp}}({\boldsymbol{y}})\). With this notation, we can make a precise theorem statement.

Theorem 4. For linear models, under any product distribution, every locally minimal \(\delta\)-SR is a subset-minimal \(\delta\)-SR.

Furthermore, we will prove a stronger lemma than Lemma 1 stated in the main body.

Lemma 1 1. Given a linear model \(\mathcal{L}\), and an instance \({\boldsymbol{x}}\), if \({\boldsymbol{y}}^{(0)}, \ldots, {\boldsymbol{y}}^{(d)}\) are the partial instances of \({\boldsymbol{x}}\) such that \({\boldsymbol{y}}^{(k)} \subseteq {\boldsymbol{x}}\) is defined only in the top \(k\) features of maximum score, then \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k+1)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] \geq \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})]\] for all \(k \in \{1, \ldots, d-1\}\), and naturally, \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(d)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = 1.\] Moreover, \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta) = k\) if and only if \({\boldsymbol{y}}^{(k)}\) is a \(\delta\)-SR for \({\boldsymbol{x}}\) but \({\boldsymbol{y}}^{(k-1)}\) is not.

Before we prove 1, let us prove an auxiliary lemma that will also be useful for proving 3. Given an instance \({\boldsymbol{x}}\) to explain, and a partial instance \({\boldsymbol{y}}\subseteq {\boldsymbol{x}}\), such that \(y_i = \bot\), we define the partial instance \({\boldsymbol{y}}\oplus i\) by: \[({\boldsymbol{y}}\oplus i)_j = \begin{cases} y_j & \text{if } j \neq i\\ x_i & \text{otherwise}. \end{cases}\]

Lemma 6. Let \(\mathcal{L}\) be a linear model, \({\boldsymbol{x}}\) an instance and \({\boldsymbol{y}}\subseteq {\boldsymbol{x}}\) a partial instance. Assume a product distribution \(\mathbf{D}\). Then, if \(i\) is a feature such that \(y_i = \bot\), and the feature score \(s_i\) holds \(s_i \geq 0\), we have \[\Pr_{{\boldsymbol{z}}\in \mathbf{D}({\boldsymbol{y}}\oplus i)}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] \geq \Pr_{{\boldsymbol{z}}\in \mathbf{D}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})].\]

Proof of 6. Let \((w_1, \ldots, w_d)\) be the weights of \(\mathcal{L}\) and \(t\) its threshold. Then, let us assume without loss of generality that \(\mathcal{L}({\boldsymbol{x}}) = 1\), as the case \(\mathcal{L}({\boldsymbol{x}}) = 0\) is analogous. We thus have that \[s_i = w_i \cdot (2x_i - 1) \geq 0,\] from where \(s_i = w_i\) if \(x_i = 1\) and \(s_i = -w_i\) if \(x_i = 0\). Let us denote by \(S\) the set of features \(j\) such that \(y_j = x_j \neq \bot\), and define \[t' := t - \sum_{j \in S} y_j w_j.\] We can then rewrite the probability of interest as \[\Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = \Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = 1] = \Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}\left[\sum_{j \not\in S} z_j w_j \geq t'\right].\] Let us define the following two amounts: \[\mathcal{A} := \Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}\left[\sum_{j \not\in S, j \neq i} z_j w_j \geq t' - w_i\right],\] \[\mathcal{B} := \Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}\left[\sum_{j \not\in S, j \neq i} z_j w_j \geq t'\right].\] If \(p_i\) is the probability of feature \(i\) under \(\mathbf{D}\), then we have \[\Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = \Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}\left[\sum_{j \not\in S} z_j w_j \geq t'\right] = p_i \cdot \mathcal{A} + (1-p_i)\cdot \mathcal{B}.\] Now we proceed by cases on \(x_i\). If \(x_i = 1\), then \(s_i = w_i\), and thus we know \(w_i \geq 0\), from where \(t' - w_i \leq t'\) and thus \(\mathcal{A} \geq \mathcal{B}\). Moreover, as \(x_i = 1\), we conclude \[\begin{align} \Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}}\oplus i)}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] &= \mathcal{A}\\ &= p_i \cdot \mathcal{A} + (1-p_i)\cdot \mathcal{A}\\ &\geq p_i \cdot \mathcal{A} + (1-p_i)\cdot \mathcal{B}\\ &= \Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})]. \end{align}\]

Similarly, if \(x_i = 0\), then \(s_i = -w_i\), and thus we know \(w_i \leq 0\), from where \(t' - w_i \geq t'\) and thus \(\mathcal{A} \leq \mathcal{B}\). As \(x_i = 0\), we conclude \[\begin{align} \Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}}\oplus i)}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] &= \mathcal{B}\\ &= p_i \cdot \mathcal{B} + (1-p_i)\cdot \mathcal{B}\\ &\geq p_i \cdot \mathcal{A} + (1-p_i)\cdot \mathcal{B}\\ &= \Pr_{{\boldsymbol{z}}\sim \mathbf{D}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})]. \end{align}\] This concludes the proof. ◻

Similarly, for any partial instance \({\boldsymbol{y}}\) such that \(y_i \neq \bot\), we can define the partial instance \({\boldsymbol{y}}\ominus i\) as \[({\boldsymbol{y}}\ominus i)_j = \begin{cases} y_j & \text{if } j \neq i\\ \bot & \text{otherwise}. \end{cases}\] The proof of 6, but reversing signs, yields the following lemma.

Lemma 7. Let \(\mathcal{L}\) be a linear model, \({\boldsymbol{x}}\) an instance and \({\boldsymbol{y}}\subseteq {\boldsymbol{x}}\) a partial instance. Assume a product distribution \(\mathbf{D}\). Then, if \(i\) is a feature such that \(y_i \neq \bot\), and the feature score \(s_i\) holds \(s_i \leq 0\), we have \[\Pr_{{\boldsymbol{z}}\in \mathbf{D}({\boldsymbol{y}}\ominus i)}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] \geq \Pr_{{\boldsymbol{z}}\in \mathbf{D}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})].\]

Now, in order to prove 1, which makes two claims, we will split it into two separate lemmas.

Lemma 8 (Part 1 of 1). Given a linear model \(\mathcal{L}\), and an instance \({\boldsymbol{x}}\), if \({\boldsymbol{y}}^{(0)}, \ldots, {\boldsymbol{y}}^{(d)}\) are the partial instances of \({\boldsymbol{x}}\) such that \({\boldsymbol{y}}^{(k)} \subseteq {\boldsymbol{x}}\) is defined only in the top \(k\) features of maximum score, then \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k+1)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] \geq \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})]\] for all \(k \in \{0, \ldots, d-1\}\), and naturally, \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(d)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = 1.\]

Proof of 8. Let us assume without loss of generality that the features are already sorted decreasingly in terms of score, so \[s_1 \geq s_2 \geq \cdots \geq s_d.\] This way, we have that \({\boldsymbol{y}}^{(k)} \subseteq {\boldsymbol{x}}\) is defined as follows: \[y^{(k)}_i = \begin{cases} x_i & \text{if } i \leq k\\ \bot & \text{otherwise}. \end{cases}\] The proof now requires considering two cases. First, if \(s_{k+1} \geq 0\), then we can apply 6 to conclude that \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k+1)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] \geq \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})].\] We will now show that if \(s_{k+1} < 0\), then \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k+1)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = 1,\] which will be enough to conclude. Indeed, as \(s_{k+1} < 0\), we have that \[0 > s_{k+2} \geq s_{k+3} \geq \cdots \geq s_d,\] from where we can repeatedly apply 7 to deduce \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k+1)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] \geq \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k+2)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] \geq \cdots \geq \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(d)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = 1.\] This concludes the proof. ◻

Lemma 9 (Part 2 of 1). Given a linear model \(\mathcal{L}\), and an instance \({\boldsymbol{x}}\), if \({\boldsymbol{y}}^{(0)}, \ldots, {\boldsymbol{y}}^{(d)}\) are the partial instances of \({\boldsymbol{x}}\) such that \({\boldsymbol{y}}^{(k)} \subseteq {\boldsymbol{x}}\) is defined only in the top \(k\) features of maximum score, then \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta) = k\) if and only if \({\boldsymbol{y}}^{(k)}\) is a \(\delta\)-SR for \({\boldsymbol{x}}\) but \({\boldsymbol{y}}^{(k-1)}\) is not.

In order to prove 9, we will use a separate lemma. Let us define, for every \(k \in [d]\) the set \(P_k\) as the set of partial instances \({\boldsymbol{y}}\subseteq {\boldsymbol{x}}\) such that \({\boldsymbol{y}}\) has \(k\) defined features.

Lemma 10. For any \(k \in [d]\), we have \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = \max_{{\boldsymbol{y}}\in P_k} \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})].\]

Let us show immediately how 9 can be proved using 10.

Proof of 9. For the forward direction, assume that \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta) = k\). Then, by definition, we have that there exists a \(\delta\)-SR \({\boldsymbol{y}}^\star\) for \({\boldsymbol{x}}\) such that \({\boldsymbol{y}}^\star\) has \(k\) defined features. By 10, we have that \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k)})}\left[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})\right] \geq \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^\star)}\left[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})\right] \geq \delta,\] and thus \({\boldsymbol{y}}^{(k)}\) is a \(\delta\)-SR for \({\boldsymbol{x}}\). On the other hand, if \({\boldsymbol{y}}^{(k-1)}\) were to be a \(\delta\)-SR for \({\boldsymbol{x}}\), then we would have \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta) \leq k-1\), a contradiction. For the backward direction, assume that \({\boldsymbol{y}}^{(k)}\) is a \(\delta\)-SR for \({\boldsymbol{x}}\) but \({\boldsymbol{y}}^{(k-1)}\) is not. Then, by 10, we have that \[\delta > \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}^{(k-1)})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = \max_{{\boldsymbol{y}}\in P_{k-1}} \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})],\] from where \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta) > k-1\), and because \({\boldsymbol{y}}^{(k)}\) is a \(\delta\)-SR for \({\boldsymbol{x}}\), we have \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta) \leq k\); we conclude that \(\operatorname{\textrm{\mathrm{\small Min}}}(\mathcal{L}, {\boldsymbol{x}}, \delta) = k\). ◻

It thus only remains to prove 10.

Proof of 10. Let \(w_1, \ldots, w_d\) be the weights of \(\mathcal{L}\), and \(t\) its threshold. Let us use the \(\oplus, \ominus\) notation defined in [lemma:positive-score,lemma:negative-score]. We will prove something slightly stronger than 10: that if \(i\) and \(j\) are features such that \(s_i \leq s_j\), then for any partial instance \({\boldsymbol{y}}\) such that \(y_i \neq \bot\) and \(y_j = \bot\), we have \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}\ominus i \oplus j)}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] \geq \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})].\] If we prove this, then we can apply it repeatedly to deduce 10. To prove the claim, we start by defining \[S = \{ \ell \mid y_\ell \neq \bot \} \setminus \{i \},\] and \[t' = t - \sum_{\ell \in S} y_\ell w_\ell.\] We will also assume without loss of generality that \(\mathcal{L}({\boldsymbol{x}}) = 1\) since the other case is analogous. We can then rewrite the probabilities of interest as follows, using notation \(\bar{S} := [d] \setminus S\): \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}\ominus i \oplus j)}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}}\ominus i \oplus j)}\left[\sum_{\ell \in \bar{S} \setminus \{i, j\}} z_\ell w_\ell + x_j w_j + z_i w_i\geq t'\right],\] \[\Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}[\mathcal{L}({\boldsymbol{z}}) = \mathcal{L}({\boldsymbol{x}})] = \Pr_{{\boldsymbol{z}}\sim \mathbf{U}({\boldsymbol{y}})}\left[\sum_{\ell \in \bar{S} \setminus \{i, j\}} z_\ell w_\ell + x_i w_i + z_j w_j\geq t'\right].\] Let us write \(t^\star = t' - \sum_{\ell \in \bar{S} \setminus \{i, j\}} z_\ell w_\ell\), and note that \(t^\star\) is a random variable. With this notation, it remains to prove that

\[\begin{align} &\Pr_{z_i, t^\star}[z_i w_i + x_j w_j \geq t^\star] \geq \Pr_{z_i, t^\star}[z_j w_j + x_i w_i \geq t^\star] \\ \iff& \frac{1}{2}\Pr_{t^\star}[w_i + x_j w_j \geq t^\star] + \frac{1}{2}\Pr_{t^\star}[x_j w_j \geq t^\star] \geq \frac{1}{2}\Pr_{t^\star}[w_j + x_i w_i \geq t^\star] + \frac{1}{2}\Pr_{t^\star}[x_i w_i \geq t^\star] \\ \iff& \Pr_{t^\star}[w_i + x_j w_j \geq t^\star] + \Pr_{t^\star}[x_j w_j \geq t^\star] \geq \Pr_{t^\star}[w_j + x_i w_i \geq t^\star] + \Pr_{t^\star}[x_i w_i \geq t^\star]. \end{align}\] We will prove the last inequality by cases, recalling that \(s_j \geq s_i\) and thus \(w_j (2x_j - 1) \geq w_i (2x_i - 1)\).

  • (Case 1: \(x_i = 1, x_j = 1\)) The desired inequality is \[\begin{align} \Pr_{t^\star}[w_i + w_j \geq t^\star] + \Pr_{t^\star}[w_j \geq t^\star] &\geq \Pr_{t^\star}[w_j + w_i \geq t^\star] + \Pr_{t^\star}[w_i \geq t^\star]\\ \iff \Pr_{t^\star}[w_j \geq t^\star] &\geq \Pr_{t^\star}[w_i \geq t^\star], \end{align}\] which is true since \(s_j \geq s_i\) implies \(w_j \geq w_i\) given \(x_i = x_j = 1\).

  • (Case 2: \(x_i = 1, x_j = 0\)) The desired inequality is \[\begin{align} \Pr_{t^\star}[w_i \geq t^\star] + \Pr_{t^\star}[0\geq t^\star] &\geq \Pr_{t^\star}[w_j + w_i \geq t^\star] + \Pr_{t^\star}[w_i \geq t^\star]\\ \iff \Pr_{t^\star}[0 \geq t^\star] &\geq \Pr_{t^\star}[w_j + w_i \geq t^\star], \end{align}\] which is true since \(s_j \geq s_i\) implies \(-w_j \geq w_i\) given \(x_i = 1, x_j = 0\), and thus \(w_i + w_j \leq 0\).

  • (Case 3: \(x_i = 0, x_j = 1\)) The desired inequality is \[\begin{align} \Pr_{t^\star}[w_i + w_j \geq t^\star] + \Pr_{t^\star}[w_j \geq t^\star] &\geq \Pr_{t^\star}[w_j \geq t^\star] + \Pr_{t^\star}[0 \geq t^\star],\\ \iff \Pr_{t^\star}[w_i + w_j \geq t^\star] &\geq \Pr_{t^\star}[0\geq t^\star], \end{align}\] which is true since \(s_j \geq s_i\) implies \(w_j \geq -w_i\) given \(x_i = 0, x_j = 1\), and thus \(w_i + w_j \geq 0\).

  • (Case 4: \(x_i = 0, x_j = 0\)) The desired inequality is \[\begin{align} \Pr_{t^\star}[w_i \geq t^\star] + \Pr_{t^\star}[0 \geq t^\star] &\geq \Pr_{t^\star}[w_j \geq t^\star] + \Pr_{t^\star}[0 \geq t^\star],\\ \iff \Pr_{t^\star}[w_i \geq t^\star] &\geq \Pr_{t^\star}[w_j \geq t^\star], \end{align}\] which is true since \(s_j \geq s_i\) implies \(-w_j \geq -w_i\) given \(x_i = x_j = 0\), and thus \(w_i \geq w_j\).

 ◻

1 now follows directly from 8 and 9, and the sketch proof of 3 can be completed as we now have proved 6 and 7.

References↩︎

[1]
Marques-Silva, J. and Ignatiev, A. (2022). Delivering trustworthy ai through formal xai. In AAAI.
[2]
Darwiche, A. and Hirth, A. (2020). On the Reasons Behind Decisions. In ECAI 2020 - 24th European Conference on Artificial Intelligence, 29 August-8 September 2020, Santiago de Compostela, Spain, August 29 - September 8, 2020 - Including 10th Conference on Prestigious Applications of Artificial Intelligence (PAIS 2020), pages 712–720.
[3]
Miller, G. A. (1956). The magical number seven, plus or minus two: Some limits on our capacity for processing information. Psychological Review, 63(2):81–97.
[4]
Narayanan, M., Chen, E., He, J., Kim, B., Gershman, S., and Doshi-Velez, F. (2018). How do humans understand explanations from machine learning systems? an evaluation of the human-interpretability of explanation. arXiv:1802.00682 [cs].
[5]
Lage, I., Chen, E., He, J., Narayanan, M., Kim, B., Gershman, S., and Doshi-Velez, F. (2019). An evaluation of the human-interpretability of explanation. arXiv:1902.00006 [cs, stat].
[6]
Barceló, P., Monet, M., Pérez, J., and Subercaseaux, B. (2020). Model interpretability through the lens of computational complexity. In Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., and Lin, H., editors, Advances in Neural Information Processing Systems, volume 33, pages 15487–15498. Curran Associates, Inc.
[7]
Ignatiev, A., Narodytska, N., Asher, N., and Marques-Silva, J. (2021). From contrastive to abductive explanations and back again. In Baldoni, M. and Bandini, S., editors, AIxIA 2020 – Advances in Artificial Intelligence, Lecture Notes in Computer Science, page 335–355, Cham. Springer International Publishing.
[8]
Blanc, G., Lange, J., and Tan, L.-Y. (2021). Provably efficient, succinct, and precise explanations. In Beygelzimer, A., Dauphin, Y., Liang, P., and Vaughan, J. W., editors, Advances in Neural Information Processing Systems.
[9]
Wäldchen, S., MacDonald, J., Hauch, S., and Kutyniok, G. (2021). The computational complexity of understanding binary classifier decisions. J. Artif. Intell. Res., 70:351–387.
[10]
Izza, Y., Huang, X., Ignatiev, A., Narodytska, N., Cooper, M., and Marques-Silva, J. (2023a). On computing probabilistic abductive explanations. International Journal of Approximate Reasoning, 159:108939.
[11]
Izza, Y., Ignatiev, A., Narodytska, N., Cooper, M. C., and Marques-Silva, J. (2021). Efficient explanations with relevant sets. ArXiv, abs/2106.00546.
[12]
Arenas, M., Barceló, P., Romero Orth, M., and Subercaseaux, B. (2022). On computing probabilistic explanations for decision trees. In Koyejo, S., Mohamed, S., Agarwal, A., Belgrave, D., Cho, K., and Oh, A., editors, Advances in Neural Information Processing Systems, volume 35, pages 28695–28707. Curran Associates, Inc.
[13]
Izza, Y., Ignatiev, A., and Marques-Silva, J. (2020). On Explaining Decision Trees.
[14]
Subercaseaux, B. (2020). Model interpretability through the lens of computational complexity. Master’s thesis, Universidad de Chile.
[15]
Izza, Y., Huang, X., Ignatiev, A., Narodytska, N., Cooper, M., and Marques-Silva, J. (2023b). On computing probabilistic abductive explanations. International Journal of Approximate Reasoning, 159:108939.
[16]
Kozachinskiy, A. (2023). Inapproximability of sufficient reasons for decision trees. arXiv:2304.02781 [cs].
[17]
Izza, Y., Meel, K. S., and Marques-Silva, J. (2024). Locally-minimal probabilistic explanations.
[18]
Hoeffding, W. (1963). Probability Inequalities for Sums of Bounded Random Variables. Journal of the American Statistical Association, 58(301):13–30.
[19]
Marques-Silva, J., Gerspacher, T., Cooper, M. C., Ignatiev, A., and Narodytska, N. (2020a). Explaining naive bayes and other linear classifiers with polynomial time and delay. CoRR, abs/2008.05803.
[20]
Bounia, L. and Koriche, F. (2023). Approximating probabilistic explanations via supermodular minimization. In Proceedings of the Thirty-Ninth Conference on Uncertainty in Artificial Intelligence, UAI ’23. JMLR.org.
[21]
Marques-Silva, J., Gerspacher, T., Cooper, M. C., Ignatiev, A., and Narodytska, N. (2020b). Explaining naive bayes and other linear classifiers with polynomial time and delay. In NeurIPS.
[22]
Arenas, M., Báez, D., Barceló, P., Pérez, J., and Subercaseaux, B. (2021). Foundations of Symbolic Languages for Model Interpretability. In Advances in Neural Information Processing Systems, volume 34, pages 11690–11701. Curran Associates, Inc.
[23]
Barceló, P., Pérez, J., and Subercaseaux, B. (2020). Foundations of languages for interpretability and bias detection. AFCI workshop at NeurIPS 2020. Algorithmic Fairness through the Lens of Causality and Interpretability.
[24]
Arenas, M., Barceló, P., Bustamante, D., Caraball, J., and Subercaseaux, B. (2024). . In Proceedings of the 21st International Conference on Principles of Knowledge Representation and Reasoning, pages 60–70.
[25]
Komjáth, P. (2013). Upper limit on the central binomial coefficient. MathOverflow. URL:https://mathoverflow.net/q/133742 (version: 2013-07-01).

  1. The authors opted for randomized author ordering, denoted by r⃝, instead of alphabetical. A verifiable record of the randomization is available at https://www.aeaweb.org/journals/policies/random-author-order/search↩︎

  2. When talking about a partial instance \({\boldsymbol{y}}\), we will use the “size” of \({\boldsymbol{y}}\) to mean \(|{\boldsymbol{y}}|_e\).↩︎

  3. Also known as \(\delta\)-relevant sets [9], [11].↩︎

  4. [15] already made a more general observation of this form, but did not provide a hardness result for linear models.↩︎

  5. All proofs that are not presented in the main text can be found in the appendix.↩︎

  6. This idea is already used in the work of [17]↩︎

  7. For simplicity, we will say \(|S| \leq \log d\), even though the exact bound for a binary search is \(|S| \leq \lfloor \log d + 1 \rfloor\). This choice naturally has no impact on the asymptotic analysis of the algorithm.↩︎

  8. Throughout this proof, we use notation \([\alpha]\), for \(\alpha \in \mathbb{R}^{> 0}\), to denote the set \(\{0, 1, \ldots, \lceil \alpha \rceil - 1, \lceil \alpha \rceil\}\).↩︎