1 Introduction
Bayesian networks.
Bayesian networks (BNs, for short) are one of the most prominent class of probabilistic graphical models [32]
in AI. They are used in very different domains, both for knowledge representation and reasoning. BNs represent conditional dependencies between random variables yielding – if these dependencies are sparse – compact representations of their joint probability distribution. Probabilistic inference is the prime evaluation metric on BNs. It amounts to compute conditional probabilities. It is computationally hard: PPcomplete
[12, 13]. A vast amount of inference algorithms exists, both exact ones (possibly tailored to specific graph structures such as bounded treewidth graphs), as well as advanced approximate and simulation algorithms. Stateoftheart symbolic exact inference use different forms of decision diagrams. In particular, sentential decision diagrams (SDDs for short [44]) and their probabilistic extension (PSDDs [30]) belong to the prevailing techniques.Probabilistic model checking.
Model checking of Markov chains and nondeterministic extensions thereof is a vibrant field of research since several decades. The central problem is computing reachability probabilities, i.e., what is the probability to reach a goal state from a given start state? Algorithms for computing conditional probabilities have been considered in [3]. Efficient modelchecking algorithms have been developed and tools such as PRISM [33] and storm [20] have been applied to case studies from several different application areas. Like ordinary model checking, the statespace explosion problem is a major practical obstacle. As for BNs, the use of decision diagrams has attracted a lot of attention since its first usages in probabilistic model checking [2, 19] and improvements are still being developed, see e.g., [31]. As demonstrated in the QComp 2019 competition, MTBDDbased model checking prevails on various benchmarks [24].
Topic of this paper.
The aim of this work is to investigate to what extent offtheshelf techniques from probabilistic model checking can be used for exact probabilistic inference in BNs. We are in particular interested to study the usage of MTBDDbased symbolic model checking for inference, and to empirically compare its performance to inference using stateoftheart decision diagrams in AI such as SDDs and their probabilistic extension. To that end, we define a simple mapping from (discrete) BNs into discretetime Markov chains (MCs) and relate Bayesian inference to computing reachability probabilities. We report on an experimental evaluation on BNs of the bnlearn repository varying in size from small to huge (BN categorization) using a prototypical implementation on top of the storm model checker. Our experiments show that inference using MTBDDbased model checking is quite sensitive to the evidence in the inference query, both in terms of size (i.e., the number of random variables) and depth (i.e., the ordering). For BNs of small to large size, MTBDDbased symbolic model checking is competitive to BNspecific symbolic techniques such as PSDDs whereas for very large and huge BNs, PSDD techniques prevail.
Contributions.
Our work aimed to reduce the gap between the area of probabilistic model checking and probabilistic inference. Its main contributions are:

A simple mapping from Bayesian networks to Markov chains

A prototypical tool chain to enable modelchecking based inference.

An experimental evaluation to compare offtheshelf MTBDDbased inference by model checking to tailored PSDD inference.
Related work.
There is a large body of related work on exploiting verification and/or symbolic data structures to inference. We here concentrate on the most relevant papers. Deininger et al. [21] is perhaps the closest related work. They apply PCTL model checking on factored representations of dynamic BNs and compare an MTBDDbased approach using partitioned representations of the transition probability matrix to monolithic representations. Their experiments show that quantitative model checking does not significantly benefit from partitioned representations. Langmead et al. [34, 35] employ probabilistic model checking algorithms to perform inference on Dynamic Bayesian Networks. They emphasize on broadening the queries, using temporal logic as the query language. Holtzen et al. [25] consider symbolic inference on discrete probabilistic programs. They generalize efficient inference techniques for BNs that exploit the BN structure to such programs. The key is to compile a program into a weighted Boolean formula, and to exploit BDDbased techniques to carry out weighted model counting on such formulas. The works by Darwiche et al. [14, 18, 15, 11] compile BNs into arithmetic circuits (via CNF) and perform inference by mainly differentiating these circuits in linear time in terms of the circuit sizes. This method is also applicable to relational BNs [10]. Minato et al. [36] propose an approach for exact inference by compiling BNs directly into multiple linear formulas using zerosuppressed BDDs. This differs from Darwiche’s approach as it does not require the intermediate compilation into CNF. Shih et al. [43] propose a symbolic approach to compile BNs into reduced ordered BDDs in order to verify them against monotonicity and robustness. Sanner and McAllester [40] propose an affine version of algebraic decision diagrams to compactly represent contextspecific, additive, and multiplicative structures. They proved that the time and memory footprint of these affine ADDs for inference can be linear in the number of variables in cases where ADDs are exponential. Batz et al. [4] use deductive verification to analyse BNs. They show that BNs correspond to a simple form of probabilistic programs amenable to obtaining closedform solutions for exact inference. They exploited this principle to determine the expected time to get one sample from the BN under rejection sampling. Approximate model checking has been applied to verify dynamic BNs against finitehorizon probabilistic linear temporal properties [37]. Finally, we mention the works [42, 23] that use exact symbolic inference methods, socalled PSI tools, on belief networks and probabilistic programs, basically through mapping program values to symbolic expressions.
Outline.
Section 2 introduces Bayesian networks and probabilistic inference. Section 3 briefly recapitulates Markov chain model checking. Section 4 presents the various symbolic data structures that are relevant to this work. Section 5 details how BNs are mapped onto Markov chains and how inference can be reduced to computing reachability probabilities. Section 6 reports on the experimental results, while Section 7 concludes the paper.
2 Bayesian Networks
A Bayesian network (BN for short) is a tuple where is a directed acyclic graph with finite set of vertices in which represents a random variable taking values from the finite domain and edge represents the dependency of on . We let . For each vertex with parents, the function is the conditional probability table of (the random variable corresponding to) vertex . here denotes the set of probability distribution functions on . Figure 1 indicates a small BN, in which all the variables are binary. The DAG indicates the dependencies between the variables. For example, the grade a student gets for an exam depends on whether the exam has been easy or difficult, and additionally on whether she has been prepared for the exam. See Figure 1.
The conditional probability table (CPT for short) of vertex defines a probability distribution which determines the evaluation of , given some evaluation of . For example, according to the CPT of Grade, the probability of a low grade is 0.95 for an easy exam and nonprepared student.
The semantics of BN is the joint probability function that it defines. Let be a downwardclosed set of vertices where has value . The unique joint probability function of BN equals:
(1) 
In this paper, we are interested in probabilistic inference. Let be a BN with set of vertices, be the evidence, and be the hypothesis. The evidence can be simply seen as what we already know and the hypothesis as what we are interested in, given the evidence. The problem of (exact) probabilistic inference is to determine the following conditional probability:
(2) 
In case , the query is considered illconditioned. In the student mood example, shown in Figure 1, let assume that we are interested to know how likely a student ends up with a bad mood after getting a bad grade for an easy exam, given that she is well prepared. This is defined as:
The decision variant of probabilistic inference can be defined for a given probability as follows:
Does ?
This problem is PPcomplete [16]. The average Markov blanket of a BN is an indication of the practical complexity of performing inference. The Markov blanket for a vertex in a BN is the set composed of the parents, the children, and the spouses of [16], where the spouses of are the nodes that have some common children with . It follows that , for any . The average Markov blanket of a BN, or AMB for short, then is the average size of the Markov blanket of all its vertices, that is, . AMB indicates the average degree of dependence between the random variables in the BN.
3 Markov Chain Model Checking
Since in this work we are focused on discrete time BNs, we are interested in discretetime Markov chains. DTMCs or simply MCs for short, are simple probabilistic models that equip each edge with a probability.
An MC is a tuple where is a countable nonempty set of states, is the initial state, and is the transition probability function.
In this work we are interested in computing reachability probabilities in an MC. The reachability probability for is defined as the probability of finally reaching , starting from the initial state . This is denoted by .
Computing can be reduced to computing the unique solution of a linear equation system [29] whose size is linear in . This can be done in a symbolic manner using MTBDDs [2].
4 Symbolic Data Structures
The need to represent Boolean functions and probability distributions in a succinct manner has led to various compact representations [7, 1, 22, 17, 30]. Symbolic model checking mainly relies on setbased and binary encoding of states and transitions enabling the use of compact representations such as BDDs and MTBDDs. In the following we briefly review the data structures related to this work: BDDs, MTBDDs, vtrees, SDDs and PSDDs. The first two are popular in symbolic model checking while the last three are stateoftheart in probabilistic inference.
4.1 Reduced Ordered Binary Decision Diagrams
ROBDDs or simply BDDs for short, are dominantlyused structures for representing switching functions. BDDs result from compacting binary decision trees mainly by eliminating
don’t care nodes and duplicated subtrees. Essential characteristic of ROBDDs is that they are canonical for a given function and a given variable ordering [7]. Optimal variable orderings can yield very succinct ROBDDs. Although finding the optimal variable ordering is NPhard [6], ROBDDs can be very compact in practice [9].Let be a (total) variable ordering for where . An is a tuple with the finite set of nodes, partitioned into inner nodes and terminal nodes . is the unique distinguished root node. are the successor functions assigning a zerosuccessor and a onesuccessor to each . The labelling functions and must satisfy the following equation for and :
(3) 
Every inner node in an OBDD represents a variable from . The terminal nodes are mapped to or . Based on the evaluation of either to or to , the transition from to the next node is chosen from .
The semantics of an is the switching function where is determined by the value of the resulting leaf obtained by traversing the OBDD starting from the root and branching according to the evaluation .
For terminal , represents the constant function with value . For , is defined based on the Shannon expansion over as , where . A is reduced if for every pair of nodes in , implies . An OBDD can be reduced by recursively applying simple reduction rules: the elimination of don’t care vertices, and the elimination of isomorphic subtrees.
4.2 MultiTerminal BDDs
While BDDs represent Boolean functions, the terminal values in MTBDDs can acquire values from other domains such as real or rational numbers. This allows rational or real functions to be succinctly represented, enabling representing probability distribution functions. The formal definition of MTBDD is not very different from the one for BDD. Let and be as before. An MTBDD is the same structure as an OBDD except that (in our setting) the value function is refined to assigning each terminal node a probability . The semantics of MTBDD is defined by similarly to for BDD .
4.3 Sentential Decision Diagrams
Sentential Decision Diagrams [17] represent propositional knowledge bases. They are inspired by two concepts: structured decomposability [38] which is based on vtrees, and the generalisation of Shannon decomposition which is strongly deterministic decomposition [39].
vtree.
A vtree [38] for a set of variables is a full (but not necessarily complete), rooted binary tree whose leaves represent the variables in . The node and the subtree rooted at the node are often called the same. Let indicate the set of variables stored in the leaves of the subtree rooted at the node . Let and be respectively indicate the left and right children of . A Boolean function in Decomposable Negation Normal Form (DNNF) is said to respect a vtree if for every conjunction in , there is a node in such that and .
Strongly deterministic decomposition.
Let be a Boolean function with disjoint sets of variables and . If can be written as , then is called an decomposition of in terms of Boolean functions and on and respectively. Provided that for , the decomposition is called strongly deterministic on . Here, each is called a prime and each a sub. Let be a strongly deterministic decomposition of function . is called an partition of iff its primes make a partition. This means each prime is consistent (i.e., can be true at some evaluation), every pair of distinct primes are mutually exclusive, and the disjunction of all primes is valid (true).
Sdd.
An SDD can be seen as a recursive strongly deterministic decomposition of a switching function according to a particular vtree, starting from the root node. The semantics of SDD is defined by the switching function with respect to the vtree . is an SDD respecting vtree iff (1) or , with the semantics and , (2) or and is a leaf with variable with the semantics and , (3) , is internal, are SDDs that respect subtrees of , and are SDDs that respect subtrees of , where makes a partition.
In this case, the semantics of SDD is given by .
An SDD is compressed iff all its subs are distinct ( for . Moreover, it is called trimmed if it does not contain any decomposition of the form or . These two properties characterise the canonicity of SDDs as follows. Two SDDs that are compressed and trimmed and respect the same vtree are semantically equivalent if and only if they are equal [17]. Thus, vtrees for SDDs resemble the role of variable ordering for BDDs. In the same manner, compression and trimming resemble reduction in BDDs.
Example 1
Figure 2 (right) indicates an SDD for the Student Mood example (see Figure 1). The underlying vtree is depicted in Figure 2 (left). The twoparts boxes in SDD visually indicate the primesub pairs. The circles indicate decision nodes. Decision node has outgoing edges and edge is connected to . The SDD respects the vtree in the sense that on each vtree node the leaves in the left subtree determine the primes and the leaves in the right subtree determine the subs. For instance, for node 3 in the vtree, determines the primes and and determine the subs. Since each decision node makes an partition, each variable evaluation holds on exactly one prime.
4.4 Probabilistic SDDs
PSDDs [30] are recent representations in the domain of reasoning and learning. Similarly to MTBDDs, which are BDDs to represent nonBoolean functions, SDDs are extended to PSDDs in order to particularly represent probability distributions. A single SDD can be parameterized in infinitely many ways, each yielding a probability distribution. This is similar to BNs in a sense that each DAG can be extended to infinitely many s, (i.e., conditional probability tables) where each specifies a probability distribution. PSDDs are complete in the sense that every distribution can be induced by a PSDD. PSDDs are canonical in the sense that for a given vtree, there is a unique trimmed and compressed PSDD. Interestingly, computing the probability of a term can be done in time linear in the PSDD size [30].
Syntax.
A PSDD parametrizes an SDD in the following manner: (1) Every decision node and every prime is equipped with a positive parameter such that and iff . The PSDD decision node is indicated by . (2) For each terminal node , a positive parameter is supplied such that . Syntactically, the terminal node with parameter is indicated by , where is the variable of the vtree leaf node that is normalized [17] for. Other terminal nodes (, , and ) have fixed predefined parameters.
Semantics.
Let be a PSDD node respecting a vtree node . Node represents the probability distribution over the variables of vtree defined by:

If is a terminal node and consists of variable , then

for , and

for , and

for , and

for , and .


If is a decision node and , the corresponding vtree node, has as left variables and as right variables, for that . Here, denotes the evaluation of ’s variables. The condition holds on exactly one of the primes, by definition of decomposition.
Example 2
Figure 3 (right) denotes the PSDD for the Student Mood example, with the same underlying vtree as in Example 1. The visual representation of PSDD extends SDD in two manners: (1) edge directing from the decision node to the pair is labeled with , (2) terminal node is replaced by , according to the PSDD syntax and semantics. The PSDD in Figure 3 (right) induces the same probability distribution function induced by the Student Mood BN. For instance, , by the PSDD semantics.
5 BN Analysis using Probabilistic Model Checking
In this section, we are going to explain our approach in detail. First, let us explain some notations. Let be a set of variables. Let denote the evaluation of ’s variables. We use to denote a don’t care value. We use to denote a probability distribution. Let be the Cartesian product over the sets .
The basic idea for the transformation is to map a Bayesian network onto the Markov chain such that the conditional reachability probabilities in correspond to the conditional probabilistic inference queries in . Colloquially stated:
(4) 
The definition of MC is as follows.
Definition 1
(The Markov chain of a BN). Let be a BN with and with elements . For a topological order on the DAG , let MC be the Markov chain of where:

is the set of states,

is the initial state, and

is the transition probability function defined by the following SOS rules:
(5) 
(6) 
(7) 
The states in MC are tuples of pairs in the form of where is a variable of BN and is the current value of . The symbol is used to denote the initial evaluation of a variable. The initial state is . The transition probability function specifies the probability of evolving between states. These transition probabilities correspond to the values in the conditional probability tables of ’s variables. The rule (5) defines the transitions from the initial state to its successors according to . Since is the first variable in the topological order, . If and , there is a transition with probability from the initial state to the state in which all the variables are except for which is mapped to . Let states in which all the variables have taken values from their domain constitute the final states, . According to the rule (7), the final states are equipped with a 1probability selfloop. The transitions from the states that are neither initial nor final are formalized in the rule (6). Let be the evaluation of all the variables in the set . Let . If , then from the state where all variables before based on the ordering are evaluated to values other than , the transition goes to the state where all the variable evaluations remain the same, except for that changes to . The transition can take place only provided that all the variables in are already evaluated at the state and their evaluation is consistent with the values in . This is ensured by the premise .
Example 3
Reconsider the BN Student Mood shown in the Figure 1. Figure 4 (left) indicates the MC resulting from the above definition. Here, the don’t care evaluations are omitted from the states and the states related to ”Mood” variable are ignored. The probabilities on evolving edges are based on their corresponding values in the conditional probability tables. For instance, for the left most path in the MC this is and . The last number is set, for example, according to the Grade’s CPT where the probability of equals , for and . The MTBDD corresponding to the probability distribution over the leaves of is shown in Figure 4 (right), again abstracting from don’t care values and ”Mood” variable. The nodes binary evaluations are coded as the right and left edges in an MTBDD. For example, the left most path indicates all the variables being evaluated to . The terminal nodes denote the joint probability, which in this case equals .
Proposition 1
(The size of MC ) Let be a BN with for each and be the number of states in the Markov chain . Then,
(8) 
In the special case where all random variables in have domain
Example 4
The number of states in Figure 4 (right) is .
We now consider the reachability probability as shown in the equation (4). By definition of conditional probabilities we have:
(9) 
To determine the righthand side we observe that given the tree structure of MC it holds:
Proposition 2
For Markov Chain of BN :
.
From this, it is concluded that inference in BN can be reduced to computing reachability probabilities in MC .
6 Experimental Results
Experimental setup.
We implemented a prototypical software tool for performing Bayesian inference as an extension of the probabilistic model checker Storm [20]. Our tool takes as input a BN in the Bayesian network Interchange Format [5] (BIF, for short). The BN is translated into a Markov chain as described in Definition 1. The MC is specified using the Jani [8] modelling language, a highlevel modelling language in the domain of probabilistic model checking. We evaluated our tool using various BN benchmarks from the Bayesian network repository bnlearn [41] that contains several BNs categorized in small, medium, large, very large, and huge networks. Table 1 indicates some statistics of the evaluated BNs from the repository. The first column denotes whether all the variables in the BN are binary. The other statistics are the number of vertices, the number of edges, the maximum indegree, the maximum domain size of variables, the average Markov blanket, and the number of parameters. The number of parameters is related to the total number of probabilities in all the conditional probability tables.
All our experiments were conducted on a GHz Intel Core i5 processor with 16 GB of RAM.
We focused our experimental validations on the following three questions:

What is the performance of MTBDDbased symbolic probabilistic model checking on Bayesian inference?

What is the effect of the number of observations and their depth in the topological ordering on the inference time in our approach?

How does inference using MTBDDs compares to PSDD techniques in terms of compilation time and inference time?
Binary  BN  #Vertices  #Edges  InDegreeMax  Dmax  AMB  #Parameters 
YES  cancer  5  4  2  2  2.00  10 
earthquake  5  4  2  2  2.00  10  
asia  8  8  2  2  2.5  18  
win95pts  76  112  7  2  5.92  574  
andes  223  338  6  2  5.61  1157  
NO  survey  6  6  2  3  2.67  21 
sachs  11  17  3  3  3.09  178  
child  20  25  2  6  3.00  230  
alarm  37  46  4  4  3.51  509  
insurance  27  52  3  5  5.19  984  
hepar2  70  123  6  4  4.51  1453  
hailfinder  56  66  4  11  3.54  2656  
water  32  66  5  4  7.69  10083  
pathfinder  135  200  5  63  3.81  72079 
Bayesian inference using MTBDDbased model checking.
In order to answer the first question, we have fed the Jani descriptions of the MCs into storm’s sparse engine, and storm’s bdd engine. The former fully builds a sparse matrix of the Markov chain of BN , while the latter generates an MTBDD representation from the Jani file. The variable ordering of the MTBDD is determined based on the topological order of the BN. Table 2 indicates the size of the resulting data structures and the compilation time. Here , for instance, denotes as the order of magnitude. The inference time on the sparse representation is prohibitive, even for mediumsized BNs, while inference using MTBDDs is mostly a matter of a few seconds or less. The large MC sizes are due to the exponential growth of the state space in the domain of the BN’s variables, see Proposition 1. The significant size reduction with MTBDDs is due to the symmetrical and repetitive structure of the . Those kind of symmetries and duplicated subtrees are merged in the MTBDD representation. The type of MTBDD shown in Figure 4 (right) represents a discrete probability distribution. However, the MTBDD generated by storm encodes the Markov chain, i.e. its terminal nodes carry the transition probabilities of the Markov chain. This makes sharing of the subgraphs much more likely.
Binary  BN  MC (#states)  MTBDD (#nodes)  Sparse Engine  Symbolic Engine 
YES  cancer  63  56  0.018s  0.007s 
earthquake  63  55  0.023s  0.006s  
asia  278  154  0.028s  0.011s  
win95pts  E19  446752  1.5h  11s  
andes  E67  339485  1.5h  180s  
NO  survey  238  70  0.031s  0.008 
sachs  265720  165  0.469s  0.072s  
child  E9  731  1.5h  0.277s  
alarm  E16  2361  1.5h  1s  
insurance  E11  102903  1.5h  2s  
hepar2  E42  7675  1.5h  17s  
hailfinder  E17  152201  1.5h  18s  
water  E9  64744  1.5h  20s  
pathfinder  E242  MO  1.5h   
The influence of observations.
In order to answer the second question, we have chosen different ways to pick the set of evidences. This is aimed to investigate how the number of evidence nodes and their depth in the topological order affect the verification time. For each BN, three different sets of observations are considered; the evidence nodes at the beginning in the topological order, a random selection, and the last nodes in the topological ordering. We also varied the number of evidence nodes. Figure 5 (in loglog scale) demonstrates the results for two large benchmarks, win95pts (left) and hepar2 (right). The xaxis denotes the number of evidence nodes and the yaxis denotes the model checking time in seconds. For the ”first” setting, where nodes are picked from the beginning of the topological order, the time for performing model checking is relatively small; less than 3.064s seconds in all the experiments for win95pts and less than 0.682 seconds in all the experiments for hepar2. The results follow a similar pattern in almost all the other BN benchmarks. The last nodes in the topological order are the highest dependent ones on the other nodes. That explains why model checking is significantly more timeconsuming in the ”last” setting. The verification time becomes negligible if the number of evidences is large. That is mostly because then the final result of the inference tends more likely to become zero when the number of evidence nodes are high. In this case there are many restrictions to be satisfied, and the zero probability can be computed very fast.
BN  #Evidence  MTBDD 




Compilation 
Inference 
Compilation 
Inference 
Compilation 
Inference 
Compilation 
Inference 

cancer  1  0.022s  0.001s  0.016s  0.002s  0.016s  0.003s  0.005s  0.003s  
2  0.001s  0.003s  0.003s  0.003s  
3  0.001s  0.003s  0.003s  0.003s  
4  0.001s  0.003s  0.002s  0.003s  
5  0.001s  0.003s  0.003s  0.003s  
earth quake  1  0.006s  0.001s  0.015s  0.003s  0.016s  0.003s  0.004s  0.003s  

2  0.001s  0.003s  0.003s  0.003s  
4  0.001s  0.003s  0.003s  0.003s  
asia  1  0.018s  0.001s  0.026s  0.004s  0.023s  0.003s  0.005s  0.003s  
2  0.001s  0.003s  0.003s  0.003s  
4  0.001s  0.004s  0.004s  0.003s  
8  0.002s  0.003s  0.003s  0.003s  
win95pts  1  11.214s  2.409s  0.258s  0.074s  0.233s  0.068s  0.047s  0.042s  
2  2.760s  0.066s  0.060s  0.039s  
4  2.501s  0.067s  0.067s  0.039s  
8  2.452s  0.063s  0.061s  0.039s  
16  2.576s  0.056s  0.050s  0.033s  
32  0.671s  0.053s  0.046s  0.033s  
64  0.658s  0.053s  0.043  0.032s  
andes  1  180s  1.165s  12.617s  5.479s  13.046s  12.893s  4.724s  4.863s  
2  0.989s  5.824s  12.832s  4.818s  
4  0.992s  5.423s  13.312s  4.823s  
8  1.144s  5.620s  12.874s  4.838s  
16  1.247s  5.612s  9.921s  4.122s  
32  1.385s  5.457s  10.362s  4.120s  
64  2.538s  5.552s  8.996s  3.442s  
128  3.488s  3.656s  8.096s  3.141s 
BN  #Nodes  #Evidence  MTBDD 




Compilation 
Inference 
Compilation 
Inference 
Compilation 
Inference 
Compilation 
Inference 

survey  14  1  0.018s  0.002s  0.114s  0.004s  0.129s  0.004s  0.019s  0.004s  
2  0.002s  0.004s  0.003s  0.004s  
4  0.004s  0.003s  0.003s  0.003s  
sachs  33  1  0.076s  0.002s  0.208s  0.008s  0.212s  0.008s  0.096s  0.010s  
2  0.002s  0.008s  0.008s  0.008s  
4  0.004s  0.009s  0.009s  0.009s  
8  0.004s  0.008s  0.007s  0.008s  
child  60  1  0.273s  0.014s  0.304s  0.014s  0.293s  0.012s  0.191s  0.021s  
2  0.004s  0.013s  0.010s  0.018s  
4  0.005s  0.013s  0.010s  0.018s  
8  0.006s  0.010s  0.010s  0.013s  
16  0.008s  0.011s  0.010s  0.016s  
alarm  104  1  1.538s  0.010s  0.703s  0.014s  0.685s  0.012s  0.345s  0.013s  
2  0.011s  0.012s  0.013s  0.012s  
4  0.013s  0.013s  0.013s  0.012s  
8  0.014s  0.013s  0.013s  0.013s  
16  0.019s  0.010s  0.011s  0.010s  
32  0.031s  0.013s  0.013s  0.012s  
insur ance  88  1  2.258s  0.432s  0.695s  0.011s  0.672s  0.013s  0.342s  0.012s  

2  0.462s  0.012s  0.012s  0.012s  
4  0.461s  0.012s  0.013s  0.012s  
8  0.478s  0.013s  0.013s  0.012s  
16  0.174s  0.012s  0.011s  0.010s  
he par2  162  1  17s  0.074s  32.129s  0.058s  37.466s  0.054s  12.205s  0.056s  
2  0.069s  0.054s  0.049s  0.054s  
4  0.076s  0.052s  0.044s  0.053s  
8  0.083s  0.052s  0.043s  0.043s  
16  0.101s  0.045s  0.043s  0.033s  
32  0.144s  0.039s  0.036s  0.051s  
64  0.191s  0.042s  0.038s  0.051s 
Comparing MTBDDbased model checking to inference using PSDDs.
In order to answer our last question, we have conducted a series of experiments to see how our approach performs compared to the recent prominent inference tool based on PSDD. PSDD^{1}^{1}1https://github.com/hahaXD/psdd is a scalable tool for reasoning and learning on belief networks in the AI literature. We have compiled the BNs in the benchmark into MTBDD with storm symbolic engine. To this end, we have converted the benchmark BNs into PSDDs and vtrees using the PSDDNips package^{2}^{2}2https://github.com/hahaXD/psdd_nips
. Our experiments covers the available vtree methods: random, fixed and minfill. The decisive difference between these methods is the heuristics they employ to triangulate the DAG underlying a BN
[26]. Due to the fact that the PSDD packages are inherently limited to perform inference only on BNs with binary variables, we categorize our results into two parts:
binary BNs and nonbinary BNs. Table 3indicates the results for the binary benchmarks. The results include the compilation time and inference time by different methods, taking the same sets of evidence nodes. In each row the minimum inference time is highlighted in bold face. As inference in our tool is applicable to nonbinary BNs, we have built a prototypical script to binarize nonbinary networks such that they can be fed into the PSDD package. Table
4 indicates the results for these nonbinary benchmarks where indicates the number of resulting binary variables. The preprocessing time for conversion and binarization is not included. Due to the large number of parameters in the benchmarks ”hailfinder”, ”water”, and ”pathfinder” (see Table 1), these cases are computationally hard to binarize. Therefore, these cases are not included in Table 4.The main conclusions of our experimental results are:

Inference using MTBDDbased symbolic model checking is competitive to BNspecific symbolic techniques like PSDD for small to large BNs.

PSDD techniques outperform our MTBDDbased approach for very large and huge BNs.

MTBDDbased inference is quite sensitive to the number and depth (in the topological order) of evidences.
7 Conclusions
In this paper, we have investigated MTBDDbased symbolic probabilistic model checking to perform exact inference on Bayesian networks. We have translated Bayesian networks into Markov chains, and have reduced inference to computing reachability probabilities. Our prototypical tool chain built on top of storm [20] is evaluated on BNs from the bnlearn repository. We investigated several hypotheses to see which factors are affecting the inference time.
Future work consists of optimizing our implementation and approach, and to consider other metrics on BNs, such as maximum a posteriori (MAP) and the most probable explanation (MPE). We also like to generalize our approach to recursive BNs [27] or dynamic BNs [28], which bring respectively the notion of recursion and time on the table. Moreover, we believe that this work provides a good basis for performing probabilistic model checking on a broader set of graphical models such as Markov networks, which are, unlike Bayesian networks, undirected in nature.
Acknowledgement.
The authors would like to thank Yujia Shen (UCLA) for his kind support with running the PSDD tools.
References
 [1] (1997) Algebraic decision diagrams and their applications. Formal Methods Syst. Des. 10 (2/3), pp. 171–206. Cited by: §4.
 [2] (1997) Symbolic model checking for probabilistic processes. In ICALP, Lecture Notes in Computer Science, Vol. 1256, pp. 430–440. Cited by: §1, §3.
 [3] (2014) Computing conditional probabilities in Markovian models efficiently. In TACAS, Lecture Notes in Computer Science, Vol. 8413, pp. 515–530. Cited by: §1.
 [4] (2018) How long, O Bayesian network, will I sample thee?  A program analysis perspective on expected sampling times. In ESOP, Lecture Notes in Computer Science, Vol. 10801, pp. 186–213. Cited by: §1.
 [5] Bayesian network Interchange Format. Note: http://www.cs.washington.edu/dm/vfml/appendixes/bif.htmAccessed: 2019 Cited by: §6.
 [6] (1996) Improving the variable ordering of OBDDs is NPcomplete. IEEE Trans. Computers 45 (9), pp. 993–1002. Cited by: §4.1.
 [7] (2018) Binary decision diagrams. In Handbook of Model Checking, pp. 191–217. Cited by: §4.1, §4.
 [8] (2017) JANI: quantitative model and tool interaction. In TACAS (2), Lecture Notes in Computer Science, Vol. 10206, pp. 151–168. Cited by: §6.
 [9] (2018) BDDbased symbolic model checking. In Handbook of Model Checking, pp. 219–245. Cited by: §4.1.
 [10] (2006) Compiling relational Bayesian networks for exact inference. Int. J. Approx. Reason. 42 (12), pp. 4–20. Cited by: §1.
 [11] (2005) Compiling Bayesian networks with local structure. In IJCAI, pp. 1306–1312. Cited by: §1.
 [12] (1990) The computational complexity of probabilistic inference using Bayesian belief networks. Artif. Intell. 42 (23), pp. 393–405. Cited by: §1.
 [13] (1993) Approximating probabilistic inference in Bayesian belief networks is NPHard. Artif. Intell. 60 (1), pp. 141–153. Cited by: §1.
 [14] (2002) A logical approach to factoring belief networks. In KR, pp. 409–420. Cited by: §1.
 [15] (2004) New advances in compiling CNF into Decomposable Negation Normal Form. In ECAI, pp. 328–332. Cited by: §1.
 [16] (2009) Modeling and reasoning with Bayesian networks. Cambridge University Press. Cited by: §2.
 [17] (2011) SDD: A new canonical representation of propositional knowledge bases. In IJCAI, pp. 819–826. Cited by: §4.3, §4.3, §4.4, §4.
 [18] (2013) A differential approach to inference in Bayesian networks. CoRR abs/1301.3847. Cited by: §1.
 [19] (2000) Symbolic model checking of probabilistic processes using MTBDDs and the Kronecker representation. In TACAS, Lecture Notes in Computer Science, Vol. 1785, pp. 395–410. Cited by: §1.
 [20] (2017) A Storm is coming: A modern probabilistic model checker. In CAV (2), Lecture Notes in Computer Science, Vol. 10427, pp. 592–600. Cited by: §1, §6, §7.
 [21] (2016) Symbolic model checking for factored probabilistic models. In ATVA, Lecture Notes in Computer Science, Vol. 9938, pp. 444–460. Cited by: §1.
 [22] (1997) Multiterminal binary decision diagrams: an efficient data structure for matrix representation. Formal Methods Syst. Des. 10 (2/3), pp. 149–169. Cited by: §4.
 [23] (2016) PSI: exact symbolic inference for probabilistic programs. In CAV (1), Lecture Notes in Computer Science, Vol. 9779, pp. 62–83. Cited by: §1.
 [24] (2019) The 2019 comparison of tools for the analysis of quantitative formal models  (QComp 2019 competition report). In TACAS (3), Lecture Notes in Computer Science, Vol. 11429, pp. 69–92. Cited by: §1.
 [25] (2019) Symbolic exact inference for discrete probabilistic programs. CoRR abs/1904.02079. Cited by: §1.
 [26] (2002) A practical relaxation of constantfactor treewidth approximation algorithms. In PGM, Proceedings of the first European Workshop on Probabilistic Graphical Models, pp. 71–80. Cited by: §6.
 [27] (2001) Complex probabilistic modeling with recursive relational Bayesian networks. Ann. Math. Artif. Intell. 32 (14), pp. 179–220. Cited by: §7.
 [28] (2001) Bayesian networks and decision graphs. Statistics for Engineering and Information Science, Springer. Cited by: §7.
 [29] (2016) The probabilistic model checking landscape. In LICS, pp. 31–45. Cited by: §3.
 [30] (2014) Probabilistic Sentential Decision Diagrams. In KR, Cited by: §1, §4.4, §4.
 [31] (2016) Advances in symbolic probabilistic model checking with PRISM. In TACAS, Lecture Notes in Computer Science, Vol. 9636, pp. 349–366. Cited by: §1.
 [32] (2009) Probabilistic graphical models  principles and techniques. MIT Press. Cited by: §1.
 [33] (2011) PRISM 4.0: verification of probabilistic realtime systems. In CAV, Lecture Notes in Computer Science, Vol. 6806, pp. 585–591. Cited by: §1.
 [34] (2006) Temporal logics as query languages for dynamic Bayesian networks: application to d. melanogaster embryo development. Technical report Carnegie Mellon University. Cited by: §1.
 [35] (2008) Towards inference and learning in dynamic Bayesian networks using generalized evidence. Technical report Carnegie Mellon University. Cited by: §1.
 [36] (2007) Compiling Bayesian networks by symbolic probability calculation based on zerosuppressed BDDs. In IJCAI, pp. 2550–2555. Cited by: §1.
 [37] (2012) Dynamic Bayesian networks: A factored model of probabilistic dynamics. In ATVA, Lecture Notes in Computer Science, Vol. 7561, pp. 17–25. Cited by: §1.
 [38] (2008) New compilation languages based on structured decomposability. In AAAI, pp. 517–522. Cited by: §4.3, §4.3.
 [39] (2010) A lower bound on the size of decomposable negation normal form. In AAAI, Cited by: §4.3.
 [40] (2005) Affine algebraic decision diagrams (AADDs) and their application to structured probabilistic inference. In IJCAI, pp. 1384–1390. Cited by: §1.
 [41] Bayesian network repository. Note: https://www.bnlearn.comAccessed: 2019 Cited by: §6.
 [42] (1990) Symbolic probabilistic inference in belief networks. In AAAI, pp. 126–131. Cited by: §1.

[43]
(2018)
Formal verification of Bayesian network classifiers
. In PGM,Proceedings of Machine Learning Research
, Vol. 72, pp. 427–438. Cited by: §1.  [44] (2012) Basing decisions on sentences in decision diagrams. In AAAI, Cited by: §1.