Inductive Synthesis for Probabilistic Programs Reaches New Horizons

Roman Andriushchenko, Milan Ceska, Sebastian Junges, Joost-Pieter KatoenarXiv 2021

TL;DR

This paper introduces a hybrid synthesis framework that combines inductive reasoning (counterexamples) with deductive reasoning (abstractions) to automatically generate probabilistic programs from sketches. By adaptively switching between these two strategies and using a novel "family-aware" counterexample construction, the authors achieved massive speedups—reducing the synthesis time for complex decentralized controllers from over 24 hours to just a few minutes.

What Problem Does This Paper Address?

Designing controllers for complex stochastic systems—like decentralized robots or power management systems—is notoriously difficult. While Markov Decision Processes (MDPs) offer a solid mathematical foundation, real-world constraints like partial observability or decentralized decision-making often lead to models (like DEC-POMDPs) where the synthesis problem is undecidable or computationally overwhelming.

A promising alternative is probabilistic program sketching. Instead of building a controller from scratch, a developer provides a "sketch"—a program with "holes" representing unknown choices or parameters. The goal is to find an assignment for these holes such that the resulting program satisfies a specific requirement, such as "the probability of a system crash is less than 0.01." However, the search space for these assignments grows exponentially with the number of holes, making exhaustive search impossible for large systems.

Methods

The authors propose a Hybrid Dual-Oracle Synthesis loop that integrates two distinct reasoning styles:

  1. Inductive Reasoning (CEGIS): This follows the Counterexample-Guided Inductive Synthesis (CEGIS) pattern. A "Learner" proposes a candidate program, and a "CE-Oracle" checks it. If the candidate fails, the oracle identifies a conflict—a set of parameter assignments responsible for the failure—allowing the learner to prune an entire subfamily of failing programs at once.
  2. Innovation: The authors developed a greedy state expansion strategy to find small conflicts quickly. Unlike previous methods that sought "optimal" counterexamples (an NP-hard task), this greedy approach is orders of magnitude faster while still providing effective pruning.
  3. Deductive Reasoning (Abstraction-Refinement): This uses an "Abstr-Oracle" to analyze the entire family of programs simultaneously by creating a high-level MDP abstraction. This provides upper and lower bounds on the behavior of all possible programs in the family.
  4. The Hybrid Loop: The core contribution is an adaptive strategy that monitors the efficiency of both oracles. If one method is pruning the search space faster than the other, the system dynamically allocates it more time. Crucially, the inductive oracle uses the bounds generated by the deductive oracle to create "CEs-modulo-family," which are more powerful than standard counterexamples because they leverage the semantics of the entire program family.

![Fig.

  1. Oracle-guided synthesis](/figures/art_7753adaaaff344d68ee999c4fdf0aa25)

Datasets

The researchers evaluated their method on several established benchmarks in the field of formal verification:

  • Grid & Maze: Navigation problems with probabilistic transitions.
  • DPM: A Dynamic Power Management model.
  • Pole: A balancing task.
  • Herman’s Protocol: A classic randomized self-stabilization algorithm for networks.
  • Herman*: A new, significantly larger variant of the Herman protocol introduced by the authors to test scalability, featuring a design space of 3.1 million candidate programs.

Key Insights and Ideas

  • Conflict Size > Counterexample Size: A common misconception is that a smaller counterexample (fewer states) is always better. The authors demonstrate that what actually matters for pruning is the number of parameterized transitions (holes) involved. A larger counterexample that involves fewer holes is often more useful for pruning the search space.
  • Context Matters: Traditional counterexamples are "context-free"—they prove a single program fails. By using MDP abstractions, the authors create counterexamples that are aware of the program family's bounds, allowing them to reject subfamilies even when the specific candidate hasn't been fully explored.
  • Adaptivity is Essential: Different benchmarks favor different strategies. "Good-for-CEGIS" benchmarks (like Grid) benefit from fast counterexamples, while "Good-for-AR" benchmarks (like DPM) benefit from tight abstraction bounds. The hybrid approach ensures high performance across the board without manual tuning.

![Fig.

  1. Counterexamples for smaller conflicts.](/figures/art_3cf1bff4847f4f548b3dbce50bb6744c)

Key Results

The hybrid method consistently outperformed state-of-the-art baselines (pure Abstraction-Refinement or pure CEGIS) across all tests:

  • Speedups: The method was up to an order of magnitude faster on standard benchmarks.
  • Scalability: On the challenging Herman* model (3.1M candidates), existing methods were effectively useless, taking over 27 hours to solve. The hybrid method solved the same problem in 13.4 minutes.
  • Optimality: The framework was successfully extended to find optimal programs (e.g., the fastest possible stabilization time) rather than just finding any program that meets a threshold, with only minor performance overhead.

Limitations and Future Work

While the greedy expansion strategy for counterexamples is fast, it does not guarantee the smallest possible conflict, which might leave some pruning potential on the table. The authors suggest that future work could involve investigating counterexamples directly on the quotient MDPs used in the abstraction phase to further tighten the integration between inductive and deductive reasoning. They also aim to improve the abstraction refinement strategies to handle even more complex program topologies.

Summary updated

BibTeX
@misc{andriushchenko2021inductive,
  author = {Roman Andriushchenko and Milan Ceska and Sebastian Junges and Joost-Pieter Katoen},
  title = {{Inductive Synthesis for Probabilistic Programs Reaches New Horizons}},
  year = {2021},
  eprint = {2101.12683},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.12683},
}
Figure