Examining the rhetorical capacities of neural language models (2020)

Abstract: Recently, neural language models (LMs) have demonstrated impressive abilities in generating high-quality discourse. While many recent papers have analyzed the syntactic aspects encoded in LMs, there has been no analysis to date of the inter-sentential, rhetorical knowledge. In this paper, we propose a method that quantitatively evaluates the rhetorical capacities of neural LMs. We examine the capacities of neural LMs understanding the rhetoric of discourse by evaluating their abilities to encode a set of linguistic features derived from Rhetorical Structure Theory (RST). Our experiments show that BERT-based LMs outperform other Transformer LMs, revealing the richer discourse knowledge in their intermediate layer representations. In addition, GPT-2 and XLNet apparently encode less rhetorical knowledge, and we suggest an explanation drawing from linguistic philosophy. Our method shows an avenue towards quantifying the rhetorical capacities of neural LMs.

## introduction in recent years, neural lms (especially contextualized lms) have shown profound abilities to generate texts that could be almost indistinguishable from human writings @xcite . neural lms could be used to generate concise summaries @xcite , coherent stories @xcite , and complete documents given prompts @xcite . it is natural to question their source and extent of rhetorical knowledge: what makes neural lms articulate, and how? while some recent works query the linguistic knowledge @xcite @xcite , this open question remain unanswered. we hypothesize that contextualized neural lms encode rhetorical knowledge in their intermediate repre-sentations, and would like to quantify the extent they encode rhetorical knowledge. to verify our hypothesis, we hand-craft a set of 24 rhetorical features including those used to examine rhetorical capacities of students @xcite @xcite , and evaluate how well neural lms encode these rhetorical features in the representations while encoding texts. recent work has started to evaluate encoded features from hidden representations. among them, probing @xcite has been a popular choice. previous work probed morphological @xcite , agreement @xcite , and syntactic features @xcite . probing involves optimizing a simple projection model from representations to features. the loss of this optimization measures the difficulty to decode features from the representations. in this work, we use a probe containing self attention mechanism. we first project the variablelength embeddings to a fixed-length latent representation per document. then, we apply a simple diagnostic classifier to detect rhetorical features from this latent representation. this design of probe reduces the total number of parameters, and enable us to better understand each model's ability to encode rhetorical knowledge. we find that: these observations allow us to investigate the mechanisms of neural lms to better understand the degree to which they encode linguistic knowledge. we demonstrate how discourse-level features can be queried and analyzed from neural lms. all of our code and parsed tree data will be available at github. ## structural analysis of discourse various frameworks exist for "good discourse" @xcite @xcite , but most of them are inaccessible to quantitative analysis. in this work, we use rhetorical structure theory @xcite since it represents the structures of discourse using trees, allowing straightforward quantitative analysis. there are two components in an rst parse-tree: ## related work recent work has considered the interpretability of contextualized representations. for example, @xcite found attention to be uncorrelated to gradient-based feature importance, while @xcite suggested such approaches allowed too much flexibility to give convincing results. similarly, @xcite considered attention representations to be noisy indicators of feature importance. many tasks in argument mining, similar to our task of examining neural lms, require understanding the rhetorical aspects of discourse @xcite . this allows rst to be applied in relevant work. for example, rst enables understanding and analyzing argument struc-tures of monologues @xcite and, when used with other discourse features, rst can improve role-labelling in online arguments @xcite . probing neural lms is an emergent diagnostic task on those models. previous work probed morphological @xcite , agreement @xcite , and syntactic features (hewitt and manning, 2019). @xcite compared different probes, and recommended linear probes with as few parameters as possible, for the purpose of reducing overfitting. recently, pimentel et al. (2020) argued against this choice from an information-theoretic point of view. @xcite presents an optimization goal for probes based on minimum description length. @xcite proposed 16 diverse probing tasks on top of contextualized lms including token labeling (e.g., pos), segmentation (e.g., ner, grammatical error detection) and pairwise relations. while lms augmented with a probing layer could reach state-of-the-art performance on many tasks, they found that lms still lacked fine-grained linguistic knowledge. discoeval @xcite showed that bert outperformed traditional pretrained sentence encoders in encoding discourse coherence features, which our results echo. ## conclusion in this paper, we propose a method to quantitatively analyze the amount of rhetorical information encoded in neural language models. we compute features based on rhetorical structure theory (rst) and probe the rst features from contextualized representations of neural lms. among six popular neural lms, we find that contextualization helps to generally improve the rhetorical capacities of lms, while individual models may vary in quality. in general, lms attending to contexts from both directions (bert-based) encode rhetorical knowledge in a more stable manner than those using unidirectional contexts (gpt-2) or permuted contexts (xlnet). our method presents an avenue towards quantitatively describing rhetorical capacities of neural language models based on unlabeled, target-domain corpus. this method may be used for selecting suitable lms in tasks including rhetorical acts classifications, discourse modeling, and response generation.