0% found this document useful (0 votes)
3 views4 pages

Bayesian Inference

Bayesian inference for phylogenetics differs from maximum likelihood methods by incorporating prior beliefs about hypotheses and using Markov Chain Monte Carlo (MCMC) to explore tree space. While Bayesian methods can efficiently estimate trees and account for uncertainty, they rely on the choice of prior probabilities, which can influence outcomes and lead to misleading results if not carefully considered. Despite their advantages, Bayesian methods can also get stuck in local optima and produce correlated samples, necessitating a cautious approach to interpretation.

Uploaded by

Screen Recorder
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Bayesian Inference

Bayesian inference for phylogenetics differs from maximum likelihood methods by incorporating prior beliefs about hypotheses and using Markov Chain Monte Carlo (MCMC) to explore tree space. While Bayesian methods can efficiently estimate trees and account for uncertainty, they rely on the choice of prior probabilities, which can influence outcomes and lead to misleading results if not carefully considered. Despite their advantages, Bayesian methods can also get stuck in local optima and produce correlated samples, necessitating a cautious approach to interpretation.

Uploaded by

Screen Recorder
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

L_Bayesian Inference

Bayesian methods for inferring phylogenies are conceptually very similar to maximum likelihood
methods. In both cases, the analysis explores ‘tree space’ (the set of all possible trees), moving
from one possible phylogeny to another by changing model parameters (e.g. branch lengths,
substitution probabilities, tree topology), and calculating the likelihood of each tree. But
Bayesian methods differ from maximum likelihood in the use of prior beliefs about the probability
of different hypotheses, the method for exploring the set of possible trees, and the way that the
plausibility of a given tree is reported.

Bayesian inference asks ‘what is the probability that a given hypothesis is true, given my
observations and my prior beliefs?’ In the case of phylogenetics, the observation is a sequence
alignment, the hypothesis is a particular phylogenetic tree, and the estimate of probability is
based on a model of the evolutionary process. While maximum likelihood (ML) incorporates
prior beliefs about the way the world works in the form of a model of sequence evolution,
Bayesian inference goes a step further than this, assigning prior probabilities to alternative
hypotheses before we have seen the data. Prior probabilities reflect the chance that any
hypothesis is true, regardless of the data. The use of prior beliefs is both the best thing and the
worst thing about Bayesian inference. If we do know, before we start, which hypotheses are
more likely to be true (or, conversely, which are very implausible) then we can use this
information to dramatically reduce the amount of time needed to search and evaluate different
hypotheses. But, given that our prior beliefs will influence the outcome of the analysis, we need
to be sure that we do not choose inappropriate priors that will lead our analysis astray.

Actually, in phylogenetics, we usually don’t have reliable prior knowledge of which hypotheses
are more probable than others before we start the analysis. Therefore, phylogenetic applications
of Bayesian inference tend to use uninformative priors for many variables. Uninformative priors
are distributions of prior probabilities that do not bias the outcome towards a particular
hypothesis, so that the posterior probability simply reflects the likelihood. Some parameter
values are given ‘flat priors’ that state that all values (within certain bounds) are equally likely.
But not all attempts to set uninformative priors use flat distributions. For example, the prior
distribution of edge lengths (branches) on each tree may be set using a particular model of
lineage speciation and extinction, such that large departures from the expected tree structure
will be penalized and end up with a lower posterior probability. In this case, before we even
start, we are saying that we don’t know what the tree is but we are pretty sure it is more likely to
have an even distribution of nodes, rather than having all the bifurcations at the base or the tips
of the tree. It’s up to you to think carefully about all these priors before you start your analysis,
and consider whether they are reasonable statements to make about your particular dataset.

Whatever probability distribution you choose, if your aim is to have uninformative priors that do
not bias your result, then it is critical to test whether the priors you set are influencing the
outcome of the analysis. One way to test this is to sample from the prior distribution and
compare it to an equivalent sample from the posterior distribution: this is like running your
analysis again without the data. If the two are the same it suggests that the answer you get is
being determined by priors and not influenced by the data you are analyzing. If you get the
same answer whether or not you include the sequence data, then the data has not given you
any extra information than you had to start with, suggesting either that there isn’t a very clear
story in the data, or that the priors have overwhelmed the data. That ought to give you pause for
thought.

There are a number of different Bayesian methods for phylogenetic inference, but the basic
approach is something like the one shown in this diagram.

1. Alignment: as with all methods, if your alignment is not reliable, neither is your phylogeny.

2. Starting tree: commonly a randomly chosen tree to ensure independence of runs (chains).

3. Generate a new tree: Bayesian methods make use of a procedure called Markov Chain
Monte Carlo (MCMC) to explore the set of all possible trees. A Markov Chain describes the
movement of a system through a series of states: at each moment the chain may move to a
new state or stay in its current state, and the movement is not influenced by past states (the
chain has no ‘memory’ of where it has been). Monte Carlo refers to random sampling of
numbers (the name is a reference to a famous casino, highlighting the role of chance). So an
MCMC algorithm takes a random walk through tree space. In practice it does this by randomly
altering one or more parameters of the current tree to produce a slightly different tree1. The
chain might then move to the new tree, or it might stay on the current tree. The chance of it
moving depends on the ratio of the posterior probabilities of the two trees.

4. Calculate the ratio of posterior probabilities of the two trees: the prior probability is the
probability of a hypothesis being true before the data is taken into account. All variables— such
as tree topology, branch lengths, and parameters of the substitution model—must have prior
probabilities, even if they are uniform (i.e. no value is more probable than any other). The
posterior probability is the probability of a hypothesis being true after you have considered it in
light of your data. The posterior probability is arrived at by calculating the likelihood of a tree,
multiplying it by the prior probability of that tree, then dividing by the probability of the data. It
would be difficult, if not impossible, to calculate the probability of the data, so estimating the
posterior probability of a single tree is generally not possible. But calculating the ratio of
posterior probabilities neatly allows the unknowns to be cancelled out, making the calculation
tractable.

5. Movement of chain to new tree is conditioned by the ratio of posterior


probabilities: in ML, you always move to the tree with the higher likelihood. But in Bayesian
inference, the chance of moving to the new tree is weighted by the ratio of the posterior
probabilities of the current tree and the new tree. So if the new tree has a much higher posterior
probability than the old tree, then the chain will probably move to the new tree, but there is a
small probability it will stay on the old tree. If both trees have a similar posterior probability, there
is a near even chance that the chain will stay with the current tree or move to the new tree.
Whether it moves or stays, steps 3 to 5 are then repeated: generate new tree, calculate the ratio
of posterior probabilities, select whether to move or stay based on probabilities.

6. Stop when MCMC chain has made a thorough search of tree space: because the chance
that a chain will move to a new tree depends on difference between the posterior probabilities of
the current and new trees, the chain is more likely to stay with better (higher likelihood) trees. As
the chain progresses, it will tend to move on to better and better trees, and the chance that a
newly generated tree will have a higher likelihood is progressively reduced. This period of
increasing likelihood is referred to as ‘burn-in’ and tells you that your analysis has not found the
best tree yet. Eventually, the chain will stabilize so that it is almost always staying on only the
best trees, all of which have similar likelihood scores. How do you know when your chain has
stabilized? Currently, researchers tend to employ a variety of ways of establishing when the
search is complete, from inspecting plots of posterior probability (often referred to as traces) to
analyzing properties of samples of trees from the chain. In addition, there are a number of
strategies that help ensure that the analysis makes a thorough search of tree space (see later).
If your analysis has failed to make a decent search of tree space, or you stop your analysis
before it has stabilized on a set of trees of equivalent probability, then you will not have ended
up with the best tree for your data.

As with maximum likelihood, you can choose the best tree (referred to as the maximum a
posteriori (MAP) tree), or you can report a ‘credible set’ of trees by starting at the MAP tree and
progressively adding the next-best trees to the set until you have some specified cumulative
probability (usually 95 percent). Because the MCMC is less likely to move away from a tree with
a high posterior probability, the chain spends more time on better trees. So, once you have
discarded trees from the ‘burn-in’ period before the search reached the highest posterior
probability trees, you can indicate the support for each node in the tree by randomly sampling
trees from the posterior distribution and asking what percentage of trees in that sample contain
a particular node. This is conceptually similar to the bootstrap, but much faster as it does not
involve calculating the likelihood of replicate datasets.

The posterior sample of trees also gives you a way of encapsulating phylogenetic uncertainty,
by allowing you to consider a sample of trees that are plausible alternative phylogenetic
hypotheses to explain your data. You can then repeat whatever phylogenetic analysis you are
doing on alternative trees, which is a way of asking ‘if my tree were slightly different would I get
the same answer?’ However, the MCMC chain adds a complication to the interpretation of a
credible set of trees. The chain wanders from one tree to the next, so two trees close to each
other in the chain will tend to be more similar, because they will be separated by fewer changes
than trees sampled from disparate parts of the chain. If you sample trees from the same part of
the chain, then you will tend to end up with a very similar set of trees. If you want a fair
representation of all the trees of near-equivalent plausibility, then you need to randomly sample
at different parts of the chain.

ADVANTAGES OF BAYESIAN INFERENCE


For the sake of brevity, we will ignore the more fundamental (and rather vigorous) debates on
whether a Bayesian or Maximum Likelihood approach is more logically defensible. Most
phylogeneticists who choose Bayesian methods do so for their practical advantages: many of
the most popular phylogenetics packages are based on Bayesian inference, they offer a
relatively fast way to estimate trees under rate-variable (‘relaxed clock’) models, they provide a
convenient way of accounting for phylogenetic uncertainty by allowing you to sample many
equivalent phylogenetic hypotheses from the posterior distribution, and they generally report
measures of support for all nodes. In common with all such support measures, these are not
indicators of how ‘true’ your tree is, but how strongly your data supports your conclusions given
the assumptions you made in your analysis. In the case of Bayesian inference, remember that
you start with a prior belief about the probability of different outcomes, so the posterior
probabilities reflect these prior beliefs updated from what you have learned from the data given
the model used. To be honest, a lot of people prefer Bayesian support values to other measures
of support, such as the bootstrap, because they have a likeable tendency to give you higher
numbers, making you feel happier about your tree.

DISADVANTAGES OF BAYESIAN INFERENCE

The increase in speed over maximum likelihood (ML) methods is a consequence of sampling
fewer trees. After all, a Bayesian method must still calculate the likelihood of each tree
considered, just as an ML method does. But unlike ML methods, the Bayesian chain does not
attempt to calculate the likelihood of the nearby trees, nor for all possible branch lengths per
tree. Instead, it draws random samples of trees (each with a particular topology and set of
branch lengths). So the performance of Bayesian methods compared to ML must depend on
how well tree space is sampled. An MCMC chain can get stuck on local optima just as ML can:
strategies can be adopted for jumping off local peaks to explore different parts of tree space, or
for running multiple chains from different starting points and seeing if they converge on the
same set of trees. Similarly, the percentage values on nodes are reliable only if they are based
on a random sample of trees from the posterior. In reality, these samples are often correlated
with each other, biasing the posterior probabilities. Never forget you can get very high support
values for a completely misleading phylogeny. As with all methods discussed in this book, be an
intelligent user, not a mindless button-pusher. Don’t be fooled into thinking that a more
sophisticated method can be relied upon to give you the right answer every time. ‘Sophisticated’
often means ‘more assumptions’, even if the nature of these assumptions is not always obvious
to the end user. Remember that the phylogeny you get is contingent on the decisions you made
in your analysis, find out what the prior beliefs and the models you are using mean, and always
keep your assumptions in the front of your mind when interpreting the results.

You might also like