Model comparison
This page compares specific configurations (such as ResNet-50 or BERT-base), not general families; each number is tied to the configuration named at the top of its column. “Unspecified” means the number is not documented in the atlas.
| Property | XLNet | RoBERTa (Robustly Optimized BERT Pretraining Approach) |
|---|---|---|
| Family | Transformers | Transformers |
| Year of appearance | 2019 | 2019 |
| Researchers | Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov,… | Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi,… |
| Architecture type | Autoregressive Transformer-XL encoder | Encoder-only Transformer |
| Learning mechanism | self-supervised | self-supervised |
| Compared configuration | XLNet-base: L = 12, d = 768, 12 heads | RoBERTa-base: L = 12, H = 768, A = 12 |
| Input shape | n tokens (+ memory) | n ≤ 512 tokens |
| Output shape | n × 768 | n × 768 |
| Depth | 12 layers | 12 encoder layers |
| Parameters (computed) | 116,718,336 ≈116.72M | 124,645,632 ≈124.65M |
| Parameters (published) | Unspecified | Unspecified |
| MACs | 13,287,555,072 ≈13.29B For a sequence n = 128 without previous memory (content stream only at inference). | 11,174,215,680 ≈11.17B For a sequence n = 128. |
| Complexity | O(L·(n·(n+m)·d + nd²)). | O(L·(n²H + nH²)). |
| Tasks | Text classification, Question answering | Text classification, Question answering |
| Main advantage | Bidirectional context without [MASK] | Higher performance than BERT with the same architecture |
| Main limitation | High implementation complexity | Very costly pre-training |
| Review status | Needs review | Needs review |
| Calculation assumptions | XLNetModel from Hugging Face with the xlnet-base-cased configuration; the paper does not state the number of parameters explicitly. | RobertaModel from Hugging Face with the roberta-base configuration (with Pooler); the paper does not state the number of base parameters explicitly. |
Recorded relations between the compared models
- XLNet Alternative RoBERTa (Robustly Optimized BERT Pretraining Approach) — The two competed on GLUE in 2019.
