Learning Provably Correct Distributed Protocols Without Human Knowledge
Yujie Hui, Xiaoyi Lu, Andrew Perrault, Yang Wang
TL;DR
This work addresses the challenge of automatically synthesizing provably correct distributed protocols under crashes and message losses by treating protocol design as a search over imperfect-information strategies and enforcing correctness via SMT-model checking. The authors introduce GGMS, a framework that combines Monte Carlo Tree Search with a transformer-based action encoder, a global depth-first search to resolve ambiguity, and iterative model-checking feedback to produce state machines that are exhaustively verified for a bounded setting. They prove completeness under mild assumptions and demonstrate that GGMS learns correct protocols where standard MCTS fails, including FloodSet-like consensus and a novel synchronous atomic commit protocol, showing improved success rates over baselines. The work suggests a promising direction for automated, verified protocol synthesis and hints at strong synergy with LLM-based methods for broader generalization, while outlining limitations and future extensions to more expressive fault models and larger process counts.
Abstract
Provably correct distributed protocols, which are a critical component of modern distributed systems, are highly challenging to design and have often required decades of human effort. These protocols allow multiple agents to coordinate to come to a common agreement in an environment with uncertainty and failures. We formulate protocol design as a search problem over strategies in a game with imperfect information, and the desired correctness conditions are specified in Satisfiability Modulo Theories (SMT). However, standard methods for solving multi-agent games fail to learn correct protocols in this setting, even when the number of agents is small. We propose a learning framework, GGMS, which integrates a specialized variant of Monte Carlo Tree Search with a transformer-based action encoder, a global depth-first search to break out of local minima, and repeated feedback from a model checker. Protocols output by GGMS are verified correct via exhaustive model checking for all executions within the bounded setting. We further prove that, under mild assumptions, the search process is complete: if a correct protocol exists, GGMS will eventually find it. In experiments, we show that GGMS can learn correct protocols for larger settings than existing methods.
