Skip to main content

Explaining Multiclass Classifiers with Categorical Values: A Case Study in Radiography

  • Conference paper
  • First Online:
Trustworthy Machine Learning for Healthcare (TML4H 2023)

Abstract

Explainability of machine learning methods is of fundamental importance in healthcare to calibrate trust. A large branch of explainable machine learning uses tools linked to the Shapley value, which have nonetheless been found difficult to interpret and potentially misleading. Taking multiclass classification as a reference task, we argue that a critical issue in these methods is that they disregard the structure of the model outputs. We develop the Categorical Shapley value as a theoretically-grounded method to explain the output of multiclass classifiers, in terms of transition (or flipping) probabilities across classes. We demonstrate on a case study composed of three example scenarios for pneumonia detection and subtyping using X-ray images.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 109.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 139.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    For instance, the Shapley value is a descriptive rather than prescriptive tool. This means that, in general, one should not expect that changing the feature with the highest Shapley value should lead to the largest change in the outcome.

  2. 2.

    In practice, out-of-coalition features must often be given a value; this could be an arbitrary baseline, a global or a conditional average Sundararajan and Najmi (2020), Aas et al. (2021).

References

  • Aas, K., Jullum, M., Løland, A.: Explaining individual predictions when features are dependent: more accurate approximations to shapley values. Artif. Intell. 298, 103502 (2021)

    Article  MathSciNet  MATH  Google Scholar 

  • Bhatt, U., et al.: Explainable machine learning in deployment. In: Proceedings of the 2020 Conference on Fairness, Accountability, and Transparency, pp. 648–657 (2020)

    Google Scholar 

  • Chen, J., Song, L., Wainwright, M.J., Jordan, M.I.: L-shapley and C-shapley: efficient model interpretation for structured data. arXiv preprint arXiv:1808.02610 (2018)

  • Frye, C., Rowat, C., Feige, I.: Asymmetric shapley values: incorporating causal knowledge into model-agnostic explainability. Adv. Neural. Inf. Process. Syst. 33, 1229–1239 (2020)

    Google Scholar 

  • Granot, D.: Cooperative games in stochastic characteristic function form. Manage. Sci. 23(6), 621–630 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  • He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition (2015)

    Google Scholar 

  • Heskes, T., Sijben, E., Bucur, I.G., Claassen, T.: Causal shapley values: exploiting causal knowledge to explain individual predictions of complex models. Adv. Neural Inf. Process. Syst. 33, 4778–4789 (2020)

    Google Scholar 

  • Kermany, D.S., et al.: Identifying medical diagnoses and treatable diseases by image-based deep learning. Cell 172(5) (2018). https://doi.org/10.1016/j.cell.2018.02.010

  • Kim, Y., Denton, C., Hoang, L., Rush, A.M.: Structured attention networks. arXiv preprint arXiv:1702.00887 (2017)

  • Kumar, I.E., Venkatasubramanian, S., Scheidegger, C., Friedler, S.: Problems with shapley-value-based explanations as feature importance measures. In: International Conference on Machine Learning, pp. 5491–5500. PMLR (2020)

    Google Scholar 

  • Lundberg, S.M., Lee, S.I.: A unified approach to interpreting model predictions. Adv. Neural Inf. Process. Syst. 30 (2017)

    Google Scholar 

  • Miller, T.: Explanation in artificial intelligence: Insights from the social sciences. Artif. Intell. 267, 1–38 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  • Mittelstadt, B., Russell, C., Wachter, S.: Explaining explanations in AI. In: Proceedings of the Conference on Fairness, Accountability, and Transparency, pp. 279–288 (2019)

    Google Scholar 

  • Papandreou, G., Yuille, A.L.: Perturb-and-map random fields: using discrete optimization to learn and sample from energy models. In: 2011 International Conference on Computer Vision, pp. 193–200. IEEE (2011)

    Google Scholar 

  • Peleg, B., Sudhölter, P.: Introduction to the Theory of Cooperative Games, vol. 34. Springer, Heidelberg (2007). https://doi.org/10.1007/978-3-540-72945-7

    Book  MATH  Google Scholar 

  • Petrosjan, L.A.: Cooperative stochastic games. In: Haurie, A., Muto, S., Petrosjan, L.A., Raghavan, T.E.S. (eds.) Advances in Dynamic Games. Annals of the International Society of Dynamic Games, vol. 8, pp. 139–145. Springer, Boston (2006). https://doi.org/10.1007/0-8176-4501-2_7

    Chapter  Google Scholar 

  • Roth, A.E.: The Shapley Value: Essays in Honor of Lloyd S. Shapley. Cambridge University Press, Cambridge (1988)

    Book  MATH  Google Scholar 

  • Shapley, L.: A Value for n-Person Games, p. 343 (1953a). Artin, E., Morse, M. (eds.)

    Google Scholar 

  • Shapley, L.S.: Stochastic games. Proc. Natl. Acad. Sci. 39(10), 1095–1100 (1953b)

    Google Scholar 

  • Suijs, J., Borm, P., De Waegenaere, A., Tijs, S.: Cooperative games with stochastic payoffs. Eur. J. Oper. Res. 113(1), 193–205 (1999)

    Article  MATH  Google Scholar 

  • Sun, P., Hou, D., Sun, H.: Optimization implementation of solution concepts for cooperative games with stochastic payoffs. Theor. Decis. 93(4), 691–724 (2022)

    Article  MathSciNet  MATH  Google Scholar 

  • Sundararajan, M., Najmi, A.: The many Shapley values for model explanation. In: International Conference on Machine Learning, pp. 9269–9278. PMLR (2020)

    Google Scholar 

  • Vaswani, A., et al.: Attention is all you need. Adv. Neural Inf. Process. Syst. 30 (2017)

    Google Scholar 

  • Weber, R.J.: Probabilistic Values for Games. The Shapley Value. Essays in Honor of Lloyd S. Shapley, pp. 101–119 (1988)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Luca Franceschi .

Editor information

Editors and Affiliations

Appendices

A Analytic Expression of the PDF of Categorical Differences

Consider \(E = \{e_1, \dots , e_d\}\) with \(d\ge 3\). Suppose that v(S) has a d-way categorical distribution with natural parameters \(\theta _{S, j}\), in that

$$ \mathbb {P}\left( v(S) = j \right) = \frac{e^{\theta _{S, j}}}{\sum _k e^{\theta _{S, k}}}. $$

Categorical games emerge, e.g., when explaining the output of multiclass classifiers or attention masks of transformer models (Kim et al., 2017, Vaswani et al., 2017).

A latent variable representation is given by the Gumbel-argmax reparameterization (Papandreou and Yuille, 2011):

$$ \tilde{v}(S, \mathbf {\varepsilon }) = \arg \max _k\{ \theta _{S,k} + \varepsilon _k \}, $$

where \(\varepsilon _1,\dots ,\varepsilon _d\) are independent standard Gumbel variables with probability distribution function \(p(\varepsilon _j)\) and cumulative distribution function \(F(\varepsilon _j)\) given by

$$ F(\varepsilon _j) = \exp \left( -e^{-\varepsilon _j} \right) ,\quad p(\varepsilon _j) = \exp \left( -\varepsilon _j - e^{-\varepsilon _j} \right) . $$

At this point, assume that \(e_j = [\textbf{1}_{k=j}]_k\in \{0,1\}^d\) are the standard basis vectors of \(\mathbb {R}^d\). Then, \(E - E = \{ e_r - e_s\,|\, 1\le r, s\le d\}\) has size \(d^2 - d + 1\), and the distribution of \(v(S\cup i) \ominus v(S)\) is given by the off-diagonal entries of the joint distribution \(Q_{i, S}(r, s) = \mathbb {P}( v(S\cup i) = r, v(S) = s )\).

We can work out \(Q_{i, S}(r, s)\) explicitly. Denote

$$ \alpha _j = \theta _{S\cup i, j},\quad \beta _j = \theta _{S, j},\quad \rho _j = \alpha _j - \beta _j. $$

Without loss of generality, we assume the categories to be ordered so that \(\rho _1\ge \rho _2\ge \dots \ge \rho _d\). Then:

$$ \begin{aligned}&\tilde{Q}_{i, S}(r, s) = e^{\alpha _r + \beta _s}\left( C_s - C_r \right) \textbf{1}_{r< s}\quad (r\ne s), \\&\tilde{Q}_{i, S}(r, r) = e^{\beta _r - \bar{\beta }_{r}} \sigma \left( \bar{\beta }_{r} - \bar{\alpha }_{r} + \rho _r \right) \textbf{1}_{r < d} + e^{\alpha _d - \bar{\alpha }_d} \textbf{1}_{r=d}, \end{aligned} $$

where

$$ \begin{aligned}&\bar{\alpha }_{k} = \log \sum _{j=1}^k e^{\alpha _j},\quad \bar{\beta }_{k} = \log \sum _{j=k+1}^d e^{\beta _j}, \\&c_k = e^{-\bar{\beta }_{k} - \bar{\alpha }_{k}} \left( \sigma \left( \bar{\beta }_{k} - \bar{\alpha }_{k} + \rho _{k} \right) - \sigma \left( \bar{\beta }_{k} - \bar{\alpha }_{k} + \rho _{k+1} \right) \right) , \\&C_t = \sum _{k=1}^{t-1} c_k,\quad \sigma (x) = \frac{1}{1 + e^{-x}}. \\ \end{aligned} $$

The derivation is provided in Appendix B. We write \(\tilde{Q}_{i, S}\) instead of \(Q_{i, S}\) due to the specific ordering of categories. The induced distribution of \(v(S\cup i) \ominus v(S)\) is

$$ \sum _{r<s} \tilde{Q}_{i, S}(r, s) \delta _{e_r - e_s} + \left( \sum \nolimits _r \tilde{Q}_{i, S}(r, r) \right) \delta _{\textbf{0}}, $$

from which the off-diagonal entries of \(\tilde{Q}_{i, S}(r, s)\) can be reconstructed.

Assume that \(Q_{i, S}(r, s)\) are given for all S in a common ordering of the categories, in that \(Q_{i, S}(r, s) = \tilde{Q}_{i, S}(\pi _S(r), \pi _S(s))\), where \(\pi _S\) is a permutation of \(\{1, \dots , d\}\) fulfilling the ordering condition used above. If

$$ Q_i(r, s) = \mathbb {E}_{S\sim p^i}\left[ Q_{i, S}(r, s) \right] , $$

the distributions of Categorical values are given by

$$ q_i = \sum _{r, s} Q_i(r, s) \delta _{e_r - e_s}. $$

The probability masses at each point \(e_r - e_s \in E-E\) are interpretable as the probability (averaged over coalitions) that player i causes the payoff of v to flip from class s to class r.

We may define the following query functional on top of this distribution is

$$ \ell _{\textrm{mc}} = \max _s \sum _{r\ne s} Q_i(r, s), $$

which quantifies the largest probability of any change in the output led by player i. It can be computed more efficiently as \(\max _s Q_i(s) - Q_i(s, s)\), where the marginal distribution \(Q_{S, i}(s)\) is given by

$$ Q_{S, i}(s) = \mathbb {P}( v(S) = s ) = e^{\beta _s - \bar{\beta }_0}. $$

B Extended Derivation for Categorical Games

We provide a derivation of the expressions \(\tilde{Q}_{i,S}(r, s)\). In this derivation, i and S are fixed, and we write \(\mathcal {P}_{r s}\) for \(\tilde{Q}_{i,S}(r, s)\). Let \(d\ge 3\) be an integer, \([\alpha _j]\) and \([\beta _j]\) be sets of d real numbers. Above, \(\alpha _j = \theta _{S\cup i, j}\) and \(\beta _j = \theta _{S, j}\), but the derivation below does not make use of this. Also, let \(\varepsilon _j\) be d independent standard Gumbel variables, each of which has distribution function and density

$$ F(\varepsilon ) = \exp \left( e^{-\varepsilon } \right) ,\quad p(\varepsilon ) = F(\varepsilon )' = \exp \left( -\varepsilon - e^{-\varepsilon } \right) = e^{-\varepsilon } F(\varepsilon ). $$

Fix \(r, s\in \{{1},\dots ,{d}\}\), \(r\ne s\). We would like to obtain an expression for the probability \(\mathcal {P}_{r s}\) of

$$ \mathop {\mathrm {arg\,max}}\limits _j\left( \alpha _j + \varepsilon _j \right) = r\quad \text {and}\quad \mathop {\mathrm {arg\,max}}\limits _j\left( \beta _j + \varepsilon _j \right) = s. $$

Define

$$ \alpha _{j r} := \alpha _j - \alpha _r,\quad \beta _{j s} := \beta _j - \beta _s. $$

The \(\mathrm {arg\,max}\) equalities above can also be written as a set of 2d inequalities (2 of which are trivial):

$$ \varepsilon _j \le \varepsilon _r - \alpha _{j r},\quad \varepsilon _j\le \varepsilon _s - \beta _{j s},\quad j={1},\dots ,{d}. $$

Then:

$$ \mathcal {P}_{r s} = \mathbb {E}\left[ \prod \nolimits _j I_j \right] ,\quad I_j := \textbf{1}_{\varepsilon _j \le \min (\varepsilon _r - \alpha _{j r}, \varepsilon _s - \beta _{j s})}. $$

Two of them are simple:

$$ I_r = \textbf{1}_{\varepsilon _r\le \varepsilon _s - \beta _{r s}},\quad I_s = \textbf{1}_{\varepsilon _s\le \varepsilon _r - \alpha _{s r}}, \quad I_r I_s = \textbf{1}_{\alpha _s - \alpha _r \le \varepsilon _r- \varepsilon _s \le \beta _s - \beta _r}. $$

Denote

$$ \gamma _j := \alpha _{j r} - \beta _{j s} = \rho _j - (\alpha _r - \beta _s),\quad \rho _j := \alpha _j - \beta _j. $$

Note that \(\gamma _j\) depends on rs, but \(\rho _j\) does not. If \(j\ne r, s\), then

$$ I_j = \textbf{1}_{\varepsilon _j\le \varepsilon _r - \alpha _{j r}} \textbf{1}_{\varepsilon _r - \varepsilon _s \le \gamma _j} + \textbf{1}_{\varepsilon _j\le \varepsilon _s - \beta _{j s}} \textbf{1}_{\varepsilon _r - \varepsilon _s \ge \gamma _j}. $$

If we exchange sum and product, we obtain an expression of \(\mathcal {P}_{r s}\) as sum of \(2^{d - 2}\) terms. Each of these terms is an expectation over \(\varepsilon _r\), \(\varepsilon _s\), with the argument being the product of \(d-2\) terms \(F(\varepsilon _r + a_j)\) or \(F(\varepsilon _s + a_j)\) and a box indicator for \(\varepsilon _r - \varepsilon _s\). In the sequel, we make this more concrete and show that at most \(d-1\) of these terms are nonzero.

With a bit of hindsight, we assume that \(\rho _1\ge \rho _2\ge \dots \ge \rho _d\), which is obtained by reordering the categories. This implies that \([\gamma _j]\) is nonincreasing for all (rs). Also, define the function \(\pi (k) = k + \textbf{1}_{r\le k} + \textbf{1}_{s-1\le k}\) from \(\{{1},\dots ,{d-2}\}\) to \(\{{1},\dots ,{d}\}\setminus \{r, s\}\). We will argue in terms of a recursive computation over \(k={1},\dots ,{d-2}\). Define

$$ M_k(\varepsilon _r, \varepsilon _s) = \mathbb {E}\left[ I_r I_s \prod \nolimits _{1\le j\le k} I_{\pi (j)}\; \bigl |\; \varepsilon _r, \varepsilon _s \right] ,\quad k\ge 0, $$

so that \(\mathcal {P}_{r s} = \mathbb {E}[M_{d-2}(\varepsilon _r, \varepsilon _s)]\). Each \(M_k\) can be written as sum of \(2^{k}\) terms. Imagine a binary tree of depth \(d-1\), with layers indexed by \(k=0, 1, \dots , d-2\). Each node in this tree is annotated by a box indicator for \(\varepsilon _r - \varepsilon _s\) and some information detailed below. We are interested in the \(2^{d-2}\) leaf nodes of this tree.

1.1 B.1 Box Indicators. Which Terms Are Needed?

We begin with a recursive computation of the box indicators, noting that we can eliminate all nodes where the box is empty. Label the root node (at \(k=0\)) by 1, its children (at \(k=1\)) by 10 (left), 11 (right), and so on, and define the box indicators as \(\textbf{1}_{l_1\le \varepsilon _r - \varepsilon _s\le u_1}\), and \((l_{10}, u_{10})\), \((l_{11}, u_{11})\) respectively. Then, \(l_1 = \alpha _s - \alpha _r\), \(u_1 = \beta _s - \beta _r\) defines the box for the root. Here,

$$ l_1 \ge u_1\quad \Leftrightarrow \quad \rho _s \ge \rho _r. $$

Since \([\rho _j]\) is non-increasing, the root box is empty if \(s < r\), so that \(\mathcal {P}_{r s} = 0\) in this case. In the sequel, we assume that \(r < s\) and \(\rho _r > \rho _s\), so that \(l_1 < u_1\).

If \(\textbf{n}{}\) is the label of a node at level \(k - 1\) with box \((l_{\textbf{n}{}}, u_{\textbf{n}{}})\), then

$$ l_{\textbf{n}{} 0} = l_{\textbf{n}{}},\quad u_{\textbf{n}{} 0} = \min (\gamma _{\pi (k)}, u_{\textbf{n}{}}),\quad l_{\textbf{n}{} 1} = \max (\gamma _{\pi (k)}, l_{\textbf{n}{}}),\quad u_{\textbf{n}{} 1} = u_{\textbf{n}{}}. $$

Consider node 11 (right child of root). There are two cases. (1) \(\gamma _{\pi (1)} < u_1\). Then, \(l_{11} \ge \gamma _{\pi (1)}\ge \gamma _{\pi (k)}\) for all \(k\ge 1\), so all descendants must have the same \(l = l_{11}\). If ever we step to the left from here, \(u = \min (\gamma _{\pi (k)}, u_1)\le \gamma _{\pi (k)}\le \gamma _{\pi (1)}\le l_{11}\), so the node is eliminated. This means from 11, we only step to the right: \(111, 1111, \dots \), with \(l = \max (\gamma _{\pi (1)}, l_1)\), \(u = u_1\), so there is only one leaf node which is a descendant of 11. (2) \(\gamma _{\pi (1)}\ge u_1\). Then, \(l_{11} \ge u_{11}\), so that 11 and all its descendants are eliminated.

At node 10, we have \(l_{10} = l_1\). If \(\gamma _{\pi (1)}\le l_1\), the node is eliminated, so assume \(\gamma _{\pi (1)} > l_1\), and \(u_{10} = \min (\gamma _{\pi (1)}, u_1)\). Consider its right child 101. We can repeat the argument above. There is at most one leaf node below 101, with \(l = \max (\gamma _{\pi (2)}, l_1)\) and \(u = u_{10} = \min (\gamma _{\pi (1)}, u_1)\).

All in all, at most \(d-1\) leaf nodes are not eliminated, namely those with labels \(1 0\dots 0 1 \dots 1\), and their boxes are \([\max (\gamma _{\pi (1)}, l_1), u_1]\), \([\max (\gamma _{\pi (2)}, l_1), \min (\gamma _{\pi (1)}, u_1)]\), \(\dots \), \([\max (\gamma _{\pi (d-2)}, l_1), \min (\gamma _{\pi (d-3)}, u_1)]\), \([l_1, \min (\gamma _{\pi (d-2)}, u_1)]\).

Recall that each node term is a product of \(d-2\) Gumbel CDFs times a box indicator. What are these products for our \(d-1\) non-eliminated leaf nodes? The first is \(F(\varepsilon _s - \beta _{\pi (1) s}) \cdots F(\varepsilon _s - \beta _{\pi (d-2) s})\), the second is \(F(\varepsilon _r - \alpha _{\pi (1) r}) F(\varepsilon _s - \beta _{\pi (2) s}) \cdots F(\varepsilon _s - \beta _{\pi (d-2) s})\), the third is \(F(\varepsilon _r - \alpha _{\pi (1) r}) F(\varepsilon _r - \alpha _{\pi (2) r}) F(\varepsilon _s - \beta _{\pi (3) s}) \cdots F(\varepsilon _s - \beta _{\pi (d-2) s})\) and the last one is \(F(\varepsilon _r - \alpha _{\pi (1) r}) \cdots F(\varepsilon _r - \alpha _{\pi (d-2) r})\). Next, we derive expressions for the expectation of these terms.

1.2 B.2 Analytical Expressions for Expectations

Consider \(d-2\) scalars \(a_1, \dots , a_{d-2}\) and \(1\le k\le d-1\). We would like to compute

$$\begin{aligned} A = \mathbb {E}\left[ \left( \prod \nolimits _{j < k} F(\varepsilon _r + a_j) \right) \left( \prod \nolimits _{j \ge k} F(\varepsilon _s + a_j) \right) \textbf{1}_{l\le \varepsilon _r - \varepsilon _s\le u} \right] . \end{aligned}$$
(4)

Denote

$$ G(a_1, \dots , a_t) := \mathbb {E}[F(\varepsilon _1 + a_1) \cdots F(\varepsilon _1 + a_t)]. $$

We start with showing that

$$ G(a_1, \dots , a_t) = \left( 1 + e^{-a_1} + \cdots + e^{-a_t} \right) ^{-1}. $$

Recall that \(p(x) = F(x)' = e^{-x} F(x)\). If \(\tilde{F}(x) = \prod _{j=1}^{t} F(x + a_j)\), then

$$ \tilde{F}(x)' = \left( \sum \nolimits _{j=1}^{t} e^{-a_j} \right) e^{-x} \tilde{F}(x). $$

Using integration by parts:

$$ G(a_1, \dots , a_t) = \int \tilde{F}(x) p(x)\, d x = 1 - \int \tilde{F}(x)' F(x)\, d x = 1 - \left( \sum \nolimits _{j=1}^{t} e^{-a_j} \right) G(a_1, \dots , a_t), $$

where we used that \(F(x) = e^x p(x)\).

Next, define

$$ g_1 = \log \left( 1 + e^{-a_1} + \cdots + e^{-a_{k-1}} \right) ,\quad g_2 = \log \left( 1 + e^{-a_{k}} + \cdots + e^{-a_{d-2}} \right) . $$

We show that A in (4) can be written in terms of \((g_1, g_2, l, u)\) only. Assume that \(k>1\) for now. Fix \(\varepsilon _s\) and do the expectation over \(\varepsilon _r\). Note that \(\textbf{1}_{l\le \varepsilon _r - \varepsilon _s\le u} = \textbf{1}_{\varepsilon _s + l\le \varepsilon _r\le \varepsilon _s + u}\). If \(\tilde{F}(x) = \prod _{j<k} F(x + a_j)\), then

$$ \tilde{F}(x)' = \left( \sum \nolimits _{j<k} e^{-a_j} \right) e^{-x} \tilde{F}(x). $$

Using integration by parts:

$$ B(\varepsilon _s) = \int _{\varepsilon _s + l}^{\varepsilon _s + u} \tilde{F}(x) p(x)\, d x = \left[ \tilde{F}(x) F(x) \right] _{\varepsilon _s + l}^{\varepsilon _s + u} - B(\varepsilon _s) \sum _{j<k} e^{-a_j}, $$

so that

$$ B(\varepsilon _s) = e^{-g_1} \left[ \tilde{F}(x) F(x) \right] _{\varepsilon _s + l}^{\varepsilon _s + u} $$

and

$$ A = \mathbb {E}\left[ B(\varepsilon _s) \prod \nolimits _{j\ge k} F(\varepsilon _s + a_j) \right] = A_1 - A_2, $$

where

$$ \begin{aligned} A_1&= e^{-g_1} \mathbb {E}\left[ \left( \prod \nolimits _{j<k} F(\varepsilon _s + u + a_j) \right) \left( \prod \nolimits _{j\ge k} F(\varepsilon _s + a_j) \right) F(\varepsilon _s + u) \right] \\&= e^{-g_1} G(a_1 + u, a_2 + u, \dots , a_{k-1} + u, a_{k}, \dots , a_{d-2}, u) \end{aligned} $$

and

$$ A_2 = e^{-g_1} G(a_1 + l, a_2 + l, \dots , a_{k-1} + l, a_{k}, \dots , a_{d-2}, l). $$

Now,

$$ \begin{aligned} -\log A_1&= g_1 - \log G(a_1 + u, a_2 + u, \dots , a_{k-1} + u, a_{k}, \dots , a_{d-2}, u) \\&= g_1 + \log \left( 1 + \sum \nolimits _{j<k} e^{-a_j - u} + \sum \nolimits _{j\ge k} e^{-a_j} + e^{-u} \right) = g_1 + \log \left( e^{g_2} + e^{-u + g_1} \right) \\&= g_1 + g_2 + \log \left( 1 + e^{g_1 - g_2 - u} \right) \end{aligned} $$

and

$$ -\log A_2 = g_1 + g_2 + \log \left( 1 + e^{g_1 - g_2 - l} \right) $$

so that

$$\begin{aligned} A = A_1 - A_2 = e^{-(g_1 + g_2)}\left( \sigma (g_2 - g_1 + u) - \sigma (g_2 - g_1 + l) \right) ,\quad \sigma (x) := \frac{1}{1 + e^{-x}}. \end{aligned}$$
(5)

If \(k=1\), we can flip the roles of \(\varepsilon _r\) and \(\varepsilon _s\) by \(g_1\leftrightarrow g_2\), \(l\rightarrow -u\), \(u\rightarrow -l\), \(k\rightarrow d-1\), which gives

$$\begin{aligned} e^{-(g_1 + g_2)}\left( \sigma (-(g_2 - g_1 + l)) - \sigma (-(g_2 - g_1 + u)) \right) \\ = e^{-(g_1 + g_2)}\left( \sigma (g_2 - g_1 + u) - \sigma (g_2 - g_1 + l) \right) , \end{aligned}$$

using \(\sigma (-x) = 1 - \sigma (x)\), so the expression holds in this case as well.

1.3 B.3 Efficient Computation for All Pairs

Our \(d-1\) terms of interest can be indexed by \(k={1},\dots ,{d-1}\). We can use the analytical expression just given with \(a_j = -\alpha _{\pi (j) r}\) for \(1\le j< k\) and \(a_j = -\beta _{\pi (j) s}\) for \(k\le j\le d-2\). Define

$$ g_1(k) = \log \left( 1 + \sum \nolimits _{1\le j < k} e^{\alpha _{\pi (j)} - \alpha _r} \right) ,\quad g_2(k) = \log \left( 1 + \sum \nolimits _{k \le j\le d-2} e^{\beta _{\pi (j)} - \beta _s} \right) , $$

as well as

$$ l(k) = \max (\gamma _{\pi (k)}, l_1),\quad u(k) = \min (\gamma _{\pi (k-1)}, u_1), $$

where we define \(\pi (0) = 0\), \(\pi (d-1) = d+1\), \(\gamma _0 = +\infty \), and \(\gamma _{d+1} = -\infty \). Note that

$$\begin{aligned} \begin{aligned}&l(k) = \max ( \rho _{\pi (k)} - \alpha _r + \beta _s, \alpha _s - \alpha _r ) = \beta _s - \alpha _r + \max ( \rho _{\pi (k)}, \rho _s ), \\&u(k) = \min ( \rho _{\pi (k-1)} - \alpha _r + \beta _s, \beta _s - \beta _r ) = \beta _s - \alpha _r + \min ( \rho _{\pi (k-1)}, \rho _r ). \end{aligned} \end{aligned}$$
(6)

\(\mathcal {P}_{r s}\) is obtained as sum of \(A(g_1(k), g_2(k), l(k), u(k))\) for \(k={1},\dots ,{d-1}\). In the sequel, we show how to compute these terms efficiently, for all pairs \(r < s\).

Recall that \(\gamma _j = \rho _j - (\alpha _r - \beta _s)\), \(u_1 = \beta _s - \beta _r\), \(l_1 = \alpha _s - \alpha _r\). Then:

$$ l(k)< u(k)\quad \Leftrightarrow \quad \rho _{\pi (k)}< \rho _{\pi (k-1)}\; \wedge \; \rho _{\pi (k)}< \rho _r\; \wedge \; \rho _s < \rho _{\pi (k-1)}. $$

Recall that \(\pi (k) = k + \textbf{1}_{r\le k} + \textbf{1}_{s-1\le k}\). Define \(K_1 = \{{1},\dots ,{r-1}\}\), \(K_3 = \{{s},\dots ,{d-1}\}\), each of which can be empty. For \(k\in K_1\), \(\rho _{\pi (k)} = \rho _k \ge \rho _r\), so \(l(k)\ge u(k)\). For \(k\in K_3\), we have \(\pi (k-1) = k+1 > s\), so that \(\rho _s\ge \rho _{\pi (k-1)}\) and \(l(k)\ge u(k)\). This means we only need to iterate over \(k\in K_2 = \{{r},\dots ,{s-2}\}\) with \(\pi (k) = k+1\) and \(k=s-1\) with \(\pi (k) = s+1\) (the latter only if \(s < d\)).

As k runs in \(K_2\), \(\pi (k) = r+1,\dots , s-1\), and if \(s < d\) then \(\pi (s-1) = s+1\). Now

$$ g_1(k) = \log \left( 1 + \sum \nolimits _{1\le j < k} e^{\alpha _{\pi (j)} - \alpha _r} \right) = \log \sum \nolimits _{1\le j\le k} e^{\alpha _{j} - \alpha _r}, $$

using that \(e^{\alpha _r - \alpha _r} = 1\). For \(g_2(k)\), if \(k < s-1\), then \(\{\pi (j)\, |\, k\le j\le d-2\} = \{{k+1},\dots ,{d}\}\setminus \{s\}\), and if \(k = s-1\), the same holds true (the set is empty if \(s=d\)). Using \(e^{\beta _s - \beta _s} = 1\), we have

$$ g_2(k) = \log \sum \nolimits _{k < j\le d} e^{\beta _{j} - \beta _s}. $$

Define

$$ \bar{\alpha }_{k} := \log \sum _{j=1}^k e^{\alpha _j},\quad \bar{\beta }_{k} := \log \sum _{j=k+1}^d e^{\beta _j},\quad k={1},\dots ,{d-1}. $$

Then:

$$ g_1(k) = \bar{\alpha }_{k} - \alpha _r,\quad g_2(k) = \bar{\beta }_{k} - \beta _s,\quad k = {r},\dots ,{s-1}. $$

Finally, using \(g_2(k) - g_1(k) = \bar{\beta }_{k} - \bar{\alpha }_{k} + \alpha _r - \beta _s\) and (6), we have

$$ g_2(k) - g_1(k) + l(k) = \bar{\beta }_{k} - \bar{\alpha }_{k} + \max ( \rho _{\pi (k)}, \rho _s ),, \quad g_2(k) - g_1(k) + u(k) = \bar{\beta }_{k} - \bar{\alpha }_{k} + \min ( \rho _{\pi (k-1)}, \rho _r ). $$

Some extra derivation, distinguishing between (a) \(r = s-1\), (b) \(r < s-1 \wedge k\in K_2\), (c) \(r < s-1 \wedge k = s-1\) shows that

$$ \max ( \rho _{\pi (k)}, \rho _s ) = \rho _{k+1},\quad \min ( \rho _{\pi (k-1)}, \rho _r ) = \rho _k,\quad k={r},\dots ,{s-1}. $$

Plugging this into (5):

$$ A(k) = e^{\alpha _r + \beta _s} c_k,\quad c_k = e^{-\bar{\beta }_{k} - \bar{\alpha }_{k}} \left( \sigma \left( \bar{\beta }_{k} - \bar{\alpha }_{k} + \rho _{k} \right) - \sigma \left( \bar{\beta }_{k} - \bar{\alpha }_{k} + \rho _{k+1} \right) \right) . $$

and \(\mathcal {P}_{r s} = \sum _{k=r}^{s-1} A(k)\). Importantly, \(c_k\) does not depend on rs. Therefore:

$$\begin{aligned} \mathcal {P}_{r s} = e^{\alpha _r + \beta _s} (C_s - C_r),\quad C_t = \sum _{k=1}^{t-1} c_k\quad (r < s);\quad \mathcal {P}_{r s} = 0\quad (r > s). \end{aligned}$$
(7)

The sequences \([\bar{\alpha }_{k}]\), \([\bar{\beta }_{k}]\), \([c_k]\) , \([C_k]\) can be computed in \(\mathcal {O}(d)\).

Finally, we also determine \(\mathcal {P}_{r r}\), which is defined by the inequalities \(\varepsilon _j \le \varepsilon _1 - \max (\alpha _{j r}, \beta _{j r})\). A derivation like above (but simpler) gives:

$$ \mathcal {P}_{r r} = \left( 1 + \sum _{j\ne r} e^{\max (\alpha _{j r}, \beta _{j r})} \right) ^{-1}. $$

Now, \(\alpha _{j r}\ge \beta _{j r}\) iff \(\rho _j\ge \rho _r\) iff \(j < r\), so that

$$ \begin{aligned} \mathcal {P}_{r r}&= \left( 1 + \sum _{j<r} e^{\alpha _j - \alpha _r} + \sum _{j>r} e^{\beta _j - \beta _r} \right) ^{-1} = \left( e^{\bar{\alpha }_{r} - \alpha _r} + e^{\bar{\beta }_{r} - \beta _r} \right) ^{-1} \\ {}&= e^{\beta _r -\bar{\beta }_{r}} \sigma (\bar{\beta }_{r} - \bar{\alpha }_{r} + \rho _r),\quad (r < d), \\ \mathcal {P}_{d d}&= e^{\alpha _d - \bar{\alpha }_{d}}. \end{aligned} $$

C Related Work in Cooperative Game Theory

The Shapley value of simple game has a probabilistic interpretation (Peleg and Sudhölter, 2007, pag. 168) however simple games are not Categorical games. An and-or axiom substitute the linear axioms in simple games (Weber, 1988), here we address probabilisitc combinations. Stochastic games are typically intended as multi-stage games where the transition between stages is stochastic Shapley (1953b), Petrosjan (2006) and not the intrinsic payoffs. Static cooperative games with stochastic output have been considered from the perspective of coalition formation and considering notions of players’ utility (e.g. Suijs et al., 1999) or studying two stages setups – before and after the realisation of the payoff (e.g. Granot, 1977), and from an optimization perspective (Sun et al., 2022). To the best of our knowledge, our settings and constructions have not been studied before.

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Franceschi, L. et al. (2023). Explaining Multiclass Classifiers with Categorical Values: A Case Study in Radiography. In: Chen, H., Luo, L. (eds) Trustworthy Machine Learning for Healthcare. TML4H 2023. Lecture Notes in Computer Science, vol 13932. Springer, Cham. https://doi.org/10.1007/978-3-031-39539-0_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-39539-0_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-39538-3

  • Online ISBN: 978-3-031-39539-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics