Graph Neural Networks with Generated Parameters for Relation Extraction

Hao Zhu, Yankai Lin, Zhiyuan Liu, Jie Fu, Tat-Seng Chua, Maosong Sun

Introduction

Relation Extraction (RE) is a fundamental challenge in Natural Language Processing, focused on identifying structured relationships between entities within unstructured text. While modern deep learning models excel at "one-hop" extractions—such as identifying a director from a film's description—they frequently struggle with "multi-hop" reasoning. For example, inferring that a director likely speaks a specific language based on the films they have directed requires a level of relational synthesis that traditional models often fail to achieve.

Existing Graph Neural Network (GNN) approaches for RE typically rely on rigid dependency trees or fixed edge types, which can be noisy and inflexible when applied to the nuances of natural language. This paper introduces GP-GNNs (Graph Neural Networks with Generated Parameters), a novel framework that bridges the gap between raw text and structured relational reasoning by dynamically generating GNN parameters directly from linguistic context.

The GP-GNN Framework

The core innovation of the GP-GNN model is its move away from static edge weights. Instead, it treats every entity in a sentence as a node in a fully connected graph and uses a neural "generator" to define the relationships between them. The architecture consists of three primary modules:

  1. Encoding Module: A Bi-LSTM processes the text context between every pair of entities. This contextual information is then transformed into a unique transition matrix (the generated parameters) for that specific edge.
  2. Propagation Module: The model performs message passing across the graph. Because the transition matrices are conditioned on the actual language used, the flow of information between nodes adapts to the specific semantic nuances of the sentence.
  3. Classification Module: After $K$ layers of propagation—representing $K$ hops of reasoning—the model concatenates the representations of the target entity pair to predict the final relationship.
Architecture of the GP-GNN model, illustrating the Encoding, Propagation, and Classification modules.

Experimental Evaluation

The researchers evaluated GP-GNNs against several state-of-the-art baselines, including CNNs, PCNNs, and the "Context-Aware RE" model, across three distinct benchmarks:

  • Distantly Labeled Dataset: A large-scale set derived from Wikipedia and Wikidata.
  • Human Annotated Test Set: A high-quality subset of 350 sentences verified by human annotators to ensure ground-truth accuracy.
  • Dense Distantly Labeled Test Set: A specialized subset containing sentences with more than two entities and complex relational "circles," specifically designed to test multi-hop reasoning capabilities.

Key Results and Analysis

GP-GNNs demonstrated significant performance gains over existing models. On the Human Annotated Set, a 3-layer GP-GNN achieved an accuracy of 75.3% and a Macro F1 of 47.9%, notably higher than the 68.9% and 44.9% achieved by the Context-Aware baseline.

The model's strength was most apparent in the Dense Dataset, where it achieved a Precision@5% of 98.5%. This performance highlights the model's ability to filter noise and perform multi-hop verification. Qualitative analysis confirmed that the model effectively "discovered" logical rules, such as transitivity (e.g., if $X$ is owned by $Y$ and $Y$ is located in $Z$, then $X$ is located in $Z$).

Qualitative comparison showing GP-GNN's ability to correctly extract complex multi-hop relations compared to LSTM and Context-Aware baselines.

Furthermore, the study found that increasing the number of GNN layers (up to 3) consistently improved performance. Unlike many GNN applications that suffer from "over-smoothing" with added depth, the GP-GNN framework benefits from deeper propagation, confirming that multi-hop reasoning is a distinct and measurable advantage of this architecture.

Conclusion

GP-GNNs represent a significant step forward in making GNNs compatible with the flexibility of natural language. By using text as a parameter generator, the model can perform sophisticated relational reasoning without being tethered to rigid, pre-defined graph structures. While the current implementation faces some computational overhead due to the fully connected nature of the entity graphs, the underlying principle of "parameter generation" offers a promising path for relational reasoning in other unstructured domains, such as computer vision and multi-modal analysis.

Summary updated

BibTeX
@inproceedings{zhu2019graph,
  author = {Hao Zhu and Yankai Lin and Zhiyuan Liu and Jie Fu and Tat-Seng Chua and Maosong Sun},
  title = {{Graph Neural Networks with Generated Parameters for Relation Extraction}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-1128},
}
Figure