[Paper Review] Addressing Class Imbalance in Federated Learning
This paper proposes a privacy-preserving method to detect and mitigate class imbalance in federated learning by introducing a gradient-based monitoring scheme and a novel Ratio Loss function. The approach estimates data composition from gradient updates without exposing raw data, significantly improving minority class accuracy while maintaining client privacy and outperforming existing loss functions.
Federated learning (FL) is a promising approach for training decentralized data located on local client devices while improving efficiency and privacy. However, the distribution and quantity of the training data on the clients' side may lead to significant challenges such as class imbalance and non-IID (non-independent and identically distributed) data, which could greatly impact the performance of the common model. While much effort has been devoted to helping FL models converge when encountering non-IID data, the imbalance issue has not been sufficiently addressed. In particular, as FL training is executed by exchanging gradients in an encrypted form, the training data is not completely observable to either clients or servers, and previous methods for class imbalance do not perform well for FL. Therefore, it is crucial to design new methods for detecting class imbalance in FL and mitigating its impact. In this work, we propose a monitoring scheme that can infer the composition of training data for each FL round, and design a new loss function -- extbf{Ratio Loss} to mitigate the impact of the imbalance. Our experiments demonstrate the importance of acknowledging class imbalance and taking measures as early as possible in FL training, and the effectiveness of our method in mitigating the impact. Our method is shown to significantly outperform previous methods, while maintaining client privacy.
Motivation & Objective
- To address the challenge of class imbalance in federated learning, where data distribution across clients leads to poor model performance on minority classes.
- To design a monitoring scheme that infers local data composition from gradient updates without requiring clients to share raw data or distribution statistics.
- To develop a new loss function, Ratio Loss, that dynamically adjusts sample contributions based on gradient ratios to counteract imbalance effects.
- To ensure the solution preserves client privacy while effectively mitigating the negative impact of class imbalance during FL training.
Proposed method
- A monitor is deployed to estimate data composition per FL round by feeding auxiliary data to the global model and analyzing resulting gradient updates.
- The monitor compares gradients from the current global model with those from the previous round to detect persistent imbalanced data distributions.
- When imbalance is detected continuously, the system triggers the use of Ratio Loss to reweight training samples based on their gradient contribution.
- Ratio Loss is designed to amplify the influence of minority-class samples by increasing their gradient contribution relative to majority classes.
- The auxiliary data used for monitoring is small (32 samples per class), randomly sampled from test sets or non-participating clients to avoid distribution shift.
- The method operates under privacy constraints, relying only on gradient exchanges—no raw data or distribution statistics are shared with the server.
Experimental results
Research questions
- RQ1Can a federated learning system detect class imbalance without accessing raw client data or distribution statistics?
- RQ2How can a privacy-preserving monitoring mechanism estimate data composition from gradient updates in FL?
- RQ3Can a new loss function, Ratio Loss, effectively mitigate the impact of class imbalance in FL while preserving model accuracy on minority classes?
- RQ4How does the proposed method compare to existing loss functions (e.g., Focal Loss, GHMC) in terms of performance and privacy?
- RQ5Does the system remain effective when data composition changes dynamically across FL rounds?
Key findings
- The proposed monitoring scheme successfully detects class imbalance by analyzing gradient updates, enabling early intervention without exposing raw data.
- Ratio Loss significantly improves classification accuracy on minority classes compared to CrossEntropy, Focal Loss, and GHMC Loss in both static and dynamic imbalance scenarios.
- The method maintains high performance even when data distribution varies across clients, demonstrating robustness to non-IID and shifting data compositions.
- Experiments show that applying mitigation early in training prevents the global model from being biased toward majority classes, leading to better convergence.
- The auxiliary data used in monitoring is effective even when drawn from different writers (e.g., in FEMNIST), indicating resilience to feature heterogeneity.
- The approach outperforms state-of-the-art loss functions in both standard FL and non-FL settings, confirming the generalizability of Ratio Loss.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.