The autoencoder that can talk
BART (Bidirectional and Auto-Regressive Transformers, Facebook (now Meta) 2019) is an encoder-decoder model (see encoder and decoder) pre-trained in a particularly elegant way: as a denoising autoencoder. An autoencoder is a network trained to reproduce its own input; "denoising" means you hand it a damaged version and ask for the original.
The concept is deceptively simple:
- Take a clean, well-formed text
- Corrupt it in different ways (mask words, delete passages, permute sentences)
- The encoder receives this damaged text and tries to understand it despite the noise
- The decoder must regenerate the original, intact text
The idea is to fuse the strengths of BERT Bidirectional Encoder Representations from Transformers, which understands text even when incomplete, with those of GPT Generative Pre-trained Transformer, which produces fluent text. The encoder must extract meaning despite the corruption; the decoder must reconstruct clean text from that partial understanding. The combination proves highly effective for text transformation tasks.
Architecture: complementary encoder-decoder
BART's architecture is a standard Transformer encoder-decoder, but each part has a very distinct role:
Encoder (comprehension side):
- Works like BERT: full bidirectional attention (each token can "see" all other tokens in the sequence, before and after it)
- Receives the corrupted text and can look in all directions to extract maximum meaning
- Produces a rich internal representation that captures the "true" meaning despite the noise
Decoder (generation side):
- Works like GPT: causal attention (each token can only see previous tokens, not those that follow, which enables sequential generation)
- Generates the reconstruction token by token, left to right
- Uses cross-attention to consult the encoder's representations at each generation step, the bridge between comprehension and production

The sizes. The paper gives the depths plus a simple rule for parameters: BART has "roughly 10% more parameters than the equivalently sized BERT model". Hence the orders of magnitude in the table: 110 million for BERT-base times 1.1 gives roughly 140 million; 340 million for BERT-large gives roughly 400 million.
| Variant | Encoder | Decoder | Parameters |
|---|---|---|---|
| BART-base | 6 layers | 6 layers | ≈140M |
| BART-large | 12 layers | 12 layers | ≈400M |
BART reconstructs the entire text after corruption. The target is long, so each example costs more compute, but supplies a lot of signal.
T5 reconstructs only the masked spans, not the whole text. Short target, cheaper training.
Two philosophies: BART says "understand everything and regenerate everything"; T5 says "fill in the holes." The T5 paper compared both and picked the short target on compute-cost grounds.
Technical corner: five corruption strategies tested
The BART paper's main contribution: there is no single good way to damage text. The authors systematically tested five strategies to see which produces the best representations.

1. Token Masking (like BERT)
Replaces individual tokens with [MASK].
| Original | Noisy | |
|---|---|---|
| Token Masking | "The black cat sleeps" | "The [MASK] cat [MASK]" |
Verdict: Effective but basic.
2. Token Deletion
Simply deletes tokens. The model must guess what is missing AND where.
| Original | Noisy | |
|---|---|---|
| Token Deletion | "The black cat sleeps" | "The cat sleeps" (lost "black") |
Verdict: Difficult. The model must infer the position too.
3. Text Infilling
Replaces a run of consecutive tokens (a span) with a single [MASK]. Unlike BERT, which masks each token separately, one marker here hides several words, and the model does not even know how many.
| Original | Noisy | |
|---|---|---|
| Text Infilling | "The black cat sleeps" | "The [MASK] sleeps" (one [MASK] replaces "black cat") |
Verdict: Very effective. The model must reconstruct multiple tokens, not just one.
4. Sentence Permutation
Shuffles the order of sentences (not tokens).
| Original | Noisy | |
|---|---|---|
| Sentence Permutation | "Cat sleeps. Owner reads." | "Owner reads. Cat sleeps." |
Verdict: Forces the model to understand inter-sentence coherence.
5. Document Rotation
Cuts the document at a random point and rotates it.
| Original | Noisy | |
|---|---|---|
| Document Rotation | "The cat sleeps on couch" | "on couch The cat sleeps" |
Verdict: Forces an understanding of narrative flow.
The recipe they settled on
Having tested each strategy alone and then in combination, the paper adopts, for the large model:
- Text infilling (the most effective) combined with sentence permutation;
- 30% of the tokens in each document are masked. The threshold is a balance: too little corruption and the model learns almost nothing; too much and the text becomes unreadable, hence unrecoverable. BERT masked 15%, but with less aggressive corruption.
- Masked span lengths are drawn from a Poisson distribution with mean 3 tokens. In plain terms: most holes hide two or three words, some a single one, a few many more. That variety is deliberate, a fixed-length hole would be a free hint.
Data: 160 GB of news, books, stories and web text, the same corpus as RoBERTa.
Masking one token at a time is too easy: the model learns to swap a word for a word. Text infilling is hard, because the model has to decide how many words to produce and then produce them in the right order. That is a generation task, not a classification task, and harder training tasks yield better representations.
Strengths: excellent generation
Abstractive summarization (BART's flagship task)
This is where BART shines the most, particularly abstractive summarization, meaning the ability to rephrase a text in its own words, not simply extract sentences from it.
| Step | Content |
|---|---|
| Input (article) | 1,000 words about health policy |
| BART-large output | 4 coherent lines summarizing key points, with rephrasing |
| ROUGE score (Recall-Oriented Understudy for Gisting Evaluation) | Best known result at publication |
ROUGE measures how many of the word runs in the reference summary (the n-grams, groups of n consecutive words) turn up in the produced summary. That is recall: the share of the reference actually recovered. A crude measure, blind to a correct rephrasing, but automatic. Its cousin BLEU (Bilingual Evaluation Understudy), used in translation, measures the reverse quantity: the share of the produced text that appears in the reference.
Why is BART so strong at summarization? Because pre-training via text infilling is structurally identical to the summarization task. During pre-training, the model learns to understand a long incomplete text (encoder) then regenerate a coherent text (decoder). Summarization is exactly that: understand a long article, then produce a short, faithful version.
On the CNN/DailyMail and XSum benchmarks, BART set new records at its publication.
Question answering, generative style
Not extractive QA (locate the span of text containing the answer), but generative QA: build the answer in the model's own words from the text. The reference dataset for the extractive version is SQuAD (Stanford Question Answering Dataset).
Context: Article about insects
Question: "How do ants communicate?"
Answer to generate: "Ants exchange chemical pheromones..."
BART outperforms pure encoders because it must generate, not classify.
Translation: a creative architectural approach
BART was pre-trained on English. To translate into English, you must feed it a sentence in another language, which its encoder has never seen.
The paper's solution: keep BART as it is, and stack in front of it a new encoder, randomly initialized, trained on bitext (pairs of sentences that are translations of each other). Its job is not to understand the source sentence in the abstract, but to project it into a form BART knows how to denoise.
In other words: present the foreign sentence to BART as if it were damaged English, and let it do what it was trained to do, repair it.
BART is for producing new text: summarization, translation, rewriting. BERT is for classifying or extracting: sentiment, named entity recognition (NER), field extraction.
"BERT or BART?" always reduces to "what is the task?" Generating means BART. Classifying means BERT.
Fine-tuning BART: task-specific adaptation
Sequence to sequence (translation, summarization)
Seq2seq, for sequence to sequence: a text sequence in, a text sequence out. This is BART's natural use.
- Fine-tune on (source text, summary/translation target) pairs
- Train to predict the target given the source
- Inference: pass the source to encoder+decoder, generate
Natural. No tricks needed.
Classification (yes, it's possible!)
Fun fact: BART can also classify. How?
But how do you use the output? Two approaches:
- By generation: let the decoder produce the word "positive", token by token, and read the first one.
- By vector: take the decoder's internal representation of its last token (its embedding) and pass it through a plain linear classification layer.
The second is more common: it exploits both the encoder's bidirectional reading and the overview the decoder has accumulated.
mBART: multilingual BART
mBART (Facebook, January 2020) extends BART to 25 languages.
An important point, often misreported: pre-training runs on monolingual corpora, ordinary text in each of the 25 languages, with no aligned translations. It is the same denoising as BART, applied to 25 languages at once. Parallel data only enters later, when the model is fine-tuned on a specific language pair.
Result:
- solid translation scores, including for low-resource pairs where bitext is scarce;
- cross-lingual transfer: what is learned in one language carries into another.
At their peak, around 2020-2022, the landscape read like this: T5 for versatility, BART for summarization and generation, mBART and mT5 for multilingual work, GPT for raw flexibility.
By July 2026 that division has largely dissolved. Large instruction-tuned decoder-only models handle translation, summarization and extraction without anyone picking an architecture per task. Encoder-decoder is no longer the first reflex for a new system; encoder-only, by contrast, holds a solid place for understanding and search.
Comparison table
| Aspect | BERT (encoder) | GPT (decoder) | BART (encoder-decoder) |
|---|---|---|---|
| Attention | Bidirectional | Causal | Bidirectional then causal |
| Strength | Comprehension | Free generation | Targeted generation |
| Output | Vectors or labels | Free text | Text guided by the input |
| Flagship task | Classification | Dialogue | Summarization, translation |
Why this matters
BART demonstrates a fundamental principle: the nature of pre-training determines the model's strengths. By combining several ways of damaging text rather than one, BART yields a robust and versatile encoder-decoder. Text infilling trains precisely the ability to reconstruct meaning from fragments, which is exactly what summarization, translation and rewriting demand.
Where BART stands in July 2026
Let us be blunt: BART is no longer a starting choice for a new system. Between 2019 and the early 2020s it had a solid argument, a 400-million-parameter model that summarized better than much larger ones, because it had been pre-trained for exactly that. That argument has been erased by large instruction-tuned models, compact versions included, which summarize and translate at least as well without per-task fine-tuning.
What does survive from BART is solid and now everywhere: the nature of pre-training determines the model's strengths. If you want a model that reconstructs meaning from fragments, you train it to reconstruct meaning from fragments. That lesson still holds whenever you design a training objective today, and it is the main thing to carry away from this page.
1. What is BART's pre-training principle?
2. Why did text infilling beat BERT-style token masking?
3. What data is mBART pre-trained on?
4. Why did BART excel at summarization in particular?