TECHNOLOGY

T5 span corruption reconstructs missing spans through sentinel tokens

In this article
THE QUICK TAKE

T5 sentinels identify removed spans and align the decoder’s reconstruction target; they are boundary markers in a training transformation rather than missing words themselves.

T5 frames many tasks as text-to-text transformations. Its span-corruption pretraining removes contiguous text spans, places sentinel markers in the source and asks the decoder to reconstruct the missing content. The source and target are deliberately different sequences, so tracing both is the clearest way to understand the objective.

Remove a span rather than scoring every visible token

The corruption procedure chooses spans according to a declared policy. A selected contiguous region is replaced by a sentinel in the encoder input. Unremoved text remains available around the gap. The decoder target contains missing content organized with the corresponding sentinel boundaries. This makes the task different from ordinary causal prediction over the original uncorrupted document and different from independently replacing every missing token with the same symbol. The exact sampling policy and target construction belong to the pretraining recipe.

Trace a miniature source and target

Imagine the sentence the quiet river crosses the old town, with quiet river selected as a missing span. The encoder sees the surrounding sentence with a sentinel replacing that span. The target associates that sentinel with quiet river and the appropriate subsequent boundary under the recipe. If another span is removed, its distinct sentinel preserves which gap is being reconstructed. This is a schematic teaching example rather than a literal tokenizer dump; actual identifiers and completion markers should be obtained from the intended T5 tokenizer and data transformation.

The encoder and decoder have different access

The encoder can represent the full corrupted source, including words after a gap. The decoder generates its reconstruction target with causal target-side dependencies and cross-attention to the encoder. Access to later unremoved source text is legitimate because that text was supplied as input. Access to future decoder target content would be a different matter. Keeping these two axes separate explains how the model can use surrounding evidence while still training an autoregressive decoder to produce the missing-span sequence in the expected order.

Preserve sentinel identity through batching

A data fixture should show original text, selected spans, corrupted source, target and their token identifiers. Verify that distinct spans retain the intended corresponding markers and that target loss ignores padding correctly. Do not assume a generic mask token can replace the recipe’s sentinel system without changing the objective. After pretraining, downstream tasks use their own text-to-text input and target formats. The span-corruption mechanism explains how reconstruction supervision is assembled, not a universal instruction to insert sentinel markers into every application prompt.

Primary research and implementation references

Reproducible inference stacks: preserving a GPU pilot’s result; A GPU inference benchmark you can trust.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles