Pre-training Entity Relation Encoder with Intra-span and Inter-span Information

Yijun Wang, Changzhi Sun, Yuanbin Wu, Junchi Yan, Peng Gao, Guotong Xie

Abstract

This paper introduces SPE (Span and span Pair Encoder), a novel pre-training framework designed specifically for entity relation extraction (ERE). Unlike standard models that focus on token-level objectives, SPE implements three unsupervised objectives—targeting token boundaries, internal span permutations, and contrastive span-pair matching—to bake relational awareness directly into the model's architecture. Experimental results on benchmarks like ACE05 and SciERC demonstrate that SPE significantly outperforms standard BERT baselines, particularly in low-resource settings.

Introduction

While universal pre-trained models like BERT have transformed NLP, they often struggle with Entity Relation Extraction (ERE). BERT is primarily optimized for token-level (Masked Language Modeling) and sentence-level (Next Sentence Prediction) tasks, which do not explicitly teach the model to recognize coherent entity spans or the complex relationships between them. Previous attempts to bridge this gap relied on noisy distant supervision or expensive human-annotated data. SPE addresses this by asking whether a model can learn span-level and relational information through purely unsupervised pre-training on raw text.

Methodology

The SPE framework extends the standard Transformer architecture by incorporating a Span Encoder and a Span Pair Encoder. These components are trained using three tailored unsupervised objectives:

  1. Token Boundary Objective (TBO): This variation of masked language modeling forces the model to predict masked sub-tokens using only the first sub-token of a word and its position, strengthening the representation of word anchors.
  2. Span Permutation Objective (SPO): To capture intra-span information, the model shuffles the internal tokens of a span and must predict the original permutation. This teaches the model the internal structural logic of entities.
  3. Contrastive Span Pair Objective (CSPO): To capture inter-span (relational) information, SPE utilizes a contrastive learning framework (MoCo). The model learns to match a span pair with its original context while distinguishing it from negative contexts sampled from other sentences.
Overview of the SPE architecture and its three-level pre-training objectives.

Experimental Results

SPE was pre-trained on English Wikipedia and BooksCorpus and subsequently fine-tuned on the ACE05 and SciERC benchmarks. The model demonstrated remarkable robustness, particularly when training data was scarce; at 10% or 20% of the fine-tuning data, SPE vastly outperformed the standard BERT baseline.

On the ACE05 benchmark, SPE achieved an F1 score of 63.2% for the joint "Entity + Relation" task, representing a 3% absolute improvement over the BERT baseline. It also matched or exceeded the performance of complex multi-task models that utilize additional supervision signals like coreference resolution.

Performance comparison on the ACE05 dataset for entity and relation extraction.

Discussion and Conclusion

A key finding of this research is that unsupervised pre-training on raw text with span-specific objectives can outperform pre-training on distantly supervised data, which often introduces performance-degrading noise. While SPE excels at identifying relations, its raw entity detection was slightly lower than some specialized models, likely due to the absence of extra supervision signals. Future work may investigate the model's performance on medium-length sentences and the integration of domain-specific knowledge bases to further enhance its capabilities in specialized fields like scientific research.

Summary updated

BibTeX
@inproceedings{wang2020pre,
  author = {Yijun Wang and Changzhi Sun and Yuanbin Wu and Junchi Yan and Peng Gao and Guotong Xie},
  title = {{Pre-training Entity Relation Encoder with Intra-span and Inter-span Information}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-main.132},
}
Figure