Paragraph-based Transformer Pre-training for Multi-Sentence Inference

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

Introduction

Modern Natural Language Processing (NLP) models typically operate as "cross-encoders," evaluating a query against a single candidate at a time (e.g., a question paired with one potential answer). While effective, this approach fails to capture the nuances of tasks that require joint inference, such as ranking the best answer from a list or verifying a claim using multiple pieces of evidence. In these scenarios, comparing candidates against each other helps eliminate redundancies and identify subtle differences.

Despite the intuitive appeal of feeding all candidates into a model like RoBERTa simultaneously, standard pre-training objectives like Masked Language Modeling (MLM) do not equip models to handle the complex dependencies between multiple separate input sentences. This paper introduces a novel pre-training objective, Multi-Sentences in Paragraph Prediction (MSPP), to bridge this gap by teaching models to reason across paragraph-level structures.

Methodology

Joint Encoder Architecture

The authors propose a "Joint" transformer architecture that concatenates multiple sentences into a single input sequence: [s0, s1, ..., sk], where $s_0$ represents the query or claim and $s_1$ through $s_k$ are the candidates or evidence sentences. To manage this complex input, the model utilizes specific Type and Position IDs to distinguish between the various segments.

Joint Encoder Architecture and Input Formatting for MSPP

Multi-Sentences in Paragraph Prediction (MSPP)

To train this joint model, the authors leverage the natural coherence of paragraphs as a form of weak supervision. During pre-training, given a target sentence $s_0$ and a set of other sentences, the model must predict which ones originated from the same paragraph as $s_0$. This objective forces the model to learn paragraph-level semantics and inter-sentence relationships, serving as a proxy for the multi-sentence reasoning required during downstream fine-tuning.

Inference Heads

The architecture supports different prediction heads to adapt to various tasks. The authors categorize these into two main types:

  • Individual Evidence (IE): Predicts a label for a candidate based primarily on its own representation.
  • Aggregated Evidence (AE): Predicts a label by considering the candidate in the global context of all other candidates in the sequence.
Overview of Individual Evidence (IE) and Aggregated Evidence (AE) Prediction Heads

Experimental Results

The MSPP-trained model was evaluated on Answer Sentence Selection (AS2) and Fact Verification tasks using datasets such as WikiQA and FEVER.

  • AS2 Performance: On WikiQA, the joint model achieved a P@1 (Precision at 1) of 82.7%, significantly outperforming the standard pairwise RoBERTa baseline of 77.1%.
  • Fact Verification: On the FEVER dataset, the model reached a test accuracy of 74.39%, surpassing previous state-of-the-art baselines like GEAR and KGAT.
  • Efficiency: Despite the quadratic cost of self-attention, the "one-pass" approach for multiple candidates resulted in only a 14.1% increase in latency compared to standard models, while providing much more robust reasoning capabilities.

Discussion and Limitations

While highly effective for inference tasks, the MSPP objective is specialized; it may not provide the same benefits for standard GLUE benchmarks that rely on simple sentence pairs. Additionally, the current implementation uses a fixed candidate count ($k=5$). Scaling to larger sets of candidates will require more memory-efficient attention mechanisms, such as Longformer, to manage the quadratic growth of Transformer attention costs. Nevertheless, using paragraph membership as a pre-training signal proves to be a powerful method for teaching models to perform sophisticated multi-sentence reasoning.

Summary updated

BibTeX
@inproceedings{liello2022paragraph,
  author = {Luca Di Liello and Siddhant Garg and Luca Soldaini and Alessandro Moschitti},
  title = {{Paragraph-based Transformer Pre-training for Multi-Sentence Inference}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.181},
}
Figure