Joint Extraction of Entities and Relations via Entity and Relation Heterogeneous Graph Attention Networks
Abstract
:1. Introduction
2. Related Works
2.1. ERE-Related Work
2.2. Heterogeneous Graph Attention Network (HGAT)-Related Work
3. Problem Formulation
4. Methodology
4.1. Encoder
4.2. Subject Extraction
4.3. Update Node Representations with Heterogeneous Graph Attention Network
4.4. Relation-Specific Object Extraction
5. Experimental Section
5.1. Experimental Setting
5.1.1. Datasets and Evaluation Metrics
5.1.2. Implementation Details
5.2. Experimental Results
5.2.1. Main Results
5.2.2. Detailed Results on Different Types of Sentences
5.3. Analysis and Discussion
5.3.1. Ablation Study
5.3.2. Results on Different Numbers of Relations
5.3.3. Error Analysis
5.3.4. Case Study
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Zeng, X.; Zeng, D.; He, S.; Liu, K.; Zhao, J. Extracting Relational Facts by an End-to-End Neural Model with Copy Mechanism. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, Melbourne, Australia, 15–20 July 2018; pp. 506–514. [Google Scholar]
- Wei, Z.P.; Su, J.; Wang, Y.; Tian, Y.; Chang, Y. A Novel Cascade Binary Tagging Framework for Relational Triple Extraction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Seattle, WA, USA, 5–10 July 2020; pp. 1476–1488. [Google Scholar]
- Zheng, H.; Wen, R.; Chen, X.; Yang, Y.; Zhang, Y.; Zhang, Z.; Zhang, N.; Qin, B.; Xu, M.; Zheng, Y. PRGC: Potential Relation and Global Correspondence Based Joint Relational Triple Extraction. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Bangkok, Thailand, 1–6 August 2021; pp. 6225–6235. [Google Scholar]
- Hu, L.; Yang, T.; Shi, C.; Ji, H.; Li, X. Heterogeneous Graph Attention Networks for Semi-Supervised Short Text Classification. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, Hong Kong, China, 3–7 November 2019; pp. 4823–4832. [Google Scholar]
- Yang, T.; Hu, L.; Shi, C.; Ji, H.; Li, X.; Nie, L. HGAT: Heterogeneous Graph Attention Networks for Semi-Supervised Short Text Classification. ACM Trans. Inf. Syst 2021, 39, 32. [Google Scholar] [CrossRef]
- Li, Z.; Liu, H.; Zhang, Z.; Liu, T.; Xiong, N.N. Learning Knowledge Graph Embedding with Heterogeneous Relation Attention Networks. IEEE Trans. Neural Netw. Learn. Syst. 2022, 33, 3961–3973. [Google Scholar] [CrossRef] [PubMed]
- Xie, Y.; Xu, H.; Li, J.; Yang, C.; Gao, K. Heterogeneous Graph Neural Networks for Noisy Few-Shot Relation Classification. Knowl.-Based Syst. 2020, 194, 105548. [Google Scholar] [CrossRef]
- Zheng, S.; Wang, F.; Bao, H.; Hao, Y.; Zhou, P.; Xu, B. Joint Extraction of Entities and Relations Based on a Novel Tagging Scheme. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, Vancouver, BC, Canada, 30 July–4 August 2017; pp. 1227–1236. [Google Scholar]
- Fu, T.J.; Li, P.H.; Ma, W.Y. GraphRel: Modeling Text as Relational Graphs for Joint Entity and Relation Extraction. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, 28 July–2 August 2019; pp. 1409–1418. [Google Scholar]
- Zeng, D.; Zhang, H.; Liu, Q. CopyMTL: Copy Mechanism for Joint Extraction of Entities and Relations with Multi-Task Learning. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; pp. 9507–9514. [Google Scholar]
- Hong, Y.; Liu, Y.; Yang, S.; Zhang, K.; Wen, A.; Hu, J. Improving Graph Convolutional Networks Based on Relation-Aware Attention for End-to-End Relation Extraction. IEEE Access 2020, 8, 51315–51323. [Google Scholar] [CrossRef]
- Wang, Y.; Yu, B.; Zhang, Y.; Liu, T.; Zhu, H.; Sun, L. TPLinker: Single-Stage Joint Extraction of Entities and Relations Through Token Pair Linking. In Proceedings of the 28th International Conference on Computational Linguistics, Barcelona, Spain, 13–18 September 2020; pp. 1572–1582. [Google Scholar]
- Zhao, K.; Xu, H.; Cheng, Y.; Li, X.; Gao, K. Representation Iterative Fusion Based on Heterogeneous Graph Neural Network for Joint Entity and Relation Extraction. Knowl.-Based Syst. 2021, 219, 106888. [Google Scholar] [CrossRef]
- Lai, T.; Cheng, L.; Wang, D.; Ye, H.; Zhang, W. RMAN: Relational Multi-Head Attention Neural Network for Joint Extraction of Entities and Relations. Appl. Intell. 2022, 52, 3132–3142. [Google Scholar] [CrossRef]
- Liang, J.; He, Q.; Zhang, D.; Fan, S. Extraction of Joint Entity and Relationships with Soft Pruning and GlobalPointer. Appl. Sci. 2022, 12, 6361. [Google Scholar] [CrossRef]
- Nadeau, D.; Sekine, S. A Survey of Named Entity Recognition and Classification. Lingvisticæ Investig. 2007, 30, 3–26. [Google Scholar] [CrossRef]
- Gormley, M.R.; Yu, M.; Dredze, M. Improved Relation Extraction with Feature-Rich Compositional Embedding Models. arXiv 2015, arXiv:1505.02419. [Google Scholar]
- Cai, R.; Zhang, X.; Wang, H. Bidirectional Recurrent Convolutional Neural Network for Relation Classification. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, Berlin, Germany, 7–12 August 2016; pp. 756–765. [Google Scholar]
- Christopoulou, F.; Miwa, M.; Ananiadou, S. A Walk-Based Model on Entity Graphs for Relation Extraction. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, Melbourne, Australia, 15–20 July 2018; pp. 81–88. [Google Scholar]
- Qin, P.; Xu, W.; Wang, W.Y. Robust Distant Supervision Relation Extraction via Deep Reinforcement Learning. arXiv 2018, arXiv:1805.09927. [Google Scholar]
- Miwa, M.; Bansal, M. End-to-End Relation Extraction Using LSTMs on Sequences and Tree Structures. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, Berlin, Germany, 7–12 August 2016; pp. 1105–1116. [Google Scholar]
- Katiyar, A.; Cardie, C. Going out on a Limb: Joint Extraction of Entity Mentions and Relations without Dependency Trees. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, Vancouver, BC, Canada, 30 July–4 August 2017; pp. 917–928. [Google Scholar]
- Miwa, M.; Sasaki, Y. Modeling Joint Entity and Relation Extraction with Table Representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, Doha, Qatar, 25–29 October 2014; pp. 1858–1869. [Google Scholar]
- Gupta, P.; Schütze, H.; Andrassy, B. Table Filling Multi-Task Recurrent Neural Network for Joint Entity and Relation Extraction. In Proceedings of the COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, Osaka, Japan, 11–16 December 2016; pp. 2537–2547. Available online: https://aclanthology.org/C16-1239 (accessed on 11 December 2016).
- Bekoulis, G.; Deleu, J.; Demeester, T.; Develder, C. Joint entity recognition and relation extraction as a multi-head selection problem. Expert Syst. Appl. 2018, 114, 34–45. [Google Scholar] [CrossRef] [Green Version]
- Ma, L.; Ren, H.; Zhang, X. Effective Cascade Dual-Decoder Model for Joint Entity and Relation Extraction. arXiv 2021, arXiv:2106.14163. [Google Scholar]
- El-allaly, E.; Sarrouti, M.; En-Nahnahi, N.; Ouatik El Alaoui, S. An Attentive Joint Model with Transformer-Based Weighted Graph Convolutional Network for Extracting Adverse Drug Event Relation. J. Biomed. Inform. 2022, 125, 103968. [Google Scholar] [CrossRef] [PubMed]
- Sun, H.; Grishman, R. Employing Lexicalized Dependency Paths for Active Learning of Relation Extraction. Intell. Autom. Soft Comput. 2022, 34, 1415–1423. [Google Scholar] [CrossRef]
- Chen, W.; Gu, Y.; Ren, Z.; He, X.; Xie, H.; Guo, T.; Yin, D.; Zhang, Y. Semi-Supervised User Profiling with Heterogeneous Graph Attention Networks. In Proceedings of the Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, Macao, China, 10–16 August 2019; pp. 2116–2122. [Google Scholar]
- Huang, Q.; Yu, J.; Wu, J.; Wang, B. Heterogeneous Graph Attention Networks for Early Detection of Rumors on Twitter. In Proceedings of the 2020 International Joint Conference on Neural Networks, Glasgow, UK, 19–24 July 2020; pp. 1–8. [Google Scholar]
- Cao, Y.; Peng, H.; Wu, J.; Dou, Y.; Li, J.; Yu, P.S. Knowledge-Preserving Incremental Social Event Detection via Heterogeneous GNNs. In Proceedings of the Web Conference 2021, Ljubljana Slovenia, 19–23 April 2021; ACM: New York, NY, USA, 2021; pp. 3383–3395. [Google Scholar] [CrossRef]
- Pang, Y.; Wu, L.; Shen, Q.; Zhang, Y.; Wei, Z.; Xu, F.; Chang, E.; Long, B.; Pei, J. Heterogeneous Global Graph Neural Networks for Personalized Session-Based Recommendation. In Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining, held virtually, Tempe, AZ, USA, 15 February 2022; pp. 775–783. [Google Scholar] [CrossRef]
- Lu, G.; Li, J.; Wei, J. Aspect Sentiment Analysis with Heterogeneous Graph Neural Networks. Inf. Process. Manag. 2022, 59, 102953. [Google Scholar] [CrossRef]
- Liang, Y.; Meng, F.; Zhang, Y.; Chen, Y.; Xu, J.; Zhou, J. Emotional Conversation Generation with Heterogeneous Graph Neural Network. Artif. Intell. 2022, 308, 103714. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. BERT: Pre-Training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Minneapolis, MN, USA, 2–7 June 2019; pp. 4171–4186. [Google Scholar]
- Gardent, C.; Shimorina, A.; Narayan, S.; Perez-Beltrachini, L. Creating Training Corpora for NLG Micro-Planning. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics, Vancouver, BC, Canada, 30 July–4 August 2017; pp. 179–188. [Google Scholar]
- Chen, T.; Zhou, L.; Wang, N.; Chen, X. Joint Entity and Relation Extraction with Position-Aware Attention and Relation Embedding. Appl. Soft Comput. 2022, 119, 108604. [Google Scholar] [CrossRef]
Class | WebNLG | |
---|---|---|
Train | Test | |
Normal | 1596 | 246 |
EPO | 227 | 26 |
SEO | 3406 | 457 |
All | 5019 | 703 |
#Relation | 171 |
BERT Model | The Number of Parameters |
---|---|
BertEmbeddings | |
word_embeddings | 28,996 × 768 |
position_embeddings | 512 × 768 |
token_type_embeddings | 2 × 768 |
LayerNorm | 768 + 768 |
BertEncoder | |
12 × BertLayer | |
12 × attention | 12 × [(768 × 768) + 768 + (768 × 768) + 768 + (768 × 768) + 768 + (768 × 768) + 768 + 768 + 768)] |
12 × intermediate | 12 × [768 + (3072 × 768) + 3072] |
12 × output | 12 × [(768 × 3072) + 768 + 768 + 768] |
BertPooler | |
Linear | (768 × 768) + 768 |
#Total | 108,310,272 |
Hyperparameters | Values |
---|---|
Tags threshold | 0.5 |
Max length of input sentences | 100 |
Training batch size | 6 |
Learning rate | 0.1 |
Weight decay | 2 × 10−4 |
Momentum | 0.8 |
Method | WebNLG | ||
---|---|---|---|
Prec. | Rec. | F1 | |
NovelTagging | 52.5 | 19.3 | 28.3 |
CopyRE | 37.7 | 36.4 | 37.1 |
GraphRel | 44.7 | 41.1 | 42.9 |
CopyMTL | 58.0 | 54.9 | 56.4 |
Relation-Aware | 66.4 | 62.7 | 64.5 |
CasRel | 93.4 | 90.1 | 91.8 |
TPLinker | 91.8 | 92.0 | 91.9 |
RIFRE | 93.3 | 92.0 | 92.6 |
PRGC | 94.0 | 92.1 | 93.0 |
RMAN | 83.6 | 85.3 | 84.5 |
SGNet | 91.8 | 91.9 | 91.9 |
ERHGAØ | 93.1 | 90.5 | 91.8 |
ERHGA | 94.3 | 92.3 | 93.3 |
Method | WebNLG | ||
---|---|---|---|
Normal | SEO | EPO | |
CopyRE | 59.2 | 33.0 | 36.6 |
GraphRel | 65.8 | 38.2 | 40.6 |
CasRel | 89.4 | 92.2 | 94.7 |
TPLinker | 87.9 | 92.5 | 95.3 |
RIFRE | 90.1 | 93.1 | 94.7 |
PRGC | 90.4 | 93.6 | 95.9 |
SGNet | 89.2 | 92.5 | 95.0 |
ERHGA | 91.2 | 93.7 | 95.9 |
Number | WebNLG |
---|---|
0 | 91.8 |
1 | 92.5 |
2 | 93.3 |
3 | 91.9 |
Different Hyperparameters. | WebNLG |
---|---|
Training batch size = 6, Learning rate = 0.1, Weight decay = 1 × 10−4, Momentum = 0.8 | 91.8 |
Training batch size = 6, Learning rate = 0.1, Weight decay = 1 × 10−4, Momentum = 0.9 | 87.2 |
Training batch size = 6, Learning rate = 0.1, Weight decay =2 × 10−4, Momentum = 0.8 | 93.3 |
Training batch size = 6, Learning rate = 0.1, Weight decay = 2 × 10−4, Momentum = 0.9 | 91.6 |
Training batch size = 6, Learning rate = 0.01, Weight decay = 1 × 10−4, Momentum = 0.8 | 91.7 |
Training batch size = 6, Learning rate = 0.01, Weight decay = 1 × 10−4, Momentum = 0.9 | 92.3 |
Training batch size = 6, Learning rate = 0.01, Weight decay = 2 × 10−4, Momentum = 0.8 | 91.5 |
Training batch size = 6, Learning rate = 0.01, Weight decay = 2 × 10−4, Momentum = 0.9 | 90.9 |
Training batch size = 8, Learning rate = 0.1, Weight decay = 1 × 10−4, Momentum = 0.8 | 92.9 |
Training batch size = 8, Learning rate = 0.1, Weight decay = 1 × 10−4, Momentum = 0.9 | 92.4 |
Training batch size = 8, Learning rate = 0.1, Weight decay = 2 × 10−4, Momentum = 0.8 | 92.7 |
Training batch size = 8, Learning rate = 0.1, Weight decay = 2 × 10−4, Momentum = 0.9 | 92.0 |
Training batch size = 8, Learning rate =0.01, Weight decay = 1 × 10−4, Momentum = 0.8 | 91.8 |
Training batch size = 8, Learning rate =0.01, Weight decay = 1 × 10−4, Momentum = 0.9 | 91.0 |
Training batch size = 8, Learning rate =0.01, Weight decay = 2 × 10−4, Momentum = 0.8 | 91.2 |
Training batch size = 8, Learning rate =0.01, Weight decay = 2 × 10−4, Momentum = 0.9 | 92.1 |
Element | ERHGA | PRGC | ||||
---|---|---|---|---|---|---|
Prec. | Rec. | F1 | Prec. | Rec. | F1 | |
E1 | 98.9 | 95.1 | 96.9 | 69.4 | 96.3 | 80.7 |
E2 | 98.2 | 94.4 | 96.3 | 72.1 | 95.7 | 82.2 |
R | 97.1 | 93.4 | 95.2 | 92.8 | 96.2 | 94.5 |
(E1, R) | 95.4 | 92.6 | 94.0 | - | - | - |
(R, E2) | 96.1 | 93.0 | 94.5 | - | - | - |
(E1, E2) | 96.1 | 93.6 | 94.8 | 96.0 | 92.1 | 94.7 |
(E1, R, E2) | 94.3 | 92.3 | 93.3 | 94.0 | 92.1 | 93.0 |
Sentences | Ground Truth | Predictive Value |
---|---|---|
Sri Jayawardenepura Kotte is the capital of Sri Lanka, where Ampara Hospital is located. | (Hospital, country, Lanka), (Lanka, capital, Kotte) | (Hospital, country, Lanka), (Lanka, capital, Kotte) |
Ampara Hospital is in Eastern Province, Sri Lanka. Ranil Wickremesinghe is a leader there. | (Hospital, country, Lanka), (Lanka, leaderName, Wickremesinghe), (Hospital, state, Lanka) | (Hospital, country, Lanka), (Lanka, leaderName, Wickremesinghe), (Hospital, state, Lanka) |
Baku is the capital of Azerbaijan and the leader of the legislature (the National Assembly) is Artur Rasizade. Azerbaijan is the location of the Baku Turkish Martyrs memorial. | (Azerbaijan, capital, Baku) (Azerbaijan, leader, Rasizade) | (Azerbaijan, capital, Baku) (Azerbaijan, leaderName, Rasizade) |
Adisham Hall is located in Haputale, Sri Lanka. The capital of Sri Lanka is Sri Jayawardenepura Kotte, the language used in the country is Tamil and the currency is the Sri Lankan Rupee. | (Lanka, capital, Kotte) (Hall, country, Lanka) (Lanka, language, language) | (Lanka, capital, Kotte) (Lanka, currency, Rupee) (Hall, country, Lanka) (Lanka, language, language) (Hall, location, Haputale) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Jiang, B.; Cao, J. Joint Extraction of Entities and Relations via Entity and Relation Heterogeneous Graph Attention Networks. Appl. Sci. 2023, 13, 842. https://doi.org/10.3390/app13020842
Jiang B, Cao J. Joint Extraction of Entities and Relations via Entity and Relation Heterogeneous Graph Attention Networks. Applied Sciences. 2023; 13(2):842. https://doi.org/10.3390/app13020842
Chicago/Turabian StyleJiang, Bo, and Jia Cao. 2023. "Joint Extraction of Entities and Relations via Entity and Relation Heterogeneous Graph Attention Networks" Applied Sciences 13, no. 2: 842. https://doi.org/10.3390/app13020842
APA StyleJiang, B., & Cao, J. (2023). Joint Extraction of Entities and Relations via Entity and Relation Heterogeneous Graph Attention Networks. Applied Sciences, 13(2), 842. https://doi.org/10.3390/app13020842