Docsity

Statistical Decision-Tree Models for Parsing, Study notes of Decision Making

Toggle sidebar
bg1
Statistical Decision-Tree Models for Parsing*
David M. Magerman
Bolt Beranek and Newman Inc.
70 Fawcett Street, Room 15/148
Cambridge, MA 02138, USA
magerman@bbn,
com
Abstract
Syntactic natural language parsers have
shown themselves to be inadequate for pro-
cessing highly-ambiguous large-vocabulary
text, as is evidenced by their poor per-
formance on domains like the Wall Street
Journal, and by the movement away
from parsing-based approaches to text-
processing in general. In this paper, I de-
scribe SPATTER, a statistical parser based
on decision-tree learning techniques which
constructs a complete parse for every sen-
tence and achieves accuracy rates far bet-
ter than any published result. This work
is based on the following premises: (1)
grammars are too complex and detailed to
develop manually for most interesting do-
mains; (2) parsing models must rely heav-
ily on lexical and contextual information
to analyze sentences accurately; and (3)
existing n-gram modeling techniques are
inadequate for parsing models. In exper-
iments comparing SPATTER with IBM's
computer manuals parser, SPATTER sig-
nificantly outperforms the grammar-based
parser. Evaluating SPATTER against the
Penn Treebank Wall Street Journal corpus
using the PARSEVAL measures, SPAT-
TER achieves 86% precision, 86% recall,
and 1.3 crossing brackets per sentence for
sentences of 40 words or less, and 91% pre-
cision, 90% recall, and 0.5 crossing brackets
for sentences between 10 and 20 words in
length.
This work was sponsored by the Advanced Research
Projects Agency, contract DABT63-94-C-0062. It does
not reflect the position or the policy of the U.S. Gov-
ernment, and no official endorsement should be inferred.
Thanks to the members of the IBM Speech Recognition
Group for their significant contributions to this work.
1 Introduction
Parsing a natural language sentence can be viewed as
making a sequence of disambiguation decisions: de-
termining the part-of-speech of the words, choosing
between possible constituent structures, and select-
ing labels for the constituents. Traditionally, disam-
biguation problems in parsing have been addressed
by enumerating possibilities and explicitly declaring
knowledge which might aid the disambiguation pro-
cess. However, these approaches have proved too
brittle for most interesting natural language prob-
lems.
This work addresses the problem of automatically
discovering the disambiguation criteria for all of the
decisions made during the parsing process, given the
set of possible features which can act as disambigua-
tors. The candidate disambiguators are the words in
the sentence, relationships among the words, and re-
lationships among constituents already constructed
in the parsing process.
Since most natural language rules are not abso-
lute, the disambiguation criteria discovered in this
work are never applied deterministically. Instead, all
decisions are pursued non-deterministically accord-
ing to the probability of each choice. These proba-
bilities are estimated using statistical decision tree
models. The probability of a complete parse tree
(T) of a sentence (S) is the product of each decision
(dl) conditioned on all previous decisions:
P(T[S) = H P(dildi-ldi-2""dlS)"
diET
Each decision sequence constructs a unique parse,
and the parser selects the parse whose decision se-
quence yields the highest cumulative probability. By
combining a stack decoder search with a breadth-
first algorithm with probabilistic pruning, it is pos-
sible to identify the highest-probability parse for any
sentence using a reasonable amount of memory and
time.
276
pf3
pf4
pf5
pf8

Partial preview of the text

Download Statistical Decision-Tree Models for Parsing and more Study notes Decision Making in PDF only on Docsity!

Statistical Decision-Tree Models for Parsing*

D a v i d M. M a g e r m a n B o l t B e r a n e k a n d N e w m a n Inc. 70 F a w c e t t S t r e e t , R o o m 1 5 / 1 4 8 C a m b r i d g e , M A 02138, U S A magerman@bbn, c o m

A b s t r a c t

Syntactic natural language parsers have shown themselves to be inadequate for pro- cessing highly-ambiguous large-vocabulary text, as is evidenced by their poor per- formance on domains like the Wall Street Journal, and by the movement away from parsing-based approaches to text- processing in general. In this paper, I de- scribe SPATTER, a statistical parser based on decision-tree learning techniques which constructs a complete parse for every sen- tence and achieves accuracy rates far bet- ter than any published result. This work is based on the following premises: (1) grammars are too complex and detailed to develop manually for most interesting do- mains; (2) parsing models must rely heav- ily on lexical and contextual information to analyze sentences accurately; and (3) existing n-gram modeling techniques are inadequate for parsing models. In exper- iments comparing SPATTER with IBM's computer manuals parser, SPATTER sig- nificantly outperforms the grammar-based parser. Evaluating SPATTER against the Penn Treebank Wall Street Journal corpus using the PARSEVAL measures, SPAT- TER achieves 86% precision, 86% recall, and 1.3 crossing brackets per sentence for sentences of 40 words or less, and 91% pre- cision, 90% recall, and 0.5 crossing brackets for sentences between 10 and 20 words in length.

This work was sponsored by the Advanced Research Projects Agency, contract DABT63-94-C-0062. It does not reflect the position or the policy of the U.S. Gov- ernment, and no official endorsement should be inferred. Thanks to the members of the IBM Speech Recognition Group for their significant contributions to this work.

1 I n t r o d u c t i o n Parsing a natural language sentence can be viewed as making a sequence of disambiguation decisions: de- termining the part-of-speech of the words, choosing between possible constituent structures, and select- ing labels for the constituents. Traditionally, disam- biguation problems in parsing have been addressed by enumerating possibilities and explicitly declaring knowledge which might aid the disambiguation pro- cess. However, these approaches have proved too brittle for most interesting natural language prob- lems. This work addresses the problem of automatically discovering the disambiguation criteria for all of the decisions made during the parsing process, given the set of possible features which can act as disambigua- tors. The candidate disambiguators are the words in the sentence, relationships among the words, and re- lationships among constituents already constructed in the parsing process. Since most natural language rules are not abso- lute, the disambiguation criteria discovered in this work are never applied deterministically. Instead, all decisions are pursued non-deterministically accord- ing to the probability of each choice. These proba- bilities are estimated using statistical decision tree models. The probability of a complete parse tree (T) of a sentence (S) is the product of each decision (dl) conditioned on all previous decisions:

P(T[S) = H P(dildi-ldi-2""dlS)"

diET

Each decision sequence constructs a unique parse, and the parser selects the parse whose decision se- quence yields the highest cumulative probability. By combining a stack decoder search with a breadth- first algorithm with probabilistic pruning, it is pos- sible to identify the highest-probability parse for any sentence using a reasonable amount of memory and time.

The claim of this work is that statistics from a large corpus of parsed sentences combined with information-theoretic classification and training al- gorithms can produce an accurate natural language parser without the aid of a complicated knowl- edge base or grammar. This claim is justified by constructing a parser, called SPATTER (Statistical PATTErn Recognizer), based on very limited lin- gnistic information, and comparing its performance to a state-of-the-art grammar-based parser on a common task. It remains to be shown that an accu- rate broad-coverage parser can improve the perfor- mance of a text processing application. This will be the subject of future experiments. One of the important points of this work is that statistical models of natural language should not be restricted to simple, context-insensitive models. In a problem like parsing, where long-distance lex- ical information is crucial to disambiguate inter- pretations accurately, local models like probabilistic context-free grammars are inadequate. This work illustrates that existing decision-tree technology can be used to construct and estimate models which se- lectively choose elements of the context which con- tribute to disambignation decisions, and which have few enough parameters to be trained using existing resources. I begin by describing decision-tree modeling, showing that decision-tree models are equivalent to interpolated n-gram models. Then I briefly describe the training and parsing procedures used in SPAT- TER. Finally, I present some results of experiments comparing SPATTER with a grammarian's rule- based statistical parser, along with more recent re- suits showing SPATTER applied to the Wall Street Journal domain.

2 Decision-Tree Modeling Much of the work in this paper depends on replac- ing human decision-making skills with automatic decision-making algorithms. The decisions under consideration involve identifying constituents and constituent labels in natural language sentences. Grammarians, the human decision-makers in pars- ing, solve this problem by enumerating the features of a sentence which affect the disambiguation deci- sions and indicating which parse to select based on the feature values. The grammarian is accomplish- ing two critical tasks: identifying the features which are relevant to each decision, and deciding which choice to select based on the values of the relevant features. Decision-tree classification algorithms account for both of these tasks, and they also accomplish a

third task which grammarians classically find dif- ficult. By assigning a probability distribution to the possible choices, decision trees provide a ranking sys- tem which not only specifies the order of preference for the possible choices, but also gives a measure of the relative likelihood that each choice is the one which should be selected.

2.1 W h a t is a Decision Tree? A decision tree is a decision-making device which assigns a probability to each of the possible choices

based on the context of the decision: P(flh), where

f is an element of the future vocabulary (the set of

choices) and h is a history (the context of the de-

cision). This probability P(flh) is determined by

asking a sequence of questions ql q2 ... qn about the context, where the ith question asked is uniquely de- termined by the answers to the i - 1 previous ques- tions. For instance, consider the part-of-speech tagging problem. The first question a decision tree might ask is:

  1. What is the word being tagged?

If the answer is the, then the decision tree needs

to ask no more questions; it is clear that the deci-

sion tree should assign the tag f = determiner with

probability 1. If, instead, the answer to question 1 is bear, the decision tree might next ask the question:

  1. What is the tag of the previous word?

If the answer to question 2 is determiner, the de-

cision tree might stop asking questions and assign

the tag f = noun with very high probability, and

the tag f = verb with much lower probability. How-

ever, if the answer to question 2 is noun, the decision

tree would need to ask still more questions to get a good estimate of the probability of the tagging deci- sion. The decision tree described in this paragraph is shown in Figure 1. Each question asked by the decision tree is repre- sented by a tree node (an oval in the figure) and the possible answers to this question are associated with branches emanating from the node. Each node de- fines a probability distribution on the space of pos- sible decisions. A node at which the decision tree stops asking questions is a leaf node. The leaf nodes represent the unique states in the decision-making problem, i.e. all contexts which lead to the same leaf node have the same probability distribution for the decision.

2.2 Decision Trees vs. n-graxns A decision-tree model is not really very different from an interpolated n-gram model. In fact, they

tree can be defined as an interpolated n-gram model where the At function is defined as:

1 if hk~hk2.., h~. is aleaf, Ai(hk~hk2... hk,) = 0 otherwise.

2. 3 Decision-Tree A l g o r i t h m s The point of showing the equivalence between n- gram models and decision-tree models is to make clear that the power of decision-tree models is not in their expressiveness, but instead in how they can be automatically acquired for very large modeling problems. As n grows, the parameter space for an n-gram model grows exponentially, and it quickly becomes computationally infeasible to estimate the smoothed model using deleted interpolation. Also, as n grows large, the likelihood that the deleted in- terpolation process will converge to an optimal or even near-optimal parameter setting becomes van- ishingly small. On the other hand, the decision-tree learning al- gorithm increases the size of a model only as the training data allows. Thus, it can consider very large history spaces, i.e. n-gram models with very large n. Regardless of the value of n, the number of param- eters in the resulting model will remain relatively constant, depending mostly on the number of train- ing examples. The leaf distributions in decision trees are empiri- cal estimates, i.e. relative-frequency counts from the training data. Unfortunately, they assign probabil- ity zero to events which can possibly occur. There- fore, just as it is necessary to smooth empirical n- gram models, it is also necessary to smooth empirical decision-tree models. The decision-tree learning algorithms used in this work were developed over the past 15 years by the IBM Speech Recognition group (Bahl et al., 1989). The growing algorithm is an adaptation of the CART algorithm in (Breiman et al., 1984). For detailed descriptions and discussions of the decision- tree algorithms used in this work, see (Magerman, 1994). An important point which has been omitted from this discussion of decision trees is the fact that only binary questions are used in these decision trees. A question which has k values is decomposed into a se- quence of binary questions using a classification tree on those k values. For example, a question about a word is represented as 30 binary questions. These 30 questions are determined by growing a classifi- cation tree on the word vocabulary as described in (Brown et al., 1992). The 30 questions represent 30 different binary partitions of the word vocabulary,

and these questions are defined such that it is possi- ble to identify each word by asking all 30 questions. For more discussion of the use of binary decision-tree questions, see (Magerman, 1994).

3 S P A T T E R P a r s i n g The SPATTER parsing algorithm is based on inter- preting parsing as a statistical pattern recognition process. A parse tree for a sentence is constructed by starting with the sentence's words as leaves of a tree structure, and labeling and extending nodes these nodes until a single-rooted, labeled tree is con- structed. This pattern recognition process is driven by the decision-tree models described in the previous section.

3.1 S P A T T E R R e p r e s e n t a t i o n A parse tree can be viewed as an n-ary branching tree, with each node in a tree labeled by either a non-terminal label or a part-of-speech label. If a parse tree is interpreted as a geometric pattern, a constituent is no more than a set of edges which meet at the same tree node. For instance, the noun phrase, "a brown cow," consists of an edge extending to the right from "a," an edge extending to the left from "cow," and an edge extending straight up from "brown".

Figure 2: Representation of constituent and labeling of extensions in S P A T T E R.

In SPATTER, a parse tree is encoded in terms of four elementary components, or features: words, tags, labels, and extensions. Each feature has a fixed vocabulary, with each element of a given feature vo- cabulary having a unique representation. The word feature can take on any value of any word. The tag feature can take on any value in the part-of-speech tag set. The label feature can take on any value in the non-terminal set. The extension can take on any of the following five values:

r i g h t - the node is the first child of a constituent;

left - the node is the last child of a constituent;

u p - the node is neither the first nor the last child of a constituent;

unary - the node is a child of a unary constituent;

root - the node is the root of the tree.

For an n word sentence, a parse tree has n leaf nodes, where the word feature value of the ith leaf node is the ith word in the sentence. The word fea- ture value of the internal nodes is intended to con- tain the lexical head of the node's constituent. A deterministic lookup table based on the label of the internal node and the labels of the children is used to approximate this linguistic notion. The SPATTER representation of the sentence

(S (N Each_DD1 code_NN

(Tn used_VVN (P by_II (N the_AT PC_NN1)))) (V is_VBZ listed_VVN)) is shown in Figure 3. The nodes are constructed bottom-up from left-to-right, with the constraint that no constituent node is constructed until all of its children have been constructed. The order in which the nodes of the example sentence are constructed is indicated in the figure. 14

10

E a c h

| 4 t ,~i~4 l ~ t O d mind ~¢ tho PC ~- I i ~ o d

Figure 3: Treebank analysis encoded using feature values.

3.2 Training S P A T T E R ' s m o d e l s SPATTER consists of three main decision-tree models: a part-of-speech tagging model, a node- extension model, and a node-labeling model.

Each of these decision-tree models are grown using the following questions, where X is one of word, tag, label, or extension, and Y is either left and right:

  • What is the X at the current node?
    • What is the X at the node to the Y?
    • What is the X at the node two nodes to the Y?
    • What is the X at the current node's first child from the Y?
    • What is the X at the current node's second child from the Y? For each of the nodes listed above, the decision tree could also ask about the number of children and span of the node. For the tagging model, the values of the previous two words and their tags are also asked, since they might differ from the head words of the previous two constituents. The training algorithm proceeds as follows. The training corpus is divided into two sets, approx- imately 90% for tree growing and 10% for tree smoothing. For each parsed sentence in the tree growing corpus, the correct state sequence is tra- versed. Each state transition from si to 8i+1 is an event; the history is made up of the answers to all of the questions at state sl and the future is the value of the action taken from state si to state Si+l. Each event is used as a training example for the decision- tree growing process for the appropriate feature's tree (e.g. each tagging event is used for growing the tagging tree, etc.). After the decision trees are grown, they are smoothed using the tree smoothing corpus using a variation of the deleted interpolation algorithm described in (Magerman, 1994).

3.3 Parsing with S P A T T E R The parsing procedure is a search for the highest probability parse tree. The probability of a parse is just the product of the probability of each of the actions made in constructing the parse, according to the decision-tree models. Because of the size of the search space, (roughly O(ITI"INJ"), where [TJ is the number of part-of- speech tags, n is the number of words in the sen- tence, and [NJ is the number of non-terminal labels), it is not possible to compute the probability of every parse. However, the specific search algorithm used is not very important, so long as there are no search errors. A search error occurs when the the high- est probability parse found by the parser is not the highest probability parse in the space of all parses. SPATTER's search procedure uses a two phase approach to identify the highest probability parse of

seconds per sentence on an SGI R4400 with 160 megabytes of R A M. To evaluate S P A T T E R ' s performance on this do- main, I a m using the P A R S E V A L measures, as de- fined in (Black et al., 1991):

Precision no. of correct constituents in S P A T T E R parse no. of constituents in S P A T T E R parse

Recall

no. of correct constituents in S P A T T E R parse no. of constituents in treebank parse

C r o s s i n g B r a c k e t s no. of constituents which vio- late constituent boundaries with a constituent in the treebank parse.

The precision and recall measures do not consider constituent labels in their evaluation of a parse, since the treebank label set will not necessarily coincide with the labels used by a given grammar. Since SPATTER uses the same syntactic label set as the Penn Treebank, it makes sense to report labelled precision and labelled recall. These measures are computed by considering a constituent to be correct if and only if it's label matches the label in the tree- bank. Table 1 shows the results of SPATTER evaluated against the Penn Treebank on the Wall Street Jour- nal section 00.

Comparisons Avg. Sent. Length Treebank Constituents Parse Constituents Tagging Accuracy Crossings Per Sentence Sent. with 0 Crossings Sent. with 1 Crossing Sent. with 2 Crossings Precision Recall Labelled Precision Labelled Recall

Table 1: Results from the WSJ Penn Treebank ex- periments.

Figures 5, 6, and 7 illustrate the performance of SPATTER as a function of sentence length. SPAT- TER's performance degrades slowly for sentences up

to around 28 words, and performs more poorly and more erratically as sentences get longer. Figure 4 in- dicates the frequency of each sentence length in the test corpus.

8 0 7 0 8 0 SO 4 0 3 0 2 0 1 0 0

iii

4 • II 10 1 2 14 lid 18 2 0 2 | 2 4 2 i l 2 8 : 1 0 : 1 2 3 4 :ill 3 8 4 0 Senbmce Length

Figure 4: Frequency in the test corpus as a function of sentence length for Wall Street Journal experi- ments.

3. $

2. 2 1.S 1

0

t

l........................................................................................

$ 8 1 0 1 2 14 1 8 1 5 2 0 2 2 2 4 2 8 ~Zll 'lO $ 2 : 1 4 ~ l ~8 4 0 Sentence Length

Figure 5: Number of crossings per sentence as a function of sentence length for Wall Street Journal experiments.

5 C o n c l u s i o n Regardless of what techniques are used for parsing disambiguation, one thing is clear: if a particular piece of information is necessary for solving a dis- ambiguation problem, it must be made available to the disambiguation mechanism. The words in the sentence are clearly necessary to make parsing de- cisions, and in some cases long-distance structural information is also needed. Statisticalmodels for

1 0 0 %

9 0 % 8 0 % 7 0 % 6 0 % 5 0 % 4 0 % 3 0 % 2 0 % 1 0 % 0%

...... . '. : ', '. : : '. : ', ~ ~ ~ I ~ ~ : : : : : : : : : : ', '. ', ~ : : : : : :: I II; il 1 0 1 2 1 4 1 1 1 8 | 0 2 = J 4 t e 2 0 3 0 5 t $ 4 ~lll ~18 4 0 Sentence L~gth

Figure 6: Percentage of sentence with 0, 1, and 2 crossings as a function of sentence length for Wall Street Journal experiments.

1 0 0 %

9 6 %

9 0 %

85%

00%

76%

-. - e m e m o n

I 8 l O 1 | 1 4 1(1 1 8 s*O | | | 4 | $ 1 8 =0 S | S4 =e $8 4 0 Sentence Length

Figure 7: Precision and recall as a function of sen- tence length for Wall Street Journal experiments.

parsing need to consider many more features of a sentence than can be managed by n-gram modeling techniques and many more examples than a human can keep track of. The SPATTER parser illustrates how large amounts of contextual information can be incorporated into a statistical model for parsing by applying decision-tree learning algorithms to a large annotated corpus.

R e f e r e n c e s L. R. Bahl, P. F. Brown, P. V. deSouza, and R. L. Mercer. 1989. A tree-based statistical language model for natural language speech recognition.

IEEE ~Pransactions on Acoustics, Speech, and Sig-

nal Processing, Vol. 36, No. 7, pages 1001-1008.

L. E. Baum. 1972. An inequality and associated maximization technique in statistical estimation

of probabilistic functions of markov processes. In-

equalities, Vol. 3, pages 1-8.

E. Black and et al. 1991. A procedure for quanti- tatively comparing the syntactic coverage of en-

glish grammars. Proceedings o/ the February 1991

DARPA Speech and Natural Language Workshop,

pages 306-311. E. Black, R. Garside, and G. Leech. 1993.

Statistically-driven computer grammars of english:

the ibm/lancaster approach. Rodopi, Atlanta,

Georgia.

L. Breiman, J. H. Friedman, R. A. Olshen, and C. J.

Stone. 1984. Ci~ssi]ication and Regression Trees.

Wadsworth and Brooks, Pacific Grove, California.

P. F. Brown, V. Della Pietra, P. V. deSouza, J. C. Lai, and R. L. Mercer. 1992. "Class-based

n-gram models of natural language." Computa-

tional Linguistics, 18(4), pages 467-479.

D. M. Magerman. 1994. Natural Language Pars-

ing as Statistical Pattern Recognition. Doctoral

dissertation. Stanford University, Stanford, Cali- fornia.