Federated Learning

MPT-FLA: The Future of Lightweight Federated Learning at the Edge

In recent years, federated learning has emerged as a promising approach to train machine learning models on decentralized data. By keeping data on local devices and only sharing model updates, federated learning allows for privacy-preserving collaborative learning. However, deploying federated learning algorithms at the edge, where computational resources and network connectivity are limited, poses significant challenges. That’s where the MicroPython Testbed for Federated Learning Algorithms (MPT-FLA) framework comes into play.

Introducing MPT-FLA

MPT-FLA System Architecture
UML class diagram of MPT-FLA System Architecture

The MicroPython Testbed for Federated Learning Algorithms (MPT-FLA) is a lightweight framework designed to advance federated learning at the edge. It is written in pure Python, making it easy to install and suitable for small IoT devices with limited memory. MPT-FLA was developed by researchers from the University of Novi Sad and RT-RK Institute, building upon the earlier Python Testbed for Federated Learning Algorithms (PTB-FLA) framework.

While PTB-FLA was limited to running on a single PC, MPT-FLA overcomes this limitation by enabling individual application instances to run on different network nodes, such as PCs and IoT devices. This advancement is crucial for deploying federated learning algorithms in edge systems, where data is generated and processed locally.

Advantages of MPT-FLA

MPT-FLA offers several advantages over existing federated learning frameworks, particularly in edge-only deployment scenarios. Let’s take a closer look at some of its key features:

Lightweight and Easy to Install

One of the notable aspects of MPT-FLA is its lightweight nature. Being written in pure Python, it is designed to fit into small IoT memory and can be easily installed on a wide range of devices. This makes it highly suitable for resource-constrained edge systems where computational capabilities are limited.

Support for Decentralized Applications

MPT-FLA supports both centralized and decentralized federated learning algorithms. This flexibility allows developers to choose the algorithm that best suits their application requirements. Decentralized federated learning is particularly beneficial in scenarios where privacy and data locality are of utmost importance.

Asynchronous I/O and MicroPython Compatibility

To ensure efficient and responsive communication between network nodes, MPT-FLA is based on asynchronous I/O. This approach enables concurrent execution of tasks, minimizing latency and optimizing resource utilization. Moreover, MPT-FLA runs on MicroPython, a lean implementation of the Python programming language targeted for microcontrollers and constrained devices. This compatibility with MicroPython makes it well-suited for edge systems.

Validation and Numerical Consistency

The MPT-FLA framework has been rigorously validated to ensure its functionality and numerical consistency with the PTB-FLA framework. The validation process involved running adapted application examples on a wireless network with PCs and Raspberry Pi Pico W boards. The results confirmed that MPT-FLA produces the same numerical results as PTB-FLA, providing confidence in its accuracy and reliability.

Overcoming Challenges

Deploying federated learning algorithms at the edge comes with its own set of challenges. Existing FL frameworks like TensorFlow Federated and BlueFog are effective in cloud-edge environments but may not be suitable for edge-only deployment and lack Windows OS support. In this context, the development of MPT-FLA serves as a significant advancement in the field.

This framework addresses the challenge of developing FL frameworks for edge systems by providing a lightweight, MicroPython-based solution that can run on diverse network nodes. By extending the capabilities of the PTB-FLA framework, MPT-FLA enables the development of distributed applications for edge systems, paving the way for privacy-preserving collaborative learning in resource-constrained environments.

Experimental Validation

To validate the effectiveness of the MPT-FLA framework, an experimental WiFi network was set up using a Belkin F5D7234-4 router, Raspberry Pi Pico W boards, and a PC. The validation process aimed to ensure that the adapted algorithms produced the same numerical results as the original PTB-FLA framework. The results confirmed functional correctness, indicating that it is capable of delivering accurate and consistent results.

However, it’s worth noting that performance metrics such as execution time and energy consumption were not evaluated in the validation process. As MPT-FLA is still in development, future work will likely involve conducting detailed performance evaluations to assess its efficiency and resource utilization.


The MicroPython Testbed for Federated Learning Algorithms framework is a significant advancement in the field of federated learning at the edge. By extending the capabilities of its predecessor, PTB-FLA, MPT-FLA enables the deployment of federated learning algorithms on diverse network nodes, including IoT devices and PCs. Its lightweight nature, support for decentralized applications, and compatibility with MicroPython make it a valuable tool for developers working on edge systems.

While MPT-FLA has been rigorously validated and proven to produce accurate numerical results, further research and development are required to evaluate its performance characteristics. As the framework evolves, it holds the potential to unlock the power of federated learning in resource-constrained environments, facilitating privacy-preserving collaborative learning at the edge.

Check out the Paper. All credit for this research goes to the researchers of this project. Also, don’t forget to follow us on LinkedIn. Do join our active AI community on Discord.

Explore 3600+ latest AI tools at AI Toolhouse 🚀.

Read our other blogs on LLMs😁

If you like our work, you will love our Newsletter 📰

Aditya Toshniwal

Aditya is a Computer science graduate from VIT, Vellore. Has deep interest in the area of deep learning, computer vision, NLP and LLMs. He like to read and write about latest innovation in AI.

Leave a Reply

Your email address will not be published. Required fields are marked *