Can Pretrained Language Models Derive Correct Semantics from Corrupt Subwords under Noise? (2023)

Abstract: For Pretrained Language Models (PLMs), their susceptibility to noise has recently been linked to subword segmentation. However, it is unclear which aspects of segmentation affect their understanding. This study assesses the robustness of PLMs against various disrupted segmentation caused by noise. An evaluation framework for subword segmentation, named Contrastive Lexical Semantic (CoLeS) probe, is proposed. It provides a systematic categorization of segmentation corruption under noise and evaluation protocols by generating contrastive datasets with canonical-noisy word pairs. Experimental results indicate that PLMs are unable to accurately compute word meanings if the noise introduces completely different subwords, small subword fragments, or a large number of additional subwords, particularly when they are inserted within other subwords.

## introduction the capability to understand the meaning of noisy words through character arrangements is a crucial aspect of human cognitive abilities @xcite . this capability is highly sought after in practical applications such as machine translation and sentiment analysis @xcite . however, despite their success in in-distribution test data with standardized word forms, pretrained language models (plms), which serve as the backbone models, tend to perform poorly on rare or noisy words @xcite . these noisy words may be caused by accidental typos @xcite or spelling variants on social media @xcite . prior studies show that most subword-based plms perform poorly under noise largely due to subword segmentation @xcite , while character-based plms show more robustness @xcite . examining the impact of subword segmentation factors on plms is also crucial for defending against the adversarial attacks that leverage the sensitivity of subword segmentation to noise @xcite . however, rare work has investigated how the subword segmentation from noisy words affects the word meaning. to help address this question, we design and develop a contrastive framework (coles) to assess the robustness of plms in the face of various forms of segmentation corruption. as subword segmentation can be influenced by noise in various ways, such as adding extra subwords or losing original subwords, we systematically categorize the ways into four main categories and two additional subcategories based on three subword sets, as exemplified in the experimental results provide the following insights: 1) complete corruption: the plms struggle to infer meaning accurately if no subwords from the original segmentation are retained. the worst performance is observed when the meaning of original words is stored in the embedding; 2) partial corruption: preserving larger subword chunks can aid the understanding of plms, whereas retaining smaller subword pieces tend to be ineffective; and 3) additive corruption: even with all original subwords, however, the addition of subwords can harm the meaning of words, particularly when they are placed within other subwords. the more additive subwords, the greater the deviation in word semantics. all the results are consistent on the three plms with different vocabularies and segmentation algorithms. ## contrastive lexical-semantic probe corruption types examples segmentation sets missing overlap additive complete (intact) @xmath0, aa, sty complete @xmath1, tun stu, nn partial @xmath2, ect additive (infix) @xmath3, ub, stan, tial u additive (affix) @xmath4, ario, us s, s missing @xmath5, stan, tial ## experimental results experiments are performed on three widely used plms: bert base , roberta base and albert base (see appendix a for details). bert @xcite accepts inputs from a wordpiece tokenizer @xcite , while roberta @xcite , another popular frequent-based segmentation scheme, uses bpe @xcite . for comparison, we include albert @xcite with a probabilistic tokenizer called sentencepiece @xcite . subwords retention is important for maintaining the correct semantics. are words more impacted by noise under complete corruption if their meaning is stored in the embeddings? according to @xcite , if a word is represented as a single vector, plms can access its meaning directly from the em-bedding (referred to as the "storage route") instead of deducing it from the combination of subwords (known as the "computation route"). we presume that plms struggle to maintain the original meaning of these words when exposed to noise. we classify this type of corruption as "intact corruption", which is a particular variation to complete corruption. to validate our assumption, we evaluate the performance of plms on words under intact corruption. results show that words with intact corruption consistently perform worse than those with complete corruption, despite both having completely distinct subwords. although intact corruption consistently yields the lowest similarity score, the plms may still be able to better infer some semantic dimensions, such as sentiment, under intact corruption compared to complete corruption. ## conclusion we proposed the coles framework which can evaluate how corrupt segmentation under noise affects plms' understanding. the experimental results show that three challenges can impair the plms' understanding of noisy words: insertion of additive subwords (especially within existing subwords), loss of original subwords, and incapacity of computing the word meanings through the aggregation of smaller subword units. reproducibility. data and source code for noisy data generation, corruption types identification and plms' performance evaluation are released on github foot_3 .