Self-Supervised Federated Learning under Data Heterogeneity for Label-Scarce Diatom Classification
Organizations: Biodata Mining Group, Faculty of Technology, University of Bielefeld, Germany · Computer Science Research Centre, University of Surrey, United Kingdom · Phycology Group, Faculty of Biology, University of Duisburg-Essen, Germany
Abstract
Label-scarce visual classification under decentralized and heterogeneous data is a fundamental challenge in pattern recognition, especially when sites exhibit partially overlapping class sets. While self-supervised federated learning (SSFL) offers a promising solution, existing studies commonly assume the same data heterogeneity pattern throughout pre-training and fine-tuning. Moreover, current partitioning schemes often fail to generate pure partially class-disjoint data settings, limiting controllable simulation of real-world label-space heterogeneity. In this work, we introduce SSFL for diatom classification as a representative real-world instance and systematically investigate stage-specific data heterogeneity. We study cross-site variation in unlabeled data volume during pre-training and label-space misalignment during downstream fine-tuning. To study the latter in a controllable setting, we propose PreDi, a partitioning scheme that disentangles label-space heterogeneity into two orthogonal dimensions, namely class Prevalence and class-set size Disparity, enabling separate analysis of their effects. Guided by the resulting insights, we further propose PreP-WFL (Prevalence-based Personalized Weighted Federated Learning) to adaptively strengthen rare-class representations in low-prevalence scenarios. Extensive experiments show that SSFL consistently outperforms local-only training under both homogeneous and heterogeneous settings. The pronounced heterogeneity in unlabeled data volume is associated with improved representation pre-training, whereas under label-space heterogeneity, prevalence dominates performance and disparity has a smaller effect. PreP-WFL effectively mitigates this degradation, with gains increasing as prevalence decreases. These findings provide a mechanistic basis for characterizing label-space heterogeneity in decentralized recognition systems.
Figures & tables
| Splits | Client 1 | Client 2 | Client 3 | Client 4 |
| 18,115 | 18,115 | 18,115 | 18,116 | |
| 19,988 | 23,405 | 14,258 | 14,810 | |
| 18,696 | 32,209 | 10,653 | 10,903 | |
| 22,558 | 35,750 | 6,546 | 7,607 | |
| 18,982 | 39,156 | 6,975 | 7,348 |
| Method | Pre-train data | Fine-tune data | Test Accuracy (%) | |
| Client 1 | SSL | in | in | 77.57 |
| ImageNet | 78.85 | |||
| Client 2 | SSL | in | in | 77.58 |
| ImageNet | 78.28 | |||
| Client 3 | SSL | in | in | 77.18 |
| ImageNet | 78.84 |
| Pre-train data | Fine-tune data | Test Accuracy (%) | |
| Client 1 | in | in | 79.69 |
| Client 2 | in | in Split | 81.33 |
| Client 3 | in | in Split | 70.64 |
| Client 4 | in | in Split | 73.86 |
| Federated | 86.33 |
| Test Accuracy (%) | |||||
| 82.47 | 79.56 | 77.00 | 75.89 | 67.82 | |
| 82.53 | 79.64 | 77.47 | 75.61 | 67.50 | |
| 82.34 | 79.84 | 77.35 | 74.43 | 65.86 | |
| 82.81 | 79.67 | 77.97 | 74.71 | 66.94 | |
| Test Accuracy (%) | |||||
| Client 1 | 69.55 | 59.79 | 50.18 | 42.08 | 11.04 |
| Client 2 | 71.12 | 58.74 | 54.46 | 43.11 | 33.71 |
| Client 3 | 68.63 | 67.66 | 50.28 | 38.30 | 30.50 |
| Client 4 | 69.04 | 62.43 | 50.54 | 42.41 | 30.10 |
| Federated | 82.47 | 79.56 | 77.00 | 75.89 | 67.82 |
| Test Accuracy (%) | ||||
| Client 1 | 69.55 | 69.37 | 71.96 | 72.24 |
| Client 2 | 71.12 | 65.85 | 64.40 | 62.38 |
| Client 3 | 68.63 | 68.71 | 66.34 | 66.48 |
| Client 4 | 69.04 | 74.16 | 75.60 | 77.90 |
| Federated | 82.47 | 82.53 | 82.34 | 82.81 |
| Test Accuracy (%) | ||||||
| Fed-MAE | 82.47 | 79.56 | 77.00 | 75.89 | 67.82 | |
| Fed-MAE PreP-WFL (ours) | 82.62 | 81.22 | 79.01 | 78.11 | 71.16 | |
| Fed-MAE | 82.53 | 79.64 | 77.47 | 75.61 | 67.50 | |
| Fed-MAE PreP-WFL (ours) | 82.56 | 81.00 | 79.51 | 77.30 | 70.21 | |
| Fed-MAE | 82.34 | 79.84 | 77.35 | 74.43 | 65.86 | |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Pre-train data | Fine-tune data | Test F1-score | |
| Client 1 | SSL | in | in | 0.7054 |
| ImageNet | 0.7234 | |||
| Client 2 | SSL | in | in | 0.7100 |
| ImageNet | 0.7186 | |||
| Client 3 | SSL | in | in | 0.7051 |
| ImageNet | 0.7552 |
| Pre-train data | Test F1-score |
| 0.8008 | |
| 0.7934 | |
| 0.7975 | |
| 0.8063 | |
| 0.8168 |
| Test F1-score | |||||
| 0.7853 | 0.7570 | 0.7310 | 0.7217 | 0.6277 | |
| 0.7833 | 0.7589 | 0.7357 | 0.7163 | 0.6244 | |
| 0.7827 | 0.7611 | 0.7312 | 0.7059 | 0.6010 | |
| 0.7882 | 0.7579 | 0.7404 | 0.7038 | 0.6158 | |
| Test F1-score | ||||||
| Fed-MAE | 0.7853 | 0.7570 | 0.7310 | 0.7217 | 0.6277 | |
| Fed-MAE PreP-WFL (ours) | 0.7822 | 0.7696 | 0.7426 | 0.7364 | 0.6611 | |
| Fed-MAE | 0.7833 | 0.7589 | 0.7357 | 0.7163 | 0.6244 | |
| Fed-MAE PreP-WFL (ours) | 0.7838 | 0.7687 | 0.7492 | 0.7279 | 0.6473 | |
| Fed-MAE | 0.7827 | 0.7611 | 0.7312 | 0.7059 | 0.6010 | |
Federated Learning
Federated learning trains shared models across data holders without requiring them to pool their raw data.
See all 943 papers