Translating Federated Learning Algorithms in Python into CSP Processes Using ChatGPT
This work addresses the challenge of automating formal verification for federated learning algorithms, making it more accessible, though it is incremental as it builds on existing translation and verification methods.
The paper tackles the problem of manually translating federated learning algorithms from Python to CSP processes by introducing a process that uses ChatGPT to automate this translation, with experimental validation showing successful translation and verification by the model checker PAT.
The Python Testbed for Federated Learning Algorithms is a simple Python FL framework that is easy to use by ML&AI developers who do not need to be professional programmers and is also amenable to LLMs. In the previous research, generic federated learning algorithms provided by this framework were manually translated into the CSP processes and algorithms' safety and liveness properties were automatically verified by the model checker PAT. In this paper, a simple translation process is introduced wherein the ChatGPT is used to automate the translation of the mentioned federated learning algorithms in Python into the corresponding CSP processes. Within the process, the minimality of the used context is estimated based on the feedback from ChatGPT. The proposed translation process was experimentally validated by successful translation (verified by the model checker PAT) of both generic centralized and decentralized federated learning algorithms.