---
title: 'CC-SHAP: Fast Shapley Attribution'
url: https://www.emergentmind.com/topics/cc-shap
type: topic
---

# CC-SHAP: Fast Shapley Attribution

Searching arXiv for papers on CC-SHAP and related terminology.
CC-SHAP is a fast Shapley-value estimation method for deep neural network explanations based on selecting a small set of feature-specific “contributive cooperators,” thereby avoiding enumeration of all possible input feature coalitions. In the original paper, the method is named **SHEAR** and is presented as an acceleration strategy for Shapley explanation in DNNs under a fixed evaluation budget; the core idea is to use second-order cross-feature information to retain only the most relevant cooperative interactions for each explained feature [2206.08529].

## 1. Problem setting and nomenclature

Shapley values provide an additive attribution of a model prediction to input features, but their direct computation requires enumeration over all subsets of features, which induces exponentially growing complexity. CC-SHAP addresses this bottleneck by replacing full coalition enumeration with a restricted coalition family tailored separately for each feature. The restriction is not arbitrary: it is guided by a feature-interaction quantity derived from mixed second derivatives of the DNN value function.

In the source paper, the method is called **SHEAR**, whereas the designation **CC-SHAP** refers to the same contributive-cooperator mechanism summarized under the name “contributive cooperator selection.” The setting assumes a differentiable DNN value function \(f_v:2^M\to\mathbb{R}\) on feature set \(U=\{1,\dots,M\}\), an instance \(x\in\mathbb{R}^M\), and a reference or baseline \(\bar x\). The objective is to approximate each feature attribution \(\phi_i\) accurately while using only \(N\ll 2^M\) total model evaluations [2206.08529].

## 2. Contributive cooperators and cross-contribution

A **contributive cooperator** for feature \(i\) is a feature \(j\neq i\) whose joint second-derivative with \(i\) is large. The paper formalizes this by the **cross-contribution**
\[
\eta_{i,j}
=
|x_i-\bar x_i|
\cdot
\frac14
\cdot
\left|\nabla^2_{i,j}f_v(U)+\nabla^2_{j,i}f_v(U)\right|
\cdot
|x_j-\bar x_j|.
\]
This quantity measures how strongly \(i\) and \(j\) “cooperate.” The approximation strategy is then to choose, for each feature \(i\), a subset \(S_i\subset U\setminus\{i\}\) consisting of the top-\(k\) features \(j\) ranked by \(\eta_{i,j}\). Those selected features are the contributive cooperators [2206.08529].

The construction is explicitly local to feature \(i\). Rather than seeking one global coalition basis for all explanations, CC-SHAP assigns each explained feature its own restricted cooperative neighborhood. This matters because Shapley interactions are generally heterogeneous across features: a feature that is jointly important with one subset of variables need not interact strongly with another. A plausible implication is that the method allocates computational budget where interaction structure is most consequential for the specific attribution being estimated.

The paper further derives the practical selection rule from an approximation of an error-control coefficient:
\[
\hat\epsilon_{i,j}
\approx
\frac14
\left|\nabla^2_{i,j}f_v(U)+\nabla^2_{j,i}f_v(U)\right|,
\]
which leads directly to the use of \(\eta_{i,j}\) as a one-point proxy for the importance of keeping feature \(j\) in the coalition family for feature \(i\).

## 3. Shapley chain rule and approximation objective

The theoretical basis of CC-SHAP is a **Shapley chain rule** stating that
\[
\phi_i(U)=\phi_i(U\setminus\{j\})+\Delta_{i,j}+o_{i,j},
\]
where
\[
\Delta_{i,j}
=
(x_i-\bar x_i)(x_j-\bar x_j)
\sum_{S\subseteq U\setminus\{i,j\}}
\frac{\nabla^2_{i,j} f_v(S\cup\{i,j\})+\nabla^2_{j,i} f_v(S\cup\{i,j\})}
{2\cdot(M-|S|-1)\cdot C(M,|S|+1)},
\]
and
\[
o_{i,j}=o(x_i-\bar x_i)+o(x_j-\bar x_j).
\]
This identity expresses the effect of removing a feature \(j\) from the coalition universe of feature \(i\) in terms of a second-order interaction term plus higher-order infinitesimals [2206.08529].

From this, the paper derives the error bound
\[
|\phi_i(U)-\phi_i(U\setminus\{j\})|
\le
\epsilon_{i,j}\cdot|x_i-\bar x_i|\cdot|x_j-\bar x_j|,
\]
with
\[
\epsilon_{i,j}
=
\max_{V\subseteq U\setminus\{i,j\}}
\frac14
\cdot
|\nabla^2_{i,j}f_v(U\setminus V)+\dots|.
\]
By repeatedly removing all features not retained in a chosen subset \(S\subset U\setminus\{i\}\), the summary gives
\[
|\phi_i(U)-\phi_i(S\cup\{i\})|
\le
\sum_{j\in U\setminus S\setminus\{i\}}
\epsilon_{i,j}\cdot|x_i-\bar x_i|\cdot|x_j-\bar x_j|.
\]

This yields the coalition-selection objective
\[
S_i
=
\arg\max_{S\subseteq U\setminus\{i\},\,|S|=k}
\sum_{j\in S}\epsilon_{i,j}\cdot|x_i-\bar x_i|\cdot|x_j-\bar x_j|.
\]
Equivalently, CC-SHAP minimizes the neglected interaction mass by preserving the \(k\) strongest cooperators. The theoretical interpretation is direct: the residual approximation error is controlled by the omitted cross-contributions. The paper also states that as \(k\) increases the upper bound decays to zero, and when \(k=M-1\) one recovers the exact Shapley [2206.08529].

## 4. Algorithmic workflow and computational profile

The algorithm takes as input a DNN \(f\), an instance \(x\in\mathbb{R}^M\), a baseline \(\bar x\), and a budget \(N\) of total evaluations. In the algorithm summary, one sets \(k=\log_2(N/2)\); in the practical guidance, the recommendation is \(k=\lfloor \log_2(N/2)\rfloor\). For each feature \(i\), the method proceeds in three main steps [2206.08529].

First, it computes \(\eta_{i,j}\) for every \(j\in U\setminus\{i\}\). The summary notes that one backward pass per feature can yield all \(\nabla^2_{i,\bullet}\). Second, it selects the top-\(k\) features by \(\eta_{i,j}\) to form \(S_i\), using a greedy sort of complexity \(O(M\log M)\). Third, it estimates \(\hat\phi_i\) by enumerating all \(2^k\) coalitions of \(S_i\), while handling all other features with **antithetic sampling**.

Let \(\{S_n\}_{n=1}^{2^k}\) be all subsets of \(S_i\). Pair each \(S_n\) with \(V_n\) and its antithetic complement in \(U\setminus(S_i\cup\{i\})\). The attribution estimate is
\[
\hat\phi_i
=
\frac{1}{k+1}
\cdot
\sum_{n=1}^{2^k}
w(|S_n|)
\cdot
\bigl[
f_v(\{i\}\cup S_n\cup V_n)-f_v(S_n\cup V_n)
\bigr],
\]
where \(w(m)=C(k,m)^{-1}\) are the Shapley weights restricted to \(S_i\). This step costs \(N=2^k\cdot 2\) forward passes.

The summary reports the per-feature complexity as one backward pass \(O(t_{\mathrm{bwd}})\) plus \(N\) forwards \(O(N\cdot t_{\mathrm{fwd}})\), with overall sequential cost
\[
O\bigl(M\cdot(t_{\mathrm{bwd}}+N\cdot t_{\mathrm{fwd}})\bigr).
\]
In condensed form, the method reduces the \(2^M\) blowup of exact Shapley to \(O(M\cdot N)\) evaluations by combining cross-gradient-based cooperator selection with a small \(2^k\) enumeration augmented by antithetic sampling [2206.08529].

## 5. Empirical evaluation

The empirical study covers three datasets: **Census Income**, **German Credit**, and **Criteo CTR**. Census Income contains 5 continuous and 8 categorical features with train/val/test split \(20\,838/5\,210/6\,513\). German Credit contains 7 continuous and 9 categorical features with split \(28\,934/7\,234/9\,043\). Criteo CTR contains 13 continuous and 26 one-hot features with split \(80\,000/10\,000/10\,000\). The models are a 3-layer MLP with hidden size 64 and ReLU for Census and German, trained with Adam at learning rate \(10^{-3}\), and DeepFM with embedding dimension 32 for Criteo, trained with Adam at learning rate \(10^{-4}\) [2206.08529].

The baselines are **Kernel-SHAP (KS)**, **KS-Welford (KS-WF)**, **KS-Pair**, **Permutation Sampling (PS)**, and **Antithetic Permutation (APS)**. Evaluation uses five metrics:

- **Absolute Error (AE)**: \(\sum_i |\phi_i-\hat\phi_i|\) against true brute-force Shapley.
- **Ranking Accuracy (ACC)**: agreement of sorted attributions with the ground-truth ranking.
- **Faithfulness**: Pearson correlation between \([f(U)-f(U\setminus\{i\})]_i\) and \([\hat\phi_i]_i\).
- **Monotonicity**: fraction of forward-add steps that preserve decreasing contribution order.
- **Throughput**: number of test instances divided by total explanation time.

The reported findings are consistent across these criteria. For fixed \(N\), CC-SHAP attains the **lowest AE** and **highest ACC**. It also yields the best **faithfulness** and **monotonicity** curves. In throughput-versus-ACC trade-off, it lies on the Pareto-front and outperforms all baselines. The summary therefore characterizes the method as outperforming state-of-the-art Kernel- and Permutation-based approximations in both accuracy and speed without sacrificing faithfulness [2206.08529].

## 6. Practical use, scope, and relation to adjacent SHAP lines

The practical guidance is budget-centric. One chooses an evaluation budget \(N\), sets \(k=\lfloor \log_2(N/2)\rfloor\), and uses the corresponding \(2^k\) restricted enumeration. The summary states that increasing \(N\) improves accuracy roughly exponentially because \(2^k=N/2\). Small \(N\), such as \(8\)–\(16\), still captures most salient cooperations, whereas larger \(N\) implies larger \(k\), more cooperators, and an error bound that decays toward zero. Proposed extensions include using second-order cross-contributions beyond a single point, adaptively selecting \(k\) per feature based on a desired local error bound, extending to group interactions through higher-order Shapley chains, and parallelizing across features or antithetic coalitions on multi-GPU or distributed backends [2206.08529].

The method belongs to the broader literature on reducing the computational burden of SHAP, but its mechanism is specific. It is not an exact SHAP algorithm; rather, it is a budgeted approximation scheme with provable error control based on featurewise second-order cooperation. This contrasts with work on exact tractability for specific model classes. For example, exact SHAP for arbitrary tensor networks is stated to be \(\#P\)-hard, whereas for Tensor Trains the problem lies in \(NC^2\), and decision trees, ensembles, linear models, and linear RNNs inherit that \(NC^2\) exact algorithm through TT reductions [2510.21599]. That comparison places CC-SHAP in the regime where exact SHAP remains intractable or impractical and selective approximation is the operative strategy.

A separate source of ambiguity is nomenclature. The label **cc-Shapley** is also used by Martin and Haufe for **causal context Shapley**, an interventional modification of observational Shapley values that uses a structural causal model and do-calculus to eliminate collider-bias-induced spurious associations [2602.20396]. That method is conceptually different from CC-SHAP/SHEAR. The former changes the semantics of the value function by moving from conditioning to intervention; the latter keeps the Shapley target fixed and accelerates its computation via contributive cooperator selection. This distinction is essential because the two methods address different failure modes: one concerns computational complexity, the other causal interpretability.

Source: https://www.emergentmind.com/topics/cc-shap