Recent advancements in pre-trained language models (PLMs) have demonstrated that these models possess some degree of syntactic awareness. To leverage this knowledge, we propose a novel chart-based method for extracting parse trees from masked language models (LMs) without the need to train separate parsers. Our method computes a score for each span based on the distortion of contextual representations resulting from linguistic perturbations. We design a set of perturbations motivated by the linguistic concept of constituency tests, and use these to score each span by aggregating the distortion scores. To produce a parse tree, we use chart parsing to find the tree with the minimum score. Our method consistently outperforms previous state-of-the-art methods on English with masked LMs, and also demonstrates superior performance in a multilingual setting, outperforming the state of the art in 6 out of 8 languages. Notably, although our method does not involve parameter updates or extensive hyperparameter search, its performance can even surpass some unsupervised parsing methods that require fine-tuning. Our analysis highlights that the distortion of contextual representation resulting from syntactic perturbation can serve as an effective indicator of constituency across languages.
翻译:近期预训练语言模型的进展表明,这些模型具备一定程度的句法感知能力。为利用这一知识,我们提出了一种新颖的基于图表的解析方法,能够从掩码语言模型中提取句法树,而无需训练独立的解析器。我们的方法基于语言扰动导致的上下文表示失真度,为每个跨度计算得分。我们设计了一组受语言学成分测试概念启发的扰动,并通过聚合失真得分来评估每个跨度。为生成句法树,我们采用图表解析法寻找得分最小的树结构。该方法在英语掩码语言模型上持续优于先前最先进方法,并在多语言场景中展现出卓越性能,在8种语言中的6种上超越了当前最优水平。值得注意的是,尽管该方法无需参数更新或广泛的超参数搜索,其表现甚至能超越某些需要微调的无监督解析方法。我们的分析强调,由句法扰动引起的上下文表示失真可作为跨语言成分结构的有效指标。