Word Order Does Matter and Shuffled Language Models Know It

38906

Authors

nan

Abstract

AbstractRecent studies have shown that language models pretrained and/or fine-tuned on randomly permuted sentences exhibit competitive performance on GLUE, putting into question the importance of word order information. Somewhat counter-intuitively, some of these studies also report that position embeddings appear to be crucial for models’ good performance with shuffled text. We probe these language models for word order information and investigate what position embeddings learned from shuffled text encode, showing that these models retain a notion of word order information. We show this is in part due to a subtlety in how shuffling is implemented in previous work – before rather than after subword segmentation. Surprisingly, we find even Language models trained on text shuffled after subword segmentation retain some semblance of information about word order because of the statistical dependencies between sentence length and unigram probabilities. Finally, we show that beyond GLUE, a variety of language understanding tasks do require word order information, often to an extent that cannot be learned through fine-tuning.

Keywords

nan

Full Content

Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics Volume 1: Long Papers, pages 6907 - 6919 May 22-27, 2022 c⃝2022 Association for Computational Linguistics Word Order Does Matter (And Shuffled Language Models Know It) ∗Mostafa Abdou† ∗Vinit Ravishankar‡ Artur Kulmizev§ Anders Søgaard† †Department of Computer Science, University of Copenhagen ‡Language Technology Group, Department of Informatics, University of Oslo §Department of Linguistics and Philology, Uppsala University † {abdou,soegaard}@di.ku.dk ‡ vinitr@ifi.uio.no Abstract Recent studies have shown that language mod- els pretrained and/or fine-tuned on randomly permuted sentences exhibit competitive perfor- mance on GLUE, putting into question the im- portance of word order information. Some- what counter-intuitively, some of these stud- ies also report that position embeddings appear to be crucial for models’ good performance with shuffled text. We probe these language models for word order information and inves- tigate what position embeddings learned from shuffled text encode, showing that these mod- els retain information pertaining to the origi- nal, naturalistic word order. We show this is in part due to a subtlety in how shuffling is implemented in previous work – before rather than after subword segmentation. Surpris- ingly, we find even Language models trained on text shuffled after subword segmentation retain some semblance of information about word order because of the statistical depen- dencies between sentence length and unigram probabilities. Finally, we show that beyond GLUE, a variety of language understanding tasks do require word order information, of- ten to an extent that cannot be learned through fine-tuning. 1 Introduction Transformers (Vaswani et al., 2017), when used in the context of masked language modelling (Devlin et al., 2018), consume their inputs concurrently. There is no notion of inherent order, unlike in au- toregressive setups, where the input is consumed token by token. To compensate for this absence of linear order, the transformer architecture origi- nally proposed in Vaswani et al. (2017) includes a fixed, sinusoidal position embedding added to each token embedding; each token carries a different position embedding, corresponding to its position in the sentence. The transformer-based BERT (De- vlin et al., 2018) replaces these fixed sinusoidal ∗Equal contribution. Order was decided by a coin toss. Figure 1: Pearson correlations between position embed- dings for full-scale models; the patterns are similar to fully learnable absolute embeddings (Wang et al., 2021) and can be said to have learned something about posi- tion. We later demonstrate that this is not the case with post-BPE scrambling. embeddings with unique, learned embeddings per position; RoBERTa (Liu et al., 2019), the model investigated in this work, does the same. Position embeddings are the only source of or- der information in these models; in their absence, contextual representations generated for tokens are independent of the actual position of the to- kens in a sentence, and the models thus resemble heavily overparameterised bags-of-words. Sinha et al. (2021) pre-trained RoBERTa models on shuf- fled corpora to demonstrate that the performance gap between these ‘shuffled’ language models and models trained on unshuffled corpora is minor …

Content truncated to 500 words

Labeled Text

AbstractRecent studies have shown that language models pretrained and/or fine-tuned on randomly permuted sentences exhibit competitive performance on GLUE, putting into question the importance of word order information. Somewhat counter-intuitively, some of these studies also report that position embeddings appear to be crucial for models’ good performance with shuffled text. We probe these language models for word order information and investigate what position embeddings learned from shuffled text encode, showing that these models retain a notion of word order information. We show this is in part due to a subtlety in how shuffling is implemented in previous work – before rather than after subword segmentation. Surprisingly, we find even Language models trained on text shuffled after subword segmentation retain some semblance of information about word order because of the statistical dependencies between sentence length and unigram probabilities. Finally, we show that beyond GLUE, a variety of language understanding tasks do require word order information, often to an extent that cannot be learned through fine-tuning.

Publication Details

Paper ID:
38906
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan