Rewarding the Heroes: Hierarchical Gradient-Based Shapley for Fair Federated Valuation

Zehua Cheng, Wei Dai, Zhipeng Wang, Jiahao SunarXiv 2026

TL;DR

In Federated Learning, figuring out who actually contributed useful data—without looking at their private files—usually forces a grim choice: spend hours computing exact game-theoretic fairness, or use fast shortcuts that accidentally punish your best contributors for looking like statistical outliers. This paper introduces HGS-Shapley, a divide-and-conquer valuation pipeline that groups similar model updates together to compute fair rewards up to 1,200× faster than standard approximations. Along the way, it reliably separates rare, high-value "Hero" contributors from malicious attackers.

What Problem Does This Paper Address?

Imagine a hundred hospitals collaboratively training a medical AI without sharing raw patient records—the core setup of Federated Learning (FL). Instead of data, participants send local model updates (gradients) to a central server. To keep this ecosystem alive, you have to reward participants fairly based on their actual marginal utility, weeding out "free-riders" (who send junk) and adversaries (who poison the model).

Game theory has a gold-standard answer for fair credit assignment: the Shapley Value (SV). The catch? Computing exact Shapley values requires testing $2^N$ combinations of participants—a combinatorial explosion that stalls out past ~20 clients.

Existing workarounds fail in one of two ways:

  1. Sampling approximations (like Monte Carlo Shapley) still require thousands of expensive neural network evaluations, taking hours per training round.
  2. Fast heuristics and robust aggregators assume gradients add up linearly or cluster neatly around a global average. This creates the "Hero Penalty." If one specialist clinic holds rare pathology cases, its gradient update will look dramatically different from everyone else's. Standard outlier defenses mistake this "Hero" for a malicious attacker and suppress the exact signal the global model needs most.

Methods

To get game-theoretic fairness at production speeds, the authors propose Hierarchical Gradient-based Shapley (HGS-Shapley), turning an exponential $O(2^N)$ headache into a sleek, four-stage $O(Nd + N^{1.5})$ pipeline:

Figure 1: The HGS-Shapley framework. Valuation is decoupled into four stages: (1) Johnson–Lindenstrauss compression of gradients into a subspace that preserves geometric affinity; (2) K-Means++ trajectory clustering into 𝑀meta-agents; (3) coarse-grained Shapley valuation Φ𝑚per cluster via stratified permutation sampling on the validation set; and (4) Gated Softmax intra-group allocation, which exponentially amplifies aligned Heroes while strictly nullifying adversaries.
  1. Dimensionality Compression: Deep network gradients have millions of parameters ($d \approx 10^7$), where standard distance metrics break down. Using a random Johnson–Lindenstrauss (JL) projection, the server squashes these massive vectors into a compact subspace (e.g., $k=1024$) that provably preserves pairwise geometric distances while filtering out random noise.
  2. Trajectory Clustering: Clients with similar data naturally push the model in similar directions. The server runs K-Means++ on the compressed gradients to group $N$ individual clients into $M \approx \sqrt{N}$ "meta-agents."
  3. Inter-Group Valuation: With far fewer players on the board, the server uses stratified permutation sampling—running actual forward passes on a trusted validation set—to calculate a coarse-grained Shapley value for each cluster. Using real loss reduction (rather than dot-product shortcuts) properly captures diminishing returns when multiple clusters provide redundant data.
  4. Intra-Group Gated Softmax Allocation: Finally, each cluster's reward budget is divided among its members by comparing their individual gradients against the server's validation gradient ($g_{\text{val}}$). A gating function strictly zeroes out anyone pushing the wrong way (adversaries and noisy free-riders), while a low-temperature Softmax exponentially amplifies aligned, high-magnitude updates—handing the lion's share of the reward to true Heroes. (If an entire cluster is adversarial, its budget is re-normalized across active honest clusters.)

Datasets

No new datasets were introduced; the authors evaluate HGS-Shapley across four established benchmarks spanning vision, medical imaging, and text at varying federation scales:

  • CIFAR-10 ($N=16$): Natural images, kept small enough to compute exact $2^{16}$ ground-truth Shapley values.
  • CheXpert ($N=100$): 224,316 chest radiographs split by patient ID into 100 hospital-like silos for 14-pathology diagnosis.
  • FEMNIST ($N=500$): Handwritten characters partitioned across 500 writers with natural feature-shift heterogeneity.
  • StackOverflow ($N=1,000$): 135M text tokens across 1,000 clients for next-word prediction, testing sparse, high-dimensional NLP gradients.

Key Insights and Ideas

  • Valuation intractability is an artifact of granularity: You don't need to play a combinatorial game with 1,000 individual clients. Because optimization trajectories naturally form low-dimensional clusters, playing the game over $\sqrt{N}$ meta-agents preserves fairness guarantees while slashing runtime by orders of magnitude.
  • Outliers aren't all bad—context is everything: Geometric defenses (like Krum or Trimmed Mean) ask, "Does this client look like the crowd?" HGS-Shapley asks, "Does this client improve the validation loss?" That shift dissolves the Hero Penalty, cleanly distinguishing rare-data saviors from data-poisoning saboteurs.
  • Incidental privacy boost: While the random JL projection isn't formal differential privacy, squashing gradients before clustering acts like frosted glass—degrading Deep Leakage from Gradients (DLG) reconstruction attacks by 20 dB without hurting valuation accuracy.

Key Results

Across all four modalities, HGS-Shapley matches expensive Monte Carlo oracles while running in seconds instead of hours:

Cross-Modal Valuation Fidelity & Efficiency Benchmark
  • Massive Speedups, High Fidelity: On CheXpert, HGS-Shapley achieves a 0.965 Spearman rank correlation with the TMC-Shapley oracle while cutting runtime from 19,200 seconds (>5 hours) to 14.2 seconds—a >1,200× speedup. On CIFAR-10, it hits $\rho = 0.985$ against exact combinatorial Shapley values in 0.5 seconds.
  • Finding Heroes: On CheXpert, HGS-Shapley identifies rare-pathology Hero clients with 0.988 AUROC, whereas the strongest non-Shapley baseline (Fed-Influence) reaches 0.650, and Trimmed Mean drops to 0.355.
  • Stopping Attacks: Under 30% attacker penetration (label-flipping on CheXpert, token poisoning on StackOverflow, and pixel backdoors on FEMNIST), HGS-Shapley hits 0.97–0.99 detection AUROC, assigning 0.000 budget to attackers and recovering clean-model performance. Even against white-box adaptive attackers designed specifically to fool the gating mechanism, detection AUROC holds strong at 0.92–0.94.

Limitations and Future Work

  • Trusted Validation Set Required: Both the inter-group loss checks and the intra-group gating rely on the server holding a clean, representative validation dataset ($D_{\text{val}}$)—a practical constraint if rare pathologies aren't represented on the server at all.
  • No Strategic Equilibrium Guarantees (Yet): The theoretical proofs guarantee how the algorithm maps reported gradients to rewards, rather than proving game-theoretic equilibrium against strategic clients gaming their gradient reports over time.
  • Not Formal Privacy: The JL projection obscures gradients empirically, but does not replace formal differential privacy.
  • Future Directions: The authors plan to formalize the Gated Softmax's robustness using margin-based PAC bounds, and adapt the hierarchical blueprint to vertical federated learning (where clients share different features of the same users) and cross-silo fraud detection.

Summary updated

BibTeX
@misc{cheng2026rewarding,
  author = {Zehua Cheng and Wei Dai and Zhipeng Wang and Jiahao Sun},
  title = {{Rewarding the Heroes: Hierarchical Gradient-Based Shapley for Fair Federated Valuation}},
  year = {2026},
  eprint = {2611.40268},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.40268},
}
Figure