Consistent Sufficient Explanations and Minimal Local Rules for explaining any classifier or regressor
Abstract
To explain the decision of any regression and classification model, we extend the notion of probabilistic sufficient explanations (P-SE).
For each instance, this approach selects the minimal subset of features that is sufficient to yield the same prediction with high probability, while removing other features.
The crux of PSE is to compute the conditional probability of maintaining the same prediction.
Therefore, we introduce an accurate and fast estimator of this probability via random Forests for any data ( X , Y ) and show its efficiency through a theoretical analysis of its consistency.
As a consequence, we extend the P-SE to regression problems.
In addition, we deal with non-discrete features, without learning the distribution of X nor having the model for making predictions.
Finally, we introduce local rule-based explanations for regression/classification based on the
P-SE
and compare our approaches w.r.t other explainable AI methods.
These methods are available as a Python package 1 .
Introduction
Many methods have been proposed to explain specific predictions of machine learning models from different perspectives, such as feature attributions approaches [Lundberg and Lee, 2017, Ribeiro et al., 2016], decision rules [Ribeiro et al., 2018], counterfactual examples [Wachter et al., 2017] and logic-based [Shih et al., 2018, Darwiche and Hirth, 2020].
Among these categories the most popular are feature attributions approaches in particular SHAP [Lundberg and Lee, 2017] which is based on Shapley Values (SV) and aims at indicating the importance of each feature in the decision.
One of the main reasons for SHAP’s success is its scalability, nice representations of the explanations and mathematical foundations.
However, SV used in SHAP does not guarantee the truthfulness of the important variables involved in a given decision.
Indeed, it is possible to construct simple theoretical models (defined on a partition of the feature space) for which SV cannot distinguish between local important and non-important variables (see conclusion in Amoukou et al.
Similar difficulties have also been highlighted by Ghalebikesabi et al.
[2021] for SHAP and LIME [Ribeiro et al., 2016].
This lack of guarantees is a major issue since the explanations may be used for high-stakes decisions.
Moreover, Additive
Explanations are not suitable when interactions occur in the model [Gosiewska and Biecek, 2019].
An appealing solution to the problem above is to use decision rules [Ribeiro et al., 2018] or logicbased explanations [Darwiche and Hirth, 2020, Shih et al., 2018] which gives local explanations that take into account interactions while ensuring minimality and guarantee on the outcome.
However, these methods are not currently available in the general case (e.g., regression model, continuous features, ...).
Our objective is to extend these methods to more realistic cases by developing new consistent algorithms.
In this paper, we generalize the concept of Probabilistic Sufficient Explanations (P-SE) introduced by Wang et al.
P-SE is a relaxation of logic-based explanation: it explains the classification of an example by choosing a minimal subset of features guaranteeing that, the model makes the same prediction with high probability, whatever the values of the remaining features (under the data distribution).
Such a subset is called a Sufficient Explanation (also known as sufficient reason or prime implicant
[Shih et al., 2018, Darwiche and Hirth, 2020]).
We make several contributions.
We extend the concept of Same Decision Probability (SDP) to the regression setting so that we can extend Sufficient Explanations from classification to regression.
We introduce a fast and efficient estimator of the SDP based on Random Forests and prove its uniform almost sure convergence.
Our approach can deal with non-discrete features and does not need the estimation of the distribution of X , contrary to [Wang et al., 2020].
Our method can explain the data generating process ( X , Y ) directly or any learnt model ( X , f
( X )) .
We introduce the probabilistic local explanatory importance which is the frequency of each feature to be in the set of all Sufficient Explanations.
In particular, this indicates the diversity of the Sufficient
Explanations.
We introduce local rule-based explanations for classification or regression which are simultaneously minimal and sufficient.
We compare our approaches w.r.t other explainable AI methods and provide a Python package that computes all our methods.
Motivations and Related works
The methods used to explain the local behavior of Machine Learning models can be organized into 5 groups: features attributions, decision rules, instance-wise feature selection, logical reasoning approaches, data generation based or counterfactual examples.
The benefits of feature attributionbased explanations, e.g., SHAP [Lundberg et al., 2020] or LIME [Ribeiro et al., 2016] is that they are easy to read, they can be applied to any model and are generally more scalable than their alternatives.
On the other hand, they are sensitive to perturbations [Ignatiev et al., 2019], or can be fooled by adversarial attacks [Slack et al., 2020].
These downsides can be caused by the local perturbations used, which make them inconsistent with the data distribution.
Quite differently, instance-wise feature selection such as L2X [Chen et al., 2018] or INVASE
[Yoon et al., 2018] aims at finding the minimal subset of variables that are relevant for a given instance x and its label y .
Interactions can be captured in that way.
In addition, the identification of a minimal subset
S = S ( x ) is well-formalized and the objective is to find S such that L ( Y | X =
x ) ≈ L ( Y | X S = x S ) .
However, these methods are not reliable because they are prone to approximation errors due to the training of several Neural Networks, and they provide no guarantees about the fidelity of the explanations [Jethani et al., 2021].
A similar approach is also developed in [Dhurandhar et al., 2018] called Pertinent Positive.
Anchors [Ribeiro et al., 2018] are local rule-based explanations that propose a solution to the reliability issue by providing an explanation with guarantees.
It explains individual predictions of any classification model by finding a decision rule that reaches a given accuracy for a high percentage of the neighborhood of the instance.
However, the method is only available for classification, requires discrete variables, is unstable and tends to use more variables than needed.
Logical Reasoning Approaches such as Sufficient Reasons [Shih et al., 2018, Darwiche and Hirth, 2020] select a minimal subset of features guaranteeing that, no matter what is observed for the remaining features, the decision will stay the same.
It can be seen as an instance-wise feature selection but with guarantees of sufficiency and minimality (i.e., no subset of the set satisfies the sufficiency condition).
However, since the guarantees are deterministic, it is often necessary to include many features into the explanation, making the explanation more complex and thus less intelligible.
A relaxation of this method is the Sufficient Explanations [Wang et al., 2020] that gives probabilistic guarantees instead of deterministic guarantees, i.e., it required that the prediction remains the same with high probability.
It gives a simple local explanation with guarantees while considering feature interactions and the data distribution.
However, it is limited to classification with binary features and requires learning the distribution of the features.
Moreover, the Sufficient Explanations are not unique, which causes a selection problem as the whole set of explanations is not interpretable.
In this work, we propose a consistent method that efficiently finds the Sufficient Explanations of any data generating process ( X , Y ) or any model ( X , f ( X )) , without learning the distribution of X .
In particular, we don’t need to have access to the model f , we need only the predictions, contrary to [Wang et al., 2020].
We propose local attributions that summarize the diversity of the Sufficient
Explanations.
In addition, we propose local rule-based explanations for regression and classification models based on Sufficient Explanations.
To the best of our knowledge, it is the first local rule-based explanations for regression.
Probabilistic Sufficient Explanations for Regression
Let assume we have an i.i.d sample D n =
( X i , Y i ) i =1 ,...,n such that ( X , Y ) ∼ P ( X ,Y ) where
X ∈ R p and Y ∈ R .
We use uppercase letters for random variables and lowercase letters for their value assignments.
For a given subset S ⊂ [ p ] , X S
=
( X i )
i ∈ S denotes a subgroup of the features.
We define the explanations of an instance x as the minimal subsets x S , S ⊂
[ p ] such that given only those features, the model yields "almost" the same prediction y as on the complete example with high probability, under the data distribution p ( X ) .
The main probabilistic reasoning tool that we use for our explanations is the Same Decision Probability (SDP)
[Chen et al., 2012].
For classification, it is defined as the probability that the classifier has the same output by ignoring some variables.
To explain also regression models, we propose the following definition of the SDP:
Definition 3.1.
(Same Decision Probability of a regressor).
Given an instance ( x , y ) , the Same
Decision Probability at level t of the subset S ⊂ (cid:74) 1 , p (cid:75) , w.r.t x = ( x S , x ¯ S ) is
SDP S
( y ; x , t ) =
P (cid:0) ( Y − y ) 2 ≤ t | X S
= x S (cid:1) .
In a regression setting, the SDP gives the probability to stay close to the same prediction y at level t , when we fix X S = x S or when X ¯ S are missing.
The higher is the probability, the better is the explanation powered by S .
Note that for classification, the SDP is defined as SDP S ( y ; x ) =
P ( Y = y
| X S = x S ) .
Although we present all the methods with the SDP for regression, they remain the same for classification, we only need to replace SDP S
( y ; x , t ) by SDP S ( y ; x ) .
Now, we focus on the minimal subset of features such that the model makes the same or almost the same decision with a given (high) probability π .
Definition 3.2.
( Minimal Sufficient Explanations ).
Given an instance ( x , y ) , S π ( x ) is a Sufficient
Explanation for probability π , if SDP S π ( x ) ( y ; x , t ) ≥ π , and no subset Z of S π ( x ) satisfies
SDP Z ( y ; x , t ) ≥ π .
Hence, a Minimal Sufficient Explanation is a Sufficient Explanation with minimal size.
For a given instance, the Sufficient Explanation or Minimal Sufficient Explanation may not be unique [Darwiche and Hirth, 2020].
Furthermore, there may be significant differences among the
Sufficient Explanations or Minimal Sufficient Explanations.
We denote A-SE as the set of all
Sufficient Explanations and M-SE as the set of Minimal Sufficient Explanations.
Thus, the number and the diversity of the explanations make the method less intelligible, as deriving one of them is not informative enough, and all of them are too complex to interpret.
Therefore, we propose to compute the following local attributions that summarize the importance of each variable in A-SE/M-SE:
Definition 3.3.
( Local eXplanatory Importance - LXI ).
Given an instance ( x , y ) and its A-SE or
M-SE.
The local explanatory importance of x i is how frequent x i is chosen in the A-SE or M-SE.
Contrary to classical local feature attributions like SHAP or LIME, the values of Local Explanatory
Importance does not depend on the range of values of the predictions, and are interpretable by design.
It corresponds to the frequency of apparition in the A-SE or M-SE, which allows to reason about the relative difference between the attribution of each feature.
Indeed, we can easily discriminate between the importance of variables in terms of probabilities compared to arbitrary values of SHAP or LIME that depend on the model and its predictions.
In our framework, a value equal to 1 means that this feature is present in all the A-SE/M-SE.
Hence this feature is necessary to maintain the prediction.
Moreover, the attributions of the features are sparse since they are based on the A-SE/M-SE.
Although Sufficient Explanations allow finding local relevant variables, we may want to know the logical reasons relating input and output.
In essence, explaining a decision means giving the reasons that highlight why the decision has been made.
Therefore, we propose to extend the Sufficient Explanations into local rules.
A rule is a simple IF-THEN statement, e.g., IF the conditions on the features are met, THEN make a specific prediction.
Recall that given an instance x , a Sufficient Explanation is the minimal subset S ⊂
[ p ] , such that fixing the values X S
= x S permits to maintain the prediction with high probability.
The idea is to find the largest rectangle
L S ( x ) = (cid:81) | S | i =
[ a i , b i ] , a i , b i ∈ R given the indexes of the Sufficient Explanation S such that x S ∈ L S ( x ) and ∀ z with z S ∈ L S ( x ) , SDP S ( y ; z ; t ) ≥ π .
Definition 3.4.
( Minimal Sufficient Rule ).
Given an instance ( x , y ) , S a Minimal Sufficient
Explanation, the rectangle L S ( x ) =
(cid:81) | S | i =
[ a i , b i ] , a i , b i ∈ R is a Minimal Sufficient Rule if L S ( x ) =
argmax L ( x ) V ol ( L ( x )) , x S ∈ L S ( x ) and ∀ z , z S ∈ L S ( x ) , SDP S ( y ; z , t ) ≥ π .
Intuitively, the Sufficient Rule is a generalization of the Sufficient Explanation, i.e., instead of satisfying the minimality/sufficiency conditions of definition 3.2 if we fixed the values X S = x S , we want to satisfy these conditions on all the elements of a rectangle L S ( x ) that contains x S .
We also want this rectangle to be of maximal volume such that it covers a large part of the input space.
Thus, the Sufficient Rule captures the local behavior of the model around x while ensuring the minimality of the rule and guarantees on the outcome.
Note that the volume of the rectangle L can be defined as
V ol ( L ( x )) =
P ( X ∈ L ( x )) or λ ( L ( x )) , with λ the Lebesgue measure.
While Sufficient Rules are similar to Anchors introduced by Ribeiro et al.
[2018], we emphasize two major types of differences.
The first is that our framework for constructing rules can address regression problems, deal with continuous features without discretization, and do not need access to the model f .
Moreover, if we have a model f and an instance x , Anchors search the largest rule (or rectangle) L S ( x ) such that P Q ( f ( x ) =
Y | X S ∈ L S ( x )) ≥ π under an instrumental distribution Q .
This is different from the Sufficient Rule that requires the stability of the prediction for all the observations in the rectangle i.e ∀ x S ∈ L S ( x ) , P ( f ( x ) =
Y | X S
= x S ) ≥ π .
The second major difference is that the Sufficient Rule is based on the original distribution P ( X ,Y ) as we use conditional distribution P ( Y | X S ) .
At the contrary, anchors use local sampling perturbations (introducing another distribution Q ).
As we discuss in the next section, the effective computation of these rules is very different.
Anchors use a heuristic approach to find the minimal rule, which might produce suboptimal minimal rules.
The Sufficient Rules satisfy a minimality principle by definition.
SDP, Sufficient Explanations and Sufficient Rules via Random Forest
In order to find the Sufficient Explanations S π ( x ) and the corresponding Sufficient Rules L S π ( x ) , we need to compute the SDP for any subset S .
However, the computation of the SDP is known to be computationally hard; even for simple Naive Bayes model, the computation of SDP is NP-hard
[Chen et al., 2013].
Consequently, approximate criteria based on expectations instead of probabilities have been introduced by Wang et al.
They proposed to use a Probabilistic Circuit [Choi et al., 2020] to model the distribution of the features X and compute a lower bound of the SDP.
In this section, we propose a consistent estimator of the SDP for any distribution ( X , Y ) .
It is based on two ideas: Projected Forest [Bénard et al., 2021a,c] and Quantile Regression Forest [Meinshausen and Ridgeway, 2006].
The Projected Forest is an adaptation of the Random Forest algorithm that estimates E [ Y | X S = x S ] instead of E
[ Y | X
= x ] , and the Quantile Regression Forest uses the
Random Forest algorithm to estimate the Conditional Distribution Function (CDF)
P ( Y ≤ y | X = x ) .
The first step is to write the SDP as
[Equation]
Equation 4.1 shows that the only challenge is to estimate the Projected (or Conditional) CDF
F S ( y | X S = x S ) =
P ( Y ≤ y | X S
= x S ) .
The variant of the original Random Forest proposed by Meinshausen and Ridgeway [2006] that estimates the CDF F ( y | X = x ) =
P ( Y ≤ y | X = x ) is not of interest to us because we want to estimate the Projected CDF F S ( y | X S
= x S ) for any
S .
The recent works by Bénard et al.
[2021a,c] are much more relevant as they permit to estimate
E [ Y | X S = x S ] from a classical Random Forest that has learned to predict E [ Y | X = x ] .
The idea is to extract a new Forest called Projected Forest from the original Forest, which is a projection of the original Forest along the S -direction.
We propose to combine the ideas of Quantile Regression Forest and Projected Forest to estimate the Projected CDF F S ( y | X S = x S ) .
In addition, we prove the consistency of our estimator of the
Projected CDF.
4.1 Random Forest and Condition Distribution Function (CDF) Forest
A Random Forest (RF) is grown as an ensemble of k trees, based on random node and split point selection based on the CART algorithm
[Breiman et al., 1984].
The algorithm works as follows.
For each tree, a n data points are drawn at random with replacement from the original data set of size n ; then, at each cell of every tree, a split is chosen by maximizing the CART-criterion; finally, the construction of every tree is stopped when the total number of cells in the tree reaches the value t n .
For each new instance x , the prediction of the l -th tree is:
[Equation]
where:
Θ l , l = 1 , . . .
, k are independent random vectors, distributed as a generic random
vector Θ
=
(Θ 1 , Θ 2 ) and
independent
of
D n
Θ 1 contains
indexes
of observations that
are
used to build the tree,
i
e. the bootstrap sample and Θ 2 indexes of splitting candidate variables in each node.
Θ 1: k denotes the sequence of Θ l ’s. • A n ( x ; Θ l , D n ) is the tree cell (leaf) containing x • N n ( x ; Θ l , D n ) is the number of bootstrap elements that fall into A n ( x ; Θ l , D n ) • B n ( X i ; Θ l ) is the bootstrap component
i
e. the number of times that the observation has been chosen from the original data.
The trees are then averaged to gives the prediction of the forest as:
[Equation]
The Random Forest estimator (Eq. 4.2) can also be seen as an adaptive neighborhood procedure [Lin and Jeon, 2006].
For every instance x , the observations in D n are weighted by w n,i ( x ; Θ 1: k , D n ) , i = 1 , . . . , n .
Therefore, the prediction of Random Forests and the weights can be rewritten as m k,n ( x , Θ 1: k , D n ) = n
[Equation]
i
[Equation]
x ; Θ
[Equation]
n
[Equation]
Viewing a Random Forest as an adaptive nearest neighbor predictor offers natural estimates of more complex quantities (Cumulative hazard function [Ishwaran et al., 2008], Treatment effect [Wager and Athey, 2017], and conditional density [Du et al., 2021]).
Therefore, just as E [ Y | X = x ] is approximated by a weighted mean over observation of Y i , E [ 1 Y ≤ y | X
= x ] is approximated by the weighted mean over the observations of 1 Y i ≤ y using the same weights w n,i ( x ; Θ 1: k , D n ) .
The approximation is
[Equation]
To simplify notations, we omit Θ 1 , . . .
, Θ k , D n and we write (cid:98) F S ( y | X S
= x S ) for any S .
4.2 Projected Forest and Projected CDF Forest
We describe the Projected Forest (PRF) and show how it is combined with the Quantile Regression
Forest to build the estimator of the Projected CDF.
The PRF algorithm has been introduced in Bénard et al.
[2021c,a].
The idea is to project the partition of each tree of the forest on the subspace spanned by the variables in S , thus we can estimate E
[ Y | X S ] rather than E
[ Y | X ] .
The computation of these partitions for each S can be computationally expensive in high dimension.
However, Bénard et al.
[2021a] uses a simple algorithm trick to derive efficiently the output of the Projected Forest without computing explicitly its partitions.
Roughly, for computing the prediction of a tree, the algorithm ignores the splits that use variables not contained in S .
It works as follow: when an observation is dropped down in the initial trees, and it encounters a split involving a variable i / ∈ S , the observation is sent both to the left and right children nodes.
As a result, each observation falls in multiple terminal leaves of the tree.
Thus, to compute the prediction of an instance x S , we collect the set of terminal leaves where it falls, and average the output Y i of the training observations which belong to every terminal leaf of this collection.
E [ Y | X S
= x S ] is estimated as the average outputs of the training observations in the intersection of the leaves where x S falls.
An efficient implementation of the PRF algorithm is detailed in Appendix.
The associated PRF is m ( x S ) k,n ( x S )
= (cid:80) ni
=1 w n,i ( x S ) Y i where the weights are defined by
[Equation]
where A ( x S ) n ( x S ; Θ l , D n ) is the leaf of the associated Projected l -th tree where x S falls and
N ( x S ) n ( x ; Θ l , D n ) is the number of bootstrap observations that falls in A ( x S ) n ( x S ; Θ l , D n ) .
Therefore, we approximate the Projected CDF F S ( y | X S
= x S ) =
P ( Y ≤ y | X S
= x S ) as in Eq.
4.3 by using the weights of the Projected Forest defined in Eq.
The estimator of the Projected CDF is defined as: (cid:98) F S ( y | X S
= x S )
=
(cid:80) ni
=1 w n,i ( x S )
1 Y i ≤ y .
4.3 Consistency of the Projected CDF Forest
In this section, we state our main result, which is the uniform a.s. convergence of the estimator (cid:98) F S ( y | X S = x S ) to F S ( y | X S
= x S ) .
Meinshausen and Ridgeway [2006] showed the uniform convergence in probability of a simplified version of the estimator of the CDF defined in Eq.
4.3, where the weights w n,i ( x S ; Θ 1: k , D n ) are in fact considered to be non-random while they are indeed random variables depending on (Θ l ) l =1 ,...,k , D n .
Moreover, the bootstrap was replaced by subsampling without replacement as in most studies that analyse the asymptotic properties of Random
Forests [Scornet et al., 2015, Wager and Athey, 2017, Goehry, 2020].
However, Elie-Dit-Cosaque
and
Maume-Deschamps [2020] showed the almost everywhere uniform convergence of both estimators (the simplified and the one defined in Eq. 4.3) under realistic assumptions with all the randomness and bootstrap samples.
We follow their works to prove the consistency of the PRF CDF (cid:98) F S ( y | X S = x S ) based on the following assumptions.
Assumption 4.1.
∀ x ∈ R d , the conditional cumulative distribution function F ( y | X = x ) is continuous.
Assumption 4.1 is necessary to get uniform convergence of the estimator.
Assumption 4.2.
For l ∈ [ k ] , we assume that the variation of the conditional cumulative distribution function within any cell goes to 0 .
[Equation]
Assumption 4.2 allows to control the approximation error of the estimator.
If for all y , F ( y | . ) is continuous, Assumption 4.2 is satisfied provided that the diameter of the cell goes to zero.
Note that the vanishing of the diameter of the cell is a necessary condition to prove the consistency of general partitioning estimator (see chapter 4 in Györfi et al.
Scornet et al.
[2015] show that it is true in RF where the bootstrap step is replaced by subsampling without replacement and the data come from additive regression models [Stone, 1985].
The result is also valid for all regression functions, with a slightly modified version of RF, where there are at least a fraction γ observations in children nodes, and the number of splitting candidate variables is set to 1 at each node with a small probability.
Under these small modifications, Lemma 2 from Meinshausen and Ridgeway [2006] gives that the diameter of each cell vanishes.
Assumption 4.3.
Let k and N n ( x ; Θ l , D n ) (number of bootstrap observations in a leaf node), then there exists k
= O ( n α ) , with α > 0 , and ∀ x ∈ R d , N n ( x ; Θ l , D n ) =
Ω 2 ( √ n ( ln ( n )) β ) , with β >a.s.
Assumption 4.3 allows us to control the estimation error and means that the cells should contain a sufficiently large number of points so that averaging among the observations is effective.
To prove the consistency of the PRF CDF (cid:98) F S ( y | X S = x S ) , we only need to verify the assumptions 4.1, 4.2, 4.3 on the parameters of the PRF CDF and the Projected CDF F S ( y | X S = x S )
= P ( Y ≤ y | X S
= x S ) .
Assumptions 4.1 and 4.2 are satisfied for the Projected CDF and the PRF CDF’s leaves.
Since by definition A ( x S ) n ( x S ; Θ l , D n ) ⊂
A n ( x ; Θ l , D n ) , if the variations within the cells of the RF
[Equation]
vanish (diameter goes to zero), it also vanishes in the Projected forest.
In addition, if the CDF
F ( y | X = x ) =
F ( y | X S
= x S , X ¯ S
= x ¯ S ) is continuous, we can show by a straightforward analysis of parameter-dependent integral that the Projected CDF F S ( y | X S = x S ) = (cid:82) F ( y | X S = x S , X ¯ S
= x ¯ S ) p ( x ¯ S | x S )
d x ¯ S is also continuous.
As we control the minimal number of observations in the leaf of the PRF CDF by construction, Assumption 4.3 is also verified.
Then, the PRF CDF satisfies also Assumption 4.1-4.3 which ensures its consistency thanks to Theorem 4.4.
Theorem 4.4.
Consider a RF satisfying Assumptions 4.1 to 4.3.
Then,
[Equation]
The complete proof and simulations showing the convergence of the estimator can be found in
Appendix.
4.4 Estimation of SDP, Sufficient Explanations and Sufficient Rules
In this section, we show how we compute the SDP, Sufficient Explanations, and Sufficient Rules using the PRF CDF estimator.
We derive from the previous section the following consistent estimator of any SDP S ( y ; x , t ) :
[Equation]
However, finding the A-SE/M-SE using a greedy algorithm is computationally hard, since the number of subsets is exponential.
Therefore, we propose to reduce the number of variables by focusing only on the most influential variables.
We search the Sufficient Explanations in the subspace of the s =variables frequently selected in the RF used to estimate the SDP, reducing the complexity from 2 p to 2 10 .
This preselection procedure is already used in Bénard et al.
[2021b,a], and it is mainly based on
Proposition 1 of Scornet et al.
[2015], which highlights the fact that RF naturally splits the most on influential variables.
Note that the minimum number of selected variables s is a hyperparameter.
To find the Sufficient Rules, we used the SDP’s estimator (cid:91) SDP S .
By using the fact that the PRF
CDF is a tree-based model, and thus (cid:91) SDP S partitions the space like a tree or a Random Forest, we do not need to discretize the continuous space to find the largest rectangle.
We only need to find the leaves compatible with the conditions of the Sufficient Rule defined in 3.4.
Given a
Minimal Sufficient Explanation S of an instance x , we already a have a rectangle L S ( x ) defined by the PRF CDF or (cid:91) SDP S that is the largest rectangle such that x S ∈ L S ( x ) and ∀ z with z S ∈
L S ( x ) , (cid:91) SDP S ( y ; z , t ) = (cid:91) SDP S ( y ; x , t ) ≥ π .
By definition, it is the intersection of the cell of the trees where x S falls, namely ∩ kl =1 A ( x S ) n ( x S ; Θ l , D n ) .
Thus, starting from ∩ kl =1 A ( x S ) n ( x S ; Θ l , D n ) , which is also a cell (leaf) of the Projected Forest, we can find all the neighboring leaf (rectangle) that we can merge with it to get the largest rectangle.
We will see in the next section that it provides good insights about the local behaviour of the model.
How to choose the hyperparameters.
The main hyperparameters are: s the number of preselected variables, π the minimal probability of changing the decision and t which corresponds to the radius of the ball center at the prediction in the definition 3.1 of the SDP for regression problems.
The choice of s ≪ p is motivated by the fact that many datasets have intrinsic dimensions much lower than the ambient dimension.
Our Selection criterion is based on Proposition 1 in [Scornet et al., 2015], which highlights the fact that RF naturally splits the most on influential variables, but any
RF’s importance measure s.t.
Mean Decrease Accuracy [Breiman, 2001] or Impurity [Breiman and
Cutler, 2003] can be used as the RF algorithm is known to adapt to the intrinsic dimension [Scornet et al., 2015, Klusowski, 2020].
Therefore, the choice of s is directly driven by the computation power available to explore the subsets.
In practice, we have always found coalitions S with a probability above π = 0 .
9 with s = 10 for real world datasets.
Otherwise, we propose a trade-off between the maximal reachable size s and the highest probability.
We suggest choosing π = 0 .
9 as it is an acceptable level of risk, but the user can increase/decrease this probability depending on the use case.
Probably the newest and most challenging hyperparameter to select is t ; we suggest having an adaptive radius t ( x ) using the quantile of the conditional distributions Y | X = x , which is a by-product of the Quantile Regression Forest used for computing the SDP.
For each observation, we choose the radius t ( x ) =
[ˆ q α 1 ( x ) , ˆ q 1 − α 2 ( x )] with α 1 + α 2 = α .
We build then a confidence interval of varying length but with constant confidence level across the dataset.
This makes our approach as a natural generalization of the SDP in the classification case by accounting for the uncertainty of the model to explain.
In that case, the SDP and associated sufficient coalition should be read: "if X S =
x S is fixed, then there is a probability at least π of not changing the prediction significantly with level 1 − α , or Y ∈
[ˆ q α 1 ( x ) , ˆ q 1 − α 2 ( x )] with probability π .
{+For this reason, we suggest fixing α 1 + α 
+}
= α and π at standard level 1 − α =
π = 0 .
9 agreeing with acceptable level of risks.
Experiments
We conduct three experiments in this section.
The first compares the Sufficient Explanations, Sufficient Rules and LXI with state-of-art (SOTA) local explanations methods (SHAP, LIME, INVASE) in a simple high dimensional regression model with small relevant features.
Although this model is simple, SOTA (SHAP, LIME) have been shown to poorly detect the important variables of this model [Amoukou et al., 2021, Ghalebikesabi et al., 2021].
Then, we analyse the performance of the Sufficient Rules in a real world regression problem.
Finally, we highlight the advantages of the
Sufficient Rules in comparison with Anchors in real world classification datasets.
More experiments can be found in Appendix.
To effectively compare different explanation methods, we use synthetic data since we need the ground truth. We use the {+following synthetic model: we have X ∈ R p , X ∈ N (0 , Σ) , Σ = 0 . 8 J p + 
 I p with p = 100 , I p is the identity matrix, J p is all-ones matrix and a linear predictor with switch defined as:+}
[Equation]
The variables X i for i = 6 . . .
100 are noise variables.
We fit a RF with a sample size n = 10 4 , k = 20 trees and the minimal number of samples by leaf node is set to t n = ⌊√ n × ln( n ) 1 . 5 / 250 ⌋ for the original and the Projected Forest.
The R 2 = 99% on the test set of size 10 4 .
The RF is used to compute the explanations of SHAP, LIME.
The Projected Forest is also extract from the RF for the SDP approaches.
We choose α 1 = 0 . 05 , α 2 = 0 . 95 and π = 0 .
For INVASE, we use Neural
Networks with 3 hidden layers for the selector model and the predictor model as in Yoon et al.
Notice that for SHAP, LIME and the SDP approaches, we used the same information (the learned
RF) to retrieve the true explanation of the data. The performance of INVASE and the RF is the same, both model perfectly fit the data with a R 2 = 99% . SDP approaches vs SOTA (SHAP, LIME, INVASE) on regression. Here, we analyze the capacity of each method to discover the local important variables of the model defined in Eq. 5.1.
Indeed, Eq.
5.1 shows that if x 5 ≤ 0 , the model uses only the variables x 1 , x 2 otherwise it uses the variables x 3 , x 4 .
Thus, we try to find the top K = 3 relevant features for each sample.
Note that K is not a required input for SDP and INVASE, but K must be given for SHAP and LIME.
We use the true positive rate (TPR) (higher is better) and false discovery rate (FDR) (lower is better) to measure the performance of the methods on discovery (i.e., discovering which features are relevant). In addition, as one of the objectives of each method is to find the minimal subset x S that is relevant to the corresponding target y , we also compute a predictive performance metrics that shows how well the projected predictor E [ Y | X S = x S ] selected by each method is close to the predictor on the full set of features E [ Y | X = x ] , under the data distribution. Formally, for a given subset S , we denote it as P-MSE =
E Z (cid:20)(cid:16) E
[ Y | X
= Z ] − E
[ Y | X S
= Z S ] (cid:17) 2 (cid:21) where Z ∼ P X .
We obtain the following results for Sufficient Explanation (TPR = 99% , FDR = 2% , P-MSE = 0 . 02 ),
INVASE (TPR = 99% , FDR = 87% , P-MSE = 0 . 006 ), SHAP (TPR = 73% , FDR = 27% , PMSE = 0 . 79 ), and LIME (TPR = 50% , FDR = 49% , P-MSE = 5 . 01 ).
We observe that the Sufficient
Explanations succeeds to find the top K relevant variables and outperform the other methods by a significant margin.
SHAP and LIME obtain the worst discovery rate.
INVASE succeeds in finding the relevant variables, but it has a high FDR ( 87% ), which means we cannot distinguish between the relevant and irrelevant variables since 87% of the selected variables are irrelevant.
We also see that the P-MSE of INVASE is the lowest, which is not surprising as it selects all the relevant variables despite its high FDR.
Indeed, this metric is not much affected by the FDR.
The P-MSE of Sufficient
Explanations is also almost zero, and as above, SHAP and LIME perform worse than the other methods.
In table 1, we compare the LXI and SHAP values on 1000 observations having X 5 > 0 .
We compare the mean absolute values of SHAP and average LXI on this sub-population.
Notice that on this model, these observations have a single Sufficient Explanation which is the variables X 3 , X 4 , X 5 .
Both models give null attributions to the noise variables, but SHAP gives higher importance to the variables X 1 , X 2 than the truly important variables X 3 , X 4 , X 5 .
On the other hand, LXI gives non null attributions only on the important variables.
We refer to the Appendix for an additional comparison with SHAP in a case where there are several Sufficient Explanations.
[Table]
However, even if the Sufficient Explanation find effectively the top K relevant variables, it cannot provide a complete understanding of the local behavior of the regression model (the baseline methods also), i.e., that it’s the sign of x 5 that matters.
Thus, by extending the Sufficient Explanation into
Sufficient Rule we can retrieve the complete story.
We choose an observation ( x , y ) such that its Sufficient Explanation found is S
= [ X 3 , X 4 , X 5 ] , with x S = [ − 3 . 64 , − 4 .
Although the Sufficient Explanation shows that fixing the value x S permit to maintain the prediction with high probability, the Sufficient Rule gives the additional information that we can also maintain the prediction within a small radius around y by satisfying the rule L S ( x ) = {
X 5 > 0 AND − 4 , 45 ≤
X 4 ≤ − 4 , 06 AND − 3 .
67 ≤ X 3 ≤ − 3 . 58 } .
The Sufficient Rule L S ( x ) catches perfectly the local behaviour of the model which says that despite the values of x 3 , x 4 , it’s the sign of x 5 that matters.
SDP approaches on real world regression.
We demonstrate the performance and flexibility of the
Sufficient Rules (SR) on a real world regression dataset.
Since there are no ground truth explanations for real world datasets, we use the predictive performance and simplicity (number of variables used) of the SR as an indicator of the effectiveness of the explanations.
Indeed, we can build a global model by combining all the Sufficient Rules found for the observations in the training set, and we measure its performance on the test set.
We set the output of each rule as the majority class (resp. average values) for classification (resp. regression) of the training observations that satisfy this rule. Note that some rules can overlap and an observation can satisfy multiple rules.
To resolve these conflicts, we use the output of the rule with the best precision (AUC or MSE).
We called this model
Global-SR.
We have experimented on Bike Sharing data [Kaggle, 2015] that contains 10886 records and 15 variables about historical usage patterns with weather data in order to forecast bike rental demand in the Capital Bikeshare program in Washington, D.C.
We split the data into train ( 75% ) - test ( 25% ) set and train a RF with k = 20 trees and maximal depth = 14 .
It has R 2 = 94% on test set.
We use the RF on the train set to generate the SR.
Although the Global-SR covers 78% of the test set, we observe that it performs as well as the baseline models with R 2 = 90% while being transparent in its decision process. Note that the rules of the SR on Bike Sharing Demand are based on 4.5 variables in average. We give examples of the {+learned rules: R 
+}
= {
If Workingday =
True and Hours ∈ [6.5, 7.5]
THEN Bike rental demand = 20 } ,
R= { If Hours ∈ [8.5, 9] and Year ≤ 2011 and month ≥ 5 THEN Bike rental demand = 192 } .
The number of observations that satisfy these rules is 145 , 133 for the rules R 1 ,
R 2 respectively with a mean absolute error MAE R 1 = 17 , MAE R 2 = 36 .
Anchors vs Sufficient Rules (SR).
To compare our methods w.r.t to Anchors, we have to consider a classification problem.
We use three popular real-world datasets: Compas ( n = 6167 , p = 14)
[Larson et al., 2016], Nhanesi ( n = 8593 , p = 17) [CDC, 1999-2022], and Employee Attrition ( n = 1470 , p = 27)
[Kaggle, 2017] which we split into train ( 75% ) - test ( 25% ) set, and train a
RF with the parameters of the previous section.
We use the RF to generate the local rule-based explanations with Anchors and the SDP approach (Sufficient Rules) to explain the RF’s predictions on the test set.
We aim to evaluate the generalization of each explanation across the population, thus we measure the average of this metrics Coverage (higher is better): what fraction of unseen instances fall in the rule and Correctness (higher is better): average number of unseen instances that satisfy the rule and has the same output than the observation that generate the rule, Sparsity (lower is better): the mean, variance and maximal size of the rule (number of variable on which it is based).
[Table]
In table 2, we observe that both model have a high accuracy in all datasets, but SR consistently outperforms Anchors on all datasets in Correctness and Coverage .
On the other hand, Anchors uses many more features.
Indeed, by sampling marginally (i.e. assuming that the features are independent)
Anchors can succeed to find accurate and high coverage rule, but at the cost of optimality.
In fact, we can observe in table 2 that Anchors tend to give much longer rules.
While the observed maximal size of SR is 9 in all dataset, Anchors can provide a rule of size 12 ( Compas ), 16 ( Nhanesi ), 23 ( Attrition ).
For instance, the size distribution of Anchors on
Nhanesi is represented with the following dictionary { size : count } : { 1 : 704 , 2 : 127 , 3 : 71 , 4 : 21 , 5 : 13 , 6 : 10 , 7 : 10 , 8 : 9 , 9 : 9 , 10 : 4 , 11 : 2 , 12 : 4 , 13 : 5 , 14 : 1 , 16 : 1 } , and the corresponding distribution for the SR is { 1 : 775 , 2 : 145 , 3 : 52 , 4 : 9 , 5 : 12 , 7 : 4 } .
Note that this is a significant drawback of Anchors, as simplicity of the explanations is an essential desideratum for explanation methods.
We give an additional experiment confirming these results in the Appendix.
Another desirable property of explanation methods is stability, i.e nearby observations must have same explanations.
Here, we evaluate the stability of the methods w.r.t input perturbations.
For each observation x , we compare its rule with the rules of 50 noisy versions of x obtained by adding random Gaussian noises N (0 , ϵ × I ) to the features values with ϵ = 0 .
The perturbation is small enough to not change the prediction.
For each dataset Compas, Nhanesi, Attrition , we randomly perturb 100 observations in the test set with 50 noisy versions, and we observe in average 10 (std=76), 6.83 (std=139), 14 (std=58) different rules for Anchors respectively, while we have 1.5 (std=0.25), 1.1 (std=1.9), 1.13 (0.13) for SR, resp.
It shows the large instability of Anchor compared to SR.
Indeed, even when ϵ = 0 (no perturbation), Anchors gives different rules, e.g., on Compas its has(std=70) different rules in average with no perturbations. Results for other values of ϵ can be found in Appendix. These experiments demonstrate that the SR gives more optimal rules than the one returned by Anchors.
We also conduct an additional experiment in the Appendix that confirms this claim in a setting where we know exactly the ground truth.
Conclusion
In this work, we introduce a fast and consistent estimator of the Same Decision Probability and propose a natural generalization of the SDP for regression problems.
Thus, we introduce the first local rule-based explanations for regression. We give a consistent estimates of three local explanations methods: Minimal Sufficient Explanations, Local eXplanatory Importance, and Minimal Sufficient Rules for any data. We prove that these methods considerably improve local variable detection over state-of-the-art algorithms while ensuring minimality, sufficiency, and stability.
Our generalization of
SDP and Minimal Sufficient Rules are tightly related. They are linked by a Random Forest, which is a computationally and statistically efficient estimator of the SDP and gives the partition that is translated into an interpretable rule. Therefore, our method is principally suitable for datasets where tree-based models work (e.g., tabular data). In future works, we aim at improving the interpretability and confidence of the Sufficient Rules by taking into account uncertainty estimates of their predictions.
[-For this reason, we suggest fixing α 1 + α 
-]This work has been done in collaboration between Stellantis and Laboratoire de Mathématiques et Modélisation d’Évry
(LaMME) and was supported by the program Convention Industrielle de Formation par la Recherche (CIFRE) of the Association Nationale de la Recherche et de la Technologie (ANRT). Checklist For all authors... (a) Do the main
claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? Yes
] We present the Minimal Sufficient Explanations, the Local eXplanatory Importance (LXI), and the Sufficient Rules in Section 3. While the Sufficient Rules and LXI are new, the Sufficient Explanations are a generalization of existing works so that they can also address regression problems, deal with continuous features, and are more efficient to estimate. We present all the theoretical framework in Section 4 and their complete proofs in Appendix.
We provide a Python package that computes our methods.
Finally, we demonstrate the advantage of our methods w.r.t SOTA on real-world datasets in section 6. (b) Did you describe the limitations of your work? [Yes] Yes, we remind in the conclusion that our approaches are appropriate for datasets where tree-based models work. (c) Did you discuss any potential negative societal impacts of your work?
[Yes] Our work is fully dedicated to the positive societal impacts.
Indeed, we propose new methods that outperforms SOTA in local important feature detection. In addition, we propose a new rule-based explanation that is more faithful to the data distribution than prior works (Anchors).
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] We conform to the ethics review. If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[Yes] We state all the theoretical results in Section 4.
(b) Did you include complete proofs of all theoretical results? [Yes] The complete proofs are in Appendix. If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] We provide a Python package and the results at https://github.com/salimamoukou/acv00 . (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Appendix. (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix. 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators? [Yes] We cited the datasets that we used.
(b) Did you mention the license of the assets?
[Yes] (c) Did you include any new assets either in the supplemental material or as a URL?
[Yes] It can be found at https://github.com/salimamoukou/acv00 .
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[No] Not relevant (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[No] Not relevant 5.
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[No] Not Relevant (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[No] Not relevant (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[No] Not Relevant
Supplementary materials: Consistent Sufficient Explanations and Minimal Local Rules for explaining any classifier or regressor
Contents
A Proofs
A.1 Main assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A.2 Proof of theorem 4.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B Empirical evaluations of the estimator (cid:98) F S
C Additional experiments
C
D From Sufficient Rules to Global Interpretable model
E Projected Forest CDF algorithm
A Proofs
In this section, we prove our main result, Theorem 4.4, which is the uniform a.s. consistency of the
PRF CDF (cid:98) F S ( y | X S = x S ) to the projected CDF F S ( y | X S = x S ) .
A.1 Main assumptions
Assumption A.1.
∀ x ∈ R d , the conditional cumulative distribution function F ( y | X = x ) is continuous.
Assumption A.1 is necessary to get uniform convergence of the estimator.
Assumption A.2.
For l ∈ [ k ] , we assume that the variation of the conditional cumulative distribution function within any cell goes to 0 .
[Equation]
Assumption A.2 allows to control the approximation error of the estimator.
If for all y , F ( y | . ) is continuous, Assumption A.2 is satisfied provided that the diameter of the cell goes to zero.
Note that the vanishing of the diameter of the cell is a necessary condition to prove the consistency of general partitioning estimator (see chapter 4 in Györfi et al.
Scornet et al.
[2015] show that it is true in RF where the bootstrap step is replaced by subsampling without replacement and the data come from additive regression models [Stone, 1985].
The result is also valid for all regression functions, with a slightly modified version of RF, where there are at least a fraction γ observations in children nodes, and the number of splitting candidate variables is set to 1 at each node with a small probability.
Under these small modifications, Lemma 2 from Meinshausen and Ridgeway [2006] gives that the diameter of each cell vanishes.
Assumption A.3.
Let k and N n ( x ; Θ l , D n ) (number of boostrap observations in a leaf node), then there exists k
= O ( n α ) , with α > 0 , and ∀ x ∈ R d , N n ( x ; Θ l , D n ) =
Ω 1 ( √ n ( ln ( n )) β ) , with β >a.s.
Assumption A.3 allows us to control the estimation error and means that the cells should contain a sufficiently large number of points so that averaging among the observations is effective.
To prove the consistency of the PRF CDF (cid:98) F S ( y | X S = x S ) , we only need to verify the assumptions
A.1, A.2, A.3 on the parameters of the PRF CDF and the Projected CDF F S ( y | X S = x S ) =
P ( Y ≤ y | X S
= x S ) .
Assumptions A.1 and A.2 are satisfied for the Projected CDF and the PRF CDF’s leaves.
Since by definition A ( x S ) n ( x S ; Θ l , D n ) ⊂
A n ( x ; Θ l , D n ) , if the variations within the cells of the RF vanish, it also vanishes in the projected forest.
In addition, if the CDF F ( y | X = x ) = F ( y | X S = x S , X ¯ S = x ¯ S ) is continuous, we can show by a straightforward analysis of parameter-dependent integral that the Projected CDF F S ( y | X S = x S ) = (cid:82) F ( y | X S = x S , X ¯ S
= x ¯ S ) p ( x ¯ S | x S )
d x ¯ S is also continuous.
Since we control the minimal number of observations in the leaf of the Projected Forest by construction, Assumption A.3 is also verified.
Then, the PRF CDF satisfies also Assumption
A.1-A.3 which ensures its consistency thanks to Theorem 4.4.
A.2 Proof of theorem 4.
Theorem A.4.
Consider a random forest which satisfies Assumtions A.1 to A.3.
Then,
[Equation]
The main idea is to use a second independent sample D ⋄ n .
Let assume we have a honest forest [Wager and Athey, 2017] of the Projected CDF Forest (cid:98) F S ( y | X S
= x S , Θ 1 , . . .
, Θ k , D n ) , which is a random forest that grows using D n but use another sample D ⋄ n (independent of D n and Θ ) to estimate the weights and the prediction.
The projected CDF honest Forest is defined as:
[Equation]
where
[Equation]
and N ⋄ ( A ( S ) n ( x S ; Θ l )) =
N ( S ) n ( x ; Θ l , D n , D ⋄ n ) is the number of observation of D ⋄ n = { ( X ⋄ 1 , Y ⋄ 1 ) . .
, ( X ⋄ n , Y ⋄ n ) } that fall in A ( S ) n ( x S ; Θ l , D n ) .
To ease the notations, we do not write Θ 1 , . . .
, Θ k , D n , D ⋄ n if not necessary e.g. we write F ⋄ S ( y | X S
= x S ) instead of F ⋄ S
( y | X S
= x S , Θ 1 , . . .
, Θ k , D n , D ⋄ n ) .
Therefore, we have ∀ x ∈ R d , ∀ y ∈ R ,
[Equation]
The convergence of the two right-hand terms is handled separately into the following Proposition A. and Lemma A.1.
Proposition A.5.
Consider a random forest which satisfies Assumtions A.1 to A.3.
Then,
[Equation]
Proposition A.5 shows that the Projected CDF honest Forest is consistent and Lemma A.1 shows that the honest and the non-honest forest are close.
Lemma A.1.
Consider a random forest which satisfies Assumtions A.1 to A.3.
Then,
[Equation]
Hence, according to Proposition A.5 and Lemma A.1, we get
[Equation]
To have the almost sure uniform convergence relative to y of the Projected CDF honest forest, we use
Dini’s second theorem.
Indeed, { Y ⋄ i ≤ y } = { U i ≤ F S ( y | X ⋄ iS ) } ,
where U i , i = 1 , . .
. , n are i.i.d uniform random variables.
Let s i
= F S ( y | X S =
X ⋄ iS ) =
F S ( y | X ⋄ iS ) and s = F S
( y | X S
= x S ) , we have
[Equation]
where ˜ U i ∼ U
( s i , s i + 1) , i = 1 , . . .
, n are independent uniform variable.
Then, A.4 is equivalent to:
[Equation]
{+A.5 states that, ∀ s ∈ [0 , 1] , ∃ N s ⊂ Ω , P ( N s ) = 
+}
such that
[Equation]
Thus, we need to find a set N that does not depend on s which satisfies A.6 to get the uniform convergence with Dini’s second theorem.
To that aim, we will use the density of Q in R as in the proof of the Glivenko-Cantelli theorem.
{+Since the countable union of null set is a null set, ∃ N ⊂ Ω , P ( N ) = 
+}
such that
[Equation]
A.7 is also true ∀ s ∈ [0 , 1] .
Indeed, let s ∈ [0 , 1] , ϵ > 0 , w ∈ N, ∃ p, q ∈ Q such that s − ϵ ≤ p ≤ s ≤ q ≤ s + ϵ , since s → (cid:80) ni
=1 w n,i ( x S ) 1 { ˜ U
i
[Equation]
w )
[Equation]
s } is increasing, we have:
[Equation]
Thus,
[Equation]
So we have shown that ∃ N ⊂ Ω , P ( N ) = 0 , ∀ ω ∈ N c
• s → (cid:80) ni
=1 w n,i ( x S ) 1 { ˜ U
i ( w ) ≤ s }
is increasing for all n ∈ N
⋆ • ∀ s ∈ [0 , 1] ,
[Equation]
is
[Equation]
Then the Dini’s second theorem states that we have the almost sure uniform convergence proving
Theorem 4.4.
Now, we turn to the proof of Proposition A.5 and Lemma A.1.
To that aim, we need the following lemma based on Vapnik-Chervonenkis classes.
Lemma A.2.
Consider D n , D ⋄ n , two independent datasets of independent n samples of ( X , Y ) .
Build a tree using D n with bootstrap and bagging procedure driven by Θ .
As before, N ( A ( S ) n ( x S ; Θ l )) is the number of bootstrap observations of D n that fall into A ( S ) n ( x S ; Θ l , D n ) and N ⋄ ( A ( S ) n ( x S ; Θ l )) is the number of observations of D ⋄ n that fall into A ( S ) n ( x S ; Θ l , D n ) .
Then:
[Equation]
See the proof in [Elie-Dit-Cosaque and Maume-Deschamps, 2020], Lemma 5.3.
Proof of proposition A.5 .
We want to show that:
[Equation]
Let x ∈ R d , y ∈ R , we have:
[Equation]
n
[Equation]
+ (cid:12)(cid:12)(cid:12) (cid:12)(cid:12) n (cid:88) i =
[Equation]
We define
[Equation]
= and
V n =
[Equation]
y | X ⋄ iS ) − F S
( y | X S
= x S ) (cid:17) and treat each term separately.
Let prove that | W n | a.s −→ n → + ∞ 0 .
We can rewrite W n as W n = (cid:80) ni
=1 w ⋄ n,i ( x S )
H ⋄ i where H ⋄ i is bounded by 1 and E
[ H ⋄ i | X ⋄ iS ] = 0 .
Then,
[Equation]
The last inequality comes from the fact that w ⋄ n,i ( x S ) is a constant given Θ 1 , . . .
, Θ k , D n , X ⋄ ,iS , . . .
, X ⋄ ,nS , and as H ⋄ i is bounded by 1 with E [ H ⋄ i | X ⋄ iS ] = 0 , we used the following inequality: If | X | ≤ 1 a.s and E [ X ] = 0 , then E [ e tX ] ≤ E [ e t 2 2 ] .
By using Assumption A.2, item 2.
, let K > 0 be such that ∀ l ∈ [ k ] , N ( A ( S ) n ( x S ; Θ l )) ≥
K √ n ln( n ) βa.s.
, then we have Γ( l ) =
{ N ⋄ ( A ( S ) n ( x S ; Θ l )) ≤ K √ n ln( n ) β} ⊂ {| N ( A ( S ) n ( x S ; Θ l )) −
N ⋄ ( A ( S ) n ( x S ; Θ l ))
| ≥ K √ n ln( n ) β} .
Thus, using Lemma A.2, we have that P (Γ( l )) ≤ 24( n + 1) 2 | S | exp( − − K 2 (ln
[Equation]
n
[Equation]
We have
[Equation]
So that,
[Equation]
[Equation]
Taking t 2 =
[Equation]
leads to
[Equation]
We obtain the same bound for P ( W n ≤ − ϵ )
=
P ( − W n > ϵ ) , then by using Assumption A.2, item 1., k
= O ( n α ) so that the right term is finite, we conclude by Borel cantelli that | W n | goes to 0 a.s.
Finally, we show that V n a.s −→ n → + ∞ 0 .
[Table]
−
[Equation]
By assumption A.1 i.e that variation of the Projected CDF within the cell of the Projected Tree vanishes, we conclude that | V n | a.s −→ n → + ∞ 0 ending the proof of Proposition A.5.
Proof of Lemma A.1 .
We want to show that:
[Equation]
We have
[Equation]
As in [Arenal-Gutiérrez et al., 1996], we replace the boostrap component with Z 1 , . . .
, Z n which are distributed as Z
= ( Z 1 , Z 2 ) that has uniform distribution over D n = { ( X 1 , Y 1 ) , . .
, ( X n , Y n ) } conditionally to D n .
[Equation]
def =k k (cid:88)
l = |
G l |
We have,
[Equation]
with
[Equation]
and
[Equation]
Therefore, A.1 is equivalent to show that ∀ l ∈ [ k ] , | G 1 l | , | G 2 l |
[Equation]
Let ϵ > 0 , by using Assumption A.2, item 2. i.e ∃ K > 0 , N ( A ( S ) n ( x S , Θ l )) ≥ K √ n ln( n ) β , we have, P ( [Equation]
ϵN
[Table]
[Equation]
{+where B = (cid:110) (cid:81) | S | i =
+}
[ a i , b i ] ×
[ −∞ , y ] : a i , b i ∈ ¯ R (cid:111) .
The first term are handled thanks to a direct application of the Theorem 2 in [Vapnik, 1971] that bounds the difference between the frequencies of events to their probabilities over an entire class B .
Therefore,
[Equation]
To handle the last term
[Equation]
we apply the Theorem 2 in [Vapnik
[Equation]
1971] under the conditional distribution given D n ,
[Equation]
Finally
[Equation]
we get the overall upper bound,
[Equation]
By Borel-Cantelli, we conclude that | G 1 l | a.s −→ n → + ∞ 0 .
Now, we treat the term | G 2 l | .
The main difference with | G 1 l | is that N ( A ( S ) n ( x S , Θ l )) was replaced by N ⋄ ( A ( S ) n ( x S , Θ l )) .
The proof remains the same as above, we just have to show how to deal with
N ⋄ ( A ( S ) n ( x S , Θ l )) for each term.
For example,
[Table]
By using Lemma A
[Table]
2 for the first term
[Table]
and Assumption A
[Table]
2, item 2.
with λ = 2 K √ n ln( n ) β , we have
[Table]
[Equation]
Since k = O ( n α ) by Assumption A.2, item 1., the right hand is summable, then we conclude that | G 2 l | a.s −→ n → + ∞ 0 .
This conclude the proof of Lemma A.1, thus the proof of Theorem 4.4.
B Empirical evaluations of the estimator (cid:98) F S
In order to compare the PRF CDF (cid:98) F S ( y | X S = x S ) and F S ( y | X S = x S ) , we use a Monte Carlo estimator to effectively compute F S ( y | X S = x S ) .
We use the synthetic dataset of Section 5:
X ∈ R p , X ∈ N (0 , Σ) , Σ = 0 .
8 J p +
I p with p = 100 , I p is the identity matrix, J p is all-ones matrix and a linear predictor with switch defined as:
[Equation] [Equation]
The variables X i for i = 6 . . .
100 are noise variables.
We fit a RF with a sample size n = 10 4 , k = 20 trees and the minimal number of samples by leaf node is set to t n = ⌊√ n × ln( n ) 1 . 5 / 250 ⌋ for the original and the Projected Forest. We chose a randomly chosen point x S = [ − 0 .
13 , 1 . 29 , − 1 . 31] with S = [1 , 2 , 5] from the test set. The experiment is replicated 100 times. Figure 1 shows that the estimator works well for almost all points y ∈ R .
We also compute two global metrics.
For a given S , we compute the average Kolmogorov-Smirnov
MKS = 1 n (cid:80) ni =1 sup y ∈ R | (cid:98) F S ( y | X S = x S,i ) − F S
( y | X S
= x S,i ) | and the average mean absolute deviation MAD = 1 n (cid:80) ni =1 (cid:82) R | (cid:98) F S ( y | X S
= x S,i ) − F S ( y | X S
= x S,i ) | dy .
We have MAD = 0.008 and the MKS=0.26 on all the observations with S =
[1 , 2 , 3 , 5] showing the estimator’s efficiency.
We also compute them with small S =
[0 , 4] , it works even better with
MAD= 0 .
068 , MKS= 0 .
In this section, we compare Anchors and Sufficient Rules in a synthetic dataset where there are strong dependencies between the important features. In this case, we can evaluate their capacity of providing the ground truth minimal rules since we know the distribution of {+the data. We use the moon dataset ( X 1 , X 
+}
, Y ) ∈ R 2 × { 0 , 1 } , see figure 2, and we add gaussian features Z ∈ R 100 with the µ, Σ of the previous section such that the final data is ( X 1 , X 2 , Z , Y ) . In addition, if Z 1 > 0 , we flip the label Y of the observations. We train a RF with the parameters of the previous section.
It has AUC= 99% on the test set ( 10observations). We use Anchors with threshold τ = 0 .
95 , tolerance δ = 0 .
05 , and the Minimal
Sufficient Rules with π = 0 . 95 to explain 1000 observations of the test set.
We observe that, on average Anchors tend to give much longer rules. The mean size for Sufficient Rules is 2, and for
Anchors it is 10.
In addition, the Minimal Sufficient Explanations detect local relevant variables more accurately.
It has FDR= 3% , TPR= 100% and Anchors has FDR= 48% , TPR= 80% .
Finally, we observe qualitatively the rules on a given example x (black star in figure 2).
We also test the stability of the explanations by comparing the rules of x and ˜ x
a nearby observation such that max i ∈{ 1 , 2 } | x i − ˜ x i | ≤ 0 .
(yellow star in figure 2).
The rules given by Anchors for x , ˜ x are L Anchors ( x ) = { X 1 > − 0 . 03 AND Z 1 > 0 . 01 AND Z 9 > − 1 . 66 AND Z 44 > 1 . 66 AND Z 32 ≤ − 1 .
and L Anchors ( ˜ x ) = { X 1 > 1 . 04 AND X 2 ≤ − 0 .
20 AND Z 1 > 0 . 01 AND Z 28 > 0 . 01 AND Z 45 ≤ − 1 . 57 } . We find that the rules are very different, showing instability. Moreover, we also note that
Anchors is very sensitive to random seed. However, the SDP approach gives the same explanations for x , ˜ x . The observations have two Minimal Sufficient Explanations S ⋆ 1 =
[ x 1 , z 1 ] , S ⋆ 2 = [ x 2 , z 1 ] . Thus, they have two Sufficient Rules, we can observe them given the axis X 1 , X 2 in figure 2. We notice that the rules found are very relevant for explaining these instances’ predictions.
Nevertheless, the vertical rule could be a little more to the left. We think this inaccuracy comes from the estimation of the RF, which is not perfect. As these observations have multiple explanations, we provide an additional insight about the important variables by computing their Local eXplanatory Importances (LXI).
The LXI of x , ˜ x are (cid:2) x 1 = 0 . 5 , x 2 = 0 . 5 , z 1 = 1 , z 2 = 0 , . . . , z 100 = 0 (cid:3) .
It shows that the variables { Z i } i ∈ (cid:74) 2 , 100 (cid:75) are irrelevant for these observations. The relevant variables are X 1 , X 2 , Z 1 and especially Z 1 is the most important. It is a necessary feature as it appears in every Sufficient Explanations.
Comparison of SHAP values and LXI on Moon Data: In figure 3, we compare the SHAP values and LXI of an observation with Z 1 > 0 (the green star).
We observe that the LXI gives non-null values only on the active variable ( X 2 , Z 1 ) , while the SV gives non-null values also on noise variables. Moreover, SV gives a non-negligible value to the feature X 1 that is not necessary for this prediction.
Indeed, by analyzing figure 2, we observe that whatever the value of X 1 , if we fix X 2 and the sign of Z 1 , the prediction will not change. We also compute the mean importance score across the population in figure 4.
For the SV, we take the mean absolute values as it may have negative contributions. The three important values that come out for both methods are X 1 , X 2 , Z 1 . However, as in the local case, SV assign values to the noise variables.
[Figure]
[Figure] C.2 Shapley values and Local eXplanatory importance (LXI) on LUCAS dataset
In this section, we want to highlight a case where the LXI permit to drastically simplify the different explanations.
We use a semi-synthetic dataset LUCAS (LUng CAncer Simple set), a dataset generated by causal Bayesian networks with 12 binary variables.
The causal graph is drawn in figure 5 and the probability table in figure 6 .
In figure 7, we observe the different explanations of an observation chosen randomly, its features values are (cid:8) Smoking = True, Yellow Fingers = True, Anxiety =
False, Peer Pressure = False, Genetic = False,
Attention Disorder = True, Born an Even Day = False, Car Accident =
True, Fatigue = True, Allergy = False, Coughing = True (cid:9) and its label is True. We see in the left of figure 7 that it has many Sufficient Explanations.
Therefore, as seen in the right of Figure 7, the LXI permit to synthesize all the different explanations in a single feature contributions that exhibits the local importance of the variables. Each value corresponds to the frequency of apparition of the corresponding feature in the set of all the sufficient explanations. At the bottom of figure 7, we observe the rule associated with the first Sufficient Explanation which is (cid:8) Smoking = True, Coughing =
True (cid:9) . Note that this rule is very powerful, because it has a coverage of 46% and an accuracy of 93% . Comparison of SHAP values and LXI on LUCAS: We can also compare the SHAP values and LXI on this dataset.
In figure 8, we observe that it is the value of Coughing that is really important for this observation. Indeed it appears in several Sufficient Explanations ( 80% ). On the other side, in figure 9, SHAP associates values to many more variables, and it is difficult to discriminate between the important values. It is difficult to deduce from the values of Smoking, Coughing, Fatigue, Allergy which is the most important variable with SHAP values.
Here, we run the last experiment of Section 5 on the stability of the local rules (Anchors, Sufficient
Explanations) with different parameters. It consists of evaluating the stability of the methods w.r.t to input perturbations. For a given observation x , we compare the rule of each method with the rules obtained for 50 noisy versions of x by adding random Gaussian noises N (0 , ϵ × I ) to the values of the features with different ϵ = 0 . D From Sufficient Rules to Global Interpretable model
In this section, we investigate the capacity of transforming the Sufficient Rules explanations as a competitive global model. Indeed, we can build a global model by combining all the Sufficient Rules found for the observations in the training set.
We set the output of each rule as the majority class (resp.
average values) for classification (resp.
regression) of the training observations that satisfy this rule.
Note that some rules can overlap and an observation can satisfy multiple rules.
To resolve these conflicts, we use the output of the rule with the best precision (accuracy or R 2 ).
We [-give examples of the learned rules: R 
 = { If Workingday = True-]have experimented on 5 real-world datasets: COMPAS, NHANES, ATTRITION , DIABETES , and
Breast Cancer Wisconsin .
Thus, we perform comparisons between the global model induced by the
Sufficient Rules (G-SR) and SOTA global rule-based models as baseline.
We use the package imodel [Singh et al., 2021] (resp.
scikit-learn [Pedregosa et al., 2011]) for RuleFit, Skoped Rule (SkR) (resp.
Decision Tree (DT), Random Forest (RF)).
In table 1, we observe that the G-SR performs as well as the best baseline models while being transparent in its decision process.
These experiments increase the trustworthiness of our explanations because we derive an interpretable (by-design) global model without paying a trade-off with performance.
As a by-product, SR can be used as a new way of building glass-box models, but this line of research is beyond the scope of the current work.
[Table]
These experiment permit to enforce the trust in the explanations given by our methods and open new avenues to build a glass-box model with the SR.
10: compute
11: append
12: set
; 15: set samples
; 16: end
17: if size
18: break the loop through the tree levels; 19:
20: set samples samples_
; 21: end
22: end for 23: set nodes_level
; 24: end for 25: compute
; 26: end for 27: return average prediction