Redefining Contributions: Shapley-Driven Federated Learning

Nurbek Tastan Samar Fares Toluwani Aremu

Samuel Horvath Karthik Nandakumar

Mohamed bin Zayed University of Artificial Intelligence (MBZUAI)

Abstract

Federated learning (FL) has emerged as a pivotal approach in machine learning, enabling multiple participants to collaboratively train a global model without sharing raw data. While FL finds applications in various domains such as healthcare and finance, it is challenging to ensure global model convergence when participants do not contribute equally and/or honestly. To overcome this challenge, principled mechanisms are required to evaluate the contributions made by individual participants in the FL setting. Existing solutions for contribution assessment rely on general accuracy evaluation, often failing to capture nuanced dynamics and class-specific influences. This paper proposes a novel contribution assessment method called ShapFed for fine-grained evaluation of participant contributions in FL. Our approach uses Shapley values from cooperative game theory to provide a granular understanding of class-specific influences. Based on ShapFed, we introduce a weighted aggregation method called ShapFed-WA, which outperforms conventional federated averaging, especially in class-imbalanced scenarios. Personalizing participant updates based on their contributions further enhances collaborative fairness by delivering differentiated models commensurate with the participant contributions. Experiments on CIFAR-10, Chest X-Ray, and Fed-ISIC2019 datasets demonstrate the effectiveness of our approach in improving utility, efficiency, and fairness in FL systems.


Overview of our proposed ShapFed algorithm: Each participant \(i\) transmits their locally computed iterates \(w_i\) to the server. The server then, (i) computes class-specific Shapley values (CSSVs) using the last layer parameters (gradients) \(\hat{w}\), (ii) aggregates the weights by employing normalized contribution assessment values \(\tilde{\gamma}_i\) for each participant \(i\), and (iii) broadcasts the personalized weights \(\bar{w}_i\) to each participant, using their individual, not-normalized contribution values \(\gamma_i\).

ShapFed - Main Algorithm

Weighted Aggregation: The optimal weights \(w_s^{\star}\) are derived using Equation 7, while \(w_s\) represents the result of applying equal weights (FedAvg). Personalization: Rather than distributing a uniform global model to all users, we provide personalized weights \(\bar{w}_i\), which are \(\gamma_i\) combinations of individual user weights \(w_i\) and the optimally aggregated weight \(w_s^{\star}\).

Results: Contribution Assessment

Comparison of our proposed contribution assessment algorithm (CSSV) with CGSV and true Shapley value computations using ResNet-34 architecture on Chest X-Ray dataset.
Heatmap visualization of class-specific Shapley values for heterogeneous setting (explained in Section 5.2) evaluated on CIFAR-10 dataset.

Results: Weighted Aggregation

Comparing FedAvg and ShapFed-WA on CIFAR10 under an imbalanced split scenario: insights into the balanced accuracy of four individual participants.
(Left) The balanced accuracy of our methods (ShapFed-WA & ShapFed) vs FedAvg. (Right) Per-participant accuracy using all methods evaluated on Fed-ISIC2019 dataset.

Results: Personalization

Performance and fairness comparison with our method and FedAvg. We use Pearson's correlation (↑) as a fairness metric on CIFAR-10. The red highlight indicates a negative gain from collaboration.
Dataset / Partition Setting \(P_1\) \(P_2\) \(P_3\) \(P_4\) \(P_5\) Corr.
ChestXRay Hetero. Individual 50.0 64.7 62.0 53.7 50.0 ---
FedAvg 50.0 55.8 61.9 54.2 50.0 0.82
ShapFed 50.0 65.2 69.5 58.5 50.0 0.93
CIFAR-10 Imb. Individual 75.8 45.4 48.6 31.6 --- ---
FedAvg 56.6 56.8 63.8 64.2 --- -0.60
CGSV 57.2 59.0 58.8 60.4 --- -0.98
ShapFed 81.4 78.2 71.8 73.6 --- 0.74
Hetero. Individual 75.2 68.8 66.8 69.0 --- ---
FedAvg 74.6 70.2 70.2 76.0 --- 0.53
CGSV 55.0 55.8 57.2 52.6 --- -0.26
ShapFed 79.8 75.4 69.0 75.0 --- 0.90
Note: Correlation coefficients indicate the fairness level, with higher values showing better fairness.
Performance and fairness comparison using Pearson's correlation (↑) as a fairness metric on Fed-ISIC2019. The red highlight indicates a negative gain from collaboration.
Setting \(P_1\) \(P_2\) \(P_3\) \(P_4\) \(P_5\) \(P_6\) Corr.
Individual 67.2 25.7 42.3 31.0 18.5 15.6 ---
FedAvg 65.4 40.9 57.2 59.3 51.5 56.2 0.63
ShapFed-WA 69.3 44.3 65.0 63.1 54.8 61.2 0.62
ShapFed 68.5 44.4 61.9 60.4 40.6 53.2 0.84

Summary

This work proposes Class-Specific Shapley Values (CSSVs) to quantify participant contributions at a granular level. The contributions of this work include a novel method to deepen the understanding of participant impact and improve fairness analysis. Evaluation against FedAvg shows superior performance and additional experiments reveal enhanced fairness by personalizing client updates based on contributions. Overall, the approach aims to achieve a more equitable distribution of benefits in FL. In future, we plan to conduct an in-depth theoretical analysis aimed at identifying the specific characteristics that contribute to an effective estimation of Shapley values. This analysis will enhance our understanding of the factors that influence the accuracy and reliability of Shapley value approximations. Furthermore, an investigation into what makes our approximation of cosine similarity from the last layer a robust indicator of contributions will be explored.

Contact

Contact me at nurbek [dot] tastan [at] mbzuai [dot] ac [dot] ae.

Citation

@InProceedings{tastan2024redefining,
    author    = {Tastan, Nurbek and Fares, Samar and Aremu, Toluwani and Horvath, Samuel and Nandakumar, Karthik},
    title     = {Redefining Contributions: Shapley-Driven Federated Learning}, 
    booktitle = {International Joint Conference on Artificial Intelligence (IJCAI)},
    year      = {2024},
}