Notes

Denoising Autoencoder Pretraining

Hand someone a page with words blacked out, whole phrases missing and the sentences shuffled, then ask them to write out what the page originally said. Doing that well requires genuinely understanding the page. Denoising autoencoder pretraining turns that exercise into a training objective for a sequence-to-sequence model.

Corrupt, then reconstruct
Clean text passes through a noising function, the encoder reads the damaged version, and the decoder is trained to produce the original — cross-entropy against text that never needed a human annotator. BART popularised the recipe, and the menu of noise is deliberately varied:

  • Token masking and deletion — individual tokens replaced or removed, so the model must work out not only what is missing but how much.
  • Text infilling — spans of arbitrary length collapsed into a single mask token.
  • Sentence permutation and document rotation — order scrambled, which pushes the model to learn discourse structure rather than local grammar.

Why corrupt the input at all
Masked language modeling trains an encoder to fill slots and leaves it with no practice at producing fluent text. Denoising trains encoder and decoder together under one objective, which is why checkpoints pretrained this way fine-tune strongly for summarisation, translation and other text-to-text work instead of classification alone. mBART applies the identical scheme across many languages at once.

The noise is the hyperparameter
Corruption that is too mild makes reconstruction trivial and teaches nothing. Corruption that is too aggressive makes the original genuinely unrecoverable, and the model settles for producing plausible generic text. The span-length distribution used in text infilling is the setting that moves results most.

Denoising autoencoder pretraining trains a sequence-to-sequence model to reconstruct original text from a deliberately corrupted copy — tokens masked or deleted, spans infilled, sentences shuffled. The objective needs no labels and trains encoder and decoder under one loss, which is why checkpoints built this way, such as BART and mBART, fine-tune strongly for summarisation and translation rather than for classification alone.

Imagine a teacher who hands back your essay with random words blacked out, a couple of sentences swapped around and a paragraph missing, and asks you to write out the original. You can only manage it if you truly understood the piece in the first place.

Denoising autoencoder pretraining sets software that same exercise, millions of times over. The computer damages a piece of real text itself, tries to restore it, and corrects itself whenever the restoration is wrong. No person has to mark anything, because the undamaged text is already the answer key. What comes out of all that practice is a model that is good at producing language, which is why it goes on to write summaries and translations well.