Explaining Deep Neural Networks with a Polynomial Time Algorithm for Shapley Values Approximation
Marco Ancona Cengiz Öztireli Markus Gross


[
Explaining Deep Neural Networks with a Polynomial Time Algorithm for Shapley Values Approximation


Marco Anconaeth
Cengiz Öztirelidrs
Markus Grosseth,drs


ethDepartment of Computer Science, ETH Zurich, Switzerland
drsDisney Research Zurich, Switzerland

Marco Anconamarco.ancona@inf.ethz.ch

Neural Networks, Attribution methods, Shapley values, Explainable AI, XAI

0.3in
]





The problem of explaining the behavior of deep neural networks has recently gained a lot of attention. While several attribution methods have been proposed, most come without strong theoretical foundations, which raises questions about their reliability.
On the other hand, the literature on cooperative game theory suggests Shapley values as a unique way of assigning relevance scores such that certain desirable properties are satisfied. 
Unfortunately, the exact evaluation of Shapley values is prohibitively expensive, exponential in the number of input features. 
In this work, by leveraging recent results on uncertainty propagation, we propose a novel, polynomial-time approximation of Shapley values in deep neural networks. 
We show that our method produces significantly better approximations of Shapley values than existing state-of-the-art attribution methods.




§ INTRODUCTION

DNN have demonstrated enormous potential in solving a variety of problems, growing the sophistication and impact of machine learning. 


On the other hand, while machine learning models are being employed on an increasing number of fields, the black-box nature of DNN is still a barrier to the adoption of these systems for those tasks where interpretability is a requirement.

Recently, European regulators introduced the legal notion of a right to explanation <cit.>, demanding transparency for any automated decision having a deep impact on the life of the people involved, which affects the adoption of black-box models like DNN on some domains.


Since the notion of interpretability is complex, multi-faceted and not yet fully defined <cit.>, several works have focused on investigating methods for local interpretability. Contrarily to global interpretability, which aims at explaining the general model behavior, local interpretability scope is restricted at explaining a particular decision for a given model and input instance <cit.>.

In the realm of local interpretability, attribution methods have received particular attention in the last years <cit.>. 

Consider a model that takes an N-dimensional input x⃗ = [x_1,...,x_N] ∈ℝ^N and produces a C-dimensional output f⃗(⃗x⃗)⃗ = [f_1(x⃗),...,f_C(x⃗)] ∈ℝ^C, like a DNN with C output neurons. 

Depending on the application, the input features x_1, ..., x_N can have a different nature, like pixels for images or components of a multi-dimensional word vector representation for natural language processing.

Similarly, each output of the network can represent either a numerical predicted quantity (regression task) or the probability of a corresponding class (classification task).


Formally, attribution methods aim at producing explanations by assigning a scalar attribution value, sometimes also called “relevance” <cit.> or “contribution” <cit.>, to each input feature of a network for a given input sample.
In particular, for a single target output indexed with c, the goal of an attribution method is to determine the contribution R⃗^c(x⃗;f_c) = [R_1^c(x⃗;f_c),...,R_N^c(x⃗;f_c)] ∈ℝ^N of each input feature x_i to the output f_c(x⃗). For clarity of notation, in the remainder of the paper, we will simply use R⃗^c whenever possible. For a classification task, the target output can be chosen to be the one associated with the highest output probability (to understand which part of the input was mostly relevant for the prediction) or the one associated with a different class (to assess whether the input contains evidence that supports or rejects a different class).

Over the last decade, several attribution methods have been specifically developed for neural networks <cit.>.


When an explanation is generated, it should be a natural requirement to have a clear understanding of how the explanation method works, a condition necessary to make sure the explanation itself is a reliable and unbiased representation of the network behavior. In fact, some recent works showed that attribution methods can actually produce unreliable or misleading results, despite these being visually appealing to humans <cit.>. This problem is fueled by the limited theoretical understanding of some of these methods and lack of reliable quantitative metrics to evaluate explanations in the absence of a ground-truth <cit.>. To overcome these limitations, some authors have recently endorsed an axiomatic approach <cit.>. In this context, an axiom is a self-evident property of the attribution method that should be satisfied for any explanation generated by the method itself. By leveraging these properties, attribution methods with stronger theoretical guarantees can be designed <cit.>.

Along with this research direction, the literature on cooperative game theory suggests Shapley values <cit.> as a unique way of assigning attributions such that certain desirable axioms are satisfied. Shapley values are a classic game theory solution for the distribution of credits to players participating in a cooperative game. Notably, the unique set of properties of Shapley values, discussed in the next section, seems to fit naturally in the setting of attributions as well <cit.>.



On the other hand, computing the exact Shapley value is, in general, NP-hard <cit.> and only feasible for less than 20-25 players (i.e. input features for our case). Some previous works proposed sampling-based methods to approximate Shapley values <cit.>.  While these methods are unbiased estimators, as the number of input features grows they require thousands of model evaluations, which is expensive for DNN. KernelSHAP <cit.> combines sampling with lasso regression to reduce the number of samples but it also introduces a bias from the regularizer. Other fast approximations designed for DNN exist but these are based on the strong assumptions of model linearity <cit.>. At the best of our knowledge, there is no exhaustive evaluation of the empirical accuracy of these methods as Shapley value approximators in DNN.

The contribution of this work is threefold: 1) endorsing an axiomatic approach, we compare Shapley values to existing state-of-the-art attribution methods, motivating the use of the former to explain non-linear models; 2) we formulate a novel, polynomial-time approximation of Shapley values specifically designed for DNN; 3) we assess empirically the approximation power of our algorithm compared to other attribution methods on three datasets and architectures.



§ ATTRIBUTION METHODS

Attribution methods can be partitioned into two broad categories: backpropagation-based methods and perturbation-based methods <cit.>. In this section, we define Shapley values and briefly review some popular attribution methods that will be later used in our experimental comparison. We focus on methods that can be applied to a variety of architectures and that are not restricted to some particular input type (eg. images).




 §.§ Backpropagation-based methods

Methods in this category compute attributions running only one or a few backward passes through the network. Many such methods have been proposed in the last years. The prototypical example is Saliency maps <cit.> where attributions are computed as the absolute gradient of the target output with respect to each input feature.
 Gradient × Input <cit.> introduces an element-wise multiplication between the input and the (signed) gradient, producing more sharp results:
 
 
    R_i^c = x_i ·∂f_c(x⃗)/∂ x_i

 
While the gradient provides information about which features can be locally perturbed the least in order for the output to change the most, applied to a highly non-linear function only provides local information and it does not help to compute the marginal contribution of a feature. To overcome this limitation, other methods have been proposed such as Layer-wise Relevance Propagation (LRP) in several variants <cit.>, DeepLIFT (in its two variants, Rescale and RevealCancel) <cit.>, and Integrated Gradients <cit.>.

Compared to Gradient × Input, these methods are characterized by different propagation rules for non-linear operations in the network than the instant gradient. In the case of Integrated Gradients, DeepLIFT Rescale, and ϵ-LRP, the propagation rule can be seen as computing a form of average gradient <cit.>. In the other cases, the propagation rule is designed on specific heuristics. 




 §.§ Perturbation-based methods

This category includes methods that estimate the contribution of input features by removing or perturbing them and measuring the variation of the network target output as a consequence of this operation <cit.>. The simplest perturbation method computes attributions by setting each feature sequentially to zero <cit.>:
 
 
    R_i^c = f_c(x⃗) - f_c(x⃗∖{x_i})

 
 In the remainder of the paper, we will refer to this method simply as “Occlusion”. 
 
 Remark Notice that the procedure of replacing features with a zero value implicitly defines a baseline that can be used to indicate features that are toggled off. Many attribution methods require the definition of a baseline to indicate the absence of information. This is further discussed in Appendix C of the supplementary material.
 
Most often perturbation-based methods are simple to implement but very slow, as several evaluations of the network are necessary. Additionally, the number of features perturbed at each iteration and the choice of the perturbation itself are hyper-parameters of these methods that can heavily affect the resulting explanations, making it difficult to interpret the results <cit.>. 


 

 §.§ Shapley values

 Shapley values can be considered a particular example of perturbation-based methods where no hyper-parameters, except the baseline, are required.
 
 Consider a set of N players P and a function f⃗̂⃗ that maps each subset S ⊆ P of players to real numbers, modeling the outcome of a game when players in S participate in it. The Shapley value is one way to quantify the total contribution of each player to the result f⃗̂⃗(P) of the game when all players participate. For a given player i, it can be computed as follows:
 

    R_i = ∑_S ⊆ P ∖{i}|S|!(|P| - |S| - 1)!/|P|! [f⃗̂⃗(S ∪{i}) - f⃗̂⃗(S)]


The Shapley value for player i defined above can be interpreted as the average marginal contribution of player i to all possible coalitions S that can be formed without it.

While f⃗̂⃗ is a set function, the definition can be adapted for a neural network function f⃗ by defining a baseline as discussed above. Then we can replace f⃗̂⃗(S) in Eq. <ref> with f⃗(x⃗_S), where x⃗_S indicates the original input vector x⃗ where all features not in S are replaced with the baseline value. 

It has been observed <cit.> that attributions based on Shapley values better agree with the human intuition empirically. Unfortunately, computing Shapley values exactly requires us to evaluate all 2^N possible feature subsets as in Eq. <ref>. This is clearly prohibitive for more than a couple of dozens of variables. 

For certain simple functions f⃗, it is possible to compute Shapley values exactly in polynomial time. For example, the Shapley values of the inputs to a max-pooling layer can be computed with 𝒪(N^2) function evaluations <cit.>. When this is not possible, Shapley values sampling <cit.> can be used to estimate approximate Shapley values based on sampling of Eq. <ref>. For specific games, other approximate methods have been developed. In particular, <cit.> proposed a polynomial time approximation for weighted voting games <cit.> based on the idea that, instead of enumerating all coalitions, it might suffice to estimate their expected contributions. The same idea is used as the first step of our approximation algorithm for deep neural networks in Sec. <ref>. Before going into the details of the derivations, we present a review of theoretical properties of Shapley values and other attribution methods.




§ AXIOMATIC COMPARISON OF ATTRIBUTION METHODS


We start our theoretical analysis by observing the following connection between existing attribution methods and Shapley values for linear models.

propProposition
Occlusion, Gradient × Input, Integrated Gradients and DeepLIFT produce exact Shapley values when applied to a linear model and a zero baseline is used.


The proof (provided in Appendix A of the supplementary material) comes directly from the observation that all these methods are equivalent for linear models <cit.>.

For non-linear models, instead, these methods produce different attributions. DeepLIFT RevealCancel <cit.> and its variant DeepSHAP <cit.> approximate Shapley values at each layer independently and use the chain rule to compose these into attributions. 

Unfortunately, the chain rule does not hold in general for Shapley values.
Integrated Gradients <cit.>, on the other hand, can be shown to compute Aumann-Shapley values <cit.>, an extension of Shapley values for infinite games where each individual player has a negligible contribution. While this method has better theoretical properties, it is not yet clear how well these assumptions apply to real scenarios where the number of input features is limited and the individual features may have a significant impact.

In order to better understand the relations among methods and their advantages, it is essential to evaluate them with respect to desirable theoretical properties. We thus compare different attribution methods according to the following axioms already established in the literature:
(1) conservation,
(2) null player,
(3) symmetry,
(4) linearity,
(5) continuity and 
(6) implementation invariance. 


Axiom 1: Completeness. An attribution method satisfies completeness when attributions sum up to the difference between the value of the function evaluated at the input, and the value of the function evaluated at the baseline, i.e. ∑_i=1^n R_i^c = f⃗_c(x⃗) - f⃗_c(0⃗). This property, also called efficiency <cit.>, summation to delta <cit.> or conservation <cit.>,  has been recognized by previous works as desirable to ensure the attribution method is comprehensive in its accounting.

Axiom 2: Null player. If the function implemented by a DNN does not depend on some variable, then the attribution to that variable should always be zero.

Axiom 3: Symmetry. If the function implemented by a DNN depends on two variables x_1 and x_2 but not on their order (i.e. f(x_1, x_2) = f(x_2, x_1)), then the attribution assigned to these variables should be the same every time the input and the baseline provides the same values for these variables. This axiom, also called anonymity <cit.>, is arguably a desirable property for any attribution method: if two variables play the exact same role
in the DNN, they should receive the same attribution.


Axiom 4: Linearity. If the function f implemented by a DNN can be seen as a linear combination of the functions of two sub-networks (i.e. f = a × f_1 + b× f_2), then any attribution should also be a linear combination, with the same weights, of the attributions computed on the sub-networks, i.e. R_i^c(x⃗|f) = a× R_i^c(x⃗|f_1) + b × R_i^c(x⃗|f_2), where R_i^c(x|f) denotes the attributions for the DNN that implements the function f. 
Intuitively, this is justified by the need for preserving linearities within the network <cit.>.

Axiom 5: Continuity Attributions generated for two nearly identical inputs should be nearly identical, i.e. R_i^c(x⃗) ≈ R_i^c(x⃗+ϵ). This axiom assumes the attribution is generated for a continuous prediction function f(x⃗), which is always the case for DNN built by combining continuous functions. In this case, the prediction for two nearly identical inputs is also nearly identical, which motivates a nearly identical explanation <cit.>.

Axiom 6: Implementation Invariance. Two networks are said to be functionally equivalent if their outputs are equal for all inputs, despite having (possibly very) different implementations <cit.>. Attribution methods should produce identical results when applied to any functionally equivalent network provided with the same input. The importance of this property relies on the observation that any explanation should only depend on the input and the function implemented by the DNN, not its implementation. This property is satisfied by all perturbation-based methods (that only relies on the function evaluation) as well as by all backpropagation-based methods relying purely on the gradient (which is itself implementation-invariant). This axiom was proposed in a previous work <cit.> where it is shown that it can be violated when other propagation rules are used, like in DeepLIFT and LRP.


It is trivial to see that Gradient × Input and Occlusion do not satisfy Completeness, while it has been showed that LRP and DeepLIFT do not satisfy Implementation Invariance <cit.>. Instead, the following notable result can be shown for Shapley values.

Shapley values is the only possible attribution method that satisfies Axioms 1-5.


-0.01in
The proposition is a direct consequence of previous results <cit.> and the proof is provided in Appendix B of the supplementary material.
Clearly, being a perturbation-based method, Shapley values satisfies Axiom 6 as well. This unique set of sought after properties motivates the use of Shapley values for attributions.



§ DEEP APPROXIMATE SHAPLEY PROPAGATION


Despite the theoretical guarantees, Shapley values have one big flaw: computing them is NP-hard, as elaborated on in the previous sections. In this section, we introduce Deep Approximate Shapley Propagation (DASP), a perturbation-based method that can reliably approximate Shapley values in DNN with a polynomial number of perturbation steps.

Consider a feed-forward neural network, composed of layers equipped with a non-linear function σ, each performing 


    f⃗^(i)(x⃗^(i-1)) = σ(W⃗^(i)x⃗^(i-1)  + b⃗^(i))

where i indicates a layer index, 1 ≤ i ≤ l.

We are interested in computing the Shapley values with respect to one output unit of a neural network whose overall function f⃗(x⃗) = (f⃗^(1)∘f⃗^(2)∘ ... ∘f⃗^(l)) (x⃗) is the composition of several of such layers.

Our approximation is based on the following intuition. According to the definition given by Eq. <ref>, the Shapley value of an input feature is given by its marginal contribution to all possible 2^N-1 coalitions that can be made out of the remaining features. Since we are interested in an average value, we can compute the expected contribution to a random coalition instead of enumerating each of them. In particular, we consider the distribution of coalitions of size k, for each 0 ≤ k ≤ N - 1, that do not include the feature x_i, and compute the expected contribution of that feature with respect to these distributions.

The average of all these marginal contributions gives the feature's approximate Shapley value <cit.>:



    𝔼[R_i^c] = 1/N∑_k=0^N-1𝔼_k [R_i,k^c ],


where the expectations 𝔼_k are over the distribution of sets of size k, and R_i,k^c denotes the contribution of feature x_i to any random coalition of size k.
More explicitly, we can write the expected contribution of a feature x_i for a given coalition size as the expected target output difference with and without it, i.e.

-0.2in

    𝔼_k[R_i,k^c] 
           = 𝔼_S ⊆ P ∖{i}
     |S|=k [f_c(x⃗_S ∪{i})] - 𝔼_S ⊆ P ∖{i}
     |S|=k [f_c(x⃗_S)].


-0.2in
The proof of Eq. <ref> is based on the observation that there exists the same number of coalitions (where order matters) of size k for all values of k. We refer the reader to <cit.> for the complete derivation.


So the main problem is approximating these expected values for all coalitions of size 0 ≤ k ≤ N-1. As we will elaborate on in the next sections, these expected values can be computed and propagated along with variances from layer to layer in a DNN. Such a propagation can be achieved by transforming the architecture of a given DNN to replace the point activations at all layers by probability distributions. 

This problem has been previously studied in the scope of uncertainty propagation in DNN <cit.>, where the goal is to analyze how the uncertainty of the input data or of the network parameters propagates through the linear and non-linear operations up to the output layer. We adapt such a framework for our use case by i) considering the network parameters fixed and hence no source of uncertainty, and ii) introducing input uncertainty based on sampling of input coalitions. Then, we employ a Lightweight Probabilistic Network <cit.>, and show that the expected values can be propagated in a practical fashion through the entire network. 



 §.§ Input distribution from random coalitions


Each coalition of size k is represented with a vector x⃗_S of inputs, where the set S of k components of the vector contain their actual values, and the others contain the baseline value of zero. All such vectors with k non-zero elements can be thought of as drawn from an underlying distribution of a random variable X⃗_k. 

The first operation in a typical DNN is a weighted sum of the inputs. Each hidden unit thus takes a weighted sum of the network input z_j = ∑_i=1^N x_i · w_ij. As X⃗_k is a random variable, a weighted sum of its components is also a random variable. It can be shown <cit.> that, under mild assumptions, the distribution of Z_j is given by

    Z_j ∼𝒩(kμ_j, k σ_j^2  N-k/N-1),

where we set

    μ_j = 1/N∑_i=1^N x_i · w_ij,   σ^2_j = 1/N∑_i=1^N (x_i · w_ij)^2 - μ_j^2,

with the sums computed over all components x_i of the input vector x⃗. We provide a study of the accuracy of this form of the distribution by comparing it to the empirical counterpart in Appendix D of the supplementary material.

The random vector Z⃗ with the components Z_j is thus distributed with an isotropic Gaussian of the means μ_j and variances σ^2_j. Note that if we assume that this weighted sum is the only layer in the network, then the means here already provide the expected values we need to compute Shapley values. As this random variable is fed into the further operations of the later layers in a DNN, the distribution and hence the means will change. The next task is thus to derive how the distribution of Z⃗ will change as it is fed through.




 §.§ Distribution propagation

Given the probabilistic input Z⃗ at the first hidden layer, we propagate this distribution to the target unit by employing LPN <cit.>. LPN is an architecture for uncertainty propagation through a feed-forward DNN where
each input sample is modeled using an independent univariate Gaussian distribution. Contrary to other Bayesian formulations, the model parameters are considered deterministic, as in our case.
The propagation of uncertainties is carried out using assumed density
filtering <cit.>, where each layer is implemented as filtering of the input distribution to obtain a transformed Gaussian distribution with diagonal covariance.  While it was originally developed to propagate the intrinsic uncertainty of the input, LPN can be easily adapted to our scenario, where the uncertainty given by random coalitions induces a probability distribution for the input of the first hidden layer. On the other hand, notice that DASP is not coupled to any particular probabilistic framework and can extend to general architectures (eg. RNNs) given a probabilistic framework that supports them.













In order to propagate the activation distribution through linear and non-linear operations, LPN converts any layer with point activations into
an uncertainty propagation layer by matching first and second-order central moments, i.e.


    μ_X⃗^(i) = 𝔼_X⃗^(i-1)[ f⃗^(i)(x⃗^(i-1)) ] 
    σ^2_X⃗^(i) =
    𝕍_X⃗^(i-1)[ f⃗^(i)(x⃗^(i-1)) ],



where 𝔼[·] and 𝕍[·] denote expectation and variance. This procedure can be proven to perform a greedy (layer-wise) optimization of the KL-divergence of p(x⃗^(0:l)) towards the actual distribution <cit.>.

As a result, our original network function f⃗(x⃗) is transformed into a probabilistic network function f̂⃗̂(μ, σ^2) = [f̂_1(μ, σ^2), ..., f̂_C(μ, σ^2)] that takes as inputs the first and second moments of a (Gaussian) distribution and returns the parameters of the distribution at the output layer, after the original distribution is sequentially filtered by all hidden layers.

Moment matching for several commonly employed layers and operations in neural network architectures can be derived in closed-form:

Affine transformation. A fully-connected layer with weights W⃗ and bias b⃗ takes the input Z⃗∼𝒩(μ, σ^2) and filters it by applying f⃗(Z⃗) = W⃗Z⃗ + b⃗. The output is a new Gaussian with mean and variance:

    μ_lin = W⃗μ + b⃗;     σ^2_lin = W⃗^2 σ^2,

where by W⃗^2 we indicate the element-wise square. This notation will be used for any matrix or vector in the remainder of the paper. With minor adaptations, this also holds for the convolution and the mean pooling, which are linear layers. Notice that mean and variance do not interact with each other on linear operations.

ReLU activation. The output of a ReLU activation that receives a Gaussian input Z⃗∼𝒩(μ, σ^2) is a rectified Gaussian distribution <cit.> whose mean and variance can be derived analytically <cit.>. For details, see Appendix E of the supplementary material.






Max Pooling. Max pooling can be seen as returning the maximum response of n random variables Z_1, ... Z_n. For two independent inputs A ∼𝒩(μ_A, σ^2_A), B ∼𝒩(μ_B, σ^2_B), the maximum is not normally distributed anymore. Nevertheless, it has been shown that the univariate normal is an effective approximation <cit.> and the first and second moments, provided also in Appendix E, can be derived analytically <cit.>.



 §.§ Computing approximate Shapley values

Having transformed the distribution of inputs from coalitions to output activation uncertainties, we can finally compute approximate Shapley values. Algorithm <ref> describes the procedure in pseudo-code. For the sake of clarity, we have listed all the operations of the first weighted sum as explained in Sec. <ref> explicitly, and wrapped all other operations in subsequent layers into f̂_c.





Computing Deep Shapley values requires N network evaluations for each input feature, if we test all possible coalition sizes (i.e. k=0,...,N-1). As a result, the algorithm approximates Shapley values for N input features in 𝒪(N^2) network evaluations, compared to 𝒪(2^N) of the exact computation. 


In order to further reduce the computational cost, we can perform a secondary approximation by reducing the number of coalition sizes that we consider. If K is the number of coalition sizes tested, we need 𝒪(KN) evaluations. In the next section, we show empirically that K can be much lower than N. In order to ensure as much diversity as possible, we pick coalition sizes k = [k_1,...,k_K] equally apart from each other.



§ EXPERIMENTS


In this section, we report experiments running DASP[DASP implementation: http://bit.ly/DASPCode] alongside Integrated Gradients, DeepLIFT Rescale, DeepLIFT, RevealCancel, Occlusion, Shapley sampling and KernelSHAP using three datasets and different network architectures. Instead, we omit the comparison with DeepSHAP as this method is equivalent to DeepLIFT Rescale when used with a (fixed) zero baseline.

Our main goal is to demonstrate how DASP can be effectively used to approximate Shapley values and compare it with state-of-the-art attribution methods on this task.

Notice that Shapley sampling and KernelSHAP (without regularizer) are guaranteed to converge to exact Shapley values, given enough samples. This is not the case for DASP, which is not a sampling-based method. In this case, our goal is to show that sampling-based methods require significantly more model evaluations than DASP to reach the same approximation error.


All experiments are run in Keras <cit.>. Details about the architectures used are in Appendix F of the supplementary material.



 §.§ Evaluation metrics

When the size of the input allows it, we compute exact Shapley values using Eq. <ref>, and use it as the ground-truth. When the exact computation is not feasible, we run Shapley sampling until convergence as an approximation of the ground-truth. Since Shapley sampling is an unbiased estimator, this is a faithful approximation.

For the quantitative comparison, we report both the root mean squared error (RMSE) and the Spearman rank correlation over several input samples extracted from each test set. While the RMSE is useful to quantify the absolute average error of each attribution score, the Spearman rank correlation is used as a metric to assess whether two methods agree on the ranking of features based on their impact on the model output.

When discussing performance, we always compare the attribution methods by the number of network evaluations they require, as the wall-clock time is influenced by the efficiency of the different implementations. However, we do take into account that our probabilistic layers require about twice the number of operations of a normal layer (to propagate mean and variance), therefore we double the number of evaluations for DASP in all our results.



 §.§ Parkinsons disability assessment



As a first test, we trained a fully-connected DNN on the Parkinsons Telemonitoring Data Set <cit.>. The goal of this regression task is to predict the Parkinson’s disease rating scale (UPDRS) that reflects the presence and severity of symptoms starting from 18 input features: subject age, subject gender, and 16 biomedical voice measures. UPDRS spans the range 0-176, with 0 representing healthy state and 176 representing total disabilities.



Fig. <ref> shows the explanation of the network prediction generated by our method for a single subject. An explanation, in this case, can tell the user which features the model has used for a certain prediction.
The natural question is whether the generated explanation is a reliable representation of the network behavior. Notice that the network behavior and the human intuition about how a certain task should be solved might not coincide in general (for example, the network might have learned patterns that the human expert was not aware of, or the network might mistakenly exploit correlations that have no causality). For this reason, we believe any qualitative comparison is dangerous. Instead, we have a clear ground truth against which we can evaluate our technique and others in this case. As the number of input features is limited to 18, we can compute the exact Shapley values for 100 samples from the test set, each requiring 2^18=262'144 network evaluations. Fig. <ref> shows that DASP produces a better approximation of Shapley values than other biased methods, even when a small number of coalition sizes is tested (i.e. K ≪ N). Unbiased, sampling-based methods, instead, require significantly more evaluations before outperforming DASP.





 §.§ Classifying regulatory DNA sequences 

To test if the result holds on different architectures, we consider a classification task over DNA sequence inputs. A DNA sequence can be seen as a string over the alphabet A,C,G,T. We are interested in detecting short patterns (eg. GATAA or GATTA) within these sequences by employing a neural network with two 1D convolutional layers, global average pooling, and one fully-connected layer. This setup, which also includes some synthetically generated DNA sequences, was previously proposed as a benchmark for attribution methods <cit.>. Since the DNA sequences have a length of 200 tokens, it is prohibitive to compute exact Shapley values. To approximate the ground-truth and enable a direct comparison of all methods against it, we run about 800'000 iterations of Shapley sampling on each of the 50 input samples until convergence. This process took about 45 minutes on our machine. 


The results are reported in Fig. <ref>. The original authors of the experiment suggest a specific combination of DeepLIFT propagation rules (Rescale for the two convolutional layers and RevealCancel for the dense layer) to obtain the best results on this dataset. This combination, identified as DeepLIFT (Mix) in Fig. <ref>, also gives the best results among backpropagation-based methods in our experiment, outperformed only by DASP and sampling methods. On the other hand, KernelSHAP requires a significantly more evaluations than DASP to reach the same rank correlation.




 §.§ Digits classification (MNIST)





Finally, we train a convolutional neural network on MNIST <cit.> to perform digit classification. We use the LeNet-5
architecture <cit.>, which consists of two convolutional layers, each followed by a max-pooling layer, and three final dense layers.  Again, we use Shapley sampling to approximate the ground-truth for the 784 features (pixels) of 50 test images, which took about 4 hours for 6M evaluations on our machine.

Fig. <ref> shows an example of the resulting attribution maps. Notice that backpropagation-based methods tend to produce more noisy explanations than perturbation-based methods. We speculate that this happens because backpropagation-based methods are more sensitive to local (and noisy) gradient information. Furthermore, Occlusion seems to under-estimate or over-estimate the importance of some areas of the image, as compared to DASP. These are reflected in the quantitative comparison in Fig. <ref>. As in the previous experiments, we see a significant gap between the accuracy of DASP and other biased approximators, as well as a significant gap in the number of samples required by Shapley sampling and KernelSHAP to reach DASP performance. Notice that, in this case, KernelSHAP performs worse than simple sampling. We speculate this happens because of the linearity assumption of KernelSHAP, affecting more the more complex models.

-1cm


§ CONCLUSIONS

In this work, we discussed Shapley values as an attribution method for DNN. First, we showed that several existing attribution methods reduce to computing Shapley values when applied to linear models. On the other hand, when the model is non-linear, Shapley values remain the only method that satisfies a number of desirable theoretical properties, which strongly motivates their use for reliable explanations.

As computing Shapley values is often unfeasible, we then proposed  Deep Approximate Shapley Propagation (DASP), a novel perturbation-based method that approximates Shapley values using uncertainty propagation in DNN. DASP requires a polynomial number of network evaluations. While it is not guarantee to recover exact Shapley values, we showed empirically that other sampling-based methods require significantly more evaluations to achieve the same approximation error.
We have also shown that DASP outperforms  state-of-the-art backpropagation-based methods, which are fast but coarse Shapley values approximators. 

DASP can be considered a novel application for the field of uncertainty propagation in DNN, although we would like to remark how it is not constrained to LPN for this purpose. As research on this area continues, we expect to be able to extend DASP for recurrent neural networks, and we hope that new probabilistic frameworks will enable the derivation of theoretical guarantees and even better approximations.








icml2019

