Bayesian network

From Wikipedia, the free encyclopedia

A bayesian network (or a belief network) is a probabilistic graphical model that represents a set of variables and their causal influences or probabilistic dependencies. For example, a Bayesian network can be used to calculate the probability of a patient having a specific disease, given the absence or presence of certain symptoms, if the probabilistic dependencies between symptoms and disease are assumed to be known.

Contents

[edit] Definition

Formally, a Bayesian network is a directed acyclic graph whose nodes represent variables and arcs represents causal or probabilistic dependencies between the variables. The strengths of the dependencies are expressed by conditional probability distributions attached to every node. Nodes can represent any kind of variable, be it a measured parameter, a latent variable or a hypothesis. They are not restricted to representing random variables, which forms the "Bayesian" aspect of a Bayesian network. There are efficient algorithms that perform inference and learning in Bayesian networks.

If there is an arc from node A to another node B, then variable B depends directly on variable A, and A is called a parent of B. If for each variable Xi, i \isin \{1, \ldots, N\}, the set of parent variables is denoted by parents(Xi), then the joint distribution of the variables is product of the local distributions

\Pr(X_1, \ldots, X_N) = \prod_{i=1}^N \Pr(X_i \mid \operatorname{parents}(X_i)).\,

If Xi has no parents, its local probability distribution is said to be unconditional, otherwise it is conditional. If the variable represented by a node is observed, then the node is said to be an evidence node.

[edit] Dependence semantics

The graph encodes dependencies between variables. Conditional independence is represented by the graphical property of d-separation: nodes X and Y are d-separated in the graph, given specified evidence nodes, if and only if variables X and Y are independent given the corresponding evidence variables. The set of all other nodes on which node X can directly depend is given by X's Markov blanket.

[edit] Causal semantics

Judea Pearl, who was one of the first researchers of Bayesian networks, originally defined the arcs in a Bayesian networks to represent direct causal influence. Nowadays most researchers in the Machine learning community use the probabilistic formulation of Bayesian networks which does not require arcs to correspond to causal relationships. Under this definition the network merely specifies a joint probability distribution. Under the causal definition, the networks has additional causal semantics which specify that if a node X is actively caused to be in a state, written as "do(X)", then the pdf changes to the network obtained by cutting links from X's parents to X and setting X to the caused value (Pearl, 2000).

The different definitions has led some to prefer the term "directed graphical model" to indicate a non-causal definition. Historically, the statistics community has tended to avoid working with causality whilst the AI community has embraced it.

Under the joint probability interpretation, there is no unique Bayesian network for a given distribution because the distribution can be decomposed into product of local distributions in any order.

[edit] Example

A simple Bayesian network.
A simple Bayesian network.

Suppose that there are two reasons which could cause grass to be wet: either the sprinkler is on or it's raining. Also, suppose that the rain has a direct effect on the use of the sprinkler (namely that when it rains, the sprinkler is usually not turned on.) Then the situation can be modelled with the adjacent Bayesian network. All three variables have two possible values T (for true) and F (for false).

The joint probability function is

Pr(G, S, R) = Pr(G | S, R) Pr(S | R) Pr(R),

where the names of the variables have been abbreviated to G = GRASS WET, S = SPRINKLER, and R = RAIN.

The model can answer questions like "What is the likelihood that it is raining, given the grass is wet?" by using the conditional probability formula and summing over all nuisance variables:

\Pr(\mathit{R}=T \mid \mathit{G}=T) = \frac{\Pr(\mathit{G}=T, \mathit{R}=T)}{\Pr(\mathit{G}=T)} = \frac{\sum_{\mathit{S} \in \{T, F\}} \Pr(\mathit{G}=T, \mathit{S}, \mathit{R}=T)}{\sum_{\mathit{S}, \mathit{R} \in \{T, F\}} Pr(\mathit{G}=T, \mathit{S}, \mathit{R})}
= \frac{0.1584+0.00198}{0+0.288+0.1584+0.00198} \approx 35.77 %

Using a Bayesian network can save considerable amounts of memory, if the dependencies in the joint distribution are sparse. For example, a naive way of storing the conditional probabilities of 10 two-valued variables as a table requires storage space for 210 = 1024 values. If the local distributions of no variable depends on more than 3 parent variables, the Bayesian network representation only needs to store at most 10 * 23 = 80 values.

One advantage of Bayesian networks is that it is intuitively easier for a human to understand (a sparse set of) direct dependencies and local distributions than complete joint distribution.

[edit] Structure learning

In the simplest case, a Bayesian network is specified by an expert and is then used to perform inference. In other applications the task of defining the network is too complex for humans. In this case the network structure and the parameters of the local distributions must be learned from data.

Learning the structure of a Bayesian network (i.e., the graph) is a very important part of machine learning. Assuming that the data is generated from a Bayesian network and that all the variables are visible in every iteration, optimization based search method can be used to find the structure of the network. It requires a scoring function and a search strategy. A common scoring function is posterior probability of the structure given the training data. The time requirement of an exhaustive search returning back a structure that maximizes the score is superexponential in the number of variables. A local search strategy makes incremental changes aimed at improving the score of the structure. A global search algorithm like Markov chain Monte Carlo can avoid getting trapped in local minima. Friedman et al.[citation needed] talk about using mutual information between variables and finding a structure that maximizes this. They do this by restricting the parent candidate set to k nodes and exhaustively searching therein.

[edit] Parameter learning

In order to fully specify the Bayesian network and thus fully represent the joint probability distribution, it is necessary to further specify for each node X the probability distribution for X conditional upon X's parents. The distribution of X conditional upon its parents may have any form. It is common to work with discrete or Gaussian Distributions since that simplifies calculations. Sometimes only constraints on a distribution are known; one can then use the principle of maximum entropy to determine a single distribution, the one with the greatest entropy given the constraints. (Analogously, in the specific context of a dynamic Bayesian network, one commonly specifies the conditional distribution for the hidden state's temporal evolution to maximize the entropy rate of the implied stochastic process.)

Often these conditional distributions include parameters which are unknown and must be estimated from data, sometimes using the maximum likelihood approach. Direct maximization of the likelihood (or of the posterior probability) is often complex when there are unobserved variables. A classical approach to this problem is the expectation-maximization algorithm which alternates computing expected values of the unobserved variables conditional on observed data, with maximizing the complete likelihood (or posterior) assuming that previously computed expected values are correct. Under mild regularity conditions this process converges on maximum likelihood (or maximum posterior) values for parameters. A more fully Bayesian approach to parameters is to treat parameters as additional unobserved variables and to compute a full posterior distribution over all nodes conditional upon observed data, then to integrate out the parameters. This approach can be expensive and lead to large dimension models, so in practise classical parameter-setting approaches are more common.

[edit] Inference

Because a Bayesian network is a complete model for the variables and their relationships, it can be used to answer probabilistic queries about them. For example, the network can be used to find out updated knowledge of the state of a subset of variables when other variables (the evidence variables) are observed. This process of computing the posterior distribution of variables given evidence is called probabilistic inference. The posterior gives a universal sufficient statistic for detection applications, when one wants to choose values for the variable subset which minimize some expected loss function, for instance the probability of decision error. A Bayesian network can thus be considered a mechanism for automatically constructing extensions of Bayes' theorem to more complex problems.

The most common exact inference methods are variable elimination, which eliminates (by integration or summation) the non-observed non-query variables one by one by distributing the sum over the product; clique tree propagation, which caches the computation so that many variables can be queried at one time and new evidence can be propagated quickly; and recursive conditioning, which allows for a space-time tradeoff and matches the efficiency of variable elimination when enough space is used. All of these methods have complexity that is exponential in the network's treewidth. The most common approximate inference algorithms are stochastic MCMC simulation, mini-bucket elimination which generalizes loopy belief propagation, and variational methods.

[edit] Applications

Bayesian networks are used for modelling knowledge in gene regulatory networks, medicine, engineering, text analysis, image processing, data fusion, and decision support systems.

[edit] See also

[edit] More information

[edit] Free and open source software

[edit] Commercial software

[edit] References