A matter of framing: T he impact of linguistic formalism on probing results (2020)

Abstract: Deep pre-trained contextualized encoders like BERT demonstrate remarkable performance on a range of downstream tasks. A recent line of research in probing investigates the linguistic knowledge implicitly learned by these models during pre-training. While most work in probing operates on the task level, linguistic tasks are rarely uniform and can be represented in a variety of formalisms. Any linguistics-based probing study thereby inevitably commits to the formalism used to annotate the underlying data. Can the choice of formalism affect probing results? To investigate, we conduct an in-depth cross-formalism layer probing study in role semantics. We find linguistically meaningful differences in the encoding of semantic role- and proto-role information by BERT depending on the formalism and demonstrate that layer probing can detect subtle differences between the implementations of the same linguistic formalism. Our results suggest that linguistic formalism is an important dimension in probing studies, along with the commonly used cross-task and cross-lingual experimental settings.

## introduction the emergence of deep pre-trained contextualized encoders has had a major impact on the field of natural language processing. boosted by the availability of general-purpose frameworks like allennlp @xcite and transformers @xcite , pre-trained models like elmo @xcite and bert @xcite have caused a shift towards simple architectures where a strong pre-trained encoder is paired with a shallow downstream model, often outperforming the intricate task-specific architectures of the past. the versatility of pre-trained representations implies that they encode some aspects of general we asked john to leave . ## probing methodology we take the edge probing setup by @xcite as our starting point. edge probing aims to predict a label given a pair of contextualized span or word encodings. more formally, we encode a wp-tokenized sentence [wp 1 , wp 2 , ...wp k ] with a frozen pre-trained model, producing contextual embeddings [e 1 , e 2 , ...e k ], each of which is a layered representation over @xmath0, l 1 , ...l m } layers, with encoding at layer l n for the wordpiece wp i further denoted as e n i . a trainable scalar mix is applied to the layered representation to produce the final encoding given the per-layer mixing weights {a 0 , a foot_0 ..a m } and a scaling parameter γ: given the source src and target tgt wordpieces encoded as e src and e tgt , our goal is to predict the label y. due to its task-agnostic architecture, edge probing can be applied to a wide variety of unary (by omitting tgt) and binary labeling tasks in a unified manner, facilitating the cross-task comparison. the original setup has several limitations that we address in our implementation. regression tasks. the original edge probing setup only considers classification tasks. many language phenomena -including positional information and semantic proto-roles, are naturally modeled as regression. we extend the architecture by @xcite and support both classification and regression: the former achieved via softmax, the latter via direct linear regression to the target value. flat model. to decrease the models' own expressive power @xcite , we keep the number of parameters in our probing model as low as possible. while @xcite utilize pooled self-attentional span representations and a projection layer to enable cross-model comparison, we directly feed the wordpiece encoding into the classifier, using the first wordpiece of a word. to further increase the selectivity of the model, we directly project the source and target wordpiece representations into the label space, opposed to the two-layer mlp classifier used in the original setup. separate scalar mixes. to enable fine-grained analysis of probing results, we train and analyze separate scalar mixes for source and target wordpieces, motivated by the fact that the classifier might utilize different aspects of their representation for prediction 1 . indeed, we find that the mixing weights learned for source and target wordpieces might show substantial -and linguistically meaningful -variation. combined with regressionbased objective, separating the scalar mixes allows us to scrutinize layer utilization patterns for semantic proto-roles. sentence-level probes. utilizing the bertspecific sentence representation [cls] allows us to incorporate the sentence-level natural language inference (nli) probe into our kit. anchor tasks. we employ two analytical tools from the original layer probing setup. mixing weight plotting compares layer utilization among tasks by visually aligning the respective learned weight distributions transformed via a softmax function. layer center-of-gravity is used as a summary statistic for a task's layer utilization. while the distribution of mixing weights along the layers allows us to estimate the order in which information is processed during encoding, it doesn't allow to directly assess the similarity between the layer utilization of the probing tasks. @xcite have demonstrated that the order in which linguistic information is stored in bert mirrors the traditional nlp pipeline. a prominent property of the nlp pipelines is their use of low-level features to predict downstream phenomena. in the context of layer probing, probing tasks can be seen as end-to-end feature extractors. following this intuition, we define two groups of probing tasks: target tasks -the main tasks under investigation, and anchor tasks -a set of related tasks that serve as a basis for qualitative comparison between the targets. the softmax transformation of the scalar mixing weights allows to treat them as probability distributions: the higher the mixing weight of a layer, the more likely the probe is to utilize information from this layer during prediction. we use kullback-leibler divergence to compare target tasks (e.g. role labeling in different formalisms) in terms of their similarity to lowerlevel anchor tasks (e.g. dependency relation and lemma). note that the notion of anchor task is contextual: the same task can serve as a target and as an anchor, depending on the focus of the study. ## results our probing framework is implemented using allennlp. 2 we train the probes for 20 epochs using the adam optimizer with default parameters and a batch size of 32. due to the frozen encoder and flat model architecture, the total runtime of the main experiments is under 8 hours on a single tesla v100 gpu. in addition to pre-trained mbert we report baseline performance using a frozen untrained mbert model obtained by randomizing the encoder weights post-initialization as in @xcite . ## conclusion we have demonstrated that the choice of linguistic formalism can have substantial, linguistically meaningful effects on role-semantic probing results. we have shown how probing classifiers can be used to detect discrepancies between formalism implementations, and presented evidence of semantic proto-role encoding in the pre-trained mbert model. our refined implementation of the edge probing framework coupled with the anchor task methodology enabled new insights into the processing of predicate-semantic information within mbert. our findings suggest that linguistic formalism is an important factor to be accounted for in probing studies. this prompts several recommendations for the follow-up probing studies. first, the formalism and implementation used to prepare the linguistic material underlying a probing study should be always explicitly specified. second, if possible, results on multiple formalisations of the same task should be reported and validated for several languages. finally, assembling corpora with parallel cross-formalism annotations would facilitate further research on the effect of formalism in probing. while our work illustrates the impact of formalism using a single task and a single probing framework, the influence of linguistic formalism per se is likely to be present for any probing setup that builds upon linguistic material. an investigation of how, whether, and why formalisms and their implementations affect probing results for tasks beyond role labeling and for frameworks beyond edge probing constitutes an exciting avenue for future research.