Self-Training for Unsupervised Parsing with PRPN (2020)

Abstract: Neural unsupervised parsing (UP) models learn to parse without access to syntactic annotations, while being optimized for another task like language modeling. In this work, we propose self-training for neural UP models: we leverage aggregated annotations predicted by copies of our model as supervision for future copies. To be able to use our model’s predictions during training, we extend a recent neural UP architecture, the PRPN (Shen et al., 2018a), such that it can be trained in a semi-supervised fashion. We then add examples with parses predicted by our model to our unlabeled UP training data. Our self-trained model outperforms the PRPN by 8.1% F1 and the previous state of the art by 1.6% F1. In addition, we show that our architecture can also be helpful for semi-supervised parsing in ultra-low-resource settings.

## introduction unsupervised parsing (up) models learn to parse sentences into unlabeled constituency trees without the need for annotated treebanks. self-training @xcite consists of training a model, using it to label new examples and, based on a confidence metric, adding a subset to the training set, before repeating training. for supervised parsing, results with self-training have been mixed @xcite @xcite . for unsupervised dependency parsing, @xcite obtain strong results by training a supervised parser on outputs of unsupervised parsing. up models show low self-agreement between training runs @xcite , while obtaining parsing performances far above chance. supervising one run with confident parses from the last could combine their individual strengths. thus, we ask the question: can up benefit from self-training? in order to answer this question, we propose ss-prpn, a semi-supervised extension of the up architecture prpn @xcite , which can be trained jointly on language modeling and supervised parsing. this enables our model to leverage silver-standard annotations obtained via selftraining for supervision. our approach draws on the idea of syntactic distances, which can be learned both as latent variables @xcite and as explicit supervision targets @xcite . we use both of these, leveraging annotations obtained via up to supervise the two different outputs of the parser, in addition to standard up training. ss-prpn, in combination with self-training, improves over its original version by 8.1% f1 and over the previous state of the art @xcite by 1.6% f1, when trained and evaluated on the english ptb @xcite : up can indeed benefit from self-training. we further perform an analysis of our self-training procedure, finding that longer sentences benefit most from self-training. although our primary motivation for the de-velopment of a semi-supervised architecture is to enable self-training, we further hypothesize that, since language modeling and parsing annotations seem to provide complementary information, up should aid low-resource supervised parsing. as a proof of concept, we employ ss-prpn for semisupervised training. in extremely-low-data regimes with no more than 250 labeled parses, ss-prpn outperforms supervised and unsupervised baselines in most settings on unlabeled parsing, and in all settings on labeled constituency parsing. related work following the line of research on non-neural up models @xcite @xcite , early approaches to neural up @xcite obtain improved performance on downstream tasks, yet show highly inconsistent behavior in parsing @xcite . recently, @xcite introduce the first high performing neural up model @xcite . @xcite raise concerns that prpn's parsing methodology is biased towards english trees. though these concerns are serious, they are largely orthogonal to our research question regarding the helpfulness of self-training for up. several models have been introduced since: @xcite propose an architecture consisting of an lstm @xcite with a modified update function for the lstm cell state, @xcite al. (2019a) 2 model syntactic distances in order to parse a sentence, a computational model needs to output some kind of variables representing a unique tree structure. the variables we use are syntactic distances as introduced by @xcite . they represent the syntactic relationships between all successive pairs of words in a sentence. if the distance between two neighboring words is large, they belong to different subtrees, and, thus, their traversal distance in the tree is large. a parse tree can be created by finding the maximum syntactic distance, splitting two different formulations of syntactic distance have been proposed to realize this basic intuition: the first, which we refer to as d l , is introduced by @xcite as a latent variable in their up model. since, for self-training, we supervise d l with values predicted by our model, we introduce algorithm 1, which is used to convert a tree to distances d l . the second kind of distance, denoted here as d g , is introduced by @xcite as labels for direct supervision. we use their algorithms to map trees to distances d g and vice versa, and ask readers to refer to @xcite for details. we design our parser in such a way that it can predict both. we treat the decision whether d g or d l are used at test time as a hyperparameter. the reasons why we employ both types of distances are two-fold: d g , unlike d l , cannot be learned in an unsupervised fashion, which is critical for a semisupervised architecture. empirically, supervising purely on d l performs poorly. the parser our parser, cf. figure 1 , consists of an embedding layer and a convolutional layer which are followed by two different components: a linear output layer that predicts d g and a second convolutional layer that predicts d l . formally, given an input sentence @xmath0, t 1 , . . . , t n-1 , our parser predicts d g as: algorithm 2: self-training for up distance loss when we have silver-standard annotations from self-training available, we compute the loss for both syntactic distances directly. since the relative ranking between distances-rather than absolute values-defines the tree structure, we train our parser with a hinge ranking loss following @xcite . our distance loss l r is the weighted sum of the distance losses corresponding to d l (l sl ) and d g (l sg ): language modeling loss in order to optimize the parameters of our parser without direct supervision, we further feed its output-the predictions for d l -into a language model, following @xcite . multi-task training our parser is trained in a semi-supervised fashion with losses corresponding to (i) learning the distances in a latent manner through language modeling, and (ii) supervising directly on distances. we sample batches from both objectives at random. self-training for self-training, cf. algorithm 2, we first train n c models on the unlabeled ptb training set x u . we then have them predict parse trees for all sentences in x u . if more than µ * n c models (with µ as a hyperparameters) agree on the same parse, we add it as a silver-standard labeled example to the parsing training set x t . we use algorithm 1 and the respective algorithm by @xcite to convert consensus trees into distances d l and d g . we then train a new model on both x u and x t . ## experimental design data and metrics we experiment on the english penn treebank @xcite . for evaluation, we compute the f1 score of the output parses against binarized gold parses following @xcite . the code for our model is published online foot_0 . baselines we compare against an unsupervised recurrent neural network grammar (urnng; @xcite , a compound probabilistic context free grammar (c-pcfg; @xcite hyperparameters we tune our hyperparameters on the development set. hidden states and word embeddings have 300 and 100 dimensions, respectively. we set the weight α = 0.5. for self-training, we obtain best results with µ = 60% and n @xmath1. we further experiment with converting either d l or d g into final parse trees, and find that d l works best. ## results and analysis unsupervised parsing performance ## conclusion we introduce a semi-supervised neural architecture, ss-prpn, which is capable of up via self-training. our self-trained models strongly outperform comparable baselines, and advance the state of the art on ptb by 1.6% f1. analyses show that our approach yields most gains for longer sentences. our architecture can also leverage limited amounts of parsing supervision when available. we conclude that it is beneficial to develop better up models for semi-supervised settings.