{'fraction_non_alphanumeric': 0.036659029368881484, 'fraction_numerical': 0.009878894277977801, 'mean_word_length': 4.4127878885488805, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
L-Shapley and C-Shapley: Efficient Model Interpretation for Structured Data

We study instancewise feature importance scoring as a method for model interpretation. Any such method yields, for each predicted instance, a vector of importance scores associated with the feature vector. Methods based on the Shapley score have been proposed as a fair way of computing feature attributions of this kind, but incur an exponential complexity in the number of features. This combinatorial explosion arises from the definition of the Shapley value and prevents these methods from being scalable to large data sets and complex models. We focus on settings in which the data have a graph structure, and the contribution of features to the target variable is well-approximated by a graph-structured factorization. In such settings, we develop two algorithms with linear complexity for instancewise feature importance scoring. We establish the relationship of our methods to the Shapley value and another closely related concept known as the Myerson value from cooperative game theory. We demonstrate on both language and image data that our algorithms compare favorably with other methods for model interpretation.


Introduction
Modern machine learning models, including random forests, deep neural networks, and kernel methods, can produce highaccuracy prediction in many applications. Often however, the accuracy in prediction from such black box models, comes at the cost of interpretability. Ease of interpretation is a crucial criterion when these tools are applied in areas such as medicine, financial markets, and criminal justice; for more background, see the discussion paper by Lipton [13] as well as references therein.
In this paper, we study instancewise feature importance scoring as a specific approach to the problem of interpreting the predictions of black-box models. Given a predictive model, such a method yields, for each instance to which the model is applied, a vector of importance scores associated with the underlying features. The instancewise property means that this vector, and hence the relative importance of each feature, is allowed to vary across instances. Thus, the importance scores can act as an explanation for the specific instance, indicating which features are the key for the model to make its prediction on that instance.
There is now a large body of research focused on the problem of scoring input features based on the prediction of a given instance (for instance, see the papers [19,1,17,14,22,2,5,23] as well as references therein). Of most relevance to this paper is a line of recent work [22,14,5] that has developed methods for model interpretation based on Shapley value [18] from cooperative game theory. The Shapley value was originally proposed as an axiomatic characterization of a fair distribution of a total surplus from all the players, and can be applied in to predictive models, in which case each feature is modeled as a player in the underlying game. While the Shapley value approach is conceptually appealing, it is also computationally challenging: in general, each evaluation of a Shapley value requires an exponential number of model evaluations. Different approaches to circumventing this complexity barrier have been proposed, including those based on Monte Carlo approximation [22,5] and methods based on sampled least-squares with weights [14].
In this paper, we take a complementary point of view, arguing that the problem of explanation is best approached within a model-based paradigm. In this view, explanations are cast in terms of a model, which may or may not be the same model as used to fit the data. Criteria such as Shapley value, which are intractable to compute when no assumptions are made, can be more effectively computed or approximated within the framework of a model. We focus specifically on settings in which a graph structure is appropriate for the data; specifically, we consider simple chains and grids, appropriate for time series and images, respectively. We propose two measures for instancewise feature importance scoring in this framework, which we term L-Shapley and C-Shapley; here the abbreviations "L" and "C" refer to "local" and "connected," respectively. By exploiting the underlying graph structure, the number of model evaluations is reduced to linear-as opposed to exponentialin the number of features. We demonstrate the relationship of these measures with a constrained form of Shapley value, and we additionally relate C-Shapley with another solution concept from cooperative game theory, known as the Myerson value [16]. The Myerson value is commonly used in graph-restricted games, under a local additivity assumption of the model on disconnected subsets of features. Finally, we apply our feature scoring methods to several state-of-the-art models for both language and image data, and find that our scoring algorithms compare favorably to several existing sampling-based algorithms for instancewise feature importance scoring.
The remainder of this paper is organized as follows. We begin in Section 2 with background and set-up for the problem to be studied. In Section 3, we describe the two methods proposed and analyzed in this paper, based on the L-Shapley and C-Shapley scores. Section 4 is devoted to a study of the relationship between these scores and the Myerson value. In Section 5, we evaluate the performance of L-Shapley and C-Shapley on various real-world data sets, and we conclude with a discussion in Section 6.

Background and preliminaries
We begin by introducing some background and notation.

Importance of a feature subset
We are interested in studying models that are trained to perform prediction, taking as input a feature vector x ∈ X ⊂ R d and predicting a response or output variable y ∈ Y. We assume access to the output of a model via a conditional distribution, denoted by P m (·|x), that provides the distribution of the response Y ∈ Y conditioned on a given vector X = x of inputs. For any given subset S ⊂ {1, 2, . . . , d}, we use x S = {x j , j ∈ S} to denote the associated sub-vector of features, and we let P m (Y | x S ) denote the induced conditional distribution when P m is restricted to using only the sub-vector x S . In the cornercase in which S = ∅, we define P m (Y | x ∅ ) : = P m (Y ). In terms of this notation, for a given feature vector x ∈ X , subset S and fitted model distribution where E m [· | x] denotes the expectation over P m (· | x). The importance score v x (S) has a coding-theoretic interpretation: it corresponds to the negative of the expected number of bits required to encode the output of the model based on the subvector x S . It will be zero when the model makes a deterministic prediction based on x S , and larger when the model returns a distribution closer to uniform over the output space. There is also an information-theoretic interpretation to this definition of importance scores, as discussed in our previous work [3]. In particular, suppose that for a given integer k < d, there is a function x → S * (x) such that, for all almost all x, the k-sized subset S * (x) maximizes v x (S) over all subsets of size k. In this case, we are guaranteed that the mutual information I(X S * (X) , Y ) between X S * (X) and Y is maximized, over any conditional distribution that generates a subset of size k given X. The converse is also true.
In many cases, class-specific importance is favored, where one is interested in seeing how important a feature subset S is to the predicted class, instead of the prediction as a conditional distribution. In order to handle such cases, it is convenient to introduce the degenerate conditional distribution We can then define the importance of a subset S with respect toP m using the modified score which is the expected log probability of the predicted class given the features in S.
Estimating the conditional distribution: In practice, we need to estimate-for any given feature vectorx ∈ X -the conditional probability functions P m (y |x S ) based on observed data. Past work has used one of two approaches: either estimation based on empirical averages [22], or plug-in estimation using a reference point [5,14].
Empirical average estimation: In this approach, we first draw a set of feature vector {x j } M j=1 by sampling with replacement from the full data set. For each sample x j , we define a new vectorx j ∈ R d with components Taking the empirical mean of P m (y |x j ) over {x j } is then used as an estimate of P m (y |x S ).

Plug-in estimation:
In this approach, the first step is to specify a reference vector x 0 ∈ R d is specified. We then define the vectorx ∈ R d with components Finally, we use the conditional probability P m (y |x) as an approximation to P m (y |x S ). The plug-in estimate is more computationally efficient than the empirical average estimator, and works well when there exist appropriate choices of reference points. We use this method for our experiments, where we use the index of padding for language data, and the average pixel strength of an image for vision data.

Shapley value for measuring interaction between features
Consider the problem of quantifying the importance of a given feature index i for feature vector x. A naive way of doing so would be by computing the importance score v x ({i}) of feature i on its own. However, doing so ignores interactions between features, which are likely to be very important in applications. As a simple example, suppose that we were interested in performing sentiment analysis on the following sentence: It is not heartwarming or entertaining. It just sucks.
( ) This sentence is contained in a movie review from the IMDB movie data set [15], and it is classified as negative sentiment by a machine learning model to be discussed in the sequel. Now suppose we wish to quantify the importance of feature "not" in prediction. The word "not" plays an important role in the overall sentence as being classified as negative, and thus should be attributed a significant weight. However, viewed in isolation, the word "not" has neither negative nor positive sentiment, so that one would expect that v x ({"not"}) ≈ 0. Thus, it is essential to consider the interaction of a given feature i with other features. For a given subset S containing i, a natural way in which to assess how i interacts with the other features in S is by computing the difference between the importance of all features in S, with and without i. This difference is called the marginal contribution of i to S, and given by In order to obtain a simple scalar measure for feature i, we need to aggregate these marginal contributions over all subsets that contain i. The Shapley value [18] is one principled way of doing so. For each integer k = 1, . . . , d, we let S k (i) denote the set of k-sized subsets that contain i. The Shapley value is obtained by averaging the marginal contributions, first over the set S k (i) for a fixed k, and then over all possible choices of set size k: Average over k Since the model P m remains fixed throughout our analysis, we frequently omit the dependence of φ x on P m , instead adopting the more compact notation φ x (i).
The concept of Shapley value was first introduced in cooperative game theory [18], and it has been used in a line of recent work on instancewise feature importance ranking [22,5,14]. It can be justified on an axiomatic basis [18,24] as being the unique function from a collection of 2 d numbers (one for each subset S) to a collection of d numbers (one for each feature i) with the following properties: Monotonicity: Given two models P m and P m , let m x and m x denote the associated marginal contribution functions, and let φ x and φ x denote the associated Shapley values.
Note that all three of these axioms are reasonable in our feature selection context.

The challenge with computing Shapley values
The exact computation of the Shapley value φ x (i) takes into account the interaction of feature i with all 2 d−1 subsets that contain i, thereby leading to computational difficulties. Various approximation methods have been developed with the goal of reducing complexity. For example, Štrumbelj and Kononenko [22] proposed to estimate the Shapley values via a Monte Carlo approximation built on an alternative permutation-based definition of the Shapley value. Lundberg and Lee [14] proposed to evaluate the model over randomly sampled subsets and use a weighted linear regression to approximate the Shapley values based on the collected model evaluations.
In practice, such sampling-based approximations may suffer from high variance when the number of samples to be collected per instance is limited. For large-scale predictive models, the number of features is often relatively large, meaning that the number of samples required to obtain stable estimates can be prohibitively large. The main contribution of this paper is to address this challenge in a model-based paradigm, where the contribution of features to the response variable respects the structure of an underlying graph. In this setting, we propose efficient algorithms and provide bounds on the quality of the resulting approximation. As we discuss in more detail later, our approach should be viewed as complementary to samplingbased or regresssion-based approximations of the Shapley value. In particular, these methods can be combined with the approach of this paper so as to speed up the computation of the L-Shapley and C-Shapley values that we propose.

Methods
In many applications, the features can be associated with the nodes of a graph, and we can define distances between pairs of features based on the graph structure. More concretely, for sequence data (such as language, music etc.), each feature vector x can be associated with a line graph, whereas for image data, each x is naturally associated with a grid graph. In this section, we propose modified forms of the Shapley values, referred to as L-Shapley and C-Shapley values, that can be computed more efficiently than the Shapley value. We also show that under certain probabilistic assumptions on the marginal distribution over the features, these quantities yield good approximations to the original Shapley values.
More precisely, given feature vectors x ∈ R d , we let G = (V, E) denote a connected graph with nodes V and edges E ⊂ V × V , where each feature i is associated with a a node i ∈ V , and edges represent interactions between features. The graph induces a distance function on V × V , given by d G ( , m) = number of edges in shortest path joining to m.
In the line graph, this graph distance corresponds to the number of edges in the unique path joining them, whereas it corresponds to the Manhattan distance in the grid graph. For a given node i ∈ V , its k-neighborhood is the set of all nodes at graph distance at most k. See Figure 1 for an illustration for the two-dimensional grid graph. We propose two algorithms for the setting in which features that are either far apart on the graph or features that are not directly connected, have an accordingly weaker interaction.

Local Shapley
In order to motivate our first graph-structured Shapley score, let us take a deeper look at Example ( ). In order to compute the importance score of "not," the most important words to be included are "heartwarming" and "entertaining." Intuitively, the words distant from them have a weaker influence on the importance of a given word in a document, and therefore have relatively less effect on the Shapley score. Accordingly, as one approximation, we propose the L-Shapley score, which only perturbs the neighboring features of a given feature when evaluating its importance: Definition 1. Given a model P m , a sample x and a feature i, the L-Shapley estimate of order k on a graph G is given bŷ The coefficients in front of the marginal contributions of feature i are chosen to match the coefficients in the definition of the Shapley value restricted to the neighborhood N k (i). We show in Section 4 that this choice controls the error under certain probabilistic assumptions. In practice, the choice of the integer k is dictated by computational considerations. By the definition of k-neighborhoods, evaluating all d L-Shapley scores on a line graph requires 2 2k d model evaluations. (In particular, computing each feature takes 2 2k+1 model evaluations, half of which overlap with those of its preceding feature.) A similar calculation shows that computing all d L-Shapley scores on a grid graph requires 2 4k 2 d function evaluations.

Connected Shapley
We also propose a second algorithm, C-Shapley, that further reduces the complexity of approximating the Shapley value. Coming back to Example ( ) where we evaluate the importance of "not," both the L-Shapley estimate of order larger than two and the exact Shapley value estimate would evaluate the model on the word subset "It not heartwarming," which rarely appears in real data and may not make sense to a human or a model trained on real-world data. The marginal contribution of "not" relative to "It not heartwarming" may be well approximated by the marginal contribution of "not" to "not heartwarming." This motivates us to proprose C-Shapley: Definition 2. Given a model P m , a sample x and a feature i, the C-Shapley estimate of order k on a graph G is given bỹ where C k (i) denotes the set of all subsets of N k (i) that contain node i, and are connected in the graph G.

Properties
In this section, we study some basic properties of the L-Shapley and C-Shapley values. In particular, under certain probabilistic assumptions on the features, we show that they provide good approximations to the original Shapley values. We also show their relationship to another concept from cooperative game theory, namely that of Myerson values, when the model satisfies certain local additivity assumptions.

Approximation of Shapley value
In order to characterize the relationship between L-Shapley and the Shapley value, we introduce absolute mutual information as a measure of dependence. Given two random variables X and Y , the absolute mutual information I a (X; Y ) between X and Y is defined as where the expectation is taken jointly over X, Y . Based on the definition of independence, we have I a (X; Y ) = 0 if and only if X ⊥ ⊥ Y . Recall the mutual information [4] is defined as I(X; Y ) = E[log P (X,Y ) P (X)P (Y ) ]. The new measure is more stringent than the mutual information in the sense that I(X; Y ) ≤ I a (X; Y ). The absolute conditional mutual information can be defined in an analogous way. Given three random variables X, Y and Z, we define the absolute conditional mutual information to be I a (X; where the expectation is taken jointly over X, Y, Z. Recall that Theorem 1 and Theorem 2 show that L-Shapley and C-Shapley values, respectively, are related to the Shapley value whenever the model obeys a Markovian structure that is encoded by the graph. We leave their proofs to Appendix B. where we identify I a (X i ; X V |X ∅ ) with I a (X i ; X V ) for notational convenience. Then the expected error between the L-Shapley estimateφ k X (i) and the true Shapley-value-based importance score φ i (P m , x) is bounded by 4ε: In particular, we haveφ k Theorem 2. Suppose there exists a neighborhood S ⊂ N k (i) of i, with i ∈ S, such that Condition 8 is satisfied. Moreover, for any connected subset U ⊂ S with i ∈ U , we have sup where R(U ) : = {i ∈ [d] − U : for any j ∈ U, (i, j) / ∈ E}. Then the expected error between the C-Shapley estimateφ k X (i) and the true Shapley-value-based importance score φ i (P m , x) is bounded by 6ε: In particular, we haveφ d

Relating the C-Shapley value to the Myerson value
Let us now discuss how the C-Shapley value can be related to the Myerson value, which was introduced by Myerson [16] as an approach for characterizing a coalitional game over a graph G. Given a subset of nodes S in the graph G, let C G (S) denote the set of connected components of S-i.e., subsets of S that are connected via edges of the graph. Thus, if S is a connected subset of G, then C G (S) consists only of S; otherwise, it contains a collection of subsets whose disjoint union is equal to S.
Consider a score function T → v(T ) that satisfies the following decomposability condition: for any subset of nodes S, the score v(S) is equal to the sum of the scores over all the connected components of S-viz.
For any such score function, we can define the associated Shapley value, and it is known as the Myerson value on G with respect to v. Myerson [16] showed that the Myerson value is the unique quantity that satisfies both the decomposability property, as well as the properties additivity, equal contributions and monotonicity given in Section 2.2. In our setting, if we use a plug-in estimate for conditional probability, the decomposability condition (12) is equivalent to assuming that the influence of disconnected subsets of features are additive at sample x, and C-Shapley of order k = d is exactly the Myerson value over G. In fact, if we partition each subset S into connected components, as in the definition of Myerson value, and sum up the coefficients (using Lemma 1 in Appendix B), then the Myerson value is equivalent to equation (6).

Connections with related work
Let us now discuss connections with related work in more depth, and in particular how methods useful for approximating the Shapley value can be used to speed up the evaluation of approximate L-Shapley and C-Shapley values.

Sampling-based methods
There is an alternative definition of the Shapley value based on taking averages over permutations of the features. In particular, the contribution of a feature i corresponds to the average of the marginal contribution of i to its preceding features over the set of all permutations of d features. Based on this definition, Štrumbelj and Kononenko [22] propose a Monte Carlo approximation, based on randomly sampling permutations.
While L-Shapley is deterministic in nature, it is possible to combine it with this and other sampling-based methods. For example, if one hopes to consider the interaction of features in a large neighborhood N k (i) with a feature i, where exponential complexity in k becomes a barrier, sampling based on random permutation of local features may be used to alleviate the computational burden.

Regression-based methods
Lundberg and Lee [14] proposed to sample feature subsets based on a weighted kernel, and carry out a weighted linear regression to estimate the Shapley value. Suppose the model is evaluated on N feature subsets at x. In weighted least squares, each row of the data matrix X ∈ {0, 1} N ×d is a d-dimensional vector, with the j th entry being one if the feature j is selected, and zero otherwise. The response F ∈ R N is the evaluation of the model over feature subsets. The weight matrix W is diagonal with W ii = (d − 1)/( d ni n i (d − n i )) with n i = d j=1 X ij . Lundberg and Lee [14] provide strong empirical results using this regression-based approximation, referred to as Ker-nelSHAP; in particular, see Section 5.1 and Figure 3 of their paper. We can combine such a regression-based approximation with our modified Shapley values to further reduce the evaluation complexity of the C-Shapley values. In particular, for a chain graph, we evaluate the score function over all connected subsequences of length ≤ k; similarly, on a grid graph, we evaluate it over all connected squares of size ≤ k × k. Doing so yields a data matrix X ∈ {0, 1} kd×d and a response vector F ∈ R kd , where X ij = 1 if the jth feature is included in the ith sample, and F i : = v x (S i ), the score function evaluated on the corresponding feature subset. We use the solution to this weighted least-squares problem as a regression-based estimate

Experiments
We evaluate the performance of L-Shapley and C-Shapley on real-world data sets involving text and image classification. Codes for reproducing the key results are available online. 1 We compare L-Shapley and C-Shapley with several competitive algorithms for instancewise feature importance scoring on black-box models, including the regression-based approximation known as KernelSHAP [14], SampleShapley [22] , and the LIME method [17]. As discussed previously, KernelSHAP forms a weighted regression-approximation of the Shapley values, whereas SampleShapley estimates Shapley value by random permutation of features. The LIME method uses a linear model to locally approximate the original model through weighted least squares. For all methods, the number of model evaluations is the same, and linear in the number of features. We also choose the objective to be the log probability of the predicted class, and use the plug-in estimate of conditional probability across all methods (see Section 2.1).
For image data, we also compare with Saliency map [20] as another baseline. The Saliency method is used for interpreting neural networks in computer vision, by assuming knowledge of the gradient of a model with respect to the input, and using the gradient magnitude as the importance score for each pixel.

Text Classification
Text classification is a classical problem in natural language processing, in which text documents are assigned to predefined categories. We study the performance of L-Shapley and C-Shapley on three popular neural models for text classification: word-based CNNs [8], character-based CNNs [25], and long-short term memory (LSTM) recurrent neural networks [7], with the following three data sets on different scales. See Table 1 for a summary, and Appendix A for all of the details.
• IMDB Review with Word-CNN: The Internet Movie Review Dataset (IMDB) is a dataset of movie reviews for sentiment classification [15], which contains 50, 000 binary labeled movie reviews, with a split of 25, 000 for training and 25, 000 for testing. A simple word-based CNN model composed of an embedding layer, a convolutional layer, a max-pooling layer, and a dense layer is used, achieving an accuracy of 90.1% on the test data set.
• AG news with Char-CNN: The AG news corpus is composed of titles and descriptions of 196, 000 news articles from 2, 000 news sources [25]. It is segmented into four classes, each containing 30, 000 training samples and 1, 900 testing samples. Our character-based CNN has the same structure as that proposed in Zhang et al. [25]. The model achieves an accuracy of 90.09% on the test data set.
• Yahoo! Answers with LSTM: The corpus of Yahoo! Answers Topic Classification Dataset is divided into ten categories, each class containing 140, 000 training samples and 5, 000 testing samples. Each input text includes the question title, content and best answer. We train a bidirectional LSTM which achieves an accuracy of 70.84% on the test data set, close to the state-of-the-art accuracy of 71.2% obtained by character-based CNNs [25].  Table 1. A summary of data sets and models in three experiments. "Average #w" is the average number of words per sentence. "Accuracy" is the model accuracy on test samples.  KernelSHAP It is not heartwarming or entertaining . It just sucks .

SampleShapley
It is not heartwarming or entertaining . It just sucks . Table 2. Each word is highlighted with the RGB color as a linear function of its importance score. The background colors of words with positive and negative scores are linearly interpolated between blue and white, red and white respectively.
We choose zero paddings as the reference point for all methods, and make 4 × d model evaluations, where d is the number of words for each input. Given the average length of each input (see Table 1), this choice controls the number of model evaluations under 1, 000, taking less than one second in TensorFlow on a Tesla K80 GPU for all the three models. For L-Shapley, we are able to consider the interaction of each word i with the two neighboring words in N 1 (i) given the budget. For C-Shapley, the budget allows the regression-based version to evaluate all n-grams with n ≤ 4.
The change in log-odds scores before and after masking the top features ranked by importance scores is used as a metric for evaluating performance, where masked words are replaced by zero paddings. This metric has been used in previous literature in model interpretation [19,14]. We study how the average log-odds score of the predicted class decreases as the percentage of masked features over the total number of features increases on 1, 000 samples from the test set. Results are plotted in Figure 2.
On IMDB with Word-CNN, the simplest model among the three, L-Shapley, achieves the best performance while LIME, KernelSHAP and C-Shapley achieve slightly worse performance. model, probably because some of the signals captured by LSTM are relatively long n-grams.
We also visualize the importance scores produced by different Shapley-based methods on Example ( ), which is part of a negative movie review taken from IMDB. The result is shown in Table 2. More visualizations by our methods are available online. 1

Image Classification
We carry out experiments in image classification on the MNIST and CIFAR10 data sets: • MNIST: The MNIST data set contains 28 × 28 images of handwritten digits with ten categories 0 − 9 [12]. A subset of MNIST data set composed of digits 3 and 8 is used for better visualization, with 12, 000 images for training and 1, 000 images for testing. A simple CNN model achieves 99.7% accuracy on the test data set.
• CIFAR10: The CIFAR10 data set [10] contains 32 × 32 images in ten classes. A subset of CIFAR10 data set composed of deers and horses is used for better visualization, with 10, 000 images for training and 2, 000 images for testing. A convolutional neural network modified from AlexNet [11] achieves 96.1% accuracy on the test data set.
We take each pixel as a single feature for both MNIST and CIFAR10. We choose the average pixel strength as the reference point for all methods, and make 4 × d model evaluations, where d is the number of pixels for each input image, which keeps the number of model evaluations under 4, 000. LIME and L-Shapley are not used for comparison because LIME takes "superpixels" instead of raw pixels segmented by segmentation algorithms as single features, and L-Shapley requires nearly sixteen thousand model evaluations when applied to raw pixels. 2 For C-Shapley, the budget allows the regression-based version to evaluate all n × n image patches with n ≤ 4. Figure 3 shows the decrease in log-odds scores before and after masking the top pixels ranked by importance scores as the percentage of masked pixels over the total number of pixels increases on 1, 000 test samples on MNIST and CIFAR10 data sets. C-Shapley consistently outperforms other methods on both data sets. Figure 4 and Figure 5 provide additional visualization of the results. By masking the top pixels ranked by various methods, we find that the pixels picked by C-Shapley concentrate around and inside the digits in MNIST. The C-Shapley and Saliency methods yield the most interpretable results in CIFAR10. In particular, C-Shapley tends to mask the parts of head and body that distinguish deers and horses, and the human riding the horse. Figure 3 shows two misclassified digits by the CNN model.  Interestingly, the top pixels chosen by C-Shapley visualize the "reasoning" of the model: more specifically, the important pixels to the model are exactly those which could form a digit from the opposite class.

Discussion
We have proposed L-Shapley and C-Shapley for instancewise feature importance scoring, making use of a graphical representation of the data. We have shown the superior performance of the proposed algorithms compared to other methods for instancewise feature importance scoring in text and image classification.
CIFAR10 A convolutional neural network modified from AlexNet [11] is trained on the subset. It is composed of six convolutional layers of kernel size 3 × 3 and two dense linear layers of dimension 512 and 256 at last. The six convolutional layers contain 48,48,96,96,192,192 filters respectively, and every two convolutional layers are followed by a max-pooling layer of pool size two and a dropout layer. The CNN model is trained with the Adam optimizer [9] and achieves 96.1% accuracy on the test data set.

B Proof of Theorems
In this appendix, we collect the proofs of Theorems 1 and 2.

B.1 Proof of Theorem 1
We state an elementary combinatorial equality required for the proof of the main theorem: Proof. By the binomial theorem for negative integer exponents, we have The identity can be found by examination of the coefficient of x n in the expansion of In fact, equating the coefficients of x n in the left and the right hand sides, we get n j=0 j + t j (n − j) + (s − t) n − j = n + s + 1 n = n + s + 1 s + 1 n + s n .
Taking this lemma, we now prove the theorem. We split our analysis into two cases, namely S = N k (i) versus S ⊂ N k (i). For notational convenience, we extend the definition of L-Shapley estimate for feature i to an arbitrary feature subset S containing i. In particular, we defineφ P(Y, X U \{i} )P(X U )P (X U ∪V \{i} )P (X U ∪V , Y ) P(Y, X U )P(X U \{i} )P (X U ∪V )P (X U ∪V \{i} , Y ) Taking an expectation over X at both sides, we can upper bound the expected error by  E|φ k X (i) −φ k X (i)| ≤ 2ε. Based on Theorem 1, we have E|φ k X (i) − φ X (i)| ≤ 4ε. Applying the triangle yields E|φ k X (i) − φ X (i)| ≤ 6ε, which establishes the claim.