Scenario-Based Verification of Uncertain MDPs

We consider Markov decision processes (MDPs) in which the transition probabilities and rewards belong to an uncertainty set parametrized by a collection of random variables. The probability distributions for these random parameters are unknown. The problem is to compute the probability to satisfy a temporal logic specification within any MDP that corresponds to a sample from these unknown distributions. In general, this problem is undecidable, and we resort to techniques from so-called scenario optimization. Based on a finite number of samples of the uncertain parameters, each of which induces an MDP, the proposed method estimates the probability of satisfying the specification by solving a finite-dimensional convex optimization problem. The number of samples required to obtain a high confidence on this estimate is independent from the number of states and the number of random parameters. Experiments on a large set of benchmarks show that a few thousand samples suffice to obtain high-quality confidence bounds with a high probability.


Introduction
MDPs.Markov decision processes (MDPs) model sequential decision-making problems in stochastic dynamic environments [51].They are widely used in areas like planning [52], reinforcement learning [53], formal verification [48], and robotics [24].Mature model checking tools like PRISM [21] and Storm [35] employ efficient algorithms to verify the correctness of MDPs against temporal logic specifications [2] provided all transition probabilities and cost functions are exactly known.In many applications, however, this assumption may be unrealistic, as certain system parameters are typically not exactly known and under control by external sources.Uncertain MDPs.A common approach to deal with unknown system parameters is to let transition probabilities and cost functions of an MDP belong to uncertainty sets, resulting in so-called uncertain MDPs [25,14,28], which generalize interval MDPs [20,27,7].However, solution approaches, e.g., in [25,14,28], usually rely on the potentially limiting assumption that the uncertainty sets at different states of the MDP are independent from each other.
Consider a simple motion planning scenario where an unmanned aerial vehicle (UAV) is tasked to transport a certain payload to a target location.The problem is to compute a policy for the UAV to successfully deliver the payload while taking into account the weather conditions.External factors like wind strength or direction may affect the movement of the UAV.The assumption that such weather conditions are independent between the different possible states of UAV is unrealistic, and does not adequately model the scenario at hand.
For settings in which the uncertainties at different states depend on each other, an option is to account for all possible-albeit infinitely many-values in the uncertainty sets.The policy synthesis problem can be formulated as a socalled semi-infinite convex optimization problem, which includes finitely many variables but infinitely many constraints [28].This problem, however, is NPhard [28,18].Furthermore, it fails to exploit additional information that may be available as random variables over the uncertainty sets [36], and may be very conservative.For instance, weather-data in the form of probability distributions may provide additional information on potential changes during the mission.
In this paper, we study a setting in which the fact the uncertain parameters are random variables and the dependencies between them are accounted for explicitly.Furthermore, each random parameter follows an unknown probability distribution from which we can sample the parameter values.
Problem statement.Compute the probability with which there exists a policy such that a reachability or an expected-cost specification is satisfied for any randomly drawn parameter value.
We call this probability the satisfaction probability.The intuition is that the question of whether all (or some) parameter values satisfy a specification-as is often done in parameter synthesis [46]-is replaced by the question of how much we expect the (sampled) model to satisfy a specification.For example, a satisfaction probability of 80% tells that, if we randomly sample the parameters, with a probability of 80% there exists a policy for the resulting MDP that satisfies the specification.Computing the satisfaction probability is in general undecidable, even for known probability distributions over the parameter values [37].
Scenario-based verification.Therefore, we resort to sampling-based algorithms that yield a confidence (probability) on the bounds of the satisfaction probability.Referring back to the UAV example, we want to compute a confidence probability in the probability that there exists a policy for the UAV to successfully finish the mission.As a first step, we take the aforementioned semi-infinite optimization problem that accounts for all possible parameter values as a basis.Each concrete parameter value is referred to as a scenario in the convex optimization literature [15].For specific problems where a distribution over individual scenarios is present, a technique called scenario-based optimization provides guarantees on the satisfaction probability via efficient sampling techniques [15,16].The basic idea is to consider a finite set of samples from the distribution over the scenarios and restrict the semi-infinite problem to these samples.The resulting convex optimization problem with finitely many constraints can be solved efficiently [50].
For our setting, we first sample a finite number of parameter instantiations each of which induces a concrete MDP.We can solve the synthesis problem for this MDP efficiently using, e.g., a probabilistic model checker.Based on the results, we compute a satisfaction probability and an estimate of its potential error.For example, a 90% estimate in a satisfaction probability of 80%, means that the error is at most 10%.We show that the error in the estimate diminishes to zero exponentially rapidly with increasing number of samples.Moreover, we show that the number of required samples does neither depend on the size of the state space nor the number of random parameters.We validate the theoretical results using several MDPs that have different sizes of state and parameter spaces and demonstrate experimentally that the required number of samples is indeed not sensitive to the dimension of the state and parameter space.In addition, we show the effectiveness of our method with a new dedicated case study based on the aforementioned UAV example which incorporates 2 500 random parameters.

Related work.
The so-called parameter synthesis problem is concerned with computing parameter values such that there exists a policy in the induced nonparametric MDP that satisfies the specifications.Most of the work in parameter synthesis focus on finding one parameter value that satisfies the specification.The approaches involve computing a rational function of the reachability probabilities [11,17,41], utilizing convex optimization [34,40], and sampling-based methods [26,29].The problem of whether there exists a value in the parameter space that satisfies a reachability specification is ETR-complete4 [47], and finding a satisfying parameter value is exponential in the number of parameters.
The work in [45] considers the analysis of Markov models in the presence of uncertain rewards, utilizing statistical methods to reason about the probability of a parametric MDP satisfying an expected cost specification.This approach is restricted to reward parameters and does not explicitly compute confidence bounds.[43] computes bounds on the long-run probability of satisfying a specification with probabilistic uncertainty for Markov chains.Other related techniques include multi-objective model checking to maximize the average performance with probabilistic uncertainty sets [36], sampling-based methods which minimize the regret with uncertainty sets [33], and Bayesian reasoning to compute parameter values that satisfy a metric temporal logic specification on a continuous-time Markov chain [38].[37] considers a variant of the problem in this paper where the probability distribution of the uncertainty sets is assumed to be known.The paper formulates the policy synthesis problem as an (undecidable [30]) partially observable Markov decision process (POMDP) synthesis problem and use offthe-shelf point-based POMDP methods [10,6].The work in [27,25] consider the verification of MDPs with convex uncertainties.However, the uncertainty sets for different states in an MDP are restricted to be independent, which does not hold in our problem setting where we have parameter dependencies.
Uncertainties in MDPs have received quite some attention in the artificial intelligence and planning literatures.Interval MDPs [27,7] use probability intervals in the transition probabilities.Dynamic programming, robust value iteration and robust policy iteration have been developed for MDPs with uncertain transition probabilities whose parameters are statistically independent, also referred to as rectangular, to find a policy ensuring the highest expected total reward at a given confidence level [14,25].The work in [28] relaxes this independence assumption a bit and determines a policy that satisfies a given performance with a pre-defined confidence provided an observation history of the MDP is given by using conic programming.State-of-the art exact methods can handle models of up to a few hundred of states [42].Multi-model MDPs [44] treat distributions over probability and cost parameters and aim at finding a single policy maximizing a weighted value function.For deterministic policies this problem is NP-hard, and it is PSPACE-hard for history-dependent policies.

Preliminaries
A probability distribution over a finite set X is a function µ : The set of all distributions on X is denoted by Distr (X).Let V = {x 1 , . . ., x n } be a finite set of parameters over R n .The set of polynomials over V is denoted by Q[V ].We denote the cardinality of a set U by |U|.

Parametric Models Definition 1 (pMDP).
A parametric Markov decision process (pMDP) M is a tuple M = (S, Act, s I , V, P) with a finite set S of states, a finite set Act of actions, an initial state s I ∈ S, a finite set V of real-valued variables (parameters) and a transition function For s ∈ S, ActS (s) = {α ∈ Act | ∃s ′ ∈ S, P(s, α, s ′ ) ̸ = 0} is the set of enabled actions at s. Without loss of generality, we require ActS (s) ̸ = ∅ for s ∈ S. If |ActS (s)| = 1 for all s ∈ S, M is a parametric discrete-time Markov chain (pMC).We denote the transition function for pMCs by P(s, s ′ ).
A pMDP M is a Markov decision process (MDP) if the transition function yields well-defined probability distributions, i.e., P : S × Act × S → [0, 1] and ∑ s ′ ∈S P(s, α, s ′ ) = 1 for all s ∈ S and α ∈ ActS (s).We denote the parameter space of M by V M .Applying an An instantiation u is well-defined for M if the resulting model M[u] is an MDP.We assume that all parameter instantiations in V M yield well-defined MDPs.We call u graph-preserving if for all s, s ′ ∈ S and α ∈ Act it holds that P(s, α, s We denote the set of cost parameters as W. To define measures on MDPs, nondeterministic choices are resolved by a so-called policy σ : S → Act with σ(s) ∈ ActS (s).The set of all policies over M is Str M .For the specifications that we consider in this paper, memoryless deterministic policies are sufficient [48].Applying a policy to an MDP yields an induced Markov chain where all nondeterminism is resolved.
For an MC D, the reachability specification φ r = P ≤λ (♢T ) asserts that a set T ⊆ S of target states is reached with probability at most λ ∈ [0, 1] 5 .If φ r holds for D, we write D |= φ r .Model checking for the more general PCTL [4] or ωregular specifications is often reducible to checking reachability specifications [48].For an MDP M, φ r holds if for all σ ∈ Str M such that the induced MC D by the policy σ reaches the set T with a probability of at most λ.For an expected cost specification φ c = EC ≤κ (♢G), it holds that D |= φ c if and only if the expected cost of reaching a set G ⊆ S is at most κ ∈ R. The expected cost of reaching G is well-defined if and only if P(♢T ) = 1 for all policies in an MDP.

Uncertain MDPs
We now introduce the setting that we study in this paper.Specifically, we use parameters to define the uncertainty in the transition probabilities and cost functions of an MDP.Each random parameter follows an unknown probability distribution from which we can sample the parameter values.

Definition 2 (uMDP). An uncertain Markov decision process M P (uMDP)
is a tuple M P = (M, P) where M is a pMDP, and P is a probability distribution over the parameter space V M .If M is a pMC, then we call M P a uMC.
Intuitively, a uMDP is a pMDP with an associated distribution over possible (graph-preserving) parameter instantiations.That is, a realization of P yields a concrete MDP M[u] with the respective instantiation u ∈ V M (and P(u) > 0).

Remark 1.
In a uMDP, we distinguish controllable and uncontrollable parameters.The uncontrollable parameters follow the probability distribution P. In contrast, we can actively instantiate the controllable parameters.In the following, we specifically allow cost parameters to be controllable.

Definition 3 (Satisfaction Probability).
Let M P = (M, P) be a uMDP and φ a specification.The (weighted) satisfaction probability of φ is 5 The theory also applies to lower bounded properties.with u ∈ V M and I φ : Note that I φ is measurable, as V M is the finite union of semi-algebraic sets [49].Moreover, we have that Example 1.Consider the uMC in the left figure of Fig. 1 with the uncontrollable parameter set V = {v}, initial state s 0 , target set T = {s 3 } and an uniform distribution for the parameter v over the interval [0, 1].We plot the probability of satisfying the specification φ r = P ≤λ (♢T ) as a function of v in the right figure of Fig. 1.We also show the satisfying region and its complementary as green and red regions.The satisfying region is given by the union of the intervals [0.13, 0.525] and [0.89, 1.0], and the satisfaction probability F (M P , φ r ) is 0.395+0.11= 0.505.

Problem Statement
In this section, we state the problem that we study in this paper.We seek to compute the satisfaction probability of the parameter space for a reachability or an expected cost specification φ on a uMDP.Intuitively, we seek the probability that a randomly sampled instantiation from the parameter space induces an MDP which satisfies φ.Formally: Given a uMDP M P = (M, P), and a specification φ, compute the satisfaction probability F (M P , φ).However, as mentioned, the problem is in general undecidable [37].Therefore, we consider an approximation of computing the satisfaction probability: Problem 1.Given a uMDP M P = (M, P), a reachability specification φ r = P ≤λ (♢T ), and a tolerance probability ν, compute a confidence probability α ν such that F (M P , φ r ) ≥ 1 − ν holds with a probability of at least 1 − α ν .
We illustrate the problem statement with the following example.
Example 2. For the UAV motion planning example, consider the question "What is the probability on a given day such that there exists a policy for the UAV to successfully finish the mission."A possible result is, e.g., 0.78 (confidence probability: 0.99) and 0.81 (confidence probability: 0.95).Then, with a confidence probability of 0.99, the actual satisfaction probability is indeed greater than 0.78, and with a (slightly lower) confidence probability of 0.95 it is greater than 0.81.Such a result shows that it is quite likely that the UAV will finish the mission successfully with a probability that is at least 81%.
Similar to Problem 1, we also consider expected cost specifications.
Problem 2. Given a uMDP M P = (M, P), and an expected cost specification φ c = EC ≤κ (♢G), a tolerance probability ν, and a confidence probability α ν determine if there exists an instantiation to the cost parameters such that F (M P , φ c ) ≥ 1 − ν holds with a probability of at least 1 − α ν .
Remark 2. The main difference between Problem 1 and Problem 2 is that we consider controllable cost parameters.We seek to compute an instantiation to these parameters such that the satisfaction probability is greater than 1 − ν with high confidence.

Scenario-Based Verification
In this section, we present our approach to solving Problem 1 and 2, that is, to approximate the satisfaction probability with respect to a specification.We first consider the robust policy synthesis problem that accounts for all possible values in the uncertainty set, potentially leading to a very pessimistic result.This problem can be formulated as a semi-infinite convex optimization problem, which is NP-hard [28].Here, we exploit the structure of this problem, which includes finitely many variables but infinitely many constraints.Our approach is based on scenario optimization [15,16]: We sample a finite number of parameter values and restrict the semi-infinite problem to these samples.The resulting finite-dimensional convex optimization problem can be solved efficiently [50].Based on the solution of the optimization problem, we compute high confidence in the estimate of the satisfaction probability.The estimate also generalizes to the samples from the probability distribution that are not in the sample set.Remark 3.For ease of presentation, we focus on uncertain Markov chains (uMCs).Our results and methods generalize to uncertain MDPs (uMDPs).
We first develop the main results for the simple setting where all sampled instantiated MCs from the parameter space V D satisfy the reachability specification φ r .This assumption does not imply that all instantiated MCs satisfy φ r : The sample set does not contain an MC that violates φ r even though there exists such an MC in the parameter space.In Section 4.2, we drop this assumption and allow sampled points in V D to violate φ r .This completes our treatment of Problem 1.In Section 4.3, we show how our results generalize to expected cost specifications φ c , to solve Problem 2.

Restriction to Satisfying Samples
In this section, we assume that all instantiated MCs satisfy φ r .We then generalize our method to any values of ν.We want to check if a uMC D satisfies a reachability specification φ r = P ≤λ (♢T ) for all instantiations in the sample set U. For each instantiation, we can formulate a linear program (LP) that is feasible if and only if φ r is satisfied [51].For a subset U ⊆ V D of the parameter space V D of the uMC D, we can then write the conjunction of these LPs.We assume that |U| is finite and sampled from the probability distribution P over the parameter space V D .
For each instantiation u ∈ U, we introduce a set of linear constraints that are parametrized by u6 .We use the following variables.For s ∈ S and u ∈ U, the variable p u s ∈ [0, 1] represents the probability of reaching the target set T ⊆ S from state s.The variable τ represents an upper bound on the probability of satisfying φ r for all instantiations in U. Note that τ is a variable in our formulation, whereas λ is the threshold of the reachability specification, and thus constant.The set ¬∃♢T represents the set of states which cannot reach the target set T .The probability of reaching T from these states is zero, and the set ¬∃♢T does not change for different graph-preserving instantiations [17].The set ¬∃♢T can be found in polynomial time in the size of a uMC by using standard graph-based search algorithms [48].We solve the following LP L r (U), which is parametrized by each instantiation u in U, minimize τ (1) The objective (1) minimizes the maximal probability that can be achieved by all MCs induced by U. The constraint (2) represents an upper bound on the reachability probability for all instantiations.We minimize the upper bound to compute the maximal probability of satisfying φ r for all instantiated MCs.The constraint (3) ensures that the probability of reaching T from the initial state s I is below the threshold λ.The constraint (4) sets the probability to reach a state in T from T to 1.The constraint (5) sets the reachability probabilities from the states in ¬∃♢T to zero.The constraint (6) computes the probability of satisfying the specification for each non-target state s ∈ S in the standard way.
There are infinitely many constraints in the semi-infinite LP L r (V D ) as the cardinality of (V D ) is infinite and L r (V D ) has infinitely many constraints in the form of ( 2)-( 6).Our approach is based on scenario optimization [13,15,16], where we instantiate the parameters u ∈ V D by sampling the probability distribution P.Then, for a given violation probability ν ∈ (0, 1), we compute a solution that violates the constraints in the LP L r (V D ) with a probability that is not larger than ν.We first give some properties of the LP L r (U).

Theorem 1. Let uMC D and the sample sets
Assume for all u ∈ U, D[u] |= φ r .For a given tolerance probability ν ∈ [0, 1), let the associated confidence probability Then, with a probability of at least 1 − α ν , we have Proof.The key idea of the proof is to relate the finite LP L r (U) induced by a sampled set U to the semi-infinite LP L r (V D ).Then, we use the results given in [16, Theorem 1] to obtain the lower bound 1−α ν .Let the convex set C D P U (λ, τ ) be generated by the set U according to the probability distribution P over V D as The convex set C D P U (λ, τ ) constitutes the set of feasible instantiations to the LP L r (U) and is exactly in the form of Equation 5 in [16].Using where the last constraint denotes that for a given (λ, τ ), the feasible set of C D P U (λ, τ ) is not empty, i.e., there exists a feasible solution pair (λ, τ ) to the scenario problem L r (U).This convex program asserts that all MCs in U should induce a reachability probability that is less than τ , satisfying the specification φ r .Moreover, the convex program constitutes a scenario approximation to the so-called chance-constrained problem [1].Such an optimization problem states that the probability of satisfying a (chance) constraint is above a certain threshold: The chance constraint in (10) ensures that the probability that an instantiationobtained via distribution P-satisfies the specification φ r is at least 1 − ν.Theorem 1 in [16] shows that any feasible solution to the problem in ( 9) is feasible to the problem in (10) with a confidence probability of 1 − α ν , which shows that the violation probability of the solution is at most ν.In our case, the probability of violation is exactly the probability that the instantiated MCs do not satisfy the specification φ r .Thus, the claim follows.
Remark 4 (Independence to model size).The confidence probability in Theorem 1 is in fact independent from the number of states, transitions, or random parameters of the uMC.From a practical perspective, the number of samples that are needed for a certain confidence does not depend on the model size.
Finally, Theorem 1 asserts that with a probability of at least 1 − α ν , the next sampled point from V D will satisfy the specification with a probability of at least 1 − ν.Note that α ν is the tail probability of a binomial distribution.It converges exponentially rapidly to 0 in |U| [16].

Satisfaction Probability by Treating Violating Samples
Theorem 1 assumes that all sampled points, that is, the induced MCs, satisfy the specification φ r .This is a severe assumption in general.To lift this assumption, we consider the discarding approach from [19].Specifically, after sampling a set of instantiations U from V D according to the probability distribution P, we remove the constraints for the MCs that violate the specification φ r from the LP.We construct the set R = U \Q, where Q denotes the set of samples that induce MCs violating the specification φ r .Therefore, the set R denotes the set of sampled MCs that satisfy the specification φ r .We then solve the LP L r (R) minimize τ subject to ∀u ∈ R, (2) − (6), (11) where for u ∈ R and s ∈ S, p u s gives the probability of satisfying the reachability specification of the instantiated MC D[u] at state s.The other constraints in the optimization problem in LP L r (R) are identical to the LP L r (U).We give the main result of this section.
Theorem 2. Let uMC D and the sample sets U, Q ⊆ V D , with K = |U| ≥ 2 and L = |Q|.For a given tolerance probability ν ∈ [0, 1), the associated confidence probability is Then, with a probability of at least 1 − α ν , we have Proof.Similar to the proof of Theorem 1, the main idea is to relate the LP L r (R) to the chance-constrained convex problem in (10).Then, we invoke the results from [19,Theorem 1] to get the desired result.Let the convex set C D P R (λ, τ ), which is generated by the samples in R, be defined by The set C D P R (λ, τ ) is in the form of the Definition 2.1 in [16].We reformulate the LP L r (R) as the convex program minimize τ subject to (λ, τ ) ∈ C D P R (λ, τ ). ( where the last constraint denotes that the instantiated MCs from the parameter values of the set R should induce a reachability probability less than τ , and thus, satisfy the specification φ r .The problem in ( 14) is a scenario approximation to the problem in (10).Theorem 2.1 in [19] asserts that with a probability of α ν , the violation probability of the solution is at most ν, which is the probability of violating the specification for the next sample.Similar to Theorem 1, the violation probability ν is the probability that an instantiated MC does not satisfy the specification φ r .Thus, the claim follows.

Expected Cost Specifications
So far, we have focused on parameters that were uncontrollable, and assumed to be random.Now, we consider the case where the cost function c is parametric and the cost parameters are controllable.Therefore, the parameters in the cost function are now variables that we can optimize over to satisfy an expected cost specification φ c = EC ≤κ (♢G) for the instantiated MCs.Similar to the previous sections, we assume that we sample a set of instantiations U c from the probability distribution P over the parameter space V D .In this case, we modify the LP L r (U) to obtain the following LP, which we denote by L c (U c ), where for s ∈ S, c(s) ∈ R Then, with a probability of at least 1 − α ν , we have Proof.Following the proof of Theorem 1, we define the convex set The main difference compared to the proof of Theorem 1 is that we have cost parameters in c as the decision variables and we consider an expected cost specification instead of a reachability specification.Similarly to the proof of Theorem 1, we reformulate the LP L c (U c ) as the following convex problem This convex problem is a scenario approximation to the chance constrained problem given by Therefore, similar to the Theorem 1, we obtain the desired claim.
We now consider the case that we compute an instantiation of the cost variables, and some of the instantiated MCs satisfy the expected cost specification.We construct the set R c = U c \ Q c , where Q c denotes the set of samples that induce MCs which violate the specification φ c .For this case, we obtain: For a given tolerance probability ν ∈ [0, 1), let the associated confidence probability Then, with a probability of at least 1 − α ν , we have Proof.The proof is similar to the proofs of Theorem 2 and 3, and omitted.

Building Scenario-Based Algorithms
The question remains how we leverage the theoretical results to compute an estimate on the satisfaction probability to solve Problems 1 and 2. For instance, let ν be a violation probability and U the sample set.Then, we can use Theorem 2 or 4 to compute the confidence probability α ν by using the discarding approach from [19].Similarly, for a the sample set U and a threshold on the confidence probability α ν we do a bisection on ν.Specifically, we repeatedly apply Theorem 2 or 4 for different values of ν ∈ (0, 1), to see if the corresponding confidence probability α ν is below the threshold.We then approximate the lower and upper bounds on ν.
The correctness of the approach is based on scenario-based optimization.However, it also applies to an obtained solution by any procedure [39].For instance, for any obtained value for the controlled parameters, we can construct a scenario program by sampling from random parameters.We can then apply Theorem 2 or 4 to compute the confidence probability α ν or the violation probability ν.
Generalization to uMDPs.Recall that we want to compute the satisfaction probability for a uMDP.The probability that for any sampled MDP we are able to synthesize a policy that satisfies the specification φ r .To generalize our results to uMDPs, we can modify the constraint (6) in the LP L r (U) as asserting that, for each non-target state s ∈ S and action α ∈ ActS (s), the probability induced by the minimizing policy is an upper bound to the probability variables p u s .The reachability specification φ r is satisfied if and only if the reachability probability at the initial state induced by the minimizing policy is less than λ.We can assert if φ r is satisfied by combining the constraints (20) with the constraints (2)- (5).Then, our theoretical results apply to the uMDPs.

Numerical Examples
We implemented the approach from Section 4 using the model checker Storm [35] to construct and analyze samples of MDPs.To solve the scenario optimization problems with cost parameters, we used the SCS solver [31].All computations ran on a computer with 8 2.2 GHz cores, and 32 GB of RAM.
We report on a set of well-known benchmarks used in parameter synthesis [46] that are, for instance, available on the website of the tools PARAM [17] or part of the PRISM benchmark suite [23].Moreover, we created a dedicated case study that is based on the aforementioned UAV example.

Parameter Synthesis Benchmarks
Setup.In our first set of benchmarks, we adopt parametric MDPs and MCs from [32].Essentially, the technique from that paper allows to approximate the percentage of instantiations that satisfy (or do not satisfy) a specification.We assume a uniform distribution over the parameter space and set ν equal to the percentage of instantiations that do not satisfy the specification (and vice versa for 1 − ν).We solve Problem 1 and show that the satisfaction probability is with confidence α ν as least as high as the approximate satisfaction percentages from [32].We adapt the Consensus protocol [3] and the Bounded Retransmission Protocol (brp) [5] to uMDPs; the Crowds Protocol (crowds) [12] and the NAND Multiplexing benchmark (nand) [8] become uMCs.In Table 1 we list the type of specification checked (φ) and the number of parameters, states, and transitions.We also list the satisfaction probability (as obtained in [32]) for satisfying (sat) and falsifying (unsat) the specification φ.
Results.Table 2 shows the confidence probability α ν for each benchmark to satisfy and falsify the specification after 100, 1 000 and 10 000 samples from the parameter space.In particular, for each number of samples, we report the average α ν after running 10 full iterations of the same benchmark.Furthermore, we list the time to solve 1 000 samples for each instance (Time (s)).
The results in Table 2 show that for some benchmarks we get a high confidence probability already after 1 000 samples.For other benchmarks, the confidence probability is still considerably low, for instance considering nand and falsifying the specification.After 10 000 samples, we get a very high confidence in the satisfaction probability for all benchmarks.These results demonstrate that we can efficiently compute a high confidence in the satisfaction probability.In particular, for the same number of samples, the obtained confidence probabilities are consistent for varying number of states and parameters of the underlying models.Therefore, no dependence on the size of models is shown (see Remark 4).

UAV Motion Planning
In our second benchmark, we consider the previously mentioned UAV motion planning example to model a realistic problem with a high number of random parameters.We model the problem as a uMDP, where the parameters represent how the weather conditions affect the movement of the UAV, and how the weather may change.In particular, different wind conditions induce specific satisfaction probabilities.We assume that the planning area is a certain valley where we have historic weather data which provide distributions over parameter values.The mission of the UAV is to transport a payload to a specific location and return safely to its initial position.The problem is to compute the satisfaction probability, that is, the probability that for any sampled MDP for this scenario we are able to synthesize a UAV policy that satisfies the specification.
We model the problem as follows: States encode the position of the UAV, the current weather situation, and the general wind direction in the valley.Parameters describe how the weather affects the position of the UAV for different zones in the valley, and how the weather/wind may change during the day.Fig. 2 shows an example environment with zones to avoid (red) and a target zone (green).We define four different weather conditions that each induce certain probability distributions over the eight different wind directions.The parameters of the model determine the probabilities of transitioning between different weather and wind conditions at each time step.The specification is to reach the target zone safely with a probability of at least 0.9.The number of states in our example is 266 880, and the number of parameters is 2 500.
For the distributions over parameter values, that is, over weather conditions, we consider the following cases.First, we assume a uniform distribution over the different weather conditions in each zone.Second, the probability for a weather condition inducing a wind direction that pushes the UAV into the positive ydirection is five times more likely than others.Similarly, in the third case, it is five times more likely to push the UAV into the negative x-direction.We depict some example trajectories of the UAV for three different conditions in Fig. 2. The trajectory given by the blue dashed line represents the expected trajectory for the first case, taking a direct route to reach the target area.Similarly, the trajectories given by the black dotted and solid green lines represent the expected trajectories for the second and third cases.For the second case, we observe that the UAV tries to avoid to get closer to the obstacles in x direction as the wind may push the UAV to the obstacles.For the third case, the UAV avoids the obstacle at the bottom and then reaches the target area.
We sample 1 000 parameters for each case and approximate the maximal satisfaction probability with a confidence probability of at least 1 − α ν , with α ν = 10 −6 .The highest satisfaction probability is given by the first weather condition with 0.86, and the other conditions have a satisfaction probability of 0.78 and 0.75, showing that it may be harder to navigate around the obstacles with non-uniform probability distributions.The average time to compute the satisfaction probabilities is 1 341 seconds.
Finally, we introduce costs to a 2-dimensional example, where hitting an obstacle causes (1) a cost of 100 and (2) the UAV to return to the initial position.Specifically, we introduce cost parameters for transitions that steer the UAV towards x or y-directions.We minimize the maximal possible expected cost (under all parameter values) to reach the target location.The specification asserts that the resulting expected cost should be less than 20.
We uniformly sample 1 000 parameter values for weather conditions and note that the UAV policies favor on average transitioning to y-direction more compared to the x-direction to minimize the cost while ensuring that the probability of hitting an obstacle is minimized.The average expected cost of the induced MDPs is 7.41 and the satisfaction probability is 0.71.The solving time for this example is 2 274 seconds.

Conclusion
We presented a new sampling-based approach to uncertain Markov models.Theoretically, we showed how to effectively and efficiently approximate the probability that any randomly drawn sample satisfies a temporal logic specification.Furthermore, we showed the computational tractability of our approaches by means of well-known benchmarks and a new, dedicated case study.
In the future, we plan to exploit our approaches for more involved models such as parametric extensions to continuous-time Markov chains [9] or Markov automata [22].Another line of future work will be a closer integration with a parameter synthesis framework.
Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/),which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.
The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material.If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

Fig. 1 .
Fig. 1.Left: A uMC with parameter v. Right: The probability of satisfying the reachability specification φr = P ≤λ (♢T ) versus the value of the parameter v. Intervals that satisfy φr are green, intervals that violate φr are red.

|W|≥0Theorem 3 .
is the cost function at state s, |W| is the number of the cost parameters, and for u ∈ U c , c k s gives the expected cost of reaching the target G of the instantiated MC D[k] at state s.Note that the cost parameters W are in the LP L c (U c ) as variables for the parametric cost function,.In the scenario problem (15), we optimize over c(s) and c k s to minimize the maximal induced cost of the instantiated MCs.If c is an affine function, then the optimization problem L c (U c ) is convex.In this case, the probabilistic properties of the scenario problem are given by the following theorem.Let uMC D and the sample set U c ⊆ V D with W = |W|, and K = |U c | ≥ W + 1. Assume for all u ∈ U c , D[k] |= φ c .For a given tolerance probability ν ∈ [0, 1), let the associated confidence probability

Fig. 2 .
Fig. 2.An example of a 3D UAV benchmark with obstacles and a target area.