BART

BART

A bidirectional encoder with a causal decoder, trained as a denoiser: the text is corrupted in several ways and the model learns to restore it. Especially strong in summarization and conditional generation, with understanding performance close to RoBERTa.

2019Encoder-decoderPublished weights
DeveloperFacebook AI (Meta)
Year of publication2019
Number of parametersBase about 140 million, Large about 400 million
LayersBase 6+6, Large 12+12
Context length1024 tokens
Training dataRoBERTa's data (160 GB)
Training objectiveReconstructing the original text from a corrupted version (text infilling + sentence permutation)
LicenceMIT (fairseq)
ArabicBART is English; its multilingual version mBART includes Arabic.

Corruption functions

Token masking, token deletion, text infilling (a span with a length drawn from a Poisson distribution with mean 3 replaced with a single mask), sentence permutation, and document rotation. Combining text infilling with sentence permutation gave the best results overall.

Usage

BART is fine-tuned for summarization, generative question answering and dialogue, and can be used for classification by feeding the same text to the encoder and the decoder and taking the decoder's final representation. BART-Large-CNN became a widely used reference summarization model.

Encoder-decoder model (T5 and BART) Encoder–decoder
Thank you <X> me to your party <Y>N×Encoderbidirectional self-attentionN×Decodercausal self-attention+ cross-attention<start> <X> for inviting <Y> lastK, V<X> for inviting <Y> last <Z>T5: span corruptionBART: denoising

The encoder reads the whole input in both directions, and the decoder generates the output causally with cross-attention over the encoder's representations. Pre-training corrupts the text and then reconstructs it.

Key contributions

  • It combines the advantages of BERT (bidirectional understanding) and GPT (generation).
  • Text infilling with a single mask per span teaches it to estimate the length of what was removed.
  • Strong results in summarization (CNN/DailyMail and XSum).

Limitations and caveats

  • A 1024-token window limits long documents.

Original references

  1. Lewis, M. et al. (2020). BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension. ACL arxiv.org/abs/1910.13461

The figures are taken from the papers and official cards cited in the references. When the developer does not disclose a figure we write "not disclosed" and do not estimate it. Check the model card before any commercial use, because license terms may change.