RetroMAE: Pre-training Retrieval-oriented Transformers via Masked Auto-Encoder

Zheng Liu, Yingxia Shao · DOI

TL;DR

This paper introduces RetroMAE, a novel pre-training framework for dense retrieval models that leverages a Masked Auto-Encoder (MAE) approach with asymmetric masking and model structures. RetroMAE significantly improves state-of-the-art performance on dense retrieval benchmarks by forcing the encoder to learn richer sentence embeddings through a more demanding reconstruction task.

What Problem Does This Paper Address?

Dense retrieval, a crucial component in many applications like search engines and recommendation systems, relies on representing queries and documents as similar embeddings in a shared latent space. While large language models (LLMs) like BERT have revolutionized NLP, their standard pre-training objectives (e.g., Masked Language Modeling) don't fully optimize for the sentence-level representation capabilities needed for effective dense retrieval. Existing retrieval-oriented pre-training methods often rely on self-contrastive learning (which can be sensitive to data augmentation quality and require massive negative samples) or auto-encoding approaches with less demanding reconstruction tasks. This leaves room for more effective pre-training strategies that can generate better sentence embeddings for retrieval.

Methods

RetroMAE introduces a novel Masked Auto-Encoder (MAE) workflow with three key innovations:

  1. Novel MAE Workflow: The input sentence is masked twice. First, a moderately masked version is fed to the encoder to generate a sentence embedding. Then, the original sentence is reconstructed using this embedding and a differently and aggressively masked version of the input, processed by the decoder via masked language modeling. This forces the encoder to capture deeper semantic information.
  2. Asymmetric Model Structure: A full-scale BERT-like transformer serves as the encoder, designed to produce discriminative embeddings. In contrast, the decoder is a simplified, single-layer transformer, tasked with reconstructing the original sentence.
  3. Asymmetric Masking Ratios: The encoder uses a moderate masking ratio (15-30%), preserving most of the input's information. The decoder, however, employs an aggressive masking ratio (50-70%), making the reconstruction task significantly harder and more reliant on the encoder's learned embedding.

Additionally, the paper proposes an "enhanced decoding" mechanism that allows all input tokens to be used for reconstruction, each sampled with a unique context, further improving data efficiency and reconstruction quality.

Datasets

Pre-training: * English Wikipedia * BookCorpus * MS MARCO corpus

Evaluation: * MS MARCO: Passage retrieval task. * Natural Questions: Question answering. * BEIR benchmark: A heterogeneous benchmark for zero-shot evaluation across 18 diverse datasets (question answering, fact checking, bio-medical retrieval, news retrieval, social media retrieval, etc.).

Key Insights and Ideas

  • Demanding Reconstruction is Key: The core idea is that making the reconstruction task harder (via aggressive masking and a simple decoder) forces the encoder to learn truly meaningful sentence representations, which are crucial for dense retrieval.
  • Asymmetry is Beneficial: The combination of a powerful encoder and a simple decoder, along with different masking strategies for each, is more effective than symmetric approaches.
  • Data Efficiency Matters: The enhanced decoding method, which utilizes all input tokens for reconstruction, significantly improves data efficiency compared to traditional methods that only learn from masked tokens.
  • Retrieval-Specific Pre-training Outperforms Generic: The results suggest that pre-training objectives tailored for retrieval tasks are more impactful for dense retrieval performance than generic LLM pre-training, even for models like RoBERTa and DeBERTa.

Key Results

RetroMAE demonstrates significant improvements across various benchmarks:

  • Zero-Shot Retrieval (BEIR): Achieved an average NDCG@10 of 45.2, surpassing the strongest baseline by +4.5%. This is a substantial leap forward, achieved without increasing model scale or pre-training data.
  • Supervised Retrieval (MS MARCO): Achieved an MRR@10 of 41.6 after fine-tuning with DPR, and 0.3822 after fine-tuning with ANCE, outperforming strong baselines.
  • Knowledge Distillation (MS MARCO): Outperformed the state-of-the-art coCondenser by +1.1% on MRR@10.
  • Ablation Studies: Confirmed the effectiveness of the enhanced decoding, the single-layer decoder, aggressive decoder masking, and a slightly increased encoder masking ratio.

Limitations and Future Work

  • Model Scale and Data: The current empirical studies are based on BERT-base scale transformers and a moderate amount of pre-training data. The authors suggest exploring the impact of larger networks and increased pre-training data, as these factors have been shown to be important in recent works.
  • Computational Resources: The limitations on computation resources constrained the scale of experiments.

The paper's open-source release aims to inspire further research in this area.

Summary updated

BibTeX
@inproceedings{liu2022retromae,
  author = {Zheng Liu and Yingxia Shao},
  title = {{RetroMAE: Pre-training Retrieval-oriented Transformers via Masked Auto-Encoder}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.35},
}
Figure