SpacTor-T5: Pre-training T5 Models with Span Corruption and Replaced Token Detection

Ke Ye, Heinrich Jiang, Afshin Rostamizadeh, Ayan Chakrabarti, Giulia DeSalvo, Jean-François Kagy, Lazaros Karydas, Gui Citovsky, Sanjiv KumararXiv 2024 · DOI

Abstract

Pre-training large-scale language models is computationally intensive and often inefficient. While the T5 model utilizes Span Corruption (SC) for generative tasks, it suffers from sample inefficiency as only masked portions provide a training signal. Conversely, Replaced Token Detection (RTD) is highly efficient but traditionally limited to encoder-only architectures. We present SpacTor-T5, a novel pre-training procedure that integrates SC and RTD into a two-stage curriculum for encoder-decoder models. SpacTor-T5 achieves baseline performance with 50% fewer iterations and 40% less total compute (FLOPs), while consistently outperforming standard T5 models under fixed compute budgets.

Introduction

The efficiency of pre-training objectives is a critical bottleneck in developing Large Language Models (LLMs). The standard T5 architecture typically employs Span Corruption, where the model reconstructs masked text segments. While effective for downstream generative tasks, this objective is "sample inefficient" because the model only receives a training signal from the masked portions—the rest of the sequence is essentially ignored during loss calculation.

In contrast, models like ELECTRA use Replaced Token Detection (RTD), where a discriminator predicts whether every token in a sequence is original or has been replaced by a small generator. This provides a much denser training signal. SpacTor-T5 bridges the gap between the generative power of T5 and the efficiency of RTD by combining them into a unified framework.

Methodology

SpacTor (short for Span corruption and Token replacement) utilizes a hybrid training objective within a two-stage curriculum designed to maximize both encoder and decoder learning.

The SpacTor-T5 architecture combining a generator for token replacement and a discriminator for both RTD and span corruption.

The Hybrid Objective

During the initial stage of training, the model performs two tasks simultaneously:

  1. The Encoder acts as a discriminator, identifying which tokens were replaced by a small auxiliary generator (RTD).
  2. The Decoder attempts to reconstruct spans of text that were masked out (SC).

Two-Stage Curriculum

The authors identify that while RTD provides a dense training signal early on, the "plausible but fake" tokens eventually introduce noise that hinders fine-grained generative learning in the decoder. To mitigate this, SpacTor-T5 employs a curriculum switch: after a predefined number of iterations, the model transitions from the hybrid objective to pure Span Corruption training. This transition is essential to "clean up" the model's representations and maximize downstream scores.

Experimental Results

The models were pre-trained on the C4 (Colossal Clean Crawled Corpus) and evaluated on a comprehensive suite of benchmarks, including SuperGLUE, SQuAD, CNN/DailyMail, Rainbow, and FLAN.

Performance comparison across SuperGLUE, SQuAD, and CNN/DailyMail benchmarks relative to pre-training GFLOPs.

Evaluation demonstrates that SpacTor-T5 significantly improves pre-training efficiency:

  • Iteration Reduction: SpacTor-T5 reaches baseline performance levels using only 50% of the training iterations.
  • Compute Efficiency: Even accounting for the overhead of the auxiliary generator, the total computational budget (FLOPs) required is reduced by 40%.
  • Superior Performance: When controlled for a fixed computational budget, SpacTor-T5 consistently yields higher average scores than the standard T5 baseline across all tested benchmarks.
  • Scalability: These benefits were observed in both T5-Base and T5-Large (700M parameters) scales.

Conclusion

SpacTor-T5 demonstrates that a staged curriculum combining discriminative and generative objectives can drastically reduce the cost of pre-training encoder-decoder models. By using RTD as a "jumpstart" for the encoder's representations before refining the decoder's generative accuracy with pure span corruption, the method achieves superior performance with significantly less compute. Future work may explore smoother transitions between objectives or the application of this curriculum to massive-scale decoder-only architectures.

Summary updated

BibTeX
@misc{ye2024spactor,
  author = {Ke Ye and Heinrich Jiang and Afshin Rostamizadeh and Ayan Chakrabarti and Giulia DeSalvo and Jean-François Kagy and Lazaros Karydas and Gui Citovsky and Sanjiv Kumar},
  title = {{SpacTor-T5: Pre-training T5 Models with Span Corruption and Replaced Token Detection}},
  year = {2024},
  eprint = {2401.13160},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2401.13160},
}
Figure