Model Repair Revamped: On the Automated Synthesis of Markov Chains

Milan Ceska, Christian Dehnert, Nils Jansen, Sebastian Junges, Joost-Pieter Katoen · DOI

TL;DR

This paper introduces two powerful new methods—CEGAR and CEGIS—to automatically "repair" or synthesize Markov Chains that meet specific probabilistic requirements. By moving beyond simple probability tuning to structural changes (adding or removing transitions), the authors demonstrate how to find optimal system designs in massive search spaces up to 60 times faster than traditional methods.

What Problem Does This Paper Address?

In formal verification, "model repair" traditionally meant tweaking the transition probabilities of a Markov Chain (MC) until it satisfied a requirement, like "the probability of system failure must be less than 0.001."

However, real-world engineering often involves structural choices: Should we add a redundant sensor? Should we change the control logic? These are topology changes, and they make the synthesis problem much harder—qualitative reachability becomes NP-complete. The authors tackle the challenge of "Program Sketching," where a developer provides a template (a "sketch") with holes, and the tool must automatically fill those holes to satisfy complex probabilistic specifications.

Methods

The authors propose two complementary approaches to navigate the "family" of possible model realizations:

  1. CEGAR (Counterexample-Guided Abstraction Refinement): This method looks at the entire design space at once by creating a single, massive "all-in-one" Markov Decision Process (MDP). To keep it manageable, they use a sound abstraction (a quotient MDP). If the abstraction is too vague to prove the property, they use "inconsistent schedulers" (strategies that flip-flop between different design choices) as counterexamples to refine the abstraction and narrow down the search.

  2. CEGIS (Counterexample-Guided Inductive Synthesis): Instead of looking at everything, CEGIS picks one candidate design and verifies it. If it fails, the verifier identifies a "critical subsystem"—a small fragment of the model that causes the failure. An SMT (Satisfiability Modulo Theory) solver then uses this fragment to prune not just the failed candidate, but every other possible design that contains that same faulty fragment.

Fig. 1. CEGAR and CEGIS approaches to (feasibility) synthesis.

Datasets

The researchers evaluated their methods on three distinct benchmarks representing different application domains:

  • Dynamic Power Manager (DPM): A system managing power states based on workload. The "family" contained over 300,000 possible control programs.
  • Body Sensor Network (BSN): A software product line benchmark with 1,024 different feature combinations, focusing on system reliability.
  • Maze (POMDP): A classic motion-planning problem for robots with partial observability, involving a search space of over 1 million observation-based strategies.

Key Insights and Ideas

  • Structural Synthesis is Key: By allowing the synthesis of the model's topology (the "skeleton" of the Markov Chain), the authors bridge the gap between simple parameter tuning and full-blown program synthesis.
  • The Power of Pruning: The "aha moment" for CEGIS is that a single counterexample can invalidate thousands of designs at once. If a specific sequence of three states leads to a crash, any program containing that sequence can be discarded immediately.
  • Complementary Strengths:
    • CEGAR shines when the "quotient" (the simplified version of the design space) is succinct.
  • CEGIS excels when the problem is "highly unsatisfiable"—meaning there are many ways to fail, allowing the solver to prune the search space aggressively.
A bird's eye view of how CEGAR (top) and CEGIS (bottom) partition the design space.

Key Results

  • Massive Speedups: In the DPM challenge, the proposed methods proved a specification was unsatisfiable in just 20 minutes, whereas a naive enumerative approach took over 20 hours.
  • Scalability: For the Maze POMDP, the tool navigated a space of 1 million realizations to find near-optimal strategies (within 2% of the maximum) in just seconds.
  • Efficiency: In the BSN software product line, the tools categorized all 1,024 realizations by reliability almost instantly, a task that was previously computationally heavy.

Limitations and Future Work

While powerful, the methods have trade-offs. CEGAR struggles when there are complex constraints between different parts of the model (e.g., "if you pick Option A here, you must pick Option B there"). CEGIS sees a performance drop when the required probability threshold is very close to the actual maximum possible probability, as it becomes harder to find "small" refuting fragments.

The authors suggest that future work should focus on:

  • Synthesizing infinite-state probabilistic programs.
  • Integrating learning algorithms to better predict which design candidates to test first.
  • Developing more expressive modeling formalisms to describe these families of models.

Summary updated

BibTeX
@misc{ceska2019model,
  author = {Milan Ceska and Christian Dehnert and Nils Jansen and Sebastian Junges and Joost-Pieter Katoen},
  title = {{Model Repair Revamped: On the Automated Synthesis of Markov Chains}},
  year = {2019},
  eprint = {2105.13411},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.13411},
}
Figure