Notes

mBART

BART learns by repairing damaged text: corrupt a document, then ask the model to reconstruct it. mBART runs that exercise in twenty-five languages at once, with no translations anywhere in its training data — and comes out ready to translate.

Denoising, multiplied by 25
mBART is a full sequence-to-sequence transformer whose encoder and decoder are pre-trained together as a denoising autoencoder. The corruption has two parts: spans of tokens are replaced by a single mask symbol (text infilling) and the sentences of a document are permuted. The decoder must emit the original. The training text is monolingual — Common Crawl data in 25 languages for the first release, 50 for mBART-50 — with high-resource languages down-sampled so they do not swamp the smaller ones. A language id token marks each example and, at generation time, tells the decoder which language to produce.

Why pre-training the decoder matters
A BERT-style encoder transfers well to classification but gives a generation system nothing to start its decoder with. mBART pre-trains both halves, so fine-tuning begins from a decoder that already writes fluent target-language text. That pays off in:

  • Low-resource pairs, where a from-scratch system has too little parallel text to learn fluency.
  • Document-level translation, since sentence permutation taught it cross-sentence order.
  • Summarisation and other text-to-text tasks, reached by the same fine-tuning recipe.

The limit
Capacity is shared across every language it covers, so each added language eventually costs accuracy on the others, and fine-tuning hard on one pair erodes the rest. Hugging Face Transformers exposes it as MBartForConditionalGeneration.

mBART is a sequence-to-sequence transformer pre-trained as a denoising autoencoder on monolingual text in 25 languages (50 in mBART-50), reconstructing documents whose spans were masked and whose sentences were shuffled. Because encoder and decoder are both pre-trained, fine-tuning it on a small parallel corpus yields stronger machine translation for low-resource pairs than training from scratch, and the same checkpoint transfers to summarisation and other text-to-text tasks.

Imagine someone trained by being handed thousands of damaged pages — words blacked out, paragraphs shuffled — in twenty-five different languages, and asked each time to restore the original. After enough practice they would write fluently in all of those languages, without ever having seen a translation.

That is how mBART is trained. At first it studies no translated pairs at all; it simply learns to repair text. Only afterwards is it shown a modest number of real translations, and because it can already write well in every language it knows, it picks up translating fast — which helps most for languages that have very few translated examples available.