ImageNet classification with deep convolutional neural networks
Alex Krizhevsky, Ilya Sutskever et al.
9.5k
Citations
993
Influential Citations
Neural Information Processing Systems
Venue
2019
Year
Extension of the Transformer-XL, pre-trained using a new method that combines ideas from AR and AE objectives.
Before XLNet, NLP pretraining was dominated by two paradigms: autoregressive (AR) models like GPT that predict the next token left-to-right, and autoencoding (AE) models like BERT that reconstruct masked tokens. Each had trade-offs: AR models could not capture bidirectional context, while AE models assumed masked tokens are independent given unmasked ones—a simplification that ignores natural language's long-range dependencies. XLNet bridges this gap by introducing permutation language modeling, which combines the strengths of both approaches. This innovation led to state-of-the-art results across 18 NLP tasks, demonstrating that a more flexible pretraining objective can significantly improve language understanding.

XLNet's core idea is permutation language modeling. Instead of predicting tokens in a fixed order, the model considers all possible permutations of the input sequence. For each permutation, it predicts a token based on the tokens that appear before it in that permutation, effectively learning from both left and right contexts. This avoids the independence assumption of BERT while still capturing bidirectional information.

To implement this efficiently, XLNet uses a two-stream self-attention mechanism: a content stream (standard self-attention) and a query stream (which only sees the target token's position, not its content). This allows the model to predict a token without leaking its own content during training.

XLNet is built on Transformer-XL, which introduces a segment-level recurrence mechanism. This maintains a memory of previous segments, enabling the model to capture long-range dependencies beyond a fixed-length context. This is particularly beneficial for tasks like question answering and reading comprehension that require understanding of extended passages.





XLNet was pretrained on a large corpus combining BooksCorpus, English Wikipedia, Giga5, ClueWeb 2012-B, and Common Crawl, totaling 32.89B subword pieces using SentencePiece tokenization. The XLNet-Large model uses the same architecture as BERT-Large. On 18 NLP tasks, XLNet outperformed BERT, with particularly large gains on long-context reasoning tasks like SQuAD (question answering) and RACE (reading comprehension). For classification tasks with abundant supervised data (e.g., MNLI, Yelp, Amazon), XLNet still showed substantial improvements, indicating its pretraining objective provides better representations even when fine-tuning data is plentiful.
XLNet demonstrated that permutation language modeling is a viable and powerful alternative to masked language modeling. It showed that the independence assumption in BERT is a real bottleneck, and that modeling dependencies between masked tokens can yield better representations. The integration of Transformer-XL also highlighted the importance of long-range context for many NLP tasks. XLNet's success influenced later models like ELECTRA (which uses a discriminator-based approach) and RoBERTa (which optimized BERT's training). It remains a key reference point in the evolution of pretrained language models, proving that thoughtful objective design can push the boundaries of what's possible in natural language understanding.
Alex Krizhevsky, Ilya Sutskever et al.
Ashish Vaswani, Noam Shazeer et al.
Douglas M. Bates, Martin Mächler et al.
Diederik P. Kingma, Jimmy Ba