DNNRE: A Dynamic Neural Network for Distant Supervised Relation Extraction

Yanjie Gou, Yinjie Lei, Lingqiao Liu, Pingping Zhang, Jingyi Zhang, Xi PengarXiv 2019

Abstract

Distant Supervised Relation Extraction (DSRE) often struggles with noisy labels and rare "long-tail" relations. This paper introduces DNNRE, a Dynamic Neural Network that generates its attention and classification parameters on-the-fly based on the specific entity types in a query. By adapting its own architecture to the entities involved, the model effectively handles stylistic variations in how relations are expressed and dramatically improves accuracy for rare relation classes.

Introduction

Relation Extraction (RE) aims to identify semantic relationships between entities in text. To avoid the high cost of manual labeling, researchers often employ Distant Supervision (DS). This technique aligns a text corpus with a knowledge base (KB), assuming that if two entities in a sentence share a relation in the KB, the sentence expresses that relation.

However, DS introduces significant challenges. First, it produces noisy labels; not every sentence containing a pair of entities actually describes their known relationship. Second, there is a style shift problem: the vocabulary used to express a relation varies significantly depending on the types of entities involved (e.g., a relationship between a person and a news agency vs. a person and a corporation). Finally, real-world datasets suffer from a long-tail distribution, where a few relations are over-represented while the vast majority have very few training examples.

Methodology: The DNNRE Architecture

Unlike traditional models that use static weights, the authors propose DNNRE (Dynamic Neural Network for Relation Extraction). This model dynamically generates its own network parameters based on the input entity types.

The DNNRE architecture featuring the Sentence Encoder and Dynamic Parameter Generator.

The pipeline consists of four main stages:

  1. Sentence Encoding: A Piecewise Convolutional Neural Network (PCNN) transforms raw text into feature vectors.
  2. Entity Type Mapping: The model identifies fine-grained entity types for the query pair. A relation-aware attention mechanism aggregates these types to find the most relevant information for the specific relation.
  3. Dynamic Parameter Generator: This core component uses the aggregated entity type embeddings to generate weights for the subsequent layers.
  4. Dynamic Attention and Classification: The model uses these generated weights to perform bag-level attention—identifying which sentences in a "bag" truly express the relation—and final classification.

Addressing the Long-Tail Problem

The model was evaluated on the New York Times (NYT) dataset, which aligns Freebase facts with NYT articles. This dataset is characterized by a severe long-tail distribution, where a handful of classes dominate the sample count.

Distribution of relation classes in the NYT dataset, illustrating the prevalence of rare classes.

DNNRE addresses this by leveraging the fact that entity types are shared across many relations. Even if a specific relation is rare, the model can learn robust representations for the involved entity types (like Person or Location) from data-rich relations. This knowledge is then transferred via the dynamic parameter generator to create accurate classifiers for rare relations.

Key Results and Insights

The experimental results demonstrate that DNNRE significantly outperforms existing baselines:

  • State-of-the-Art Performance: DNNRE achieved a Mean Top-N Precision (P@N) of 83.6%, surpassing the previous state-of-the-art model, RESIDE (79.4%).
  • Long-Tail Breakthrough: On relations with fewer than 100 training samples, DNNRE achieved 57.6% accuracy on Hits@10. In contrast, standard PCNN+ATT models scored below 5.0% on the same metric.
  • Importance of Granularity: Using fine-grained entity types (112 categories) proved much more effective than coarse-grained types (38 categories) for generating high-quality dynamic parameters.

Ablation studies confirmed that both the dynamic attention and the dynamic classifier are essential, with the dynamic classifier being the most critical component for performance.

Conclusion

DNNRE represents a paradigm shift from static to dynamic neural architectures in relation extraction. By generating parameters on-the-fly based on entity metadata, the model effectively handles stylistic shifts and the long-tail problem. Future work may involve joint training of entity typing and relation extraction to further reduce reliance on external knowledge bases and improve end-to-end performance.

Summary updated

BibTeX
@misc{gou2019dnnre,
  author = {Yanjie Gou and Yinjie Lei and Lingqiao Liu and Pingping Zhang and Jingyi Zhang and Xi Peng},
  title = {{DNNRE: A Dynamic Neural Network for Distant Supervised Relation Extraction}},
  year = {2019},
  eprint = {1911.06489},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.06489},
}
Figure