SysMoBench: Evaluating AI on Formally Specifying Complex Real-World Systems

Qian Cheng, Ruize Tang, Emilie Ma, Finn Hackett, Peiyang He, Yiming Su, Ivan Beschastnikh, Yu Huang, Xiaoxing Ma, Tianyin XuICLR 2026

TL;DR

SysMoBench is a new benchmark designed to test if AI can move beyond simple coding to the much harder task of "modeling" complex, real-world distributed systems. By evaluating LLMs on 11 diverse system artifacts (like Raft and ZooKeeper), researchers found that while AI can handle simple components, it still struggles to abstract the core logic of large-scale systems and reason about long-term "liveness" properties.

What Problem Does This Paper Address?

Formal verification—using mathematical models to prove a system is bug-free—is the gold standard for safety-critical software like cloud infrastructure and OS kernels. However, writing these models (often in languages like TLA+) is notoriously difficult, expensive, and requires rare expertise.

While generative AI has shown promise in writing small code snippets or simple function specifications, "modeling" a whole system is a different beast. It requires an AI to look at thousands of lines of messy, low-level source code (full of logging, error handling, and optimizations) and abstract away everything except the essential protocol logic. Before this paper, there was no rigorous way to measure if AI was actually capable of this kind of high-level architectural reasoning.

Methods

The authors introduce SysMoBench, a framework that automates the evaluation of AI-generated formal models. They focus on four key metrics:

  1. Syntax Correctness: Does the generated TLA+ code actually compile?
  2. Runtime Correctness: Can the model be executed by a model checker (TLC) without crashing?
  3. Conformance: Does the model’s behavior actually match real-world execution traces from the original source code?
  4. Invariant Correctness: Does the model satisfy critical safety properties (e.g., "only one process holds the lock") and liveness properties (e.g., "the system eventually makes progress")?
SysMoBench Evaluation Workflow

The researchers tested three types of AI "agents":

  • Basic Modeling Agent: Directly prompts the LLM with source code and requirements.
  • Code Translation Agent: Uses a statement-by-statement translation approach to maintain the structure of the original code.
  • Trace Learning Agent: Attempts to "guess" the model solely by looking at execution logs (no source code provided).

Datasets

The benchmark consists of 11 real-world system artifacts across three categories:

  • Distributed Consensus: Implementations of the Raft protocol from Etcd and Redis, and ZooKeeper’s leader election.
  • Concurrent OS Components: Spinlocks, Mutexes, and Ringbuffers from the Asterinas OS (written in Rust).
  • Compiler-Generated Systems: Systems produced by the PGo compiler (which turns TLA+ into Go code), used to test if AI can understand machine-generated logic.
SysMoBench Dataset Artifacts

This is a significant step up from previous benchmarks, which mostly focused on "toy" logic puzzles or simple data structures.

Key Insights and Ideas

  • Abstraction is the "Final Boss": AI is surprisingly good at modeling small, local components (like a Spinlock). However, when faced with a 2,000-line Raft implementation, LLMs get "lost in the weeds" of implementation details and fail to extract the high-level protocol.
  • Safety is easier than Liveness: LLMs are relatively good at ensuring "bad things don't happen" (safety invariants). They are much worse at reasoning about "good things eventually happen" (liveness). Only 8.3% of safety properties were violated in their tests, compared to a staggering 41.9% for liveness.
  • Translation > Pure Modeling: For complex systems, the Code Translation Agent significantly outperformed the Basic agent. By following the "scaffold" of the existing code, the AI is less likely to "hallucinate" incorrect logic.
  • Logs aren't enough: The Trace Learning Agent (learning from logs alone) failed almost across the board. Current LLMs cannot yet reverse-engineer complex system logic purely from observing its output.

Key Results

  • The "Claude" Advantage: Across most tasks, Claude-Sonnet-4 was the most robust, particularly in generating syntactically valid TLA+ code.
  • Simple vs. Complex: On the simple Asterinas Spinlock, most models achieved 100% across all metrics.
  • The Raft Wall: On the complex Etcd Raft implementation, even the best-performing agent (Claude-Sonnet-4 using translation) only achieved 15.38% conformance to the actual system code, though it managed to satisfy 92.31% of the invariants.
  • Bug Reproduction: Despite their limitations, AI-generated models were able to successfully reproduce five known, hard-to-find bugs in earlier versions of the systems, proving they have immediate practical utility for "partial" verification.

Limitations and Future Work

The authors note that SysMoBench currently evaluates a "one-shot" or limited-feedback loop. In the real world, formal modeling is a highly iterative process between a human and a tool. Future versions of the benchmark may include "human-in-the-loop" metrics.

Additionally, while the framework supports Alloy and PAT, the results showed that LLMs are much weaker in those languages compared to TLA+, likely due to a lack of training data. The authors hope SysMoBench will encourage the development of "system-intelligent" AI that can reason about architecture as well as it currently reasons about syntax.

Summary updated

BibTeX
@inproceedings{cheng2026sysmobench,
  author = {Qian Cheng and Ruize Tang and Emilie Ma and Finn Hackett and Peiyang He and Yiming Su and Ivan Beschastnikh and Yu Huang and Xiaoxing Ma and Tianyin Xu},
  title = {{SysMoBench: Evaluating AI on Formally Specifying Complex Real-World Systems}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=SAeaTz8YoM},
}
Figure