# GraphRel - Modeling Text as Relational Graphs for Joint Entity and Relation Extraction Authors: Fu et al. Date: August 2019 Paper: https://aclanthology.org/P19-1136.pdf Venue: ACL 19 Code: https://github.com/tsujuifu/pytorch_graph-rel ## The problem - End to end joint modeling of the entities and relations is a difficult problem.Traditionally, pipeline approach is used which rely heavily on feature engineering. - Previous approaches on joint modeling face issues with overlapping realtions i.e. relations sharing common entity mentions. Ex: A,B,C and A,D,C. ## The solution - GraphRel, a neural end-to-end joint model for entity recognition and relation extraction that handles issues of overlapping relations. - Uses BiLSTM sentence encoder and a [[Graph Convolutional Networks (GCN)]] dependancy tree encoder for the input. The stacked BiLSTM and GCN extracts both sequential and regional dependancy word features. - Each word embedding (GloVe) is added with POS embedding as the initial feature. POS embedding are randomly intialized (and trained end2end). - Sentences are passed through dependancy parser to create an adjacency matrix. This graph is passed through GCN (bi-directional) to extract regional dependancy features. - Then given word features, relation is predicted for each word pair using 1-layer FFN, and entity is predicted for each word using an 1-layer LSTM (1st phase). - To handle interactions between relations better (i.e overlapping relation problem), a relation-weighted GCN is then used. - From 1st phase relations, for each relation a graph is built. The wieghts of the edges are the probability of relations betweens entities from the previous phase. - This is fed into the 2nd phase GCN to further consider the interactions (2nd phase). - Then the word features are again passed through FNN and LSTM again, now with the relation interactions considered for robust relation prediction. ## The details ![[GraphRel.png]] - Loss components: - Entity loss and relation loss, both of which belong to categorical cross-entropy loss. - $l o s s_{a l l}=\left(e l o s s_{1 p}+r l o s s_{1 p}\right)+\alpha\left(e l o s s_{2 p}+r l o s s_{2 p}\right)$ - Experimental settings: - biLSTM with 256 units, 1st phase GCN with 2 layer 256 feature size. 2nd phase GCN with 1 layer and 256 feature size. - Dataset: - NYT and WebNLG ## The results - GraphRel maintains high precision while increasing recall substantially, yeilding high F1 scores. - Outperforms previous work by 3.2% and 5.8% (F1 score), achieving a new state-of-the-art for relation extraction. --- ## References