Measuring Context-Word Biases in Lexical Semantic Datasets (2022)

Abstract: State-of-the-art pretrained contextualized models (PCM) eg. BERT use tasks such as WiC and WSD to evaluate their word-in-context representations. This inherently assumes that performance in these tasks reflect how well a model represents the coupled word and context semantics. We question this assumption by presenting the first quantitative analysis on the context-word interaction being tested in major contextual lexical semantic tasks. To achieve this, we run probing baselines on masked input, and propose measures to calculate and visualize the degree of context or word biases in existing datasets. The analysis was performed on both models and humans. Our findings demonstrate that models are usually not being tested for word-in-context semantics in the same way as humans are in these tasks, which helps us better understand the model-human gap. Specifically, to PCMs, most existing datasets fall into the extreme ends (the retrieval-based tasks exhibit strong target word bias while WiC-style tasks and WSD show strong context bias); In comparison, humans are less biased and achieve much better performance when both word and context are available than with masked input. We recommend our framework for understanding and controlling these biases for model interpretation and future task design.

## introduction meaning contextualization (i.e., identifying the correct meaning of a target word in linguistic context) is essential for understanding natural language, and has been the focus in many lexical semantic tasks. pretrained contextualized models (pcms) have brought large improvements in these tasks including wsd @xcite @xcite , @xcite we would ideally want a dataset to lie towards the bottom left corner which is bias-free. the dashed red lines indicate 1.0 context (right) and 1.0 target word bias (top), implying a dataset is in effect dealt with by relying on context alone or target words alone. linking (el) @xcite . these superior performances have been taken as proof that pcms can successfully model wordin-context semantics. many studies have investigated the process of lexical contextualization in these pcms. specifically, @xcite ; @xcite found language models 'contextualize' words in higher layers while the type-level information is better kept in lower layers foot_0 . @xcite point out different learning objectives af-fect the contextualization process, and garí soler and apidianaki (2021); @xcite show pcms can capture words' ambiguity levels. while most these studies have focused on probing the innerworkings of the pcm feature space, there is no systematic study to quantify the wordcontext interaction (either learned by pcms or intrinsic) across different lexical semantic tasks. on one hand, these datasets often vary in their emphasis on context vs target words. for example, we could expect tasks such as wsd and wic to rely more on context by design as the target words are either given or the same in each input pair foot_2 . on the other hand, models may find shortcuts from datasets to avoid learning the complex wordcontext interaction. what is missing in the current literature is an accurate quantification of this word-context interplay being tested in each task so that we can fully understand task goals and model performance. in particular, we need to flag the situation where a model can solve a task by relying solely on context or the target words. such heavy word or context reliance hinders a scientific assessment of the models' meaning contextualization abilities as it essentially bypasses the key word-context interaction challenge in human understanding of lexical semantics. therefore, we refer to such heavy reliance on target words or context in a contextual lexical semantic dataset as target word biases or context biases 3 . this study presents an analysis framework to quantify this context-word interaction by measuring context and target word biases across lexical semantic tasks. we first run controlled probing baselines by masking the input to show the context or the target word alone. based on model's performance on these probing baselines, we calculate two ratios that reflect how much of the model performance in this dataset can be achieved from simply relying on context alone or the target word alone, i.e. the degree of context or target word biases (see figure 1 which will be discussed fully in section 3). the design of the probing baselines follows previous studies that applied input perturbation techniques for model and task analysis in glue @xcite , nli @xcite @xcite and relation extraction @xcite . while previous probing studies usually assume no meaningful information from corrupted input with no human verification, we provide fairer comparison with model performance by collecting human judgment on the same masked input in four tasks. such comparison reveals whether the biases are learned by models from the datasets or are inherent in the tasks. our key findings are (1) the tasks can be clearly divided into target-word-biased (the retrieval-based tasks), and context-biased (wic-style tasks and wsd). among the retrieval-based tasks, domain affects ambiguity level and thus the target word bias: models even achieve the best performance using target words alone in the medical domain. (2) am 2 ico and sense retrieval show less extreme model biases and challenge a model more to represent both the context and target words; and (3) a similar trend of biases exists in humans but is much less extreme, as humans find semantic judgment more difficult on masked input and require both word and context to do well in each task. this analysis helps us better understand the nuanced differences between models and humans in existing tasks, and we recommend the framework to be applied when designing new datasets to check whether word and context are required and whether the models rely on the coupled word and context semantics in a similar way to humans. ## main results and discussion we report bert's baseline performance in figure 2 , based on which we calculate bias bert c and bias bert w for each dataset and plot the results (black dots) in figure 1 (we also report roberta biases in appendix e and found a similar trend). for comparison, we plot human baseline performance and biases alongside the model performance in each figure. ## implications for future dataset design we recommend this analysis framework in future dataset design and result interpretation for contextual word representation evaluation. in particular, we recommend (1) creating probing baselines by masking the context and word (if relevant), and (2) providing a sample to humans (details in section 2.2), (3) and comparing human and model performance of full input vs the masked baseline/s, and then calculate bias indicators. in terms of task design, we would ideally want both models and humans to show low baseline performance and thus low bias measures. when interpreting the results, apart from evaluating model performance on the full input, we should also ensure the model shows a human-like gap in performance (between full and the baseline(s)) on the same data. ## conclusion and limitations this study presented an analysis framework to disentangle and quantify context-word interplay in application of popular contextual lexical semantic benchmarks. with our proposed bias measures, we plot datasets on a continuum, and we found that, to models, most existing datasets lie on the two ends with excessive biases (wic-style tasks and wsd are heavily context-biased while retrieval-based tasks are heavily target-word-biased) that essentially bypass the key challenges in word-context interaction. sr and am 2 ico have been identified as two tasks that have less extreme biases and therefore can better test the representation of both word and context, and we call for more tasks that challenge models to do so. in addition, we identify that the degree of lexical ambiguity as a byproduct of domain affects target word bias (med-@xmath0. most importantly, we differentiate biases learned by models and task-inherent biases by collecting human responses on the same baseline input. we found that models' heavy context and target word biases are not attested to the same extent in humans who usually need both context and target words to perform well in the tasks. this suggests that models are relying on different cues instead of modeling contextual lexical semantics as intended by the tasks. our paper highlights the importance of understanding these biases in existing datasets and encourages future dataset and model design to control for these biases and to focus more on testing the challenging word-context interaction in context-sensitive lexical semantics. one limitation of this study is that we do not have large-scaled quantitative evidence to pinpoint the cues the models rely on from partial input foot_9 . possible future directions will be to design such ablation studies to identify any spurious correlations the models have learned and introduce adversarial examples that penalize sole reliance on context or target words in both task design and model training. a task examples