Efficient long-distance relation extraction with DG-SpanBERT

Jun Chen, Robert Hoehndorf, Mohamed Elhoseiny, Xiangliang ZhangarXiv 2020

Introduction

Relation Extraction (RE) is a fundamental task in Natural Language Processing (NLP) aimed at identifying semantic relationships between entities within a sentence. For example, in the sentence "The key was in a chest," an RE system should identify the Content-Container relationship between key and chest.

Current methodologies typically diverge into two categories: sequence-based models like BERT, which excel at capturing lexical semantics but struggle with long-range dependencies, and dependency-based models, which leverage grammatical structures to bridge distant words but often lack deep contextual understanding. DG-SpanBERT (Dependency Graph SpanBERT) addresses this "long-distance" gap by integrating the semantic richness of SpanBERT with the structural intelligence of Graph Convolutional Networks (GCNs).

Methodology: The DG-SpanBERT Architecture

The proposed DG-SpanBERT model utilizes a hybrid approach consisting of four primary stages to bridge the gap between semantics and syntax.

The DG-SpanBERT architecture combines SpanBERT contextual encoding with a GCN layer operating on dependency trees.
  1. Contextual Encoding (SpanBERT): The model employs SpanBERT, a BERT variant optimized for representing text spans. To enhance generalization, the authors use entity masking, replacing specific entity names with special tokens representing their NER types (e.g., [PERSON]).
  2. Token Alignment: To reconcile the sub-word tokenization of SpanBERT with the word-level requirements of dependency parsers, a random sampling strategy is used. If a word is split into multiple sub-words, one is randomly selected to represent the word in the dependency graph.
  3. Structural Pooling (GCN on Dependency Tree): Hidden states from SpanBERT are fed into a GCN that operates on the sentence's dependency tree. This allows information to flow directly between grammatically linked words, regardless of their linear distance in the sentence.
  4. Classification: Finally, the model concatenates the global sentence representation from SpanBERT with the structural features from the GCN to predict the relation.

Experimental Results

The model was evaluated on the TACRED benchmark, which contains over 106,000 sentences covering 41 relation types.

State-of-the-Art Performance

DG-SpanBERT (large) achieved a state-of-the-art F1-score of 71.5% on the TACRED dataset, outperforming standard Google BERT and standalone SpanBERT models. Notably, even the base version of the model (70.2% F1) significantly outperformed other BERT-based baselines.

Superior Long-Distance Extraction

The core strength of DG-SpanBERT is its ability to handle entities separated by large distances. Analysis of performance relative to token distance reveals that DG-SpanBERT consistently maintains higher F1 scores as the distance between subject and object increases.

F1 Score vs. Token Distance: DG-SpanBERT maintains superior performance over baselines as the distance between entities increases.

For relations where entities are separated by 11 or more tokens, DG-SpanBERT achieved an average F1 of 58.7, compared to 55.6 for SpanBERT and approximately 50.4 for traditional GCN models. This demonstrates that the "topological shortcut" provided by the GCN is crucial for long-distance relation extraction.

Discussion and Future Work

The success of DG-SpanBERT highlights the importance of the "Semantic-Syntactic Bridge." By using SpanBERT's output as initial features for a GCN, the model grounds abstract grammatical structures in deep contextual meaning.

However, some limitations remain. The model's performance is dependent on the accuracy of the underlying dependency parser. Additionally, the random sampling heuristic for sub-word alignment, while effective, could be replaced by more sophisticated methods like weighted averaging. Future research may also focus on reducing the computational overhead introduced by the additional GCN layers.

Summary updated

BibTeX
@misc{chen2020efficient,
  author = {Jun Chen and Robert Hoehndorf and Mohamed Elhoseiny and Xiangliang Zhang},
  title = {{Efficient long-distance relation extraction with DG-SpanBERT}},
  year = {2020},
  eprint = {2004.03636},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.03636},
}
Figure