Large language models create diverse fault tolerant system code

DiverseFT: Diversifying Fault-Tolerant Systems using LLMs

Distributed, Parallel, and Cluster Computing

Summary

Fault-tolerant systems need many copies (replicas) of software that don't fail in the same way at the same time. Usually, all copies run identical software, which risks all failing together if there's a common bug. The authors show that large language models can automatically generate different versions of the same system code that still work correctly but differ enough to avoid shared bugs. They tested this on common protocols and managed to change up to 65% of the code, which could make systems safer and more reliable.

What this means in practice

  • For distributed system engineers: Generate diverse replicas of consensus protocols to reduce shared bugs and improve fault tolerance using large language models.
  • For software reliability teams: Automate creation of semantically different yet correct code versions to decrease risk of simultaneous failures in replicated software.

Authors

Arne Vogel, Christian Berger, Rüdiger Kapitza

Abstract

Fault-tolerant agreement protocols fail if replicas share a common flaw that simultaneously affects more replicas than the tolerable threshold. Therefore replicas should ideally fail independently, which can be achieved through diversification. However, in practice, often the same protocol implementation is shared by all replicas which is not surprising given that the provision of multiple diverse implementations is difficult and highly laborious. This poses a major risk, as a shared protocol implementation is a prime candidate for common bugs due to its complexity. With DiverseFT, we demonstrate how, given a reference implementation, Large Language Models (LLMs) can be utilised for the automated and scalable generation of code that compiles, passes tests, and crucially differs semantically/binary-wise, that can re- place code in the reference implementation, thereby significantly reducing diversification costs. We demonstrate the feasibility of diversification of replication protocol implementations using LLMs by diversifying three implementations: PBFT, HotStuff, and Raft, showing how up to 65% of the codebase can be diversified.