Pre-training Transformer Models with Sentence-Level Objectives for Answer Sentence Selection

Luca Di Liello, Siddhant Garg, Luca Soldaini, Alessandro Moschitti · DOI

Abstract

Researchers from Amazon Alexa AI and the Allen Institute for AI have introduced three new "paragraph-aware" pre-training objectives for Transformer models. By teaching models to recognize the structural relationships between sentences, paragraphs, and documents, they significantly improved performance on Answer Sentence Selection (AS2) tasks. This approach achieves state-of-the-art results without requiring the massive amounts of manually labeled data typically needed for high-performance QA systems.

Introduction

Answer Sentence Selection (AS2) is a critical component of modern Question Answering (QA) systems, such as Alexa or Siri. When a user asks a question, the system retrieves relevant documents and must then identify the exact sentence containing the answer. This is a knowledge-intensive task requiring complex semantic reasoning.

However, current models face two major hurdles:

  1. Data Scarcity: High-quality, human-labeled AS2 data is expensive and slow to produce.
  2. Objective Mismatch: Standard pre-training tasks like Masked Language Modeling (MLM) focus on predicting missing tokens. While effective for general language understanding, they do not explicitly teach "structural semantics"—the way sentences relate to paragraphs and documents—which is vital for matching a question to a candidate answer.

Methodology: Paragraph-Aware Pre-training

The authors propose continuous pre-training using three novel sentence-level objectives designed to be more challenging and structurally focused than previous methods like Next Sentence Prediction (NSP). These objectives were applied to RoBERTa and ELECTRA architectures:

  • Spans in Same Paragraph (SSP): The model predicts if two different sentence spans belong to the same paragraph.
  • Span in Paragraph (SP): The model predicts if a specific sentence span was extracted from a given paragraph.
  • Paragraphs in Same Document (PSD): The model predicts if two paragraphs belong to the same document.

To increase the difficulty of these tasks, the researchers employed "hard negatives." For example, in the SSP task, a negative example might consist of two sentences from the same document but different paragraphs. This forces the model to learn subtle topical and structural cues rather than relying on general subject matter identification.

Experimental Setup

The models were continuously pre-trained on a massive corpus including English Wikipedia, BookCorpus, OpenWebText, and CC-News. For evaluation, the researchers utilized four diverse AS2 benchmarks:

  • ASNQ: A large-scale dataset derived from Google search queries.
  • WikiQA: A popular benchmark based on Bing query logs.
  • TREC-QA: A classic factoid QA dataset.
  • WQA: A large-scale, de-identified industrial dataset from the Alexa virtual assistant.

Key Insights

Structure as a Signal

The core finding of this research is that the inherent structure of human-written documents (sentences $\rightarrow$ paragraphs $\rightarrow$ documents) contains a wealth of latent semantic information. By forcing the model to reconstruct this structure, it develops superior representations for sentence-pair tasks.

Difficulty and Intelligence

The authors observed that these paragraph-aware tasks were significantly harder for models to solve than older objectives like Sentence Order Prediction (SOP). While models often reach ~97% accuracy on SOP, they struggle more with SSP and PSD, suggesting these tasks require more complex reasoning capabilities.

Efficiency Over Volume

Traditionally, reaching top-tier AS2 performance required an intermediate transfer step using millions of labeled examples (the TANDA approach). This research demonstrates that intelligent pre-training objectives can achieve comparable results without the need for that additional labeled data.

Results

The paragraph-aware models consistently outperformed standard RoBERTa and ELECTRA baselines across all datasets:

  • Performance Boost: On the WikiQA dataset, the RoBERTa + SSP model improved P@1 (Precision at 1) by 4.6 percentage points over the baseline.
  • Competitive with SOTA: The proposed models achieved results comparable to TANDA, despite TANDA having the advantage of being fine-tuned on an additional 20 million labeled QA pairs.
  • Consistency: Combining all three objectives (SSP+SP+PSD) generally yielded the most robust results across different document types.

Limitations and Future Work

While highly effective, the study was limited to English-language datasets. The authors hypothesize that these benefits would extend to other languages, particularly those with limited morphology. Additionally, pre-training these models is computationally expensive, requiring multiple NVIDIA A100 GPUs. To support the community, the authors have released their code and pre-trained checkpoints. Future research will investigate whether these paragraph-level objectives improve performance on other NLP tasks, such as Natural Language Inference (NLI).

Summary updated

BibTeX
@inproceedings{liello2022pre,
  author = {Luca Di Liello and Siddhant Garg and Luca Soldaini and Alessandro Moschitti},
  title = {{Pre-training Transformer Models with Sentence-Level Objectives for Answer Sentence Selection}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.810},
}
Figure