Elamur Research⌕
☰
home / papers / 2007 / Bayesian Inference for PCFGs via Markov Chain Monte Carlo

Bayesian Inference for PCFGs via Markov Chain Monte Carlo

Summary

The paper offers Bayesian alternatives to the usual maximum-likelihood way of learning probabilistic context-free grammars (PCFGs) from unannotated strings with the Inside-Outside (IO) algorithm. The authors put a product of Dirichlet priors on rule probabilities and derive two Markov chain Monte Carlo samplers. The first is a Gibbs sampler that alternates between drawing parse trees given the current rule probabilities and drawing new probabilities given those trees. The second is a Hastings sampler that integrates the rule probabilities out ("collapsed") so that it works directly on parses. Both rely on a dynamic-programming routine that samples trees from an inside chart. As a test case, they induce morphological segmentations of verbs in Sesotho, an agglutinating Bantu language, using a highly ambiguous grammar. IO collapses to a degenerate solution that treats each word as one morpheme. With a sparsity-favouring prior, the Hastings sampler recovers meaningful structure. This matters because it shows that priors can steer unsupervised grammar induction where pure likelihood maximisation fails.

Key points

  • The paper presents two MCMC algorithms for PCFG inference from strings alone:
    • a component-wise Gibbs sampler over trees and θ;
    • a collapsed component-wise Hastings sampler that marginalises θ.
  • Dirichlet priors are conjugate to PCFG tree distributions, so the posterior over θ given parses is again Dirichlet. Its parameters are the rule counts plus α.
  • The Sesotho verb grammar has 81,755 productions, roughly 20 times more than the number of training strings. This makes estimation heavily underconstrained.
  • IO converges to the trivial analysis Word → V with probability 1, which scores 0 on segmentation.
  • With a uniform α below about 10⁻², the Hastings sampler finds nontrivial structure. At α = 10⁻⁵ it achieves an f-score of 0.75 on morphemes (ignoring labels), and 0.54 of words are segmented entirely correctly. Results stay good across several orders of magnitude of α.

Interesting ideas

  • I1. Sampling whole trees from an inside chart. The method builds the standard inside table and then descends top-down, choosing expansions in proportion to their inside scores. This yields exact samples from the parse distribution, which is useful anywhere a CKY-style chart already exists, such as segmentation or tagging lattices.
  • I2. Gibbs sampling as a "stochastic EM." The method replaces the E-step with sampling parses and the M-step with sampling parameters. Since parses are independent given θ, this keeps EM's easy parallelism while giving a posterior rather than a single point estimate.
  • I3. Annealing and jittering for convergence. One trick is raising the parse distribution to the power 1/τ, with τ starting near 5 and lowered to 1. Another is perturbing IO's initial estimate. Both are cheap, model-agnostic tricks for escaping poor early states in other EM or sampling setups.
  • I4. Warning about naive MAP-EM with tiny α. Subtracting (1 − α) from expected counts can push many rule probabilities to zero, leaving some training strings with no parse at all. This is a useful caution when adding sparse Dirichlet priors to an existing EM pipeline.
  • I5. Sparsity as the key inductive bias. A grammar that encodes only structural templates, together with a strong preference for few active rules, was enough to turn a degenerate solution into a sensible one. The same design pattern could suit unsupervised morphology for other agglutinative languages.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Natural language processing

Cited by

82 papers of our library cite it (of the 140884 whose bibliographies we read); 2 of them have a page here, 80 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work.

@inproceedings{johnson2007bayesian,
  title = {{Bayesian Inference for PCFGs via Markov Chain Monte Carlo}},
  author = {Johnson, Mark and Griffiths, Thomas and Goldwater, Sharon},
  booktitle = {Human Language Technologies 2007: The Conference of the North American Chapter of the Association for Computational Linguistics; Proceedings of the Main Conference},
  year = {2007},
  url = {https://aclanthology.org/N07-1018/}
}

References

10 references, 0 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Katherine Demuth. 1992. Acquisition of Sesotho. In Dan Slobin, editor, The Cross-Linguistic Study of Language Acquisition, volume 3, pages 557–638. Lawrence Erlbaum Associates, Hillsdale, N.J. find
  2. Ye Ding, Chi Yu Chan, and Charles E. Lawrence. 2005. RNA secondary structure prediction by centroids in a Boltzmann weighted ensemble. RNA, 11:1157–1166. find
  3. Jenny Rose Finkel, Christopher D. Manning, and Andrew Y. Ng. 2006. Solving the problem of cascading errors: Approximate Bayesian inference for linguistic annotation pipelines. In Proceedings of the 2006 Conference on Empirical Methods in Natural Language Processing, pages 618– 626, Sydney, Australia… find
  4. Stuart Geman and Donald Geman. 1984. Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of images. IEEE Transactions on Pattern Analysis and Machine Intelligence, 6:721–741. find
  5. James E. Gentle. 2003. Random number generation and Monte Carlo methods. Springer, New York, 2nd edition. find
  6. Joshua Goodman. 1998. Parsing inside-out. Ph.D. thesis, Harvard University. available from http://research.microsoft.com/˜joshuago/. ↗
  7. Dan Klein and Chris Manning. 2004. Corpus-based induction of syntactic structure: Models of dependency and constituency. In Proceedings of the 42nd Annual Meeting of the Association for Computational Linguistics, pages 478–485. find
  8. K. Lari and S.J. Young. 1990. The estimation of Stochastic Context-Free Grammars using the Inside-Outside algorithm. Computer Speech and Language, 4(35-56). find
  9. Brian MacWhinney and Catherine Snow. 1985. The child language data exchange system. Journal of Child Language, 12:271–296. find
  10. Noah A. Smith and Jason Eisner. 2006. Annealing structural bias in multilingual weighted grammar induction. In Proceedings of the 21st International Conference on Computational Linguistics and 44th Annual Meeting of the Association for Computational Linguistics, pages 569–576, Sydney, Australia. Ass… find

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/johnson-2007-bayesian-inference-pcfgs-markov-chain/