encyclopegia.org

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).

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== The inside probability \beta_j(p,q) is the total probability of generating words w_p \cdots w_q , given the root nonterminal N^j and a grammar G : \beta_j(p,q) = P(w_{pq}|N^j_{pq}, G) The outside probability \alpha_j(p,q) is the total probability of beginning with the start symbol N^1 and generating the nonterminal N^j_{pq} and all the words outside w_p \cdots w_q , given a grammar G : \alpha_j(p,q) = P(w_{1(p-1)}, N^j_{pq}, w_{(q+1)m}|G) ==Computing inside probabilities== Base Case: \beta_j(p,p) = P(w_{p}|N^j, G) General case: Suppose there is a rule N_j \rightarrow N_r N_s in the grammar, then the probability of generating w_p \cdots w_q starting with a subtree rooted at N_j is: \sum_{k=p}^{k=q-1} P(N_j \rightarrow N_r N_s)\beta_r(p,k) \beta_s(k+1,q) The inside probability \beta_j(p,q) is just the sum over all such possible rules: \beta_j(p,q) = \sum_{N_r,N_s} \sum_{k=p}^{k=q-1} P(N_j \rightarrow N_r N_s)\beta_r(p,k) \beta_s(k+1,q) ==Computing outside probabilities== Base Case: \alpha_j(1,n) = \begin{cases} 1 & \mbox{if } j=1 \\ 0 & \mbox{otherwise} \end{cases} Here the start symbol is N_1 . General case: Suppose there is a rule N_r \rightarrow N_j N_s in the grammar that generates N_j . Then the left contribution of that rule to the outside probability \alpha_j(p,q) is: \sum_{k=q+1}^{k=n} P(N_r \rightarrow N_j N_s)\alpha_r(p,k) \beta_s(q+1,k) Now suppose there is a rule N_r \rightarrow N_s N_j in the grammar. Then the right contribution of that rule to the outside probability \alpha_j(p,q) is: \sum_{k=1}^{k=p-1} P(N_r \rightarrow N_s N_j)\alpha_r(k,q) \beta_s(k,p-1) The outside probability \alpha_j(p,q) is the sum of the left and right contributions over all such rules: \alpha_j(p,q) = \sum_{N_r,N_s} \sum_{k=q+1}^{k=n} P(N_r \rightarrow N_j N_s)\alpha_r(p,k) \beta_s(q+1,k) + \sum_{N_r,N_s} \sum_{k=1}^{k=p-1} P(N_r \rightarrow N_s N_j)\alpha_r(k,q) \beta_s(k,p-1) ==References== J. Baker (1979): Trainable grammars for speech recognition. In J. J. Wolf and D. H. Klatt, editors, Speech communication papers presented at the 97th meeting of the Acoustical Society of America, pages 547–550, Cambridge, MA, June 1979. MIT. Karim Lari, Steve J. Young (1990): The estimation of stochastic context-free grammars using the inside–outside algorithm. Computer Speech and Language, 4:35–56. Karim Lari, Steve J. Young (1991): Applications of stochastic context-free grammars using the Inside–Outside algorithm. Computer Speech and Language, 5:237–257. Fernando Pereira, Yves Schabes (1992): Inside–outside reestimation from partially bracketed corpora. Proceedings of the 30th annual meeting on Association for Computational Linguistics, Association for Computational Linguistics, 128–135. ==External links== Inside-outside algorithm - Fei Xia The Inside-Outside Algorithm - Michael Collins

References

No reference rows published for this article.

Cite this article

MLA

"Inside–outside algorithm." encyclopegia.org, 2023, https://encyclopegia.org/wiki/inside-outside-algorithm. Accessed 24 November 2026.

Chicago

"Inside–outside algorithm." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/inside-outside-algorithm.

APA

encyclopegia.org. (2023). Inside–outside algorithm. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/inside-outside-algorithm

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Sirdar

enwiki · references available

SS Zachary Taylor

enwiki · references available

Fortune Head

enwiki · references available

River Tolka

enwiki · references available

Pincoya

enwiki · references available

Honours (Prevention of Abuses) Act 1925

enwiki · references available

Confederation of Trade Unions of Burundi

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1143544206 · 0.5 · snapshot enwiki-001143544206

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.