Improving Syntactic Probing Correctness and Robustness with Control Tasks (2023)

Abstract: Syntactic probing methods have been used to examine whether and how pre-trained language models (PLMs) encode syntactic features. However, the probing methods are usually biased by the PLMs’ memorization of common word co-occurrences, even if they do not form syntactic relations. This paper presents a random-word-substitution and random-label-matching control task to reduce these biases and improve the robustness of syntactic probing methods. Our control tasks are also shown to notably improve the consistency of probing results between different probing methods and make the methods more robust with respect to the text attributes of the probing instances. Our control tasks make syntactic probing methods better at reconstructing syntactic features and more generalizable to unseen text domains. Our experiments show that our proposed control tasks are effective on different PLMs, probing methods, and syntactic features.

## introduction to explain the high performance of plms on various natural language processing (nlp) tasks, efforts have been made to examine the syntactic relation-encoding ability of these models. for example, @xcite attempt to reconstruct syntactic relations from the attention heads of transformer models @xcite using raw attention scores. leave-one-out probing methods @xcite , instead, measure the influence of ablating parts of each syntactic relation on the hidden representations of the models. however, the probing results may not faithfully reflect the encoding of syntactic relations as the memorization of common word co-occurrences in the training data of plms can lead to incorrect and non-generalizable probing results @xcite . we observe the same issues in our experiments, where many highly-ranked attention positive: influential members of the house ways and means committee introduced legislation that would restrict how the new savings-and-loan bailout agency can raise capital, creating another potential obstacle to the government's sale of sick thrifts. ## syntactic probing methods different families of probing methods rely on different assumptions @xcite and as such, probing results from different families cannot be meaningfully compared. hence, we examine two probing methods that are both based on attention distributions: (1) given a sentence and a headword for a syntactic relation, the attentionas-classifier method (manning et al., 2020) predicts another word as the dependent if it puts the highest attention score on the headword; (2) as an attention-based version of the leave-one-out probing method used by @xcite , we mask the headword of each syntactic relation for each sentence and predict the word whose attention distribution changes the most as the dependent word. following @xcite , we additionally examine two variant methods, norm-as-classifier and leave-one-out-norm methods which predict the dependent words based on the distributions or changes of attention norms, respectively. we calculate the importance of each attention head for encoding each syntactic relation by evaluating the top-3 accuracy (acc@3) of the predictions; defined as the percentage of instances where the dependent words from the ground truth are ranked among the top-3 in the predictions. we use acc@3 since 1 all the reported spearman's ρ are statistically significant (@xmath0.01), unless specified otherwise. in many cases, the highest attention scores fall on separator tokens such as "[sep]" and punctuation marks @xcite . ## probing datasets we use the "subject" (subj), "object" (obj), "nominal modifier" (nmod), "adverbial modifier" (advmod), and "coreference" (coref) relations in our analyses. we use the english dataset for the conll-2009 shared task @xcite to construct our positive and control probing datasets. figure 1 shows an example instance from the positive dataset and each control dataset. ## experimental results we conduct three sets of experiments to examine our probing methods' sensitivity to "spurious" word correlations (section 4.1), consistency (section 4.2), and robustness to text attributes (section 4.3). we run the experiments using the bert-base and roberta-base models for generality. all the experiments are run on an nvidia rtx-6000 gpu. ## conclusion and future work this paper proposes two control tasks to improve the syntactic probing of plms and reduce the noise in the probing results of the plms' memorization of common word co-occurrences. by applying these control tasks, we observe notable improvements in the correctness and consistency of the results produced by four attention-based probing methods across two categories of five diverse syntactic relations. the improvements are also robust to different plms' and attributes of the probing instances, suggesting the general applicability of our proposed control tasks. future work can expand the use of our proposed control tasks to other models or syntactic relations. tactic probing methods, there are some limitations that must be discussed: first, our experiments only utilized attentionbased probing approaches, and it is unclear whether our results would generalize to other families of probing methods. therefore, further investigation is needed to determine the effectiveness of our control tasks for other types of probing methods. second, we only explored a subset of syntactic relations in english, including subject, object, nominal modifier, adverbial modifier, and coreference. our results may not be generalizable to other syntactic relations or languages. future studies could expand the exploration of other syntactic features and investigate the effectiveness of our control tasks in different languages. third, our experiments only focused on two pre-trained language models, namely bert and roberta. it is unclear whether our control tasks would be effective for other types of plms, and further studies could investigate the effectiveness of our control tasks on other types of plms. finally, our study only focused on syntactic probing methods and did not investigate probing methods for other types of nlp tasks, such as natural language inference, machine translation, and summarization. therefore, further studies could explore the effectiveness of our control tasks on other types of nlp tasks. despite these limitations, our proposed control tasks have shown promising results in reducing biases and improving the robustness of syntactic probing methods, and we hope that our work will inspire further research in this direction.