The Python Testbed for Federated Learning Algorithms (PTB-FLA) is a low-code framework developed for the EU Horizon 2020 project TaRDIS, aimed at simplifying the creation of decentralized and distributed applications for edge systems. Written in pure Python, PTB-FLA is lightweight and easy to install, making it suitable for small IoT devices. It supports both centralized and decentralized federated learning algorithms and peer-to-peer data exchange via time division multiplexing. Designed with a simple API, it allows nonprofessional programmers to develop applications using AI tools like ChatGPT. Its primary limitation is that it currently only runs on a single PC.
Researchers from the University of Novi Sad and RT-RK Institute have developed the MicroPython Testbed for Federated Learning Algorithms (MPT-FLA), overcoming the limitation of its predecessor by enabling individual application instances to run on different network nodes, such as PCs and IoT devices. Retaining the pure Python ideal, MPT-FLA is based on asynchronous I/O and runs on MicroPython, making it suitable for edge systems. The framework was validated on a wireless network with PCs and Raspberry Pi Pico W boards, using adapted application examples from the previous framework, PTB-FLA. The successful validation confirmed that MPT-FLA produces the same numerical results as PTB-FLA.
Current federated learning (FL) frameworks like TensorFlow Federated and BlueFog are effective in cloud-edge environments but unsuitable for edge-only deployment, lack Windows OS support, and are complex to install. A 2021 review by Kholod et al. highlighted the ongoing challenge of developing FL frameworks for edge systems. Unlike complete systems such as CoLearn and FedIoT, the MPT-FLA serves as an “algorithmic†testbed for ML and AI developers in the TaRDIS project. It uses a Single Program Multiple Data (SPMD) pattern, similar to MapReduce, and future work may involve adapting it for high-performance compilation with Codon.
The experimental WiFi network for evaluating MPT-FLA comprised a Belkin F5D7234-4 router, two Raspberry Pi Pico W boards, and a Dell Latitude 3420 PC. The router supports 802.11g with speeds up to 54Mbps. The Raspberry Pi Pico W, featuring the RP2040 chip, includes a 2.4GHz wireless interface and 264KB of RAM, programmed with the “RPI_PICO_W-20231005-v1.21.0.uf2†firmware. The PC runs Windows 10 Pro, with an Intel Core i7-1165G7 processor, and uses Python 3.12.0 and VS Code for software development. The MPT-FLA tool will be available on GitHub by mid-2024. The MPT-FLA framework evolved from the PTB-FLA framework, which relied on Python’s multiprocessing abstractions (process, queue, clients, and listeners). However, PTB-FLA could not be directly ported due to the lack of support for these abstractions in MicroPython.
The MPT-FLA framework was tested on an experimental WiFi network with a Belkin router, two Raspberry Pi Pico W boards, and a PC. The goal was to ensure the adapted algorithms produced the same numerical results as the originals, which they did, confirming functional correctness. However, performance metrics like execution time and energy consumption were not evaluated as the framework is still in development. Issues encountered included the Pico boards’ repeated attempts to connect to the WiFi, potentially seen as DoS attacks by the router, and severe WiFi interferences, particularly in apartment buildings, causing TCP connection failures and increased latencies.
In conclusion, MPT-FLA is an FL framework that extends the PTB-FLA framework to support applications running on diverse network nodes, such as PCs and IoT devices, primarily in edge systems. Four adapted application examples were used in the experimental validation in a lab setting to demonstrate functional correctness. Key contributions include the MPT-FLA framework, new application examples, and the validation approach and results. MPT-FLA’s advantages over PTB-FLA include support for distributed applications and compatibility with smaller IoT platforms. Future work will involve developing benchmark applications and conducting detailed performance evaluations.
Check out the Paper. All credit for this research goes to the researchers of this project. Also, don’t forget to follow us on Twitter. Join our Telegram Channel, Discord Channel, and LinkedIn Group.
If you like our work, you will love our newsletter..
Don’t Forget to join our 42k+ ML SubReddit
The post MicroPython Testbed for Federated Learning Algorithms (MPT-FLA) Framework Advancing Federated Learning at the Edge appeared first on MarkTechPost.
Source: Read MoreÂ