Is “My Favorite New Movie” My Favorite Movie? Probing the Understanding of Recursive Noun Phrases (2022)

Abstract: Recursive noun phrases (NPs) have interesting semantic properties. For example, “my favorite new movie” is not necessarily my favorite movie, whereas “my new favorite movie” is. This is common sense to humans, yet it is unknown whether language models have such knowledge. We introduce the Recursive Noun Phrase Challenge (RNPC), a dataset of three textual inference tasks involving textual entailment and event plausibility comparison, precisely targeting the understanding of recursive NPs. When evaluated on RNPC, state-of-the-art Transformer models only perform around chance. Still, we show that such knowledge is learnable with appropriate data. We further probe the models for relevant linguistic features that can be learned from our tasks, including modifier semantic category and modifier scope. Finally, models trained on RNPC achieve strong zero-shot performance on an extrinsic Harm Detection evaluation task, showing the usefulness of the understanding of recursive NPs in downstream applications.

## introduction recursion, the self-embedding of a linguistic structure, constitutes a fundamental property of human language. due to its hierarchical structure, it poses many challenges to human language acquisition. one such challenge occurs in the context of recursive noun phrases (nps), i.e., nps with multiple prenominal modifiers. for instance, in figure 1 , when asked to point to the second green ball in a series of balls, children sometimes erroneously point to the second and green ball (intersective interpretation), instead of the second among green balls (recursive interpretation) @xcite @xcite . we investigate whether language models (lms) make similar errors, since the understanding of recursive nps is also fundamental in real-world ai applications. for example, a summarization system should know that the former us president cannot be shortened as the president, since they are no longer in power. also, a self-driving car asked to take the first left-hand exit should not assume that it is always the first exit. previous work has studied the syntactic parsing of recursive nps @xcite , as well as the semantic categorization of modifiers in nps with only one prenominal modifier @xcite . however, neither parsing nor modifier categorization alone can sufficiently capture the meaning of recursive nps ( §2). in this paper, using recursive nps with two modifiers as our test-bed, we address the following questions about lms' understanding of recursion: the recursive noun phrase challenge (rnpc), a challenge set containing three classification tasks: single-premise textual entailment, multi-premise textual entailment, and event plausibility comparison ( §3). in summary, our work identifies an interesting linguistic phenomenon that is common sense to humans but challenging for models. it contributes to the characterization of lms' limitations and capabilities in language understanding. ## related work noun phrases (nps) have been extensively studied in both linguistics and nlp, primarily from the following perspectives. syntactic structure. a line of work focuses on the syntactic structure of nps, which essentially explains the modifier scope @xcite in nps. one classic task is np bracketing, i.e., deciding whether an np is right-branching (e.g., [world [oil prices]]) or left-branching (e.g., [[crude oil] prices]) @xcite . a harder task is full parsing @xcite , i.e., reconstructing the complete dependency tree. ## dataset construction our dataset is constructed in four stages: (a) modifier lexicon construction, (b) np extraction and selection, (c) instance creation and review, and (d) label verification. among them, (c) and (d) involve crowdsourcing. 7 modifier lexicon construction. we first construct a lexicon of modifiers following the taxonomy in section 2 @xcite . we include modifiers studied in relevant linguistics literature @xcite and complement the list with modifiers that are missing or have not been addressed before under this lens (for example, modifiers that describe material, such as wooden, can also be viewed as privative). each entry in the lexicon contains the modifier itself, its category (intersective, subsective, or privative), and its attribute (e.g., green is a color). in total, the lexicon contains 689 modifiers, the largest resource of this kind. see a kind of fur @xcite . annotators would thus probably disagree on the label if it were an spte example. instance creation and review. we hire college students 8 to write examples for the three tasks based on our collection of nps. each student is given a screening test containing five nps. @xmath0, they are qualified to continue. each instance is then reviewed and/or revised by one of the authors, resulting in 8,260 valid instances. ## can lms learn the meaning of recursive nps? we investigate the reasons behind the models' low performance on rnpc, specifically whether their failure is due to the lack of in-domain training data or an intrinsic deficiency in their architecture. namely, we attempt to answer question (b): is the target knowledge learnable with appropriate data? we adopt the challenge set analysis technique from @xcite , which exposes a model to a small amount of challenge data and assesses how well it can adapt. specifically, we split each rnpc task dataset into a training set of 200 examples and a new test set containing the rest, ensuring that they have different modifiers in the same position. for example, if a modifier appears as the m 1 of an np in the training set, it cannot appear in the same position of any np in the test set. then, we finetune each model from figure 2 on an increasing number of examples (10 to 200). the learning curves of the best-performing models (roberta-large (mnli), roberta-base (mpe), and robertalarge (adept)) are plotted in figure 3 . 12 on spte, the accuracy rapidly climbs from 61.1 to 75.8 with only 10 examples, and saturates around 92 with 100 examples, approaching human performance (94.1). the learning curve on mpte has more fluctuations, with a peak at 71.1 (150 examples) and a final score of 67.8. on epc, starting around chance (39.5), the accuracy progressively increases up to 64.4 with 200 examples. these results indicate that the target knowledge is learnable with appropriate training data. furthermore, spte may be the easiest task, since it only requires local knowledge about the meaning of the modifiers and the noun. by contrast, mpte and epc involve world knowledge (e.g., basketball players are generally tall among the population), as well as global reasoning between components in a sentence (e.g., the relationship between the event and the modifiers), which may explain the remaining large gap between model and human performance (> 90). given that the target knowledge is learnable, we now address question (c): what linguistic features have the models learned from rnpc? we probe for two features extensively studied in the relevant literature (cf. §2), using different techniques. modifier semantic category. we first investigate if models have learned the semantic category of modifiers using the "edge probing technique" @xcite . namely, each modifier is categorized as intersective, subsective, or privative @xcite . the entailment pattern of 12 see appendix e.2 for model and hyperparameter details. spte mpte epc 0 25 50 75 100 68.1 71.5 73.2 75.0 66.4 73.5 accuracy models finetuned on existing benchmark(s) models finetuned on rnpc task individual modifiers is an important factor in determining the meaning of the entire np. given a finetuned model, we take the contextualized representation of each modifier in the last hidden layer. then, we attach a linear head on top of the token representation as an "auxiliary classifier". we choose linear classifiers because more expressive ones like multi-layer perceptron are more likely to capture the target feature themselves (hewitt and liang, 2019). the token representations are then frozen, while the linear head is trained to predict the semantic category of the modifiers. 13 we probe the models finetuned on rnpc from section 6, as well as the models finetuned on existing benchmarks for comparison. the results are shown in figure 4 . for all tasks, the probing accuracy is higher for models finetuned on rnpc than on existing benchmarks. the increase is small for spte (3.4) and mpte (2.8), but more obvious for epc (7.1). this is somewhat counter-intuitive since modifier category is defined in terms of entailment patterns, but models learn it better from epc than from te tasks. nonetheless, the overall trend shows that models can learn the semantic category of modifiers to some extent after being finetuned on our datasets. since the absolute increase is limited, we plan to explore ways to quantify the actual amount of learned knowledge in future work. modifier scope. we also probe for the scope of the first modifier (m 1 ) in recursive nps (det m 1 m 2 n). specifically, we focus on privative m 1 's, since they can have different scopes when interacting with different m 2 's and n's. for instance, in the np a former american diplomat, former negates diplomat (n), but the person is still american; while in a former beginner drummer, it negates beginner (m 2 ), but the person may still be figure 5 : a case study of modifier scope. each subfigure shows the frequency distribution of the attention ratio r (0 < @xmath1, divided into two sides at 0.5. the m 2 side contains nps where m 1 attends more to m 2 than to n; vice versa for the n side. a drummer. 14 this difference cannot be captured by the semantic category of former. as a proxy for the scope of m 1 , we use attention visualization, a widely adopted technique to study token correlations @xcite . 15 we choose bert-base finetuned on 200 mpte examples from section 6 as the model to be probed for a case study. let us denote any token in a given np as x. we define a x , the average of the weights of all attention heads from m 1 to x in the final layer, representing how much m 1 attends to token x. we then calculate the ratio @xmath2. if @xmath3.5, then m 1 attends more to m 2 ; else, m 1 attends more to n. for each privative modifier, we take all nps containing it in the m 1 position in our dataset and plot the distribution of r. figure 5 shows three examples (alleged, counterfeit, or fraudulent) representing different patterns. as shown in the first sub-figure, alleged attends more to either m 2 and n depending on the np. for example, it attends more to m 2 in an alleged antique bowl (0.454), since the np describes a bowl 14 admittedly, there can be alternative interpretations: say, one can also imagine that a former beginner drummer describes a person who is no longer a drummer at all. however, in that case, it is enough to say a former drummer instead, considering the gricean maxim of quantity. therefore, here we still focus on the first interpretation, which is more straightforward. 15 there have been recent debates on the faithfulness of this method @xcite . therefore, we do not use attention weights to make claims about how our models work, but only what they capture, with attention weights. that may not be antique. inversely, an alleged male criminal is on the n side (0.517), since they are most likely male but may not be a criminal. the second sub-figure indicates that counterfeit mainly attends to m 2 . for instance, a counterfeit hollywood movie (0.382) is still a movie, but is probably not made in hollywood. this is similar to the cases of luxury bag, medical drugs, foreign cigarettes, etc. on the contrary, fraudulent mainly attends to n, as shown in the third sub-figure. the fraudulent medical claims (0.559) are not valid claims but still on medical grounds. the same holds for electoral victory, medical excuse, etc. additionally, we notice that there are some boundary cases close to the @xmath4.5 division line, like ruthless criminal and former thief in the alleged sub-figure. a plausible explanation is that m 1 is questioning both m 2 and n in these cases (e.g., an alleged ruthless criminal is not necessarily ruthless or a criminal). overall, the above results indicate that models finetuned on our tasks can capture modifier scope in recursive nps. we finally address question (d): how can such knowledge benefit downstream tasks? we choose the task of harm detection @xcite for extrinsic evaluation. concretely, we consider the scenario where a user interacts with a taskoriented agent like siri or alexa, and the agent needs to determine whether the involved activity in the user query is potentially harmful. the definition of "harm" can be user-dependent. here, we consider an activity to be harmful if it may cause pain, physical injury, or be illegal for minors. we choose this task because many false positives come from recursive nps. for example, how to make a homemade bomb is obviously harmful while how to make a homemade bath bomb is harmless. we collect a small test set from wikihow, a website of how-to articles. each article title is considered a query (e.g., how to make a cake). then, we compile a list of 74 keywords about harmful entities (e.g., bomb, fire, drugs), only 12 of which occur in rnpc. we then select wikihow queries containing at least an np with one of the 74 keywords as the head noun, and sample a small subset for manual annotation. each query is labeled as harmful or harmless, depending on whether it involves a harmful activity as defined above. after data cleaning and re-balancing, we obtain 170 queries, with a 1:1 positive/negative ratio. we design two zero-shot harm classifiers using models finetuned on our entire spte and epc dataset. they share a few pre-processing steps: first, all nps are extracted from the input query; then, nps containing a keyword from our list in the head noun position are retained. for each retained np (e.g., a water gun), we check if it is indeed a harmful entity using either the spte or the epc model. the input to the spte model is a premise of the form "this is {np}" (e.g., this is a water gun) and a hypothesis of the form "this is (a/an) {n}" (e.g., this is a gun). if the output label is entailment, we classify the query as harmful, otherwise harmless. likewise, using the epc model, we form two events given the retained np: "(a/an) {n} is harmful" and "{np} is harmful". if the second event is predicted as more or equally plausible compared to the first, the query is considered harmful. we compare our two classifiers to a simple baseline that always predicts harmful as well as to three gpt3 models. 16 both classifiers meaningfully exceed the simple baseline, and the epcbased classifier outperforms all the other methods by 10+ in terms of accuracy and f 1 . this shows that the understanding of recursive nps is beneficial for downstream tasks without any training data. to understand why epc is more suitable than spte for this task, we further examine the errors they make. one major error type concerns polysemous keywords such as shot. for instance, the spte model mistakenly predicts how to have a good basketball shot to be harmful because a good basketball shot is still a shot (shot can mean both "shooting a gun" and "shooting a ball"). there are also some queries out of the scope of the epc model, e.g., how to make a sake bomb. since sake bomb is a cocktail, the gold label is harmful as our target users are minors. the epc model correctly predicts that a sake bomb is less harmful than a bomb, but fails to capture that it may still be 16 used in a zero-shot setting; see appendix e.4 for details. harmful (for minors). ## conclusion we introduce rnpc, a challenge set targeting the understanding of recursive nps, a fundamental aspect of human common sense. pretrained lms with sota performance on natural language understanding benchmarks have poor mastery of this knowledge, but can still learn it when exposed to small amounts of data from rnpc. using different probing techniques, we show that models can learn relevant linguistic features, including modifier category and scope, from rnpc. they also achieve strong zero-shot performance on an extrinsic harm detection task, indicating the transferability of this knowledge. for future work, we hope to investigate other linguistic phenomena as a step towards comprehensively characterizing lms' limitations and capabilities in language understanding.