Nothing Special   »   [go: up one dir, main page]

skip to main content
research-article

SWIM: : Sliding-Window Model contrast for federated learning

Published: 01 March 2025 Publication History

Abstract

In federated learning, data heterogeneity leads to significant differences in the local models learned by the clients, thereby affecting the performance of the global model. To address this issue, contrast federated learning algorithms increase the comparison of positive and negative samples on the clients, bringing the local models closer to the global model. However, existing methods take the global model as the positive sample and the previous round of local models as the negative sample, resulting in insufficient utilization of historical local models. In this paper, we propose SWIM: Sliding-WIndow Model contrast method, which introduces more rounds of local models. First, we design and utilize a sliding window mechanism for collecting client representations of historical local models. Subsequently, we employ the cosine distance function as a discriminator to distinguish them into positive and negative samples. In addition, we introduce a dynamic coefficient that balances the federated classification learning and feature learning tasks. By adjusting the dynamic coefficient at different training rounds, the global model becomes more focused on feature learning in the early stages and classification learning in the later stages. Experiments are compared with four state-of-the-art federated learning algorithms on three datasets. The results show that the proposed algorithm outperforms the four state-of-the-art algorithms in terms of accuracy. Source code is available at https://github.com/zhanghrswpu/SWIM.

Highlights

Sliding-window model contrastive learning introduces more influential historical local models as positive or negative samples, enabling local models to learn more robust and generalizable representations.
Due to differences in the distribution of client data, our loss function is designed to use the contrastive learning objective as a regularizer to prevent local model overfitting.
We introduce a dynamic coefficient that balances federated classification learning and feature learning tasks to enhance the robustness of the model.

References

[1]
Kairouz P., McMahan H.B., Avent B., Bellet A., Bennis M., Bhagoji A.N., Bonawitz K., Charles Z., Cormode G., Cummings R., et al., Advances and open problems in federated learning, Found. Trends® Mach. Learn. 14 (1–2) (2021) 1–210,.
[2]
Li Q., Wen Z., Wu Z., Hu S., Wang N., Li Y., Liu X., He B., A survey on federated learning systems: vision, hype and reality for data privacy and protection, IEEE Trans. Knowl. Data Eng. 35 (4) (2019) 3347–3366,.
[3]
Li T., Sahu A.K., Talwalkar A., Smith V., Federated learning: challenges, methods, and future directions, IEEE Signal Process. Mag. 37 (3) (2020) 50–60,.
[4]
Yang Q., Liu Y., Chen T., Tong Y., Federated machine learning: concept and applications, ACM Trans. Intell. Syst. Technol. 10 (2) (2019),.
[5]
M. Mendieta, T. Yang, P. Wang, M. Lee, Z. Ding, C. Chen, Local learning matters: rethinking data heterogeneity in federated learning, in: IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2022, pp. 8397–8406.
[6]
Karimireddy S.P., Kale S., Mohri M., Reddi S., Stich S., Suresh A.T., Stochastic controlled averaging for federated learning, in: International Conference on Machine Learning, 2020, pp. 5132–5143. URL: https://proceedings.mlr.press/v119/karimireddy20a.html.
[7]
Li Q., Diao Y., Chen Q., He B., Federated learning on non-IID data silos: an experimental study, in: IEEE International Conference on Data Engineering, 2022, pp. 965–978,.
[8]
Li X., Huang K., Yang W., Wang S., Zhang Z., On the convergence of fedavg on non-IID data, 2019,.
[9]
Q. Li, B. He, D. Song, Model-contrastive federated learning, in: IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 10713–10722.
[10]
X. Mu, Y. Shen, K. Cheng, X. Geng, J. Fu, T. Zhang, Z. Zhang, Prototypical contrastive federated learning on non-IID data.
[11]
Shi X., Yi L., Liu X., Wang G., Fair federated learning with contrastive learning, in: IEEE International Conference on Acoustics, Speech and Signal Processing, 2023, pp. 1–5,.
[12]
Tan Y., Long G., Ma J., LIU L., Zhou T., Jiang J., Federated learning from pre-trained models: a contrastive learning approach, Adv. Neural Inf. Process. Syst. 35 (2022) 19332–19344. URL: https://proceedings.neurips.cc/paper_files/paper/2022/file/7aa320d2b4b8f6400b18f6f77b6c1535-Paper-Conference.pdf.
[13]
Gaudreau P., Sanchez X., Blondin J.-P., Positive and negative affective states in a performance-related setting: testing the factorial structure of the panas across two samples of french-canadian participants, Eur. J. Psychol. Assess. 22 (4) (2006) 240–249,.
[14]
Wang J., Xia J., Wang H., Su Y., Zheng C.-H., Deep contrastive clustering for single-cell rna-seq data based on auto-encoder network, Brief. Bioinform. 24 (1) (2023),.
[15]
Xiong Z., Luo J., Shi W., Liu Y., Xu Z., Wang B., An imputation method for scrna-seq data based on graph contrastive learning, Bioinformatics 39 (3) (2023) btad098,.
[16]
Liu S., Liu X., Wang Y., Cheng Z., Li C., Zhang Z., Lan Y., Shen C., Does detectgpt fully utilize perturbation? bridge selective perturbation on model-based contrastive learning detector would be better, 2024.
[17]
Zheng Z., Tan Y., Wang H., Yu S., Liu T., Liang C., Pre-training and fine-tuning model based on cascaded attention network and graph contrastive learning for molecular property prediction, Brief. Bioinform. 24 (1) (2023) bbac566,.
[18]
Porres I., Ahmad T., Rexha H., Lafond S., Truscan D., Automatic exploratory performance testing using a discriminator neural network, in: IEEE International Conference on Software Testing, Verification and Validation Workshops, 2020, pp. 105–113,.
[19]
Wei G., Wei Y., Similarity measures of pythagorean fuzzy sets based on the cosine function and their applications, Int. J. Intell. Syst. 33 (3) (2018) 634–652,. URL: https://onlinelibrary.wiley.com/doi/abs/10.1002/int.21965.
[20]
Li H., Liu H., Ji X., Li G., Shi L., Cifar10-dvs: an event-stream dataset for object classification, Front. Neurosci. 11 (2017),. URL: https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2017.00309.
[21]
Zheng Y., Huang H., Chen J., Comparative analysis of various models for image classification on cifar-100 dataset, J. Phys. Conf. Ser. 2711 (1) (2024),.
[22]
Le Y., Yang X., Tiny imagenet visual recognition challenge, Convolutional Neural Netw. Visual Recognit. 7 (7) (2015) 3.
[23]
Alzubi J.A., Bipolar fully recurrent deep structured neural learning based attack detection for securing industrial sensor networks, Trans. Emerg. Telecommun. Technol. 32 (7) (2021),. URL: https://onlinelibrary.wiley.com/doi/abs/10.1002/ett.4069.
[24]
Alzubi J.A., Alzubi O.A., Qiqieh I., Singh A., A blended deep learning intrusion detection framework for consumable edge-centric iomt industry, IEEE Trans. Consum. Electron. 70 (1) (2024) 2049–2057,.
[25]
Alzubi J.A., Alzubi O.A., Singh A., Ramachandran M., Cloud-iiot-based electronic health record privacy-preserving by cnn and blockchain-enabled federated learning, IEEE Trans. Ind. Inform. 19 (1) (2023) 1080–1087,.
[26]
Liang X., Zhang H., Tang W., Min F., Robust federated learning with voting and scaling, Future Gener. Comput. Syst. 153 (2024) 113–124,. URL: https://www.sciencedirect.com/science/article/pii/S0167739X23004235.
[27]
Wu Y., Mendis G.J., Wei J., A practical decentralized deep learning paradigm for internet-of-things applications, IEEE Internet Things J. 8 (12) (2020) 9740–9752,.
[28]
Zhang X., Wang J., Bao W., Xiao W., Zhang Y., Liu L., Self-adaptive asynchronous federated optimizer with adversarial sharpness-aware minimization, Future Gener. Comput. Syst. 161 (2024) 638–654,. URL: https://www.sciencedirect.com/science/article/pii/S0167739X24004175.
[29]
Caldas S., Duddu S.M.K., Wu P., Li T., Konečný J., McMahan H.B., Smith V., Talwalkar A., A benchmark for federated settings, 2018,.
[30]
Dai Z., Low B.K.H., Jaillet P., Federated bayesian optimization via thompson sampling, Adv. Neural Inf. Process. Syst. 33 (2020) 9687–9699,. URL: https://proceedings.neurips.cc/paper_files/paper/2020/file/6dfe08eda761bd321f8a9b239f6f4ec3-Paper.pdf.
[31]
He C., Li S., So J., Zeng X., Zhang M., Wang H., Wang X., Vepakomma P., Singh A., Qiu H., Zhu X., Wang J., Shen L., Zhao P., Kang Y., Liu Y., Raskar R., Yang Q., Annavaram M., Avestimehr S., A research library and benchmark for federated machine learning, 2020,.
[32]
Hu S., Li Y., Liu X., Li Q., Wu Z., He B., The oarf benchmark suite: characterization and implications for federated learning systems, ACM Trans. Intell. Syst. Technol. 13 (4) (2022),.
[33]
Drainakis G., Katsaros K.V., Pantazopoulos P., Sourlas V., Amditis A., Federated vs. centralized machine learning under privacy-elastic users: a comparative analysis, in: IEEE International Symposium on Network Computing and Applications, 2020, pp. 1–8,.
[34]
Naik D., Naik N., The changing landscape of machine learning: a comparative analysis of centralized machine learning, distributed machine learning and federated machine learning, in: Advances in Computational Intelligence Systems, 2024, pp. 18–28.
[35]
Taherkhani N., Pierre S., Centralized and localized data congestion control strategy for vehicular ad hoc networks using a machine learning clustering algorithm, IEEE Trans. Intell. Transp. Syst. 17 (11) (2016) 3275–3285,.
[36]
L. Bottou, Large-scale machine learning with stochastic gradient descent, in: Proceedings of International Conference on Computational StatisticsParis France, 2010, pp. 177–186.
[37]
McMahan B., Moore E., Ramage D., Hampson S., Arcas B.A.y., Communication-efficient learning of deep networks from decentralized data, in: International Conference on Artificial Intelligence and Statistics, 2017, pp. 1273–1282. URL: https://proceedings.mlr.press/v54/mcmahan17a.html.
[38]
He Y., Shen Z., Cui P., Towards non-iid. Image classification: a dataset and baselines, Pattern Recognit. 110 (2021),. URL: https://www.sciencedirect.com/science/article/pii/S0031320320301862.
[39]
Zhao Y., Li M., Lai L., Suda N., Civin D., Chandra V., Federated learning with non-IID data, 2018,. URL: https://arxiv.org/abs/1806.00582.
[40]
Zhu H., Xu J., Liu S., Jin Y., Federated learning on non-IID data: a survey, Neurocomputing 465 (2021) 371–390,. URL: https://www.sciencedirect.com/science/article/pii/S0925231221013254.
[41]
Li T., Sahu A.K., Zaheer M., Sanjabi M., Talwalkar A., Smith V., Federated optimization in heterogeneous networks, Proc. Mach. Learn. Syst. (2020) 429–450. URL: https://proceedings.mlsys.org/paper_files/paper/2020/file/1f5fe83998a09396ebe6477d9475ba0c-Paper.pdf.
[42]
Zhang H., Bi H., Wang X., Zhang P., A joint-norm distance metric 2DPCA for robust dimensionality reduction, Inform. Sci. 640 (2023),. URL: https://www.sciencedirect.com/science/article/pii/S0020025523006217.
[43]
Wang H., Yurochkin M., Sun Y., Papailiopoulos D., Khazaeni Y., Federated learning with matched averaging, 2020,.
[44]
Hanea A., Morales Napoles O., Ababei D., Non-parametric bayesian networks: improving theory and reviewing applications, Reliab. Eng. Syst. Saf. 144 (2015) 265–284,. URL: https://www.sciencedirect.com/science/article/pii/S0951832015002331.
[45]
Chen T., Kornblith S., Norouzi M., Hinton G., A simple framework for contrastive learning of visual representations, in: International Conference on Machine Learning, 2020, pp. 1597–1607. URL: https://proceedings.mlr.press/v119/chen20j.html.
[46]
Chen T., Kornblith S., Swersky K., Norouzi M., Hinton G.E., Big self-supervised models are strong semi-supervised learners, in: Advances in Neural Information Processing Systems, 2020, pp. 22243–22255. URL: https://proceedings.neurips.cc/paper_files/paper/2020/file/fcbc95ccdd551da181207c0c1400c655-Paper.pdf.
[47]
K. He, H. Fan, Y. Wu, S. Xie, R. Girshick, Momentum contrast for unsupervised visual representation learning, in: IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2020, pp. 9729–9738.
[48]
I. Misra, L.v.d. Maaten, Self-supervised learning of pretext-invariant representations, in: IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2020, pp. 6707–6717.
[49]
Grill J.-B., Strub F., Altché F., Tallec C., Richemond P., Buchatskaya E., Doersch C., Avila Pires B., Guo Z., Gheshlaghi Azar M., Piot B., kavukcuoglu k., Munos R., Valko M., Bootstrap your own latent - a new approach to self-supervised learning, Adv. Neural Inf. Process. Syst. 33 (2020) 21271–21284,. URL: https://proceedings.neurips.cc/paper_files/paper/2020/file/f3ada80d5c4ee70142b17b8192b2958e-Paper.pdf.
[50]
Jing L., Tian Y., Self-supervised visual feature learning with deep neural networks: a survey, IEEE Trans. Pattern Anal. Mach. Intell. 43 (11) (2021),.
[51]
A. Psaltis, C. Chatzikonstantinou, C.Z. Patrikakis, P. Daras, Federated knowledge distillation for representation based contrastive incremental learning, in: IEEE/CVF International Conference on Computer Vision Workshops, 2023, pp. 3463–3472.
[52]
Wang R., Huang W., Zhang X., Wang J., Ding C., Shen C., Federated contrastive prototype learning: an efficient collaborative fault diagnosis method with data privacy, Knowl.-Based Syst. 281 (2023),. URL: https://www.sciencedirect.com/science/article/pii/S0950705123008432.
[53]
Xia P., Zhang L., Li F., Learning similarity with cosine similarity ensemble, Inform. Sci. 307 (2015) 39–52,. URL: https://www.sciencedirect.com/science/article/pii/S0020025515001243.
[54]
Paszke A., Gross S., Massa F., Lerer A., Bradbury J., Chanan G., Killeen T., Lin Z., Gimelshein N., Antiga L., Desmaison A., Kopf A., Yang E., DeVito Z., Raison M., Tejani A., Chilamkurthy S., Steiner B., Fang L., Bai J., Chintala S., Pytorch: an imperative style, high-performance deep learning library, Adv. Neural Inf. Process. Syst. 32 (2019),. URL: https://proceedings.neurips.cc/paper_files/paper/2019/file/bdbca288fee7f92f2bfa9f7012727740-Paper.pdf.
[55]
Yurochkin M., Agarwal M., Ghosh S., Greenewald K., Hoang N., Khazaeni Y., Bayesian nonparametric federated learning of neural networks, in: International Conference on Machine Learning, 2019, pp. 7252–7261. URL: https://proceedings.mlr.press/v97/yurochkin19a.html.
[56]
Khosla P., Teterwak P., Wang C., Sarna A., Tian Y., Isola P., Maschinot A., Liu C., Krishnan D., Supervised contrastive learning, Adv. Neural Inf. Process. Syst. 33 (2020) 18661–18673,. URL: https://proceedings.neurips.cc/paper_files/paper/2020/file/d89a66c7c80a29b1bdbab0f2a1a94af8-Paper.pdf.

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image Future Generation Computer Systems
Future Generation Computer Systems  Volume 164, Issue C
Mar 2025
595 pages

Publisher

Elsevier Science Publishers B. V.

Netherlands

Publication History

Published: 01 March 2025

Author Tags

  1. Federated learning
  2. Contrastive learning
  3. Data heterogeneity
  4. Sliding window

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

View Options

View options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media