ENPAR: Enhancing Entity and Entity Pair Representations for Joint Entity Relation Extraction

Yijun Wang, Changzhi Sun, Yuanbin Wu, Hao Zhou, Lei Li, Junchi YanEACL 2021 · DOI

TL;DR

This paper introduces ENPAR, a novel pre-training method that enhances entity and entity pair representations for joint entity relation extraction. By introducing specialized entity and entity pair encoders and four new pre-training objectives, ENPAR significantly improves relation extraction performance, even outperforming state-of-the-art models on the ACE05 dataset, while requiring only entity-level annotations.

What Problem Does This Paper Address?

Joint entity relation extraction aims to simultaneously identify entities within text and the relationships between them. Existing state-of-the-art methods often rely on multi-task learning frameworks that require extensive, manually labeled data for auxiliary tasks like coreference resolution or event extraction, which are costly and difficult to obtain. This paper addresses the challenge of achieving high performance in joint entity relation extraction with significantly less annotation effort. The authors argue that while pre-trained models like BERT are powerful, their standard pre-training objectives are insufficient for this task, as they don't explicitly consider entity-related knowledge. Furthermore, these models only provide token-level representations, requiring additional, non-pre-trained parameters for entity and entity pair representations during fine-tuning, which can hinder performance.

Methods

ENPAR builds upon the Transformer architecture, similar to BERT, but introduces two key novelties:

  1. Specialized Encoders:
    • Entity Encoder: A CNN followed by an MLP processes the contextualized token representations of an entity to generate a single entity representation.
  2. Entity Pair Encoder: This encoder takes the representations of two entities and their surrounding context, processing them through a CNN and MLP to produce a contextualized entity pair representation.
  3. Four Novel Pre-training Objectives: These objectives are designed to imbue the encoders with entity-specific knowledge:
  4. Masked Entity Typing (MET): Masks words within an entity and trains the model to predict the entity's type.
  5. Masked Entity Prediction (MEP): Masks words within an entity and trains the model to predict the original masked words.
  6. Adversarial Context Discrimination (ACD): Generates negative samples by subtly altering the context around an entity pair and trains the entity pair encoder to distinguish between positive and negative samples using a hinge loss.
  7. Permutation Prediction (PP): Shuffles the constituent parts of an entity pair (left context, entity 1, middle context, entity 2, right context) and trains the entity pair encoder to predict the correct permutation.

These objectives are trained jointly, and the model is initialized with BERTBASE weights.

Datasets

The paper uses the following datasets:

  • Pre-training: English Wikipedia (processed and annotated with spaCy NER).
  • Fine-tuning and Evaluation:
    • ACE05
    • SciERC
    • NYT

Key Insights and Ideas

  • Entity-Specific Pre-training is Crucial: The core idea is that standard language model pre-training isn't enough for joint entity relation extraction. Explicitly training encoders for entities and entity pairs with entity-aware objectives is key to improving performance.
  • Entity Pair Information Matters: The proposed entity pair encoder and its associated objectives (ACD, PP) are shown to be particularly important for relation extraction performance, suggesting that understanding the interactions and context around pairs of entities is more critical than just individual entity representations.
  • Reduced Annotation Cost: ENPAR demonstrates that significant performance gains can be achieved with only entity-level annotations, which are much easier to obtain than the full suite of annotations required by multi-task learning approaches.
  • Robustness to Data Size: The pre-training method shows competitive performance even when using only 25% of the pre-training data, indicating efficient learning and reduced training costs.
  • Handling Complex Sentences: ENPAR excels at identifying long-distance relations and multiple relations within a sentence, outperforming BERT in scenarios with more entities or longer sentences.

Key Results

  • ACE05: ENPAR achieves significant improvements over previous state-of-the-art models, notably a 4.4-point increase in relation performance (exactly matching) compared to the LSTM-based GCN joint model and a 3.3-point increase over the BERT-based QA model. It also outperforms multi-task BERT models by 2.7 points.
  • SciERC: ENPAR shows a 0.5-point improvement in entity performance and a 2.2-point improvement in relation performance (exactly match) compared to BERT. It also achieves superior entity performance and comparable relation performance to a BERT-based multi-task model.
  • NYT: ENPAR significantly outperforms BERT on both entity and relation performance.
  • Ablation Studies: Removing the "PP" objective leads to the largest drop in relation performance, highlighting its importance. Using only the pre-trained Transformer (sentence encoder) with randomly initialized entity encoders still outperforms BERT.

Limitations and Future Work

  • Entity Performance Gap: While ENPAR excels in relation extraction, its entity performance is slightly inferior to some multi-task learning models. The authors attribute this to the additional supervision signals (coreference, event information) used by those models and their ability to consider cross-sentence contexts.
  • Entity Type Mismatch: The paper notes that entity types annotated by spaCy NER might differ from downstream datasets, but this does not hinder performance, suggesting the model's generalizability.
  • Future Work: The paper implicitly suggests that extending ENPAR to incorporate joint decoding methods could further enhance performance. The authors also highlight the potential for ENPAR to be utilized with any entity annotator due to its ability to encode contexts rather than just specific entities.

Summary updated

BibTeX
@inproceedings{wang2021enpar,
  author = {Yijun Wang and Changzhi Sun and Yuanbin Wu and Hao Zhou and Lei Li and Junchi Yan},
  title = {{ENPAR: Enhancing Entity and Entity Pair Representations for Joint Entity Relation Extraction}},
  booktitle = {EACL},
  year = {2021},
  doi = {10.18653/v1/2021.eacl-main.251},
}
Figure