Modeladvanced
Latent-variable PCFG
Also called PCFG-LA, split-merge grammar.
A PCFG whose nonterminals are split into latent subcategories learned by EM, with repeated split, merge and smoothing rounds.
A latent-variable PCFG is a probabilistic context-free grammar whose nonterminals are each split into several hidden subcategories. A treebank shows the label NP, but the model works with NP-1, NP-2 and so on, and the subcategory of each node is never observed. The probability of a tree is the sum over all ways to give its nodes subcategories. The rule probabilities of the subcategories are learned with expectation-maximization, so the data decides which distinctions matter. The subcategories can, for example, separate subject from object noun phrases, a split that parent annotation makes by hand. Matsuzaki, Miyao and Tsujii introduced the model in 2005. Petrov, Barrett, Thibaux and Klein (2006) learned the splits in rounds of split, merge and smoothing, and reached an of 90.7 on the development set of the Penn Treebank with no head words. Training is easy, but parsing is not: finding the most probable tree is NP-hard, so parsers use approximate decoders.
The machine
The grammar. Start from a PCFG in which every rule is binary, unary or lexical. Each nonterminal gets a finite set of subcategories . Every rule of becomes the set of rules , each with its own probability , every unary rule becomes the rules , and every lexical rule becomes the rules . For each subcategory , the probabilities of its rules sum to 1. The start symbol has a single subcategory. Its rules may have any number of children in the treebank, and binarization turns them into binary rules, as for any other symbol.
The tree probability. An annotation of a tree assigns a subcategory to each node. With ranging over the annotations,
The tree is observed and is hidden. Matsuzaki, Miyao and Tsujii use one set of subcategories for every symbol. Petrov et al. let the number of subcategories differ from symbol to symbol.
Training on observed trees. EM alternates two steps. The E-step computes, for each training tree, the posterior probability of each annotated rule at each node. Because the tree is fixed, this is an inside and outside pass over the nodes of the tree, not over the spans of the sentence. The M-step sets each to the expected count of the rule divided by the expected count of its left side.
Split, merge and smoothing. Petrov et al. grow the grammar in cycles:
- Split. Split every subcategory into two, copy the rule probabilities, and add 1% of randomness to break the symmetry. Run EM.
- Merge. For each split, estimate the loss in likelihood if the two halves were merged back. Undo the 50% of the new splits with the smallest loss.
- Smooth. Replace each rule probability by , where is the mean over the subcategories of the same symbol and . Run EM again.
They start from an X-bar grammar with 98 symbols (45 tags, 27 phrasal categories and 26 intermediate symbols from binarization), 236 unary rules and 3840 binary rules. The split, the merge fraction and the smoothing weight are heuristics, set by measurements on held-out data.
What it counts
The model gives a probability to each observed tree by the sum above, and through it a distribution over the trees of a sentence.
The probability of a fixed tree. Compute an inside value for each node and each subcategory of its label: for a leaf, ; for a node with children and ,
and for a node with one child , . Then . With nodes and at most subcategories per symbol, this takes time .
The best tree differs from the best derivation. Take a sentence of one word and the rules
| rule | rule | ||
|---|---|---|---|
| 0.2 | 1 | ||
| 0.2 | 1 | ||
| 0.3 | 1 | ||
| 0.3 | 1 |
The sentence has two trees, (S (A a)) and (S (B a)). The first has two annotated derivations, so its probability is . The second has one derivation of probability , because cannot produce . The most probable derivation is S, , , with , and it gives the tree (S (B a)). The most probable tree is (S (A a)), with , and conditional probability . A Viterbi parser over the split grammar therefore returns the wrong tree. The max-rule decoder of Petrov et al. returns the right one here: the posterior of the rule is and that of is .
Relation to other models
- The inside-outside algorithm. The inside-outside algorithm trains a PCFG from sentences without trees, summing over all trees of each sentence in time cubic in its length. A latent-variable PCFG is trained from trees, and EM sums only over the annotations of one fixed tree, in time linear in the number of nodes. At parse time, the inside-outside passes over the whole sentence come back, to compute the rule posteriors that the decoders need.
- Parent annotation. Parent annotation splits each label by a fixed, observed feature. A latent-variable PCFG learns its splits, and Petrov et al. start from a grammar without parent labels. The hand-made splits of Klein and Manning (2003) are another fixed choice that the learned splits replace.
- Lexicalized PCFG. A lexicalized PCFG splits each label by its head word, which gives very many fine categories and a parser of time without special algorithms. A latent-variable PCFG uses a few learned subcategories per label, so the chart stays cubic in , and the cost moves into the grammar constant.
- Hidden Markov model. A hidden Markov model has a hidden state for each position of a chain. A latent-variable PCFG has a hidden subcategory for each node of a tree, and training on a fixed tree is the tree version of the forward-backward pass.
- Tree substitution grammars. A stochastic tree substitution grammar can be written as a latent-variable PCFG, which is the basis of the hardness result below.
Known results in the model
- Training (theorem). Each EM iteration does not decrease the likelihood of the training trees, as for any use of expectation-maximization. EM can stop at a local maximum, which is one reason for the random noise and the gradual splits.
- Exact probability of a tree (theorem). is computed in time by the inside pass on the tree.
- The most probable tree is NP-hard (theorem, with a sketched proof). Matsuzaki, Miyao and Tsujii state that finding the most probable observable tree is NP-hard for general latent-variable PCFGs. They sketch the proof: a stochastic tree substitution grammar can be written as a latent-variable PCFG, and Sima'an proved the problem NP-hard for such grammars. Petrov et al. also note that the most likely unannotated tree is intractable to find. See most probable parse.
- Approximate decoders (heuristics). Matsuzaki et al. compare reranking the best derivations, taking the tree of the best derivation, and taking the best tree under a simpler distribution fitted to the posterior. Petrov et al. choose the tree that maximizes the expected number of correct rules, computed from posteriors, and prune the chart with a coarse grammar first, dropping items with posterior below .
- Accuracy (measurement). The X-bar starting grammar of Petrov et al. has labeled precision and recall of 65.8 and 59.8 on the development set. After 6 split and merge cycles the grammar has 1043 symbols and reaches an of 90.7 on the development set, section 22. They train on sections 2 to 21 and test on section 23.
References
- Takuya Matsuzaki, Yusuke Miyao and Jun'ichi Tsujii, Probabilistic CFG with Latent Annotations, ACL 2005, pp. 75-82; the model, the EM training, the NP-hardness sketch of Section 3 and the approximate decoders of Sections 3.1 and 3.2
- Slav Petrov, Leon Barrett, Romain Thibaux and Dan Klein, Learning Accurate, Compact, and Interpretable Tree Annotation, ACL 2006, pp. 433-440; the X-bar starting grammar, split and merge, smoothing, max-rule decoding with coarse-to-fine pruning, and the results
- Khalil Sima'an, Computational complexity of probabilistic disambiguation by means of tree-grammars, COLING 1996, pp. 1175-1180; the NP-hardness of the most probable parse for stochastic tree-substitution grammars
- Dan Klein and Christopher D. Manning, Accurate Unlexicalized Parsing, ACL 2003, pp. 423-430; the hand-made splits of categories that latent-variable grammars learn automatically
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag MN4Q6R Edit this page History Report an error Markdown