↑ arvau

Wikipedia / Inside–outside algorithm

For parsing algorithms in computer science, the inside–outside algorithm is a way of re-estimating production probabilities in a probabilistic context-free grammar. It was introduced by James K. Baker in 1979 as a generalization of the forward–backward algorithm for parameter estimation on hidden Markov models to stochastic context-free grammars. It is used to compute expectations, for example as part of the expectation–maximization algorithm (an unsupervised learning algorithm).

Inside and outside probabilities

:

:

Computing inside probabilities

Base Case:

General case:

is:

is just the sum over all such possible rules:

Computing outside probabilities

Base Case:

.

General case:

. Then the left is:

in the grammar. Then the right is:

is the sum of the left and right contributions over all such rules:

References