---
title: 'MVQN: Multi-Valued Quantum Neurons'
url: https://www.emergentmind.com/topics/multi-valued-quantum-neurons-mvqn
type: topic
---

# MVQN: Multi-Valued Quantum Neurons

The Neuron Shapley approach is a class of game-theoretic attribution methods designed to quantify the importance of individual neurons, filters, or layers within deep neural networks. By leveraging the Shapley value from cooperative game theory, Neuron Shapley measures the marginal contribution of each network component to various performance metrics—such as accuracy, fairness, or robustness—while fully accounting for interactions and redundancy among components. This methodology supports principled neuron ranking, model interpretability, fairness diagnostics, adversarial vulnerability analysis, and targeted model repair across a range of architectures and tasks [2002.09815][1904.08166][1907.02519][1909.06143][2604.00422].

## 1. Formalization of the Neuron Shapley Value

Let $N = \{1, 2, \ldots, n\}$ denote the set of neurons (or filters) in a neural network. Define $V(S)$ as a black-box performance metric (e.g., accuracy, loss, class recall, fairness) measured on the subnetwork retaining only neurons in $S \subseteq N$, with all other neurons zeroed out. The Neuron Shapley value $\phi_i(V, N)$ is then:

\[
\phi_i(V, N) = \frac{1}{|N|} \sum_{S \subseteq N \setminus \{i\}} \frac{V(S \cup \{i\}) - V(S)}{\binom{|N|-1}{|S|}}
\]

Alternatively, in permutation form:

\[
\phi_i = \mathbb{E}_{\pi}\Big[V\left(S^i_{\pi} \cup \{i\}\right) - V(S^i_{\pi})\Big]
\]

where $S^i_\pi$ is the set of neurons preceding $i$ in permutation $\pi$ of $N$. This framework treats each neuron as a player in a coalitional game, with the characteristic function $V(\cdot)$ specifying the payout to each coalition [2002.09815][1904.08166][1907.02519].

This setup extends to layers, filters, or even activation groups, depending on architectural granularity [1907.02519][2604.00422].

## 2. Capturing High-Order Neuron Interactions

The Shapley framework captures all higher-order interactions, including synergy, redundancy, and conditional indispensability. Marginal contributions $V(S \cup \{i\}) - V(S)$ are aggregated over all subsets $S$ of other neurons, thus ensuring sensitivity to contexts where:

- Individual neurons are only valuable jointly (e.g., $V(S \cup \{i, j\}) - V(S) \gg 0$ while $V(S \cup \{i\}) - V(S) = 0$).
- Redundant or antagonistic behavior is appropriately distributed across interacting units.
- Pruning or reweighting can be done while respecting both unique and overlapping contributions.

Shapley’s axioms (null-player, symmetry, additivity/linearity) uniquely define this “fair” attribution and guarantee consistency in neuron ranking [2002.09815][1904.08166][1907.02519].

## 3. Efficient Estimation Algorithms

Exact computation of Neuron Shapley values is exponential in $n$. Key estimation methods include:

- **Monte Carlo Permutation Sampling:** Draw $R$ random permutations of neurons. For each permutation, accumulate the marginal contribution of each neuron as it is “added” during the forward scan. Averaging over $R$ samples gives an unbiased estimate. Typically $R = 100$–$500$ yields adequate accuracy for moderate $n$ [1904.08166][1907.02519].
- **Truncated Multi-Armed Bandit (TMAB):** Adaptively samples only the top-k candidate neurons by focusing computation where Shapley values are close to the k-th largest. Early truncates permutation trajectories when performance drops below a threshold $v_t$, reducing the number of forward passes needed. Empirical Bernstein bounds guarantee error control to within $ε$ with probability $1-δ$ [2002.09815].
- **Deep SHAP Approximation:** In large models or when tight approximations suffice, Deep SHAP linearizes layers around a background set and propagates attributions, yielding approximate neuron-level or layer-level Shapley values efficiently in a few backward passes [2604.00422].

### Sample Pseudocode: TMAB-Shapley Algorithm [2002.09815]
```python
for t in range(num_iters):
    π = random_permutation(neurons)
    v0 = V(N)
    for j in range(len(π)):
        i = π[j]
        if i in active_set:
            if v_prev < v_t:
                v_curr = v_prev
            else:
                v_curr = V(π[j+1:]) # zero out first j neurons
            delta = v_prev - v_curr
            update_running_mean_and_bounds(φ_i, sigma_i, delta)
            check_confidence_bounds_and_prune_if_needed()
        v_prev = v_curr
```
[2002.09815]

## 4. Empirical Properties and Diagnostic Applications

### Model Destruction via Neuron Removal

- Removing the top 30 filters by $\phi_i$ in Inception-v3 (ImageNet) collapses accuracy from 74% to near-random (1–2%). Removal of random filters leaves performance largely intact. The top 10, 20, and 30 most-important filters drop accuracy to 38%, 8%, and random guessing, respectively [2002.09815].
- The majority of high-$\phi_i$ filters for accuracy reside in early or mid layers, matching the intuition that early features are reused across classes [2002.09815].

### Interpretability and Visualization

- Visualization (e.g., DeepDream, activation maximization) of highest-$\phi_i$ filters highlights patterns such as color bands, edges, or class-specific motifs (e.g., zebra stripes, bar shapes) [2002.09815][1907.02519].
- Shapley-guided feature selection aligns closely with variational Bayes-based “importance-switch” approaches; both identify overlapping sets of critical filters [1907.02519].

### Targeted Model Repair

- In facial gender classification (SqueezeNet on CelebA/PPB), removing 50–100 most negative-$\phi_i$ filters—those harming fairness—raises Black Female accuracy from 54.7% to 81.9%, with negligible drop in overall test accuracy [2002.09815].
- For adversarial robustness (Inception-v3 under PGD $\ell_\infty$ attacks), zeroing top 16 highly exploited filters reduces white-box attack success from ≈100% to 0.1%, with only moderate clean accuracy loss [2002.09815].
- SHARPEN applies Deep SHAP-based coarse-to-fine ranking and returns a list of “suspicious” neurons prioritized for repair by derivative-free algorithms such as CMA-ES, enabling targeted, architecture-agnostic repair of vulnerabilities or biases [2604.00422].

### Compression and Pruning

- Shapley-driven pruning drastically reduces parameter count with minimal accuracy loss. On MNIST, pruning by cumulative Shapley mass (SVbucket) achieves >90% accuracy with 4–8× fewer neurons compared to random or weight-norm heuristics [1904.08166].
- On LeNet-5 and VGG-16, removing low-SV filters and retraining achieves error rates comparable to original models, confirming SV’s utility for structured pruning [1907.02519].

## 5. Extensions, Variations, and Theoretical Properties

- **Analytical Approximations:** For ReLU activations, closed-form Gaussian approximations of input Shapley value yield fast, layer-wise relevance propagation and a smooth, nonvanishing Shapley gradient. The “Shapley Activation” (SA) implements this differentiation for improved optimization stability and convergence [1909.06143].
- **Layer/Region Attribution:** The methodology generalizes to layers, spatial regions, or composite groups—relevant for hierarchical localization or structured pruning [2604.00422].
- **Efficient Repair Pipeline:** SHARPEN demonstrates a hierarchical attribution approach integrating Deep SHAP for localization and (optionally) CMA-ES for parameter repair, applicable to backdoors, adversarial vulnerability, and unfairness across architectures [2604.00422].
- **Interpretability Guarantees:** By construction, the Shapley value uniquely satisfies fairness axioms. While the characteristic function need not be monotonic (in which case “efficiency” is not strict), empirical rankings remain robust and unbiased under Monte Carlo approximation [1904.08166][1907.02519].

### Table: Key Neuron Shapley Method Variations

| Variant                  | Core Mechanism                       | Application Focus     |
|--------------------------|--------------------------------------|----------------------|
| Standard Neuron Shapley  | Permutation Monte Carlo, TMAB        | Importance, pruning, fairness, adversarial robustness [2002.09815] |
| Deep SHAP Approximation  | Linearization, SHAP multipliers      | Fault localization, scalable repair [2604.00422] |
| Analytical Shapley       | Gaussian approx., closed-form LRP    | ReLU training/interpretation [1909.06143] |

## 6. Limitations and Considerations

- Shapley-based methods assume the performance metric can be efficiently evaluated on subnetworks, necessitating massive computation for large $n$ if not for sampling-based or approximate methods [2002.09815][1907.02519].
- Deep SHAP and Gaussian approximations may degrade when input correlations are strong, or in networks architectures not amenable to linearization [1909.06143][2604.00422].
- In practice, higher-order interactions beyond $k$-sized coalitions are ignored in some approximations, though empirical results show robust performance for moderate $k$ [1907.02519].
- Choice of performance metric $V$ is critical; non-monotonic or ill-conditioned $V$ can yield negative or otherwise pathological attributions, necessitating careful interpretation [2002.09815].

## 7. Theoretical and Practical Significance

Neuron Shapley extends the formal machinery of cooperative game theory to network analysis, providing a principled, axiomatically grounded tool for neuron ranking, structured pruning, bias and vulnerability remediation, and interpretable neural diagnostics. Empirically, a small set of neurons or filters dominate performance in large networks; their identification and neutralization (via zeroing or repair) yield substantial gains in interpretability, fairness, robustness, and model size reduction—all without requiring retraining or model redesign. The core methods—permutation sampling, multi-armed bandit acceleration, Deep SHAP approximations, and activation-level analytical proxies—cover a range of practical requirements from full attribution to real-time repair [2002.09815][2604.00422][1904.08166][1907.02519][1909.06143].

Source: https://www.emergentmind.com/topics/multi-valued-quantum-neurons-mvqn