<?xml version="1.0"?><!DOCTYPE article SYSTEM "/project/take/software/searchbench_offline_processing/paperxml_generator/aclextractor/src/python/../resource/dtd/paperxml.dtd"><article><header><firstpageheader><page local="1" global="793"/><title>Learning with Compositional Semantics as Structural Inference for Subsentential Sentiment Analysis</title><author surname="Choi" givenname="Yejin"><org  name="Cornell University" country="USA" city="Ithaca"/></author><author surname="Cardie" givenname="Claire"><org  name="Cornell University" country="USA" city="Ithaca"/></author></firstpageheader><frontmatter><p><b>Learning with Compositional Semantics as Structural Inference for Subsentential Sentiment Analysis</b></p><p><b>Yejin Choi and Claire Cardie</b></p><p>Department of Computer Science Cornell University Ithaca, NY 14853</p><p>{ychoi,cardie}@cs.Cornell.edu</p></frontmatter><abstract>Determining the polarity of a sentiment-bearing expression requires more than a sim­ple bag-of-words approach. In particular, words or constituents within the expression can interact with each other to yield a particu­lar overall polarity. In this paper, we view such subsentential interactions in light of <i>composi­tional semantics, </i>and present a novel learning-based approach that incorporates structural in­ference motivated by compositional seman­tics into the learning procedure. Our exper­iments show that (1) simple heuristics based on compositional semantics can perform bet­ter than learning-based methods that do not in­corporate compositional semantics (accuracy of 89.7% vs. 89.1%), but (2) a method that integrates compositional semantics into learn­ing performs better than all other alterna­tives (90.7%). We also find that "content-word negators", not widely employed in pre­vious work, play an important role in de­termining expression-level polarity. Finally, in contrast to conventional wisdom, we find that expression-level classification accuracy uniformly <i>decreases </i>as additional, potentially disambiguating, context is considered. </abstract></header><body><section number="1" title="Introduction"><p>Determining the polarity of sentiment-bearing ex­pressions at or below the sentence level requires more than a simple bag-of-words approach. One of the difficulties is that words or constituents within the expression can interact with each other to yield a particular overall polarity. To facilitate our discus­sion, consider the following examples:</p><doubt alpha="59.1" length="44" tooSmall="False" monospace="0.0">1 : [I did [not]-have any[doubt]-about it.]+</doubt><doubt alpha="63.4" length="41" tooSmall="False" monospace="0.0">2: [The report[eliminated]-my [doubt]-.]+</doubt><doubt alpha="60.9" length="46" tooSmall="False" monospace="0.0">3: [They could [not]-[eliminate]-my[doubt]-.]-</doubt><p>In the first example, "doubt" in isolation carries a negative sentiment, but the overall polarity of the sentence is positive because there is a <i>negator </i>"not", which flips the polarity. In the second example, both "eliminated" and "doubt" carry negative sentiment in isolation, but the overall polarity of the sentence is positive because "eliminated" acts as a negator for its argument "doubt". In the last example, there are effectively two negators - "not" and "eliminated" -which reverse the polarity of "doubt" twice, result­ing in the negative polarity for the overall sentence.</p><p>These examples demonstrate that words or con­stituents interact with each other to yield the expression-level polarity. And a system that sim­ply takes the majority vote of the polarity of indi­vidual words will not work well on the above exam­ples. Indeed, much of the previous learning-based research on this topic tries to incorporate salient in­teractions by encoding them as features. One ap­proach includes features based on <i>contextual va­lence shifters<footnote anchor="1"/> </i>(Polanyi and Zaenen, 2004), which are words that affect the polarity or intensity of sen­timent over neighboring text spans (e.g., Kennedy al. (2007)). Another approach encodes frequent sub-sentential patterns (e.g., McDonald et al. (2007)) as features; these might indirectly capture some of the subsentential interactions that affect polarity. How-</p><doubt alpha="54.0" length="50" tooSmall="False" monospace="0.0">and Inkpen (2005), Wilson et al. (2005), Shaikh et</doubt><footnote label="1">For instance, "never", "nowhere", "little", "most", "lack", "scarcely", "deeply".</footnote><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">793</doubt><p><i>Proceedings of the 2008 Conference on Empirical Methods in Natural Language Processing, </i>pages 793-801, Honolulu, October 2008. ©2008 Association for Computational Linguistics<page local="2" global="794"/></p><p>ever, both types of approach are based on learning models with a flat bag-of-features: some structural information can be encoded as higher order features, but the final representation of the input is still a flat feature vector that is inherently too limited to ade­quately reflect the complex structural nature of the underlying subsentential interactions. (Liang et al.,</p><doubt alpha="0.0" length="5" tooSmall="False" monospace="0.0">2008)</doubt><p>Moilanen and Pulman (2007), on the other hand, handle the structural nature of the interactions more directly using the ideas from <i>compositional seman­tics </i>(e.g., Montague (1974), Dowty et al. (1981)). In short, <i>the Principle ofCompositionality </i>states that the meaning of a compound expression is a func­tion of the meaning of its parts and of the syntac­tic rules by which they are combined (e.g., Mon­tague (1974), Dowty et al. (1981)). And Moilanen and Pulman (2007) develop a collection of compo­sition rules to assign a sentiment value to individual expressions, clauses, or sentences. Their approach can be viewed as a type of structural inference, but their hand-written rules have not been empirically compared to learning-based alternatives, which one might expect to be more effective in handling some aspects of the polarity classification task.</p><p>In this paper, we begin to close the gap between learning-based approaches to expression-level po­larity classification and those founded on composi­tional semantics: we present a novel learning-based approach that incorporates structural inference mo­tivated by compositional semantics into the learning procedure.</p><p>Adopting the view point of compositional seman­tics, our working assumption is that the polarity of a sentiment-bearing expression can be determined in a two-step process: (1) assess the polarities of the con­stituents of the expression, and then (2) apply a rela­tively simple set of inference rules to combine them recursively. Rather than a rigid application of hand­written compositional inference rules, however, we hypothesize that an ideal solution to the expression-level polarity classification task will be a method that can exploit ideas from compositional seman­tics while providing the flexibility needed to handle the complexities of real-world natural language — exceptions, unknown words, missing semantic fea­tures, and inaccurate or missing rules. The learning-based approach proposed in this paper takes a first step in this direction.</p><p>In addition to the novel learning approach, this paper presents new insights for <i>content-word nega­tors, </i>which we define as content words that can negate the polarity of neighboring words or con­stituents. (e.g., words such as "eliminated" in the example sentences). Unlike <i>function-word nega­tors, </i>such as "not" or "never", content-word nega­tors have been recognized and utilized less actively in previous work. (Notable exceptions include e.g., Niu et al. (2005), Wilson et al. (2005), and Moilanen</p><doubt alpha="45.0" length="20" tooSmall="False" monospace="0.0">and Pulman (2007).2)</doubt><p>In our experiments, we compare learning- and non-learning-based approaches to expression-level polarity classification — with and without com­positional semantics — and find that (1) simple heuristics based on compositional semantics outper­form (89.7% in accuracy) other reasonable heuris­tics that do not incorporate compositional seman­tics (87.7%); they can also perform better than sim­ple learning-based methods that do not incorporate compositional semantics (89.1%), (2) combining learning with the heuristic rules based on compo­sitional semantics further improves the performance (90.7%), (3) content-word negators play an impor­tant role in determining the expression-level polar­ity, and, somewhat surprisingly, we find that (4) expression-level classification accuracy uniformly decreases as additional, potentially disambiguating, context is considered.</p><p>In what follows, we first explore heuristic-based approaches in §2, then we present learning-based ap­proaches in §3. Next we present experimental results in §4, followed by related work in §5.</p></section><section number="2" title="Heuristic-Based Methods"><p>This section describes a set of heuristic-based meth­ods for determining the polarity of a sentiment-bearing expression. Each assesses the polarity of the words or constituents using a polarity lexicon that indicates whether a word has positive or negative polarity, and finds negators in the given expression using a negator lexicon. The methods then infer the expression-level polarity using voting-based heuris­tics (§ 2.1) or heuristics that incorporate composi­tional semantics (§2.2). The lexicons are described<page local="3" global="795"/></p><footnote label="2">See §5. Related Work for detailed discussion.</footnote><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">794</doubt><p>Definition of Compose( arg1, arg2 ) (COMPOsition with Majority Class) else if (Polarity( arg1 ) == Polarity( arg2 )) then Polarity( arg1 )</p><doubt alpha="62.4" length="85" tooSmall="False" monospace="0.0">Compose( arg1, arg2 ) = For COMPOMC : if (arg 1 is a negator) then - Polarity( arg2 )</doubt><p>else the majority polarity of data Compose( arg1, arg2 ) = For COMPOPR: if (arg1 is a negator) then - Polarity( arg2 ) (COMPOsition with PRiority) else Polarity( arg 1 )</p><table caption="Table 2: Compositional inference rules motivated by compositional semantics,"></table><doubt alpha="44.4" length="18" tooSmall="False" monospace="0.0">in §2.3.2.1 Voting</doubt><p>We first explore five simple heuristics based on vot­ing. Vote is defined as the majority polarity vote by words in a given expression. That is, we count the number of positive polarity words and negative polarity words in a given expression, and assign the majority polarity to the expression. In the case of a tie, we default to the prevailing polarity of the data.</p><p>For Neg(1), we first determine the majority polar­ity vote as above, and then if the expression contains <i>any </i>function-word negator, flip the polarity of the majority vote once. Neg(n) is similar to Neg(1), ex­cept we flip the polarity of the majority vote n times after the majority vote, where n is the number of function-word negators in a given expression.</p><p>NegEx(1) and NegEx(n) are defined similarly as Neg(1) and Neg(n) above, except both function-word negators and content-word negators are con­sidered as negators when flipping the polarity of the majority vote. See Table 1 for summary. Note that a word can be both a negator and have a negative prior polarity. For the purpose of voting, if a word is de­fined as a negator per the voting scheme, then that word does not participate in the majority vote.</p><subsection number="2.2" title="Compositional semantics"><p>Whereas the heuristics above use voting-based in­ference, those below employ a set of hand-written rules motivated by compositional semantics. Table 2 shows the definition of the rules along with moti­vating examples. In order to apply a rule, we first detect a syntactic pattern (e.g., [destroyed]VP [the terrorism]NP), then apply the <i>Compose </i>function as defined in Table 2 (e.g., Compose([destroyed], [the terrorism]) by rule #2).<footnote anchor="3"/></p><footnote label="3">Our implementation uses part-of-speech tags and function-words to coarsely determine the patterns. An implementation</footnote><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">795</doubt><p>For brevity, we refer to Neg(1) and Neg(n) col­lectively as Neg, and NegEx(1) and NegEx(n) col­lectively as NegEx.</p><table caption="Table 1: Heuristic methods,(nrefers to the number of negators found in a given expression.)" class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p></p></td><td class="cell"><p>Vote</p></td><td class="cell"><p>neg(l)</p></td><td class="cell"><p>neg(n)</p></td><td class="cell"><p>NegEx(I)</p></td><td class="cell"><p>NegEx(n)</p></td><td class="cell"><p>compo</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>type of negators</p></td><td class="cell"><p>none</p></td><td class="cell"><p>function-word</p></td><td class="cell"><p>function-word &amp; content-word</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>maximum # of negations applied</p></td><td class="cell"><p>0</p></td><td class="cell"><p>1</p></td><td class="cell"><p><i>n</i></p></td><td class="cell"><p>1</p></td><td class="cell"><p><i>n</i></p></td><td class="cell"><p><i>n</i></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>scope of negators</p></td><td class="cell"><p>N/A</p></td><td class="cell"><p>over the entire expression</p></td><td class="cell"><p>compositional</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table class="main" frame="box" rules="all" border="0" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Rules</p></td><td class="cell"><p>Examples</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>1</p></td><td class="cell"><p>Polarity(not_[argl] ) =</p></td><td class="cell"><p>-i Polarity( argl )</p></td><td class="cell"><p>not[bad<b>]orfli.</b></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>2</p></td><td class="cell"><p>Polarity( [VP]_[NP] ) =</p></td><td class="cell"><p>Compose( [VP], [NP] )</p></td><td class="cell"><p>[destroyed]<i>vp </i>[the terrorism]NP.</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>3</p></td><td class="cell"><p>Polarity( [VPl]_to_[VP2] ) =</p></td><td class="cell"><p>Compose( [VP1], [VP2] )</p></td><td class="cell"><p>[refused] <b>y </b>pi to [deceive]<b>y</b>p2 the man.</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>4</p></td><td class="cell"><p>Polarity( [adj]_to_[VP] ) =</p></td><td class="cell"><p>Compose( [adj], [VP] )</p></td><td class="cell"><p>[unlikely]    to [destroy] <i>vp </i>the planet.</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>5</p></td><td class="cell"><p>Polarity( [NP1]_[IN]_[NP2] ) =</p></td><td class="cell"><p>Compose( [NP1], [NP2] )</p></td><td class="cell"><p>[lack<b>]Arpi </b>[of]<i>in </i>[crime]<i>np</i><i>2 </i>in rural areas.</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>6</p></td><td class="cell"><p>Polarity( [NP]_[VP] ) =</p></td><td class="cell"><p>Compose( [VP], [NP] )</p></td><td class="cell"><p>[pollution]<i>Np</i><i> </i>[has decreased]<b>y </b><i>p.</i></p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>7</p></td><td class="cell"><p>Polarity( [NP]_be_[adj] ) =</p></td><td class="cell"><p>Compose( [adj], [NP] )</p></td><td class="cell"><p>[harm]     is [minimal] a(§.</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><page local="4" global="796"/><p><i>Compose </i>first checks whether the first argument is a negator, and if so, flips the polarity of the second argument. Otherwise, <i>Compose </i>resolves the polar­ities of its two arguments. Note that if the second argument is a negator, we do not flip the polarity of the irst argument, because the irst argument in gen­eral is not in the semantic scope of the negation.<footnote anchor="4"/> In­stead, we treat the second argument as a constituent with negative polarity.</p><p>We experiment with two variations of the <i>Com­pose </i>function depending on how conflicting polari­ties are resolved: COMPOMC uses a <i>Compose </i>func­tion that defaults to the <b>M</b>ajority <b>C</b>lass of the po­larity of the data,<footnote anchor="5"/> while CompoPR uses a <i>Compose </i>function that selects the polarity of the argument that has higher semantic <b>PR</b>iority. For brevity, we refer to CompoPR and CompoMC collectively as Compo.</p></subsection><subsection number="2.3" title="Lexicons"><p>The polarity lexicon is initialized with the lexicon of Wilson et al. (2005) and then expanded using the General Inquirer dictionary.<footnote anchor="6"/> In particular, a word contained in at least two of the following categories is considered as positive: Positiv, Pstv, PosAff, Pleasur, Virtue, Increas, and a word contained in at least one of the following categories is consid­ered as negative: Negativ, Ngtv, NegAff, Pain, Vice, Hostile, fail, EnlLoss, WlbLoss, Tran-Loss.</p><p>For the (function- and content-word) negator lex­icon, we collect a handful of seed words as well as General Inquirer words that appear in either NotLw or Decreas category. Then we expand the list of content-negators using the synonym information of WordNet (Miller, 1995) to take a simple vote among senses.</p><p>based on parse trees might further improve the performance.</p><footnote label="4">Moilanen and Pulman (2007) provide more detailed dis­cussion on the semantic scope of negations and the semantic priorities in resolving polarities.</footnote><footnote label="5">The majority polarity of the data we use for our experi­ments is negative.</footnote><footnote label="6">Available at http://www.wjh.harvard.edu/~inquirer/ . When consulting the General Inquirer dictionary, senses with less than 5% frequency and senses specific to an idiom are dropped.</footnote></subsection></section><section number="3" title="Learning-Based Methods"><p>While we expect that a set of hand-written heuristic rules motivated by compositional semantics can be effective for determining the polarity of a sentiment-bearing expression, we do not expect them to be per­fect. Interpreting natural language is such a com­plex task that writing a perfect set of rules would be extremely challenging. Therefore, a more ideal solution would be a learning-based method that can exploit ideas from compositional semantics while providing the flexibility to the rigid application of the heuristic rules. To this end, we present a novel learning-based approach that incorporates inference rules inspired by compositional semantics into the learning procedure (§3.2). To assess the effect of compositional semantics in the learning-based meth­ods, we also experiment with a simple classiica-tion approach that does not incorporate composi­tional semantics (§3.1). The details of these two approaches are elaborated in the following subsec­tions.</p><subsection number="3.1" title="Simple Classification (SC)"><p>Given an expression <i>x </i>consisting of <i>n </i>words <i>x\, xn</i>, the task is to determine the polarity <i>y </i>€ <i>{positive, negative} </i>of x. In our simple binary classiication approach, <i>x </i>is represented as a vec­tor of features <b>f </b>(x), and the prediction <i>y </i>is given by argmaxy <b>w </b>• <b>f</b>(x, <i>y </i>), where <b>w </b>is a vector of parameters learned from training data. In our experiment, we use an online SVM algorithm called MIRA (Margin Infused Relaxed Algorithm) (Crammer and Singer, 2003)<footnote anchor="7"/> for training. For each x, we encode the following features:</p><p>• Lexical: We add every word <i>xi </i>in x, and also add the lemma of <i>x</i><i>i </i>produced by the CASS partial parser toolkit (Abney, 1996).</p><p>• Dictionary: In order to mitigate the problem of unseen words in the test data, we add features that describe word categories based on the Gen­eral Inquirer dictionary. We add this feature for each <i>x</i><b>i </b>that is not a stop word.</p><p>• vote: We experiment with two variations of voting-related features: for SC-Vote, we add</p><footnote label="7">We use the Java implementation of this algorithm available at http://www.seas.upenn.edu/~strctlrn/StructLearn /StructLearn.html.</footnote><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">796</doubt><page local="5" global="797"/><p>Simple Classification</p><doubt alpha="59.6" length="57" tooSmall="False" monospace="0.0">y —argmaxyscore(y) / &lt;— loss_flat(y*,y)w—update(w,/,y*,y)</doubt><doubt alpha="53.5" length="43" tooSmall="False" monospace="0.0">score(y):= w • f(x,y)loss_flat(y*,y):=if{y*</doubt><p>Classification with Compositional Inference Find <i>K </i>best z and denote them as <i>Z = </i>{z(1),z(K)}</p><doubt alpha="59.3" length="81" tooSmall="False" monospace="0.0">s.t. V i &lt;j,score(z(i)) &gt; score(z(j))zbadj_jjyjjj,z(fc)s^loss_compo(y*, z^fc\x)&gt;0</doubt><p>(if such z6ad not found in Z, skip parameter update for this.) If loss_compo(y*, z*, <i>x)</i><i> </i><i>&gt;</i><i> </i>0</p><p><i>zgood </i><b><i>j_ </i></b>mjnfe z(fc) s ^ loss_compo(y*, z^fc\ x) = 0</p><p>(if such zg°°d not found in Z, stick to the original <i>z*</i>.) / &lt;— loss_compo(y*, z6ad, x) - loss_compo(y*, z*, <i>x)</i><i> </i>w &lt;— update(w, /, <i>z*,zbad) </i>Deinitions of score functions and loss functions</p><doubt alpha="50.0" length="10" tooSmall="False" monospace="0.0">y)0 else 1</doubt><doubt alpha="51.9" length="54" tooSmall="False" monospace="0.0">score(z) :=J2% score(z4) := loss_compo(y*,z,x):= if(y*</doubt><doubt alpha="58.3" length="12" tooSmall="False" monospace="0.0">Hw^f(x,zi,i)</doubt><doubt alpha="43.8" length="16" tooSmall="False" monospace="0.0">C(x,z)) 0 else 1</doubt><p>Figure 1: Training procedures. y* € <i>{positive, negative} </i>denotes the true label for a given expression x = x1<i>, ...,xn. </i>z* denotes the pseudo gold standard for hidden variables z.</p><p>a feature that indicates the dominant polarity of words in the given expression, without consid­ering the effect of negators. For SC-NegEx, we count the number of content-word nega­tors as well as function-word negators to de­termine whether the inal polarity should be flipped. Then we add a conjunctive feature that indicates the dominant polarity together with whether the final polarity should be flipped. For brevity, we refer to SC-Vote and SC-NegEx collectively as SC.</p><p>Notice that in this simple binary classiication set­ting, it is inherently dificult to capture the compo­sitional structure among words in <i>x, </i>because <b>f</b><i>(x,</i><i> </i><i>y)</i><i> </i>is merely a flat bag of features, and the prediction is governed simply by the dot product of <b>f</b><i>(x,</i><i> </i><i>y)</i><i> </i>and the parameter vector w.</p></subsection><subsection number="3.2" title="Classification with Compositional Inference (CCI)"><p>Next, instead of determining <i>y </i>directly from <i>x, </i>we introduce hidden variables <b>z = </b><i>(z\,...,zn) </i>as intermediate decision variables, where <i>zi € {positive, negative, negator, none}, </i>so that <i>zi</i>represents whether <i>xi </i>is a word with posi­tive/negative polarity, or a negator, or none of the above. For simplicity, we let each intermediate de­cision variable <i>zi </i>(a) be determined independently from other intermediate decision variables, and (b)</p><p>For each token xi; if <i>x% </i>is a word in the negator lexicon</p><p>then z* — <i>negator </i>else if <i>x% </i>is in the polarity lexicon as negative</p><p>then z* — <i>negative </i>else if <i>x% </i>is in the polarity lexicon as positive</p><p>then z* — <i>positive </i>else</p><p>then z* — <i>none </i>Figure 2: Constructing Soft Gold Standard z* depend only on the input x, so that <i>zi = </i>argmaxz. <b>w </b>• <b>f</b>(x, <i>zi, </i><i>i),</i><i> </i>where <b>f</b>(x, <i>zi, </i><i>i)</i><i> </i>is the feature vector en­coding around the <i>i</i>th word (described on the next page). once we determine the intermediate decision variables, we apply the heuristic rules motivated by compositional semantics (from Table 2) in order to obtain the inal polarity <i>y </i>of <i>x. </i>That is, <i>y </i>= C<i>(x,</i><i> </i><b>z), </b>where C is the function that applies the composi­tional inference, either CompoPR or CompoMC.</p><p>For training, there are two issues we need to handle: the irst issue is dealing with the hidden variables <i>z. </i>Because the structure of composi­tional inference C does not allow dynamic program­ming, it is intractable to perform exact expectation-maximization style training that requires enumerat­ing all possible values of the hidden variables <b>z. </b>In­stead, we propose a simple and tractable training rule based on the creation of a <i>soft </i>gold standard for <b>z.</b><page local="6" global="798"/><b> </b>In particular, we exploit the fact that in our task, we can automatically construct a reasonably accu­rate gold standard for <b>z, </b>denoted as <b>z* </b>: as shown in Figure 2, we simply rely on the negator and polar­ity lexicons. Because <b>z* </b>is not always correct, we allow the training procedure to replace <b>z* </b>with po­tentially better assignments as learning proceeds: in the event that the soft gold standard <b>z* </b>leads to an in­correct prediction, we search for an assignment that leads to a correct prediction to replace <b>z* </b>. The exact procedure is given in Figure 1, and will be discussed again shortly.</p><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">797</doubt><p>Figure 1 shows how we modify the parameter up­date rule of MIRA (Crammer and Singer, 2003) to reflect the aspect of compositional inference. In the event that the soft gold standard <b>z* </b>leads to an incor­rect prediction, we search for <b>zgood, </b>the assignment with highest score that leads to a correct prediction, and replace <b>z* </b>with <b>zgood. </b>In the event of no such <i>z</i><i>good </i>being found among the K-best assignments of <b>z, </b>we stick with <b>z*.</b></p><p>The second issue is finding the assignment of <b>z </b>with the highest score<b>(z) = </b><i>J2</i><b>%w </b>• <b>f</b>(x, <i>z%, </i>i) that leads to an incorrect prediction <i>y = C </i>(x, <b>z). </b>Be­cause the structure of compositional inference C does not allow dynamic programming, finding such an assignment is again intractable. We resort to enu­merating only over <i>K</i>-best assignments instead. If none of the <i>K</i>-best assignments of <b>z </b>leads to an in­correct prediction <i>y, </i>then we skip the training in­stance for parameter update.</p><p><b>Features. </b>For each x% in x, we encode the follow­ing features:</p><p>• Lexical: We include the current word x% as well as the lemma of x% produced by CASS partial parser toolkit (Abney, 1996). We also add a boolean feature to indicate whether the current word is a stop word.</p><p>• Dictionary: In order to mitigate the problem with unseen words in the test data, we add fea­tures that describe word categories based on the General Inquirer dictionary. We add this fea­ture for each x% that is not a stop word. We also add a number of boolean features that pro­vide following properties of x% using the polar­ity lexicon and the negator lexicon:</p><p><b>- </b>whether x% is a function-word negator <b>- </b>whether x% is a content-word negator <b>- </b>whether x% is a negator of any kind</p><p><b>- </b>the polarity of x% according to Wilson et al. (2005)'s polarity lexicon</p><p><b>- </b>the polarity of x% according to the lexicon derived from the General Inquirer dictio­nary <b>- </b>conjunction of the above two features</p><p>• Vote: We encode the same vote feature that we use for SC-NegEx described in § 3.1.</p><p>As in the heuristic-based compositional semantics approach (§ 2.2), we experiment with two variations of this learning-based approach: CCI-CompoPR and CCI-CompoMC, whose compositional infer­ence rules are CompoPR and CompoMC respec­tively. For brevity, we refer to both variations col­lectively as CCI-Compo.</p></subsection></section><section number="4" title="Experiments"><p>The experiments below evaluate our heuristic- and learning-based methods for subsentential sentiment analysis (§ 4.1). In addition, we explore the role of context by expanding the boundaries of the sentiment-bearing expressions (§ 4.2).</p><subsection number="4.1" title="Evaluation with given boundaries"><p>For evaluation, we use the Multi-Perspective Ques­tion Answering (MPQA) corpus (Wiebe et al., 2005), which consists of 535 newswire documents manually annotated with phrase-level subjectivity information. We evaluate on all strong (i.e., inten­sity of expression is 'medium' or higher), sentiment-bearing (i.e., polarity is 'positive' or 'negative') ex­pressions.<footnote anchor="8"/> As a result, we can assume the bound­aries of the expressions are given. performance is reported using 10-fold cross-validation on 400 doc­uments; a separate 135 documents were used as a development set. Based on pilot experiments on the development data, we set parameters for MIRA as follows: slack variable to 0.5, and the number of incorrect labels (constraints) for each parameter up­date to 1. The number of iterations (epochs) for training is set to 1 for simple classification, and to 4 for classification with compositional inference.<page local="7" global="799"/> We use K = 20 for classification with compositional inference.</p><footnote label="8">We discard expressions with confidence marked as 'uncer­tain'.</footnote><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">798</doubt><p><b>Results. </b>Performance is reported in Table 3. In­terestingly, the heuristic-based methods Neg (~ 82.2%) that only consider function-word negators perform even worse than Vote (86.5%), which does not consider negators. On the other hand, the NegEx methods (87.7%) that do consider content-word negators as well as function-word negators perform better than Vote. This confirms the importance of content-word negators for determining the polari­ties of expressions. The heuristic-based methods motivated by compositional semantics Compo fur­ther improve the performance over NegEx, achiev­ing up to 89.7% accuracy. In fact, these heuris­tics perform even better than the SC learning-based methods (~ 89.1%). This shows that heuristics that take into account the compositional structure of the expression can perform better than learning-based methods that do not exploit such structure.</p><p>Finally, the learning-based methods that in­corporate compositional inference CCI-Compo (~ 90.7%) perform better than all of the previous methods. The difference between CCI-CompoPR (90.7%) and SC-NegEx (89.1%) is statistically sig­nificant at the .05 level by paired t-test. The dif­ference between Compo and any other heuristic that is not based on computational semantics is also statistically significant. In addition, the difference between CCICompoPR (learning-based) and Com-poMC (non-learning-based) is statistically signifi­cant, as is the difference between NegEx and Vote.</p></subsection><subsection number="4.2" title="Evaluation with noisy boundaries"><p>one might wonder whether employing additional context outside the annotated expression boundaries could further improve the performance. Indeed, con­ventional wisdom would say that it is necessary to employ such contextual information (e.g., Wilson et al. (2005)). In any case, it is important to determine whether our results will apply to more real-world settings where human-annotated expression bound­aries are not available.</p><p>To address these questions, we gradually relax our previous assumption that the exact boundaries of expressions are given: for each annotation bound­ary, we expand the boundary by x words for each direction, up to sentence boundaries, where x € {1, 5, oo}. We stop expanding the boundary if it will collide with the boundary of an expression with a different polarity, so that we can consistently re­cover the expression-level gold standard for evalua­tion. This expansion is applied to both the training and test data, and the performance is reported in Ta­ble 4. From this experiment, we make the following observations:</p><p>• Expanding the boundaries hurts the perfor-</p><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">799</doubt><table caption="Table 3: Performance (in accuracy) on MPQA dataset." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Heuristic-Based</p></td><td class="cell"><p>Learning-Based</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Vote Neg Neg Neg Neg (1)    (n)    Ex Ex (1) (n)</p></td><td class="cell"><p>compo compo MC PR</p></td><td class="cell"><p>sc sc Vote Neg EX</p></td><td class="cell"><p>CCI CCI compo compo MC PR</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>86.5   82.0  82.2  87.7 87.7</p></td><td class="cell"><p>89.7 89.4</p></td><td class="cell"><p>88.5 89.1</p></td><td class="cell"><p>90.6 90.7</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><table caption="Table 4: Performance (in accuracy) on MPQA data set with varying boundaries of expressions." class="main" frame="box" rules="all" border="1" regular="False"><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Data</p></td><td class="cell"><p>Heuristic-Based</p></td><td class="cell"><p>Learning-Based</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>Vote Neg Neg Neg Neg (1)    (n)    Ex Ex (1) (n)</p></td><td class="cell"><p>compo compo MC PR</p></td><td class="cell"><p>sc sc Vote Neg EX</p></td><td class="cell"><p>CCI CCI compo compo MC PR</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"><p>[-0.+0]</p><p>[-5,+5]</p><p>[-oo,+oo]</p></td><td class="cell"><p>86.5   82.0  82.2  87.7 87.7 86.4  81.0  81.2  87.2 87.2 85.9  79.0  79.4  85.7 85.6 85.3   75.8  76.9  83.9 83.9</p></td><td class="cell"><p>89.7 89.4 89.3 89.0 88.2 88.0 87.0 86.9</p></td><td class="cell"><p>88.5 89.1</p><p>88.3 88.4</p><p>86.4 87.1 85.8 85.8</p></td><td class="cell"><p>90.6 90.7 89.5 89.4</p><p>88.7 88.7 87.3 87.5</p></td><td class="cell"></td></tr><tr class="row"><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td><td class="cell"></td></tr></table><page local="8" global="800"/><p>mance for any method. This shows that most of relevant context for judging the polarity is con­tained within the expression boundaries, and motivates the task of finding the boundaries of opinion expressions.</p><p>• The NegEx methods perform better than Vote only when the expression boundaries are rea­sonably accurate. When the expression bound­aries are expanded up to sentence boundaries, they perform worse than Vote. We conjecture this is because the scope of negators tends to be limited to inside of expression boundaries.</p><p>• The Compo methods always perform better than any other heuristic-based methods. And their performance does not decrease as steeply as the NegEx methods as the expression boundaries expand. We conjecture this is be­cause methods based on compositional seman­tics can handle the scope ofnegators more ade­quately.</p><p>• Among the learning-based methods, those that involve compositional inference (CCI-Compo) always perform better than those that do not (SC) for any boundaries. And learning with compositional inference tend to perform bet­ter than the rigid application of heuristic rules (Compo), although the relative performance gain decreases once the boundaries are relaxed.</p></subsection></section><section number="5" title="Related Work"><p>The task focused on in this paper is similar to that of Wilson et al. (2005) in that the general goal of the task is to determine the polarity in context at a sub­sentence level. However, Wilson et al. (2005) for­mulated the task differently by limiting their evalua­tion to individual words that appear in their polarity lexicon. Also, their approach was based on a flat bag of features, and only a few examples of what we call content-word negators were employed.</p><p>our use of compositional semantics for the task of polarity classification is preceded by Moilanen and Pulman (2007), but our work differs in that we integrate the key idea of compositional seman­tics into learning-based methods, and that we per­form empirical comparisons among reasonable al­ternative approaches.  For comparison, we evaluated our approaches on the polarity classification task from SemEval-07 (Strapparava and Mihalcea, 2007). We achieve 88.6% accuracy with CompoPR, 90.1% with SCNegEx, and 87.6% with CCICom-poMC.<footnote anchor="9"/> There are a number of possible reasons for our lower performance vs. Moilanen and Pulman (2007) on this data set. First, SemEval-07 does not include a training data set for this task, so we use 400 documents from the MPQA corpus instead. In addition, the SemEval-07 data is very different from the MPQA data in that (1) the polarity annotation is given only at the sentence level, (2) the sentences are shorter, with simpler structure, and not as many negators as the MPQA sentences, and (3) there are many more instances with positive polarity than in the MPQA corpus.</p><p>Nairn et al. (2006) also employ a "polarity" prop­agation algorithm in their approach to the semantic interpretation of implicatives. However, their notion of polarity is quite different from that assumed here and in the literature on sentiment analysis. In partic­ular, it refers to the degree of "commitment" of the author to the truth or falsity of a complement clause for a textual entailment task.</p><p>McDonald et al. (2007) use a structured model to determine the sentence-level polarity and the document-level polarity simultaneously. But deci­sions at each sentence level does not consider struc­tural inference within the sentence.</p><p>Among the studies that examined content-word negators, Niu et al. (2005) manually collected a small set of such words (referred as "words that change phases"), but their lexicon was designed mainly for the medical domain and the type of nega­tors was rather limited. Wilson et al. (2005) also manually collected a handful of content-word nega­tors (referred as "general polarity shifters"), but not extensively. Moilanen and Pulman (2007) collected a more extensive set of negators semi-automatically using WordNet 2.1, but the empirical effect of such words was not explicitly investigated.</p><footnote label="9">For lack of space, we only report our performance on in­stances with strong intensities as defined in Moilanen and Pul­man (2007), which amounts to only 208 test instances. The cross-validation set of MPQA contains 4.9k instances.</footnote><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">800</doubt><page local="9" global="801"/></section><section number="6" title="Conclusion"><p>In this paper, we consider the task of determining the polarity of a sentiment-bearing expression, con­sidering the effect of interactions among words or constituents in lightofcompositionalsemantics. We presented a novel learning-based approach that in­corporates structural inference motivated by compo­sitional semantics into the learning procedure. our approach can be considered as a small step toward bridging the gap between computational semantics and machine learning methods. our experimen­tal results suggest that this direction of research is promising. Future research includes an approach that learns the compositional inference rules from data.</p></section><section title="Acknowledgments"><p>This work was supported in part by National Science and by Department of Homeland Security Grant N0014-07-1-0152. We also thank Eric Breck, Lil­lian Lee, Mats Rooth, the members of the Cornell NLP reading seminar, and the EMNLP reviewers for insightful comments on the submitted version of the paper.</p><doubt alpha="55.6" length="45" tooSmall="False" monospace="0.0">Foundation Grants BCS-0624277 and IIS-0535099</doubt></section><references><p>Steven Abney. 1996. Partial parsing via finite-state cascades. <i>Journal of Natural Language Engineering,</i> 2(4):337344.</p><p>Koby Crammer and Yoram Singer. 2003. Ultraconserva-tive online algorithms for multiclass problems. <i>JMLR </i>3:951.</p><p>David R. Dowty, Robert E. Wall and Stanley Peters. 1981. <i>Introduction to Montague Semantics.</i></p><p>Andrea Esuli and Fabrizio Sebastiani. 2006. SentiWord-Net: A Publicly Available Lexical Resource for Opin­ion Mining. In <i>Proceedings of 5th Conference on Lan­guage Resources and Evaluation (LREC),.</i></p><p>Percy Liang, Hal Daume III and Dan Klein. 2008. Struc­ture Compilation: Trading Structure for Features. In <i>International Conference on Machine Learning.</i></p><p>Minqing Hu and Bing Liu. 2004. Mining and sum­marizing customer reviews. In <i>Proceedings </i><i>ofthe</i><i> ACM SIGKDD International Conference on Knowl­edge Discovery &amp; Data Mining (KDD-2004).</i></p><p>Alistair Kennedy and Diana Inkpen. 2005. Senti­ment Classification of Movie and Product Reviews Us­ing Contextual Valence Shifters.  In <i>Proceedings of</i></p><p><i>FINEXIN 2005, Workshop on the Analysis ofInfor-mal and Formal Information Exchange during Nego­tiations.</i></p><p>Soo-Min Kim and Eduard Hovy. 2004. Determining the sentiment of opinions. In <i>Proceedings ofCOLING.</i></p><p>Ryan McDonald, Kerry Hannan, Tyler Neylon, Mike Wells and Jeff Reynar. 2007. Structured Models for Fine-to-Coarse Sentiment Analysis. In <i>Proceedings of Association for Computational Linguistics (ACL) </i>.</p><p>George A. Miller. 1995. WordNet: a lexical database for English. In <i>Communications of the ACM, </i>38(11):3941</p><p>Richard Montague. 1974. Formal Philosophy; Selected papers of Richard Montague. Yale University Press.</p><p>Karo Moilanen and Stephen Pulman. 2007. Sentiment Composition. In <i>Proceedings of Recent Advances in Natural Language Processing (RANLP 2007).</i></p><p>Rowan Nairn, Cleo Condoravdi and Lauri Karttunen 2006. Computing relative polarity for textual infer­ence. In <i>Inference in Computational Semantics (ICoS-</i></p><p><i>5).</i></p><p>Yun Niu, Xiaodan Zhu, Jianhua Li and Graeme Hirst. 2005. Analysis of polarity information in medical text.</p><p>In <i>Proceedings </i><i>ofthe</i><i> American Medical Informatics Association 2005 Annual Symposium (AMIA).</i></p><p>Livia Polanyi and Annie Zaenen. 2004. Contextual lex­ical valence shifters. In <i>Exploring Attitude and Affect in Text: Theories and Applications: Papers from the 2004 Spring Symposium, AAAI.</i></p><p>Mostafa Shaikh, Helmut Prendinger and Mitsuru Ishizuka. 2007. Assessing sentiment of text by se­mantic dependency and contextual valence analysis. In <i>Proc 2nd Int'l Confon Affective Computing and In­telligent Interaction (ACII 07).</i></p><p>Carlo Strapparava and Rada Mihalcea. 2007. Semeval-2007 task 14: Affective text. In <i>Proceedings </i><i>ofSe-</i><i>mEval.</i></p><p>Janyce Wiebe, Theresa Wilson and Claire Cardie. 2005. Annotating expressions of opinions and emotions in language. In <i>Language Resources and Evalua­tion (formerly Computers and the Humanities), 39(2-3):165210.</i></p><p>Theresa Wilson, Janyce Wiebe and Paul Hoffmann. 2005. Recognizing contextual polarity in phrase-level sentiment analysis. In <i>Proceedings ofHLT/EMNLP.</i></p><doubt alpha="0.0" length="3" tooSmall="False" monospace="0.0">801</doubt></references></body></article>