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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
References
Brown, A., Sun, M.: WASI-NN Proposal (2020). https://github.com/WebAssembly/ wasi-nn
Caldas, S., et al.: LEAF: A Benchmark for Federated Settings (2018). arXiv:1812.01097 [cs.LG]
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)
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)
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)
Ding, A.Y., et al.: Roadmap for edge AI: a Dagstuhl perspective. ACM SIGCOMM Comput. Commun. Rev. 52, 28–33 (2022)
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)
Gohman, D., et al.: WebAssembly/WASI: v0.2.1 (2024)
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)
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)
Hoque, M.N., Harras, K.A.: WebAssembly for edge computing: potential and challenges. IEEE Commun. Stand. Mag. 6(4), 68–73 (2022)
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]
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)
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)
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)
Khan, L.U., et al.: Federated learning for edge networks: resource optimization and incentive mechanism. IEEE Commun. Mag. 58(10), 88–93 (2020)
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)
Kluften, M.N.: Nebula: performance and energy efficiency in serverless computing. Master’s thesis, University of Oslo (2024)
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]
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)
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)
Li, Q., He, B., Song, D.: Model-contrastive federated learning. In: IEEE Conference on Computer Vision and Pattern Recognition, pp. 10713–10722 (2021)
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]
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)
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)
Ludwig, H., et al.: IBM Federated Learning: an Enterprise Framework White Paper V0.1 (2020). arXiv:2007.10987 [cs.LG]
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)
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)
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)
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)
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)
Nissen, S.: Implementation of a Fast Artificial Neural Network Library (FANN). Graduate project, Department of Computer Science, University of Copenhagen (2003)
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)
Reddi, S.J., et al.: Adaptive federated optimization. In: 9th International Conference on Learning Representations (2021)
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)
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)
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)
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
Spies, B., Mock, M.: An evaluation of webassembly in non-web environments. In: 2021 XLVII Latin American Computing Conference, pp. 1–10 (2021)
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)
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)
Wang, S., et al.: Adaptive federated learning in resource constrained edge computing systems. IEEE J. Sel. Areas Commun. 37(6), 1205–1221 (2019)
WebAssembly Working Group, WebAssembly Core Specification (2019). W3C Recommendation. https://www.w3.org/TR/2019/REC-wasm-core-1-20191205/
Zhang, C., Xie, Y., Bai, H., Yu, B., Li, W., Gao, Y.: A survey on federated learning. Knowl. Based Syst. 216, 106775 (2021)
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
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2025 IFIP International Federation for Information Processing
About this paper
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)