PERT: Pre-training BERT with Permuted Language Model

Yiming Cui, Ziqing Yang, Ting LiuarXiv 2022 · DOI

Abstract

PERT (Pre-training BERT with Permuted Language Model) introduces a novel auto-encoding pre-training objective that replaces traditional masking with token permutation. Instead of predicting masked tokens, PERT learns to restore the original order of a shuffled sequence. This approach eliminates the pre-training/fine-tuning discrepancy associated with the [MASK] token and demonstrates superior performance in tasks requiring structural understanding, such as machine reading comprehension and grammar correction.

Introduction

The Masked Language Model (MLM) objective, popularized by BERT, has been the standard for pre-training. However, it suffers from a discrepancy: the [MASK] token used during training is absent during fine-tuning. Furthermore, while many variants have optimized masking strategies, few have explored alternatives to the "fill-in-the-blank" paradigm. PERT addresses these issues by focusing on the structural and positional information of natural language through a permutation-based task.

Methodology: Permuted Language Model (PerLM)

The core of PERT is the Permuted Language Model (PerLM) task. Unlike MLM, which hides tokens, PerLM shuffles a subset (15%) of the input tokens. The model's objective is to predict the original position index for each shuffled token. By using actual vocabulary words rather than artificial tokens, PERT maintains a consistent input distribution between pre-training and downstream tasks.

Architecture of the PERT model illustrating the Permuted Language Model (PerLM) task.

To enhance linguistic learning, PERT incorporates Whole Word Masking (WWM) and N-gram masking, where entire words or multi-token sequences are moved as single units. This prevents the model from relying on local sub-token cues to solve the permutation. Additionally, the PerLM task is computationally efficient; the output layer predicts a position within the sequence length (e.g., 1-512) rather than a word from a massive vocabulary. The authors found that shuffling at the token level was superior to shuffling entire words or sentences, as a harder task forces the model to learn more robust representations.

Experimental Setup

PERT was pre-trained on extensive Chinese (20GB) and English (Wikipedia + BooksCorpus) datasets. Evaluation spanned several categories: Machine Reading Comprehension (MRC) using CMRC 2018 and DRCD; Text Classification (TC) using XNLI and LCQMC; Named Entity Recognition (NER); and a specialized Word Order Recovery (WOR) task for grammar assessment.

Results and Discussion

PERT demonstrates significant strengths in tasks requiring deep structural logic. In Machine Reading Comprehension, PERT-large achieved state-of-the-art results, notably reaching a 72.2 EM score on the CMRC 2018 dev set, surpassing MacBERT-large and RoBERTa-large.

Performance comparison of PERT against other pre-trained models on Machine Reading Comprehension (MRC) tasks.

However, PERT shows mixed results in short-text classification. The authors hypothesize that permuting short sentences can drastically alter their semantic meaning, introducing noise that hinders classification performance. Interestingly, for classification, PERT's performance peaks early in pre-training (around 1M steps), suggesting that over-optimizing for the difficult reordering task might eventually degrade the broad semantic representations needed for simple categorization.

Conclusion

PERT offers a powerful alternative to masking-based pre-training, particularly for sequence-tagging and structural tasks. While it may not be a universal replacement for all NLP applications, its ability to capture linguistic structure without artificial tokens makes it a valuable tool for complex language understanding. Future research may explore hybrid models that combine the semantic depth of MLM with the structural precision of PerLM.

Summary updated

BibTeX
@misc{cui2022pert,
  author = {Yiming Cui and Ziqing Yang and Ting Liu},
  title = {{PERT: Pre-training BERT with Permuted Language Model}},
  year = {2022},
  eprint = {2203.06906},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.06906},
}
Figure