Knowledge Base Question Answering via Semantic Analysis
Abstract
:1. Introduction
- (1)
- This paper summarizes the current mainstream methods of knowledge Q&A, and compares and describes the characteristics and advantages of each of the four mainstream methods: the rule-based question-answering method, information retrieval question-answering method, ChatGPT method, and semantic analysis question-answering method.
- (2)
- The published NLPCC2016KBQA data set was optimized. For the public NLPCC2016KBQA, segmentation and data processing were carried out to generate the special data set for question entity recognition and the special data set for question type identification; support model training; extracting the triad in the NLPCC2016KBQA data set; and generating the knowledge graph, as the background knowledge for intelligent question answering.
- (3)
- A method of multi-neural-network cooperation, the BBCB (BERT–BiLSTM–CRF-BERT) model, is proposed to research the machine intelligence question-answering task. For the entity extraction task, a model was constructed based on BERT–BiLSTM–CRF and experiments were conducted on the constructed question entity recognition data set. The final F1 value was 95.5%. For the question-type judgment task, a BERT-FC model was constructed. On the NLPCC2016KBQA data set, the final F1 value was 99.1%.
2. Literature Review
2.1. Mainstream Technology
2.2. Related Data Sets
3. Method
3.1. An Entity Recognition Model for Question Sentences
3.1.1. Question Entity Recognition BiLSTM Layer
3.1.2. CRF Layer of Question Entity Recognition
3.2. Attribute Similarity Judgment
3.3. Answer Generation
4. Results
4.1. Experimental Data Set
4.2. Experimental Environment and Evaluation Index
4.3. Comparative Analysis of Results
5. Error Analysis
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Liu, H.; Zhang, Y.; Li, Y.; Kong, X. Review on emotion recognition based on electroencephalography. Front. Comput. Neurosci. 2021, 15, 84. [Google Scholar] [CrossRef]
- Othman, N.; Faiz, R.; Smaïli, K. Learning english and arabic question similarity with siamese neural networks in community question answering services. Data Knowl. Eng. 2022, 138, 101962. [Google Scholar] [CrossRef]
- Maheshwari, G.; Trivedi, P.; Lukovnikov, D.; Chakraborty, N.; Fischer, A.; Lehmann, J. Learning to rank query graphs for complex question answering over knowledge graphs. In The Semantic Web–ISWC 2019, Proceedings of the 18th International Semantic Web Conference, Auckland, New Zealand, 26–30 October 2019; Part I; Springer International Publishing: Cham, Switzerland, 2019; pp. 487–504. [Google Scholar]
- Jabalameli, M.; Nematbakhsh, M.; Ramezani, R. Denoising distant supervision for ontology lexicalization using semantic similarity measures. Expert Syst. Appl. 2021, 177, 114922. [Google Scholar] [CrossRef]
- Jabalameli, M.; Nematbakhsh, M.; Zaeri, A. Ontology-lexicon–based question answering over linked data. ETRI J. 2020, 42, 239–246. [Google Scholar] [CrossRef]
- Lin, L.; Liu, J.; Zhang, X.; Liang, X. Automatic translation of spoken English based on improved machine learning algorithm. J. Intell. Fuzzy Syst. 2021, 40, 2385–2395. [Google Scholar] [CrossRef]
- Jiang, Y.; Yang, G.; Li, H.; Zhang, T. Knowledge driven approach for smart bridge maintenance using big data mining. Autom. Constr. 2023, 146, 104673. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Polosukhin, I. Attention is all you need. In Proceedings of the Advances in Neural Information Processing Systems 30 (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; Volume 30. [Google Scholar]
- Wang, R.Z.; Ling, Z.H.; Hu, Y. Knowledge base question answering with attentive pooling for question representation. IEEE Access 2019, 7, 46773–46784. [Google Scholar] [CrossRef]
- Bi, X.; Nie, H.; Zhang, G.; Hu, L.; Ma, Y.; Zhao, X.; Yuan, Y.; Wang, G. Boosting question answering over knowledge graph with reward integration and policy evaluation under weak supervision. Inf. Process. Manag. 2023, 60, 103242. [Google Scholar] [CrossRef]
- Turing, A.M. Computing machinery and intelligence. Mind 1950, 59, 433–460. [Google Scholar] [CrossRef]
- Green, B.F., Jr.; Wolf, A.K.; Chomsky, C.; Laughery, K. Baseball: An automatic question-answerer. In Proceedings of the Western Joint IRE-AIEE-ACM Computer Conference, Los Angeles, CA, USA, 9–11 May 1961; pp. 219–224. [Google Scholar]
- Weizenbaum, J. ELIZA—A computer program for the study of natural language communication between man and machine. Commun. ACM 1966, 9, 36–45. [Google Scholar] [CrossRef]
- Antoniou, C.; Bassiliades, N. A survey on semantic question answering systems. Knowl. Eng. Rev. 2022, 37, e2. [Google Scholar] [CrossRef]
- Lan, Y.; He, G.; Jiang, J.; Jiang, J.; Zhao, W.X.; Wen, J.-R. Complex knowledge base question answering: A survey. IEEE Trans. Knowl. Data Eng. 2022, 35, 11196–11215. [Google Scholar] [CrossRef]
- Zhong, B.; He, W.; Huang, Z.; Love, P.E.; Tang, J.; Luo, H. A building regulation question answering system: A deep learning methodology. Adv. Eng. Inform. 2020, 46, 101195. [Google Scholar] [CrossRef]
- Mahmud, T.; Hasan, K.A.; Ahmed, M.; Chak, T.H.C. A rule based approach for NLP based query processing. In Proceedings of the 2015 2nd International Conference on Electrical Information and Communication Technologies (EICT), Khulna, Bangladesh, 10–12 December 2015; pp. 78–82. [Google Scholar]
- Woods, W.A. Progress in natural language understanding: An application to lunargeology. In Proceedings of the National Computer conference and Exposition, New York, NY, USA, 4–8 June 1973; pp. 441–450. [Google Scholar]
- Liu, Z.J.; Wang, X.L.; Chen, Q.C.; Zhang, Y.Y.; Xiang, Y. A Chinese question answering system based on web search. In Proceedings of the 2014 International Conference on Machine Learning and Cybernetics, Malaga, Spain, 13–16 July 2014; Volume 2, pp. 816–820. [Google Scholar]
- Riloff, E.; Thelen, M. A rule-based question answering system for reading comprehension tests. In ANLP-NAACL 2000 Workshop: Reading Comprehension Tests as Evaluation for Computer-Based Language Understanding Systems; 2000; Available online: https://aclanthology.org/W00-0603.pdf (accessed on 4 May 2020).
- Dong, L.; Wei, F.; Zhou, M.; Xu, K. Question answering over freebase with multi-column convolutional neural networks. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), Beijing, China, 26–31 July 2015; pp. 260–269. [Google Scholar]
- Bordes, A.; Weston, J.; Usunier, N. Open question answering with weakly supervised embedding models. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases; ACM: Nancy, France, 2014; pp. 165–180. [Google Scholar]
- Zhang, Y.; Liu, K.; He, S.; Ji, G.; Liu, Z.; Wu, H.; Zhao, J. Question answering over knowledge base with neural attention combining global knowledge information. arXiv 2016, arXiv:1606.00979. [Google Scholar]
- Jiajie, D.; Kang, X.; Heng, Y.; Zhou, X.; Zhang, M. Data enhancement method for question answering field. J. Peking Univ. Nat. Sci. Ed. 2022, 58, 54–60. [Google Scholar]
- Peng, Y.; Li, X.; Hu, S.; Liu, X.; Qian, W. Three-stage question answering model based on BERT. J. Comput. Appl. 2022, 42, 64–70. [Google Scholar]
- Li, J.; Luo, Z.; Huang, H.; Ding, J. Towards Knowledge-Based Tourism Chinese Question Answering System. Mathematics 2022, 10, 664. [Google Scholar] [CrossRef]
- Shamsabadi, A.S.; Ramezani, R.; Farsani, H.K.; Nematbakhsh, M. Direct relation detection for knowledge-based question answering. Expert Syst. Appl. 2023, 211, 118678. [Google Scholar] [CrossRef]
- Antaki, F.; Touma, S.; Milad, D.; El-Khoury, J.; Duval, R. Evaluating the Performance of ChatGPT in Ophthalmology: An Analysis of its Successes and Shortcomings. Ophthalmol. Sci. 2023, 3, 100324. [Google Scholar] [CrossRef] [PubMed]
- Zhang, P.J.; Jia, Y.H.; Chen, W.L. Chinese knowledge based question answering based on multi-feature entity disambiguation. Comput. Eng. 2022, 48, 47–54. [Google Scholar]
- Yang, Y.; Yih, W.; Meek, C. Wikiqa: A challenge dataset for open-domain question answering. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, Lisbon, Portugal, 17–21 September 2015; pp. 2013–2018. [Google Scholar]
- Singhal, A. Introducing the Knowledge Graph: Things, not Strings. Official Google Blog. 2012, 5, 16. Available online: https://www.blog.google/products/search/introducing-knowledge-graph-things-not/ (accessed on 16 May 2012).
- Zhang, J.; Zhang, L.; Hui, B.; Tian, L. Improving complex knowledge base question answering via structural information learning. Knowl. Based Syst. 2022, 242, 108252. [Google Scholar] [CrossRef]
- Duan, N. Overview of the nlpcc-iccpol 2016 shared task: Open domain Chinese question answering. In Natural Language Understanding and Intelligent Applications, Proceedings of the 5th CCF Conference on Natural Language Processing and Chinese Computing, NLPCC 2016, and 24th International Conference on Computer Processing of Oriental Languages, ICCPOL 2016, Kunming, China, 2–6 December 2016; Springer International Publishing: Cham, Switzerland, 2016; pp. 942–948. [Google Scholar]
- Zhong, Q.; Tang, Y. An attention-based BILSTM-CRF for Chinese named entity recognition. In Proceedings of the 2020 IEEE 5th International Conference on Cloud Computing and Big Data Analytics (ICCCBDA), Chengdu, China, 10–13 April 2020; pp. 550–555. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Liu, Y.; Wen, F.; Zong, T.; Li, T. Research on joint extraction method of entity and relation triples based on hierarchical cascade labeling. IEEE Access 2022, 11, 978. [Google Scholar] [CrossRef]
- Fan, C.; Chen, W.; Wu, Y. Knowledge base question answering via path matching. Knowl. Based Syst. 2022, 256, 109857. [Google Scholar] [CrossRef]
- Li, R.; Wang, L.; Jiang, Z.; Liu, D.; Zhao, M.; Lu, X. Incremental BERT with commonsense representations for multi-choice reading comprehension. Multimed. Tools Appl. 2021, 80, 32311–32333. [Google Scholar] [CrossRef]
- Tian, D.; Li, M.; Ren, Q.; Zhang, X.; Han, S.; Shen, Y. Intelligent question answering method for construction safety hazard knowledge based on deep semantic mining. Autom. Constr. 2023, 145, 104670. [Google Scholar] [CrossRef]
- Wu, W.; Zhu, Z.; Qi, J.; Wang, W.; Zhang, G.; Liu, P. A dynamic graph expansion network for multi-hop knowledge base question answering. Neurocomputing 2023, 515, 37–47. [Google Scholar] [CrossRef]
- Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
- Wang, Z.; Huang, Z.; Gao, J. Chinese text classification method based on BERT word embedding. In Proceedings of the 2020 5th International Conference on Mathematics and Artificial Intelligence, Beijing, China, 10–12 May 2020; pp. 66–71. [Google Scholar]
- Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; Stoyanov, V. Roberta: A robustly optimized bert pretraining approach. arXiv 2019, arXiv:1907.11692. [Google Scholar]
- Liu, Y.; Zuo, Q.; Wang, X.; Zong, T. Entity relationship extraction based on a multi-neural network cooperation model. Appl. Sci. 2023, 13, 6812. [Google Scholar] [CrossRef]
- Duan, K.; Du, S.; Zhang, Y.; Lin, Y.; Wu, H.; Zhang, Q. Enhancement of Question Answering System Accuracy via Transfer Learning and BERT. Appl. Sci. 2022, 12, 11522. [Google Scholar] [CrossRef]
Algorithm Name | Answer Generation |
---|---|
Input | Question Qtext |
Output | Answer C |
Algorithm steps |
|
No. | Interrogative Sentence | Triplet | Answer |
---|---|---|---|
1 | What are the main crops in Quanshan Street? | Quanshan Street ||| main crops ||| Wheat, corn, sweet potatoes, peanuts | Wheat, corn, sweet potatoes, peanuts |
2 | How did Lion Stone get its name? | Lion stone ||| Reason for Naming ||| Mount resembling Manjushri Bodhisattva | Mount resembling Manjushri Bodhisattva |
Question | How | did | Lion | Stone | get | its | name |
Tagging | O | O | B | I | O | O | O |
No. | Head Entity | Attribute Relationship | Tail Body |
---|---|---|---|
1 | «The Dream of Red Mansion» | Leading actor | Qian Huili; Dan Yangping; Chen Ying; Fang Yafen |
2 | «The Dream of Red Mansion» | Release time | 2005 |
3 | «The Dream of Red Mansion» | Production Company | China Film Group, Rongxinda, Hualu Baina |
Model | Average Precision | Average Recall Rate | Average F1 Value | Best Epoch |
---|---|---|---|---|
CRF | 29.5 | 81.5 | 41.6 | 12 |
BiLSTM–CRF | 31.8 | 83.4 | 43.2 | 8 |
BAT–KBQA [45] | - | - | 87.7 | - |
BERT–CRF | 94.6 | 95.6 | 95.1 | 91 |
BERT–BiLSTM–CRF | 95.1 | 96.0 | 95.5 | 92 |
BERT–BiGRU–CRF | 94.3 | 95.0 | 94.5 | 90 |
RoBERTa–CRF | 96.4 | 94.2 | 95.3 | 94 |
RoBERTa–BiLSTM–CRF | 93.9 | 96.9 | 95.4 | 98 |
Model | Label B Prediction Precision Rate | Label B Prediction Recall Rate | Label B Prediction F1 | Label I Prediction Precision Rate | Label I Prediction Recall Rate | Label I Prediction F1 |
---|---|---|---|---|---|---|
CRF | 23.2 | 4.2 | 8.3 | 34.1 | 97.3 | 48.2 |
BiLSTM–CRF | 24.1 | 5.7 | 9.3 | 33.3 | 98.4 | 49.8 |
BERT–CRF | 95.6 | 93.6 | 94.6 | 94.4 | 96.0 | 95.1 |
BERT–BiLSTM–CRF | 97.3 | 91.4 | 94.3 | 94.6 | 97.0 | 95.7 |
BERT–BiGRU–CRF | 96.5 | 91.2 | 93.1 | 93.2 | 95.0 | 94.3 |
RoBERTa–CRF | 96.7 | 93.4 | 95.3 | 96.3 | 94.3 | 95.3 |
RoBERTa–BiLSTM–CRF | 93.4 | 95.0 | 94.2 | 94.0 | 97.3 | 95.6 |
Epochs | 5 | 50 | 100 |
---|---|---|---|
Precision rate | 96.396 | 97.741 | 98.396 |
Recall rate | 99.473 | 99.919 | 99.878 |
F1 Value | 97.910 | 98.818 | 99.131 |
Test set LOSS | 26.967 | 17.191 | 8.592 |
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
Liu, Y.; Zhang, H.; Zong, T.; Wu, J.; Dai, W. Knowledge Base Question Answering via Semantic Analysis. Electronics 2023, 12, 4224. https://doi.org/10.3390/electronics12204224
Liu Y, Zhang H, Zong T, Wu J, Dai W. Knowledge Base Question Answering via Semantic Analysis. Electronics. 2023; 12(20):4224. https://doi.org/10.3390/electronics12204224
Chicago/Turabian StyleLiu, Yibo, Haisu Zhang, Teng Zong, Jianping Wu, and Wei Dai. 2023. "Knowledge Base Question Answering via Semantic Analysis" Electronics 12, no. 20: 4224. https://doi.org/10.3390/electronics12204224
APA StyleLiu, Y., Zhang, H., Zong, T., Wu, J., & Dai, W. (2023). Knowledge Base Question Answering via Semantic Analysis. Electronics, 12(20), 4224. https://doi.org/10.3390/electronics12204224