Abstract
We present BART, a denoising autoencoder for pretraining sequence-to-sequence models. BART is trained by (1) corrupting text with an arbitrary noising function, and (2) learning a model to reconstruct the original text. It uses a standard Transformer-based neural machine translation architecture which, despite its simplicity, can be seen as generalizing BERT (due to the bidirectional encoder), GPT (with the left-to-right decoder), and many other more recent pretraining schemes. We evaluate a number of noising approaches, finding the best performance by both randomly shuffling the order of the original sentences and using a novel in-filling scheme, where spans of text are replaced with a single mask token. BART is particularly effective when fine tuned for text generation but also works well for comprehension tasks. It matches the performance of RoBERTa with comparable training resources on GLUE and SQuAD, achieves new state-of-the-art results on a range of abstractive dialogue, question answering, and summarization tasks, with gains of up to 6 ROUGE. BART also provides a 1.1 BLEU increase over a back-translation system for machine translation, with only target language pretraining. We also report ablation experiments that replicate other pretraining schemes within the BART framework, to better measure which factors most influence end-task performance.
Introduction
Before the introduction of BART, the natural language processing (NLP) landscape was largely divided between models optimized for understanding and those optimized for generation. Bidirectional models like BERT excelled at natural language understanding (NLU) tasks by leveraging context from both directions but struggled with generative tasks. Conversely, autoregressive models like GPT were proficient at generating text but lacked the bidirectional context necessary for deep comprehension.
BART (Bidirectional and Auto-Regressive Transformer) bridges this gap by unifying these paradigms into a single sequence-to-sequence framework. As a denoising autoencoder, BART learns to map corrupted input text back to its original form, creating a versatile model capable of handling a wide range of tasks from classification to abstractive summarization.
Architecture
BART utilizes a standard sequence-to-sequence architecture based on the Transformer. It consists of a bidirectional encoder, similar to BERT, and an autoregressive decoder, similar to GPT. This hybrid structure allows BART to process input context globally while generating output tokens sequentially.
This architecture is highly flexible. If the cross-attention between the encoder and decoder is removed, the model behaves like a standard language model (GPT). If only the encoder is used, it functions similarly to BERT, providing a unified framework for various pre-training schemes.
Denoising Pre-training Objectives
The core of BART's pre-training is its denoising objective. Unlike previous models that relied on simple token masking, BART experiments with several sophisticated corruption functions to challenge the model's reconstructive abilities:
- Token Masking: Random tokens are replaced with a
[MASK]token. - Token Deletion: Random tokens are removed, requiring the model to identify missing positions.
- Text Infilling: A novel scheme where spans of text (of varying lengths) are replaced with a single
[MASK]token. This forces the model to predict the number of missing tokens. - Sentence Permutation: The order of sentences within a document is shuffled.
- Document Rotation: A random token is chosen as the new start of the document, and the text is rotated accordingly.
The authors found that text infilling was particularly effective, as it encourages the model to reason about the overall structure and length of the text rather than just local token dependencies.
Evaluation and Results
BART was pre-trained on a massive 160GB dataset (BooksCorpus, Wikipedia, and news/web text) and evaluated across diverse benchmarks, showing significant gains over existing baselines.
Text Generation and Summarization
BART shows significant dominance in generation tasks. On the XSum dataset, which requires highly abstractive summarization, BART improved ROUGE scores by approximately 6 points over previous state-of-the-art models. It also achieved top results in dialogue (ConvAI2) and abstractive question answering (ELI5).
Natural Language Understanding
Despite its generative focus, BART remains highly competitive in NLU. It matches the performance of RoBERTa on the GLUE benchmark and SQuAD, demonstrating that the sequence-to-sequence denoising objective is effective for comprehension as well as generation.
Machine Translation
For translation tasks, BART introduces a novel fine-tuning approach where a randomly initialized encoder is stacked on top of the pre-trained BART model. This allows the model to map a foreign source language into the "denoised English" space it learned during pre-training, resulting in a 1.1 BLEU increase over strong back-translation baselines on WMT’16 Romanian-English.
Conclusion
BART represents a significant step toward a unified pre-training framework for NLP. By combining bidirectional encoding with autoregressive decoding and employing diverse denoising tasks, it achieves state-of-the-art performance across both understanding and generation. While challenges like factual "hallucination" remain, BART's flexibility and performance make it a powerful tool for modern NLP applications.
Summary updated