Skip to main content

Towards WebAssembly-Based Federated Learning

  • Conference paper
  • First Online:
Service-Oriented and Cloud Computing (ESOCC 2025)

Abstract

WebAssembly is a portable binary instruction format designed to serve as a compilation target for high-level languages. While originally developed to run performance-intensive applications directly in Web browsers, WebAssembly supports these days a number of different hardware platforms across the compute continuum. This makes it a promising option to run services for training and inference in Federated Learning.

To the best of our knowledge, there have been only a few practical approaches to realize Federated Learning using WebAssembly. Therefore, in this paper, we present a framework to achieve this. Our prototypical implementation shows that WebAssembly-based Federated Learning applications are highly portable while providing acceptable runtime overhead during model training.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/WebAssembly/WASI.

  2. 2.

    https://github.com/VerFlix/WASM-FL.

  3. 3.

    https://wasmtime.dev/.

  4. 4.

    https://github.com/FederatedAI/FATE.

  5. 5.

    https://github.com/IBM/federated-learning-lib.

  6. 6.

    https://ai.google.dev/edge/litert.

  7. 7.

    https://www.mlpack.org/.

  8. 8.

    https://github.com/minhpqn/maxent.

  9. 9.

    https://pytorch.org/cppdocs/.

  10. 10.

    https://github.com/libfann/fann.

  11. 11.

    https://github.com/WebAssembly/wasi-sockets.

  12. 12.

    https://github.com/WebAssembly/wasi-http.

References

  1. Brown, A., Sun, M.: WASI-NN Proposal (2020). https://github.com/WebAssembly/ wasi-nn

  2. Caldas, S., et al.: LEAF: A Benchmark for Federated Settings (2018). arXiv:1812.01097 [cs.LG]

  3. Chen, Y., Chai, Z., Cheng, Y., Rangwala, H.: Asynchronous federated learning for sensor data with concept drift. In: 2021 IEEE International Conference on Big Data, pp. 4822–4831 (2021)

    Google Scholar 

  4. De Macedo, J., Abreu, R., Pereira, R., Saraiva, J.: WebAssembly versus JavaScript: energy and runtime performance. In: 2022 International Conference on ICT for Sustainability, pp. 24–34 (2022)

    Google Scholar 

  5. Deng, L.: The MNIST database of handwritten digit images for machine learning research [best of the web]. IEEE Signal Process. Mag. 29(6), 141–142 (2012)

    Article  MATH  Google Scholar 

  6. Ding, A.Y., et al.: Roadmap for edge AI: a Dagstuhl perspective. ACM SIGCOMM Comput. Commun. Rev. 52, 28–33 (2022)

    Article  MATH  Google Scholar 

  7. Gackstatter, P., Frangoudis, P.A., Dustdar, S.: Pushing serverless to the edge with webassembly runtimes. In: 2022 22nd IEEE International Symposium on Cluster, Cloud and Internet Computing, pp. 140–149 (2022)

    Google Scholar 

  8. Gohman, D., et al.: WebAssembly/WASI: v0.2.1 (2024)

    Google Scholar 

  9. Hiessl, T., Lakani, S.R., Kemnitz, J., Schall, D., Schulte, S.: Cohort-based federated learning services for industrial collaboration on the edge. J. Parallel Distrib. Comput. 167, 64–76 (2022)

    Article  Google Scholar 

  10. Hilbig, A., Lehmann, D., Pradel, M.: An empirical study of real-world web- assembly binaries: security, languages, use cases. In: Web Conference 2021, pp. 2696–2708 (2021)

    Google Scholar 

  11. Hoque, M.N., Harras, K.A.: WebAssembly for edge computing: potential and challenges. IEEE Commun. Stand. Mag. 6(4), 68–73 (2022)

    Article  MATH  Google Scholar 

  12. Hsu, T.-M., Qi, H., Brown, M.: Measuring the effects of non-identical data distribution for federated visual classification (2019). arXiv:1909.06335 [cs.LG]

  13. Jangda, A., Powers, B., Berger, E.D., Guha, A.: Not so fast: analyzing the performance of webassembly vs. native code. In: 2019 USENIX Annual Technical Conference, pp. 107–120 (2019)

    Google Scholar 

  14. Jansen, M., Al-Dulaimy, A., Papadopoulos, A.V., Trivedi, A., Iosup, A.: The SPEC-RG reference architecture for the compute continuum. In: IEEE 23rd International Symposium on Cluster, Cloud and Internet Computing, pp. 469–484 (2023)

    Google Scholar 

  15. Jothimurugesan, E., Hsieh, K., Wang, J., Joshi, G., Gibbons, P.B.: Federated learning under distributed concept drift. In: International Conference on Artificial Intelligence and Statistics, pp. 5834–5853 (2023)

    Google Scholar 

  16. Khan, L.U., et al.: Federated learning for edge networks: resource optimization and incentive mechanism. IEEE Commun. Mag. 58(10), 88–93 (2020)

    Article  MATH  Google Scholar 

  17. Khelifa, S.E., Bagaa, M., Messaoud, A.O., Ksentini, A.: Case study of web-assembly runtimes for AI applications on the edge. In: 2024 Global Information Infrastructure and Networking Symposium, pp. 1–6 (2024)

    Google Scholar 

  18. Kluften, M.N.: Nebula: performance and energy efficiency in serverless computing. Master’s thesis, University of Oslo (2024)

    Google Scholar 

  19. Konečný, J., McMahan, H.B., Yu, F.X., Richtárik, P., Suresh, A.T., and Bacon, D.: Federated learning: strategies for improving communication efficiency (2016). arXiv:1610.05492 [cs.LG]

  20. Kotilainen, P., Heikkilä, V., Systä, K., and Mikkonen, T.: Towards liquid AI in IoT with webassembly: a prototype implementation. In: 19th International Conference on Mobile Web and Intelligent Information Systems, pp. 129–141 (2023)

    Google Scholar 

  21. Leroy, D., Coucke, A., Lavril, T., Gisselbrecht, T., Dureau, J.: Federated learning for keyword spotting. In: IEEE International Conference on Acoustics, Speech and Signal Processing, pp. 6341–6345 (2019)

    Google Scholar 

  22. Li, Q., He, B., Song, D.: Model-contrastive federated learning. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 10713–10722 (2021)

    Google Scholar 

  23. Li, X., Huang, K., Yang, W., Wang, S., Zhang, Z.: On the Convergence of FedAvg on Non-IID Data (2019). arXiv:1907.02189 [stat.ML]

  24. Liu, Y., Fan, T., Chen, T., Xu, Q., Yang, Q.: FATE: an industrial grade platform for collaborative learning with data protection. J. Mach. Learn. Res. 22(226), 1–6 (2021)

    MathSciNet  MATH  Google Scholar 

  25. Long, J., Tai, H.-Y., Hsieh, S.-T., Yuan, M.J.: A lightweight design for serverless function as a service. IEEE Softw. 38(1), 75–80 (2020)

    Article  MATH  Google Scholar 

  26. Ludwig, H., et al.: IBM Federated Learning: an Enterprise Framework White Paper V0.1 (2020). arXiv:2007.10987 [cs.LG]

  27. Ma, Y., Xiang, D., Zheng, S., Tian, D., Liu, X.: Moving deep learning into web browser: how far can we go? In: The World Wide Web Conference, pp. 1234–1244 (2019)

    Google Scholar 

  28. Mäkitalo, N., et al.: WebAssembly modules as lightweight containers for liquid IoT applications. In: 21st International Conference on Web Engineering, pp. 328–336 (2021)

    Google Scholar 

  29. McMahan, B., Moore, E., Ramage, D., Hampson, S., Arcas, B.A.: Communication-efficient learning of deep networks from decentralized data. In: 20th International Conference on Artificial Intelligence and Statistics. Machine Learning Research, pp. 1273–1282 (2017)

    Google Scholar 

  30. Ménétrey, J., Pasin, M., Felber, P., Schiavoni, V.: WebAssembly as a common layer for the cloud-edge continuum. In: 2nd Workshop on Flexible Resource and Application Management on the Edge, pp. 3–8 (2022)

    Google Scholar 

  31. Mothukuri, V., Parizi, R.M., Pouriyeh, S., Huang, Y., Dehghantanha, A., Srivastava, G.: A survey on security and privacy of federated learning. Future Gener. Comput. Syst. 115, 619–640 (2021)

    Article  Google Scholar 

  32. Nissen, S.: Implementation of a Fast Artificial Neural Network Library (FANN). Graduate project, Department of Computer Science, University of Copenhagen (2003)

    Google Scholar 

  33. Pham, S., Oliveira, K., Lung, C.-H.: WebAssembly modules as alternative to docker containers in IoT application development. In: 2023 IEEE 3rd International Conference on Electronic Communications, Internet of Things and Big Data, pp. 519–524 (2023)

    Google Scholar 

  34. Reddi, S.J., et al.: Adaptive federated optimization. In: 9th International Conference on Learning Representations (2021)

    Google Scholar 

  35. Riedel, P., Schick, L., von Schwerin, R., Reichert, M., Schaudt, D., Hafner, A.: Comparative analysis of open-source federated learning frameworks – a literature based survey and review. Int. J. Mach. Learn. Cybern. (2024)

    Google Scholar 

  36. Saile, F., Thomas, J., Kaaser, D., Schulte, S.: Client-side adaptation to concept drift in federated learning. In: 2nd IEEE International Conference on Federated Learning Technologies and Applications (2024)

    Google Scholar 

  37. Semjonov, A., Bornholdt, H., Edinger, J., Russo, G.R.: Wasimoff: distributed computation offloading using webassembly in the browser. In: 2024 IEEE International Conference on Pervasive Computing and Communications Workshops and other Affiliated Events, pp. 203–208 (2024)

    Google Scholar 

  38. Smilkov, D., Thorat, N., Yuan, A.: Introducing the WebAssembly backend for TensorFlow.js (2020). https://blog.tensorflow.org/2020/03/introducingwebassembly- backend-for-tensorflow-js.html

  39. Spies, B., Mock, M.: An evaluation of webassembly in non-web environments. In: 2021 XLVII Latin American Computing Conference, pp. 1–10 (2021)

    Google Scholar 

  40. Thomas, J., Saile, F., Fischer, M., Kaaser, D., Schulte, S.: Adaption via selection: on client selection to counter concept drift in federated learning. In: 11th European Conference on Service-Oriented and Cloud Computing (2025)

    Google Scholar 

  41. Wang, J., Liu, Q., Liang, H., Joshi, G., Poor, H.V.: Tackling the objective inconsistency problem in heterogeneous federated optimization. In: Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems (2020)

    Google Scholar 

  42. Wang, S., et al.: Adaptive federated learning in resource constrained edge computing systems. IEEE J. Sel. Areas Commun. 37(6), 1205–1221 (2019)

    Article  MathSciNet  MATH  Google Scholar 

  43. WebAssembly Working Group, WebAssembly Core Specification (2019). W3C Recommendation. https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/

  44. Zhang, C., Xie, Y., Bai, H., Yu, B., Li, W., Gao, Y.: A survey on federated learning. Knowl. Based Syst. 216, 106775 (2021)

    Article  MATH  Google Scholar 

Download references

Acknowledgement

The financial support by the Austrian Federal Ministry for Digital and Economic Affairs, the National Foundation for Research, Technology and Development as well as the Christian Doppler Research Association for the Christian Doppler Laboratory for Blockchain Technologies for the Internet of Things is gratefully acknowledged.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Stefan Schulte .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2025 IFIP International Federation for Information Processing

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Gottschalk, F., Schulte, S., Hemadasa, N., Ebrahimi, E., Edinger, J., Kaaser, D. (2025). Towards WebAssembly-Based Federated Learning. In: Pahl, C., Janes, A., Cerny, T., Lenarduzzi, V., Esposito, M. (eds) Service-Oriented and Cloud Computing. ESOCC 2025. Lecture Notes in Computer Science, vol 15547. Springer, Cham. https://doi.org/10.1007/978-3-031-84617-5_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-84617-5_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-84616-8

  • Online ISBN: 978-3-031-84617-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics