[Paper Review] GLM: General Language Model Pretraining with Autoregressive Blank Infilling
This paper proposes GLM, a general language model pretraining framework based on autoregressive blank infilling that unifies natural language understanding (NLU), conditional generation, and unconditional generation under a single architecture. By introducing span shuffling and 2D positional encodings, GLM achieves state-of-the-art performance on SuperGLUE (4.6–5.0% higher than BERT) and outperforms T5, RoBERTa, and GPT with fewer parameters and data, demonstrating strong generalization across diverse NLP tasks.
There have been various types of pretraining architectures including autoencoding models (e.g., BERT), autoregressive models (e.g., GPT), and encoder-decoder models (e.g., T5). However, none of the pretraining frameworks performs the best for all tasks of three main categories including natural language understanding (NLU), unconditional generation, and conditional generation. We propose a General Language Model (GLM) based on autoregressive blank infilling to address this challenge. GLM improves blank filling pretraining by adding 2D positional encodings and allowing an arbitrary order to predict spans, which results in performance gains over BERT and T5 on NLU tasks. Meanwhile, GLM can be pretrained for different types of tasks by varying the number and lengths of blanks. On a wide range of tasks across NLU, conditional and unconditional generation, GLM outperforms BERT, T5, and GPT given the same model sizes and data, and achieves the best performance from a single pretrained model with 1.25x parameters of BERT Large , demonstrating its generalizability to different downstream tasks.
Motivation & Objective
- Address the limitation of existing pretraining frameworks—autoencoding (e.g., BERT), autoregressive (e.g., GPT), and encoder-decoder (e.g., T5)—which each excel in specific NLP task categories but lack generalizability across all tasks.
- Unify pretraining objectives for NLU, conditional generation, and unconditional generation into a single, flexible framework to improve model generalization and parameter efficiency.
- Overcome the unidirectional attention limitation of autoregressive models and the generation-incompatibility of autoencoding models by introducing a novel autoregressive blank infilling objective with bidirectional context awareness.
- Enable effective few-shot and zero-shot NLU through cloze-style prompting, leveraging autoregressive generation of multi-token answers.
- Demonstrate that a single GLM model can achieve state-of-the-art performance across diverse NLP tasks without task-specific fine-tuning or architectural specialization.
Proposed method
- Propose a new pretraining objective called autoregressive blank infilling, where continuous spans of tokens are masked and the model autoregressively predicts them in a shuffled order.
- Introduce 2D positional encodings to model both intra-span and inter-span token positions, enabling better modeling of span structure and relative positions.
- Apply span shuffling during pretraining: masked spans are reordered before generation, increasing training diversity and improving generalization.
- Use a single [MASK] token to represent all masked spans, avoiding parameter waste from learning multiple sentinel tokens.
- Design a mixed self-attention mask that allows attended tokens to attend to both the original context (Part A) and the generated spans (Part B), with cross-attention between them.
- Train the model end-to-end using a standard autoregressive language modeling objective on the reconstructed spans, with the full input sequence as context.
Experimental results
Research questions
- RQ1Can a single pretraining framework unify high performance across NLU, conditional generation, and unconditional generation tasks?
- RQ2Does autoregressive blank infilling with span shuffling and 2D positional encoding improve performance on NLU benchmarks compared to BERT and T5?
- RQ3Can GLM effectively handle multi-token answers in cloze-style NLU tasks, outperforming BERT-based models?
- RQ4How does the choice of pretraining objective (e.g., span shuffling, positional encoding) affect downstream performance?
- RQ5Can a single GLM model achieve state-of-the-art results across diverse NLP tasks with fewer parameters than specialized models like RoBERTa or T5?
Key findings
- GLM outperforms BERT on the SuperGLUE benchmark by 4.6–5.0 percentage points under the same model size and training data, demonstrating superior NLU performance.
- GLM achieves better performance than RoBERTa and BART when pretrained on a 158GB corpus of similar size, indicating strong generalization and efficiency.
- GLM outperforms T5 on both NLU and generation tasks with fewer parameters and less training data, showing improved parameter efficiency.
- Span shuffling is critical: removing it leads to a severe performance drop on SuperGLUE, confirming its role in improving generalization.
- 2D positional encoding is essential for long text generation: removing the second dimension significantly degrades performance.
- Using multiple sentinel tokens instead of a single [MASK] token hurts performance, indicating that redundant token learning wastes modeling capacity.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.