WassFFed: Wasserstein Fair Federated Learning

Zhongxuan Han,Li Zhang,Chaochao Chen,Xiaolin Zheng,Fei Zheng,Yuyuan Li,Jianwei Yin
2024-11-11
Abstract:Federated Learning (FL) employs a training approach to address scenarios where users' data cannot be shared across clients. Achieving fairness in FL is imperative since training data in FL is inherently geographically distributed among diverse user groups. Existing research on fairness predominantly assumes access to the entire training data, making direct transfer to FL challenging. However, the limited existing research on fairness in FL does not effectively address two key challenges, i.e., (CH1) Current methods fail to deal with the inconsistency between fair optimization results obtained with surrogate functions and fair classification results. (CH2) Directly aggregating local fair models does not always yield a globally fair model due to non Identical and Independent data Distributions (non-IID) among clients. To address these challenges, we propose a Wasserstein Fair Federated Learning framework, namely WassFFed. To tackle CH1, we ensure that the outputs of local models, rather than the loss calculated with surrogate functions or classification results with a threshold, remain independent of various user groups. To resolve CH2, we employ a Wasserstein barycenter calculation of all local models' outputs for each user group, bringing local model outputs closer to the global output distribution to ensure consistency between the global model and local models. We conduct extensive experiments on three real-world datasets, demonstrating that WassFFed outperforms existing approaches in striking a balance between accuracy and fairness.
Machine Learning
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to achieve fairness in Federated Learning (FL). Specifically, the paper focuses on how to ensure fairness among different user groups when training data cannot be shared across clients. Most of the existing fairness research assumes that all training data can be accessed, which makes it challenging to directly apply it to FL. In addition, the existing fairness research for FL fails to effectively address two key issues: 1. **CH1: Inconsistency between optimization results and classification results** Current methods have difficulty dealing with the inconsistency between fair optimization results obtained using proxy functions and actual classification results. Many studies train fair classification models by minimizing the loss function and imposing fairness constraints. However, since most quantitative fairness metrics are non - convex, the optimization problem becomes difficult to solve. Therefore, the common method is to use continuous and convex proxy functions to approximate the original non - convex indicator function. However, this substitution will lead to estimation errors. 2. **CH2: The global model after aggregating local fair models is unfair** Directly aggregating local fair models does not always produce a global fair model because the data distribution among clients is non - independent and identically distributed (non - IID). Even if each local model is fair, the aggregated global model may show unfairness due to differences in data distribution. To solve these problems, the paper proposes a new framework - Wasserstein Fair Federated Learning (WassFFed). WassFFed addresses the above challenges in the following ways: - **For CH1**: WassFFed directly focuses on the output of the classification model instead of relying on proxy functions to calculate fairness loss. This can avoid the estimation error caused by using proxy functions. By ensuring that the model output is independent of sensitive attributes, the fairness of the classification results can be guaranteed regardless of how the threshold changes. - **For CH2**: WassFFed calculates the Wasserstein barycenter of all local model output distributions and pulls the output distribution of each client towards this barycenter. This process ensures the consistency between the global model and local models, thereby avoiding the fairness inconsistency problem caused by non - IID data distribution. ### Formula Summary 1. **Wasserstein Distance (W1)**: \[ W_1(S_1, S_2)=\min_{T\in T}\int_{S_1\times S_2}|s_1 - s_2|T(s_1, s_2)ds_1ds_2 \] where \(T\) is the optimal transport matrix from \(S_1\) to \(S_2\). 2. **Wasserstein Barycenter**: \[ B_t = \arg\min_{B\in B}\sum_{a\in A}\lambda_a^tW_1(B, S_a^t) \] where \(B\) is the set of barycenters and \(\lambda_a^t\) is the weight ratio for aggregation. 3. **Fairness Loss**: \[ L_{\text{fairness}}=\sum_{a\in A}\sum_{s\in S_a^1}\sum_{b\in B_t}|s - b|T_a^{1,t}(s, b) \] Through these methods, WassFFed can effectively balance accuracy and fairness in the federated learning environment and has demonstrated its superior performance on multiple real - world datasets.