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.

PropertyXLNetRoBERTa (Robustly Optimized BERT Pretraining Approach)
FamilyTransformersTransformers
Year of appearance20192019
ResearchersZhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov,…Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi,…
Architecture typeAutoregressive Transformer-XL encoderEncoder-only Transformer
Learning mechanismself-supervisedself-supervised
Compared configurationXLNet-base: L = 12, d = 768, 12 headsRoBERTa-base: L = 12, H = 768, A = 12
Input shapen tokens (+ memory)n ≤ 512 tokens
Output shapen × 768n × 768
Depth12 layers12 encoder layers
Parameters (computed)116,718,336
≈116.72M
124,645,632
≈124.65M
Parameters (published)UnspecifiedUnspecified
MACs13,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.
ComplexityO(L·(n·(n+m)·d + nd²)).O(L·(n²H + nH²)).
TasksText classification, Question answeringText classification, Question answering
Main advantageBidirectional context without [MASK]Higher performance than BERT with the same architecture
Main limitationHigh implementation complexityVery costly pre-training
Review statusNeeds reviewNeeds review
Calculation assumptionsXLNetModel 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.