BART Pre-training › The Denoising Framework

Michael BrenndoerferOctober 19, 20253 min read
Language AI HandbookAll chapters
Part 25 of 67Encoder-Decoder Models
Chapter 181BART Pre-training › The Denoising Framework
Reading section 2 of 16 · The Denoising Framework · 3 minSection 2 of 16 · 3 min

Book contents

Section 2 of 16 · 3 min read

BART Pre-training › The Denoising FrameworkOne section · Sections in this chapter2 / 16 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

BART's pre-training objective is simple: given a corrupted document x~\tilde{x}, reconstruct the original document xx. This turns the abstract problem of "learning language" into a concrete task: undo the corruption and recover the original text. The approach works because the objective creates rich learning signals based on how we corrupt the input.

The model minimizes negative log-likelihood loss:

L=−∑t=1∣x∣log⁡P(xt∣x<t,x~)\mathcal{L} = -\sum_{t=1}^{|x|} \log P(x_t \mid x_{<t}, \tilde{x})

where:

  • L\mathcal{L}: the loss function to minimize (negative log-likelihood)
  • xx: the original uncorrupted document
  • ∣x∣|x|: the number of tokens in the original document
  • xtx_t: the tt-th token of the original document
  • x<tx_{<t}: all tokens before position tt (the decoder's previous outputs)
  • x~\tilde{x}: the corrupted version of the document (encoder input)
  • P(xt∣x<t,x~)P(x_t \mid x_{<t}, \tilde{x}): the probability the model assigns to the correct token xtx_t

Consider what happens at each decoding step. The model uses two information sources: the corrupted input x~\tilde{x} processed by the encoder, and the previously generated tokens x<tx_{<t}. With these, the model predicts the probability distribution over all possible next tokens. We measure how much probability mass it assigns to the correct token xtx_t. The logarithm converts multiplicative probabilities into additive quantities. The negative sign changes our goal from maximizing likelihood to minimizing loss, which is standard in optimization.

This is cross-entropy loss over the original tokens, conditioned on both the previously generated tokens and the corrupted input. The encoder processes x~\tilde{x}, and the decoder generates xx token by token. The summation over all ∣x∣|x| tokens means we get a training signal at every position in the sequence, not just corrupted ones. This dense supervision distinguishes BART from BERT, which only computes loss at masked positions.

Denoising Autoencoder

A model that learns to reconstruct clean data from corrupted versions. The corruption process is called "noising," and the reconstruction process is "denoising." The model learns reliable representations by being forced to fill in missing or corrupted information.

The key design choice is selecting the noising function gg that turns xx into x~=g(x)\tilde{x} = g(x). This function determines what the model learns during pre-training. Different noising functions create different learning signals. Some emphasize local word relationships, others stress document structure, and some require the model to infer the length of missing content. If corruption is too easy to reverse, the model learns little because it can trivially recover the original without developing strong linguistic understanding. If corruption is too difficult or destroys too much structure, the model cannot learn meaningful patterns because there's insufficient signal remaining to guide reconstruction. BART's innovation was systematically exploring this design space to identify corruptions that hit the sweet spot: challenging enough to force learning but structured enough to permit it.

Unlike BERT, which only predicts masked tokens, BART's decoder must generate the entire original sequence. This architectural choice affects training. The model receives a training signal for every token position, not just corrupted ones. Even "easy" positions where the input was not corrupted contribute to learning. The decoder must copy these tokens and position them correctly within the output sequence. Unlike T5, which uses a specific span corruption scheme with sentinel tokens, BART explores a broader range of corruption strategies and reconstructs exact original text rather than just the corrupted spans. This full-sequence reconstruction teaches the model to blend generated content with copied content, a skill relevant to tasks like summarization where the output combines novel phrases with material drawn from the source.