Neural Retrieval for Question Answering with Cross-Attention Supervised Data Augmentation

Yinfei Yang, Ning Jin, Kuo Lin, Mandy Guo, Daniel Cer

TL;DR

This paper introduces a supervised data augmentation method that uses a high-accuracy "cross-attention" model to train a fast, efficient "dual-encoder" retrieval model. By mining and labeling millions of additional question-answer pairs, the authors significantly boost retrieval performance, particularly on challenging datasets where simple keyword matching fails.

What Problem Does This Paper Address?

In open-domain question answering, the goal is to find the correct answer to a question from a massive corpus. This usually involves two steps: retrieval (finding relevant passages) and reading (extracting the exact answer).

For retrieval to be fast enough for production, we typically use dual-encoder models. These project questions and answers into a shared embedding space independently, allowing us to pre-compute answer embeddings and perform fast nearest-neighbor searches. However, this "late fusion" approach—where the question and answer only interact via a simple dot product at the very end—often underperforms compared to cross-attention models (like BERT). Cross-attention models perform "early fusion," allowing every word in the question to attend to every word in the answer, but they are far too slow to use for searching millions of documents.

The challenge is: how do we give the fast dual-encoder the "intelligence" and fine-grained comparison capabilities of a cross-attention model?

Methods

The authors propose a teacher-student framework for data augmentation:

  1. Train the Teacher: They first train a high-accuracy BERT-based cross-attention classifier on existing "gold" (human-labeled) question-answer pairs.
  2. Mine for Candidates: Using an off-the-shelf retriever (USE-QA), they find the top 10 potential answers for every question in their training set.
  3. Generate "Silver" Labels: The accurate but slow Teacher model scores these new pairs. Pairs with a score $\ge 0.5$ are kept as "silver" training data.
  4. Train the Student: They train a BERT-based dual-encoder (the retrieval model) on a combination of the original gold data and the new weighted silver data.
Figure 1: Use of a cross-attention model for the su- pervised mining of additional QA pairs. Our accurate cross-attention model supervises the mining process by identifying new previously unannotated positive pairs. Mined QA pairs augment the original training data for the dual encoder based neural passage retrieval model.

To handle the silver data effectively, they modify the standard training loss (In-batch Softmax) to include a weight $w(x, y)$ based on the teacher's confidence score.

Figure 2: The BERT dual encoder architecture. The answer and context are concatenated and fed into the answer encoder. Figure from (Guo et al., 2020).

Datasets

The researchers evaluated their approach on two major benchmarks via the MultiReQA framework:

  • Natural Questions (NQ): Derived from real Google search queries. This is considered a harder task because there is often less word-for-word overlap between the question and the answer.
  • SQuAD (Stanford Question Answering Dataset): A popular reading comprehension dataset.
Statistics for the NQ and SQuAD retrieval tasks.

Key Insights and Ideas

  • Bridging the Inductive Bias Gap: Cross-attention models have an inherent "inductive bias" to compare fine-grained text spans. Dual-encoders lack this. The authors show that providing more data (even "silver" data) helps the dual-encoder learn the complex representations necessary to mimic that bias.
  • Semantic vs. Lexical Overlap: The method is most effective on NQ. In SQuAD, questions are often written by workers looking directly at the text, leading to high token overlap. In such cases, simple methods like BM25 are already very strong, leaving less room for neural models to shine.
  • Data Efficiency: The mining process was much more productive for NQ (adding 53% more data) than for SQuAD (adding only 12%). This suggests that "natural" queries have many more valid-but-unlabeled answers hidden in large corpora than synthetic datasets do.

Key Results

The augmented retrieval model showed impressive gains, especially on the Natural Questions dataset:

  • NQ Performance: The augmented model achieved 53.3% P@1, a massive +8.6% absolute improvement over the standard dual-encoder (44.7%).
  • SQuAD Performance: The gains were more modest but still positive, moving from 62.8% to 63.8% P@1.
  • Teacher Accuracy: The BERT-Large teacher model achieved very high precision-recall (AUC-PR of 93.5 for NQ and 97.1 for SQuAD), proving it to be a reliable supervisor for the mining process.
Table 3: Precision at N(P@N) (%) N=[1, 5, 10] and Mean Reciprocal Rank (MRR) (%) on the MultiReQA tasks.

Limitations and Future Work

  • Dependence on Gold Data: The current pipeline still requires some initial human-annotated data to train the teacher model. The authors suggest that using a strong, general-purpose cross-attention model might eventually allow for "zero-shot" domain adaptation without any in-domain gold pairs.
  • Dataset Bias: The marginal gains on SQuAD highlight that neural retrieval benefits most when questions are linguistically diverse and don't just "parrot" the answer text.
  • Future Directions: The authors aim to explore training in-domain retrieval models without any gold question-answer pairs by leveraging general-purpose teacher models.

Summary updated

Abstract

Neural models that independently project questions and answers into a shared embedding space allow for efficient continuous space retrieval from large corpora. Independently computing embeddings for questions and answers results in late fusion of information related to matching questions to their answers. While critical for efficient retrieval, late fusion underperforms models that make use of early fusion (e.g., a BERT based classifier with cross-attention between question-answer pairs). We present a supervised data mining method using an accurate early fusion model to improve the training of an efficient late fusion retrieval model. We first train an accurate classification model with cross-attention between questions and answers. The accurate cross-attention model is then used to annotate additional passages in order to generate weighted training examples for a neural retrieval model. The resulting retrieval model with additional data significantly outperforms retrieval models directly trained with gold annotations on Precision at $N$ (P@N) and Mean Reciprocal Rank (MRR).
BibTeX
@inproceedings{yang2021neural,
  author = {Yinfei Yang and Ning Jin and Kuo Lin and Mandy Guo and Daniel Cer},
  title = {{Neural Retrieval for Question Answering with Cross-Attention Supervised Data Augmentation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.acl-short.35},
}
Figure