Translating Federated Learning Algorithms in Python into CSP Processes Using ChatGPT

📅 2025-06-08
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Manual construction of Communicating Sequential Processes (CSP) models for formal verification of federated learning (FL) algorithms is labor-intensive, error-prone, and hinders scalability. Method: This paper proposes the first LLM-based automated translation framework that converts Python-implemented centralized and decentralized FL algorithms into executable CSP processes. Leveraging ChatGPT with carefully engineered prompts, the approach dynamically minimizes contextual redundancy to enhance translation reliability and reproducibility; generated CSP models are automatically verified for safety and liveness using the PAT model checker. Contribution/Results: The framework achieves 100% verification success on CSP models of two representative FL algorithms in PAT. End-to-end translation time is reduced by over 90% compared to manual modeling, significantly advancing automation and trustworthiness in formal verification of FL algorithms.

Technology Category

Application Category

📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

Automating Python FL algorithm translation to CSP using ChatGPT
Ensuring minimal context usage for accurate CSP conversion
Validating translated CSP processes via model checker PAT
Innovation

Methods, ideas, or system contributions that make the work stand out.

Automated Python to CSP translation using ChatGPT
Minimal context estimation via ChatGPT feedback
Validated by PAT model checker for FL algorithms
🔎 Similar Papers
No similar papers found.
Miroslav Popovic
Miroslav Popovic
University of Novi Sad
engineering of computer based systems
M
Marko Popovic
RT-RK Institute for Computer Based Systems, Novi Sad, Serbia
M
Miodrag Djukic
University of Novi Sad, Faculty of Technical Sciences, Novi Sad, Serbia
I
Ilija Basicevic
University of Novi Sad, Faculty of Technical Sciences, Novi Sad, Serbia