Rethinking Denoised Auto-Encoding in Language Pre-Training

Fuli Luo, Pengcheng Yang, Shicheng Li, Xuancheng Ren, Xu Sun, Songfang Huang, Fei Huang

Abstract

Modern language pre-training predominantly relies on Denoising Auto-Encoding (DAE), where models learn by reconstructing original inputs from corrupted versions. However, this approach often suffers from a discrepancy between pre-training and fine-tuning phases and may fail to capture global semantic features. This paper introduces ContrAstive Pre-Training (CAPT), a novel objective that encourages models to produce nearly identical representations for an original text sequence and its noisy counterparts. By minimizing the pretrain-finetune discrepancy, CAPT enables models to learn noise-invariant features and global semantics. Experimental results across 11 natural language and vision-language benchmarks demonstrate that CAPT consistently improves performance over strong baselines like RoBERTa and LXMERT.

Introduction

Most contemporary AI models for language, such as BERT, are trained using Denoising Auto-Encoding (DAE). In this setup, the model takes a corrupted input—where words are masked, shuffled, or replaced—and attempts to reconstruct the original "clean" version. While highly successful, DAE presents two major limitations:

  1. Pretrain-Finetune Discrepancy: During pre-training, the model only encounters noisy data, whereas during fine-tuning on downstream tasks, it sees clean data. This discrepancy can lead to suboptimal performance as internal representations become covariant with the noise.
  2. Lack of Global Semantics: Token-level prediction tasks like Masked Language Modeling (MLM) often ignore the "big picture" or global meaning of a sentence, which is critical for many high-level understanding tasks.

Methodology: ContrAstive Pre-Training (CAPT)

To address these challenges, the authors propose CAPT, which reframes pre-training as a multi-class classification problem. The objective is to match an instance with its own corrupted version in a shared semantic space.

The CAPT framework: (a) Extracting semantic representations from original and corrupted batches; (b) Multi-class classification for contrastive learning; (c) Optimized semantic space where similar instances are pulled together and dissimilar ones are pushed apart.

Core Components

  • Contrastive Objective: For every input sequence $x$, a corrupted version $\hat{x}$ is created. The model uses a contrastive loss to "pull" the representations of $x$ and $\hat{x}$ together while "pushing" them away from unrelated sequences in the batch.
  • Aggregation Layer: Instead of relying solely on the standard [CLS] token, CAPT incorporates a dedicated MLP-based aggregation layer to extract high-level global representations.
  • Adaptive Temperature: To optimize gradient flow and handle "hard negatives," the authors implemented an inverted triangle schedule for the temperature hyperparameter ($\tau$), adjusting it throughout the training process.
  • Memory Queue: To provide a vast number of negative examples without excessive memory usage, a dynamic queue of 8,192 previous representations is maintained.

Experimental Results

The effectiveness of CAPT was evaluated by applying it to two robust baselines: RoBERTa for natural language processing and LXMERT for vision-language tasks.

Performance analysis of CAPT: (Left) Impact of negative sample size and adaptive temperature on GLUE scores; (Middle) Convergence speed on GQA task compared to LXMERT; (Right) Comparison of different noise types (Masking vs. Shuffling) on GLUE performance.

Key Findings

  • Benchmark Improvements: CAPT-Large improved the average GLUE score to 89.5%, a 0.6% absolute gain over RoBERTa-Large. It showed particular strength in Natural Language Inference tasks. In vision-language tasks, CAPT consistently outperformed LXMERT on VQA (+0.36%), GQA (+0.53%), and NLVR² (+0.8%).
  • Noise Invariance and Convergence: By forcing the model to recognize semantic cores despite noise, CAPT effectively mitigates the pretrain-finetune discrepancy. Furthermore, CAPT-based models reach high performance levels significantly faster during fine-tuning compared to standard baselines.
  • Ablation Insights: Analysis revealed that masking is a more effective noise source than shuffling for CAPT. Additionally, both the Memory Queue and Adaptive Temperature were found to be critical for capturing high-level features.

Conclusion

CAPT provides a powerful alternative to traditional denoising objectives by focusing on noise-invariant global representations. By bridging the gap between pre-training and fine-tuning, it achieves state-of-the-art results across multiple modalities. Future work may explore more complex noise types, such as back-translation, and the scalability of CAPT to even larger model architectures.

Summary updated

BibTeX
@inproceedings{luo2021rethinking,
  author = {Fuli Luo and Pengcheng Yang and Shicheng Li and Xuancheng Ren and Xu Sun and Songfang Huang and Fei Huang},
  title = {{Rethinking Denoised Auto-Encoding in Language Pre-Training}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.232},
}
Figure