计算机科学 ›› 2025, Vol. 52 ›› Issue (3): 295-305.doi: 10.11896/jsjkx.240600095

• 人工智能 • 上一篇    下一篇

基于可微知识图谱的多跳知识库问答

魏谦强1,2,3, 赵书良1,2,3, 张思漫4   

  1. 1 河北师范大学计算机与网络空间安全学院 石家庄 050024
    2 供应链大数据分析与数据安全河北省工程研究中心 石家庄 050024
    3 河北省网络与信息安全重点实验室 石家庄 050024
    4 海南师范大学教育学院 海口 571158
  • 收稿日期:2024-06-17 修回日期:2024-09-18 出版日期:2025-03-15 发布日期:2025-03-07
  • 通讯作者: 赵书良(zhaoshuliang@sina.com)
  • 作者简介:(15075805882@163.com)
  • 基金资助:
    国家社会科学基金重大项目(18ZDA200);河北省省级科技计划项目(20370301D,22567606H);河北省引进留学人员项目(C20230339);河北师范大学专项科技基金项目(L2023T03)

Multi-hop Knowledge Base Question Answering Based on Differentiable Knowledge Graph

WEI Qianqiang1,2,3, ZHAO Shuliang1,2,3, ZHANG Siman4   

  1. 1 College of Computer and Cyber Security,Hebei Normal University,Shijiazhuang 050024,China
    2 Hebei Provincial Engineering Research Center for Supply China Big Data Analytics & Data Security,Shijiazhuang 050024,China
    3 Hebei Provincial Key Laboratory of Network & Information Security,Shijiazhuang 050024,China
    4 College of Education,Hainan Normal University,Haikou 571158,China
  • Received:2024-06-17 Revised:2024-09-18 Online:2025-03-15 Published:2025-03-07
  • About author:WEI Qianqiang,born in 1997,postgra-duate,is a student member of CCF(No.N8307G).His main research interests include natural language processing and multi-hop knowledge base question answer.
    ZHAO Shuliang,born in 1967,Ph.D,professor,Ph.D supervisor,is a member of CCF(No.62875M).His main research interests include machine lear-ning and intelligent information proces-sing.
  • Supported by:
    National Social Science Foundation of China(18ZDA200),S&T Program of Hebei Pronince(20370301D, 22567606H),Introducing Talents of Studying Overseas Fund of Hebei Pronince(C20230339) and Special Science and Technology Fund of Hebei Normal University(L2023T03).

摘要: 知识库问答是一个具有挑战性的热门研究方向。目前,基于嵌入的方法通过隐式推理得到问题的答案而不能产生完整的推理路径,基于可微知识图谱的模型只需要将问题答案对作为弱监督信号就可以产生可解释的结果。基于可微知识图谱,提出了一个端到端编码器-解码器模型。编码器使用多头注意力机制和LSTM对问题进行细粒度顺序建模,生成能更好地表示问题每一跳语义特征的查询向量;解码器使用前馈神经网络实现问题多跳推理的注意力机制,能更好地表示问题每一跳在整个问题中的权重。所提模型解决了以前粗粒度非顺序建模方法存在的信息丢失问题。在5个数据集MetaQA-1hop,MetaQA-2hop,MetaQA-3hop,WebQSP和CWQ上进行实验,模型分别取得了97.5%,100%,100%,77.8%和51.4%的准确率。消融实验表明,各个模块都对模型整体性能的提高有贡献。

关键词: 多跳知识库问答, 可微知识图谱, 编码器-解码器

Abstract: Knowledge base question answering(KBQA) is a challenging and popular research direction.Currently,embedding-based methods obtain the answer to a question through implicit reasoning and cannot generate complete reasoning paths.Models based on differentiable knowledge graphs only needs the question-answer pairs as weak supervision signals to generate explainable results.An end-to-end encoder-decoder model based on differentiable knowledge graphs is proposed.The encoder uses multi-head attention mechanism and LSTM to model the fine-grained sequence of questions,generating query vectors that can effectively represent the semantic features of each step of the question.The decoder uses feedforward neural networks to effectively represent the weights of each hop in the entire question.Our model solves the problem of information loss caused by previous coarse-grained and non-sequential modeling methods.The experiments are conducted on five datasets:MetaQA-1hop,MetaQA-2hop,MetaQA-3hop,WebQSP and CWQ,and the model achieves accuracy of 97.5%,100%,100%,77.8% and 51.4%,respectively.The ablation experiment shows that each module contributes to the overall performance improvement of the model.

Key words: Knowledge base question answering, Differentiable knowledge graph, Encoder-decoder

中图分类号: 

  • TP391
[1]CAO S L,SHI J X,HOU L,et al.Research progress and pro-spect of knowledge base question answering[J].Chinese Journal of Computers,2023,46(3):512-539.
[2]LAN Y,HE G,JIANG J,et al.Complex knowledge base question answering:A survey[J].IEEE Transactions on Knowledge and Data Engineering,2023(11):35.
[3]LIANG C,BERANT J,LE Q,et al.Neural symbolic machines:Learning semantic parsers on freebase with weak supervision[C]//ACL.2017:23-33.
[4]GUO D,TANG D,DUAN N,et al.Dialog-to-action:Conversational question answering over a large-scale knowledge base[J].Advances in Neural Information Processing Systems,2018(31):2946-2955.
[5]SAHA A,ANSARI G A,LADDHA A,et al.Complex program induction for querying knowledge bases in the absence of gold programs[J].Transactions of the Association for Computational Linguistics,2019(7):185-200.
[6]LUO K,LIN F,LUO X,et al.Knowledge base question answer-ing via encoding of complex query graphs[C]//Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing.2018:2185-2194.
[7]LAN Y,JIANG J.Query graph generation for answering multi-hop complex questions from knowledge bases[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.2020:969-974.
[8]YIH W T,CHANG M W,HE X D,et al.Semantic Parsing Via Staged Query Graph Generation:Question Answering With Knowledge Base[C]//Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing(ACL).2015:1321-1331.
[9]LAN Y,JIANG J.Query graph generation for answering multi-hop complex questions from knowledge bases[C]//Proceedings of the 58th Annual Meeting of the Association for Computa-tional Linguistics(ACL).2020:969-974.
[10]ZHANG L,ZHANG J,WANG Y,et al.FC-KBQA:A Fine-to-Coarse Composition Framework for Knowledge Base Question Answering[C]//Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics(Volume 1:Long Papers)(ACL).2023:1002-1017.
[11]XIE T,WU C H,SHI P,et al.Unifiedskg:Unifying and multi-tasking structured knowledge grounding with text-to-text language models[C]//Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing(EMNLP).2022:602-631.
[12]ATIF F,EL KHATIB O,DIFALLAH D.Beamqa:Multi-hopknowledge graph question answering with sequence-to-sequence prediction and beam search[C]//Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval.2023:781-790.
[13]CHEN Y,LI H,QI G,et al.Outlining and Filling:Hierarchical Query Graph Generation for Answering Complex Questions Over Knowledge Graphs[J].IEEE Transactions on Knowledge and Data Engineering,2023,35(8):8343-8357.
[14]DONG L,WEI F,ZHOU M,et al.Question answering overfreebase with multi-column convolutional neural networks[C]//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).2015:260-269.
[15]MILLER A,FISCH A,DODGE J,et al.Key-value memory networks for directly reading documents[C]//Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing(EMNLP).2016:1400-1409.
[16]HAO Y,ZHANG Y,LIU K,et al.An end-to-end model forquestion answering over knowledge base with cross-attention combining global knowledge[C]//Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics(Volume 1:Long Papers)(ACL).2017:221-231.
[17]SAXENA A,TRIPATHI A,TALUKDAR P.Improving multi-hop question answering over knowledge graphs using knowledge base embeddings[C]//Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics(ACL).2020:4498-4507.
[18]XU K,LAI Y,FENG Y,et al.Enhancing key-value memoryneural networks for knowledge based question answering[C]//NAACL-HLT.2019:2937-2947.
[19]ZHAO W,CHUNG T,GOYAL A,et al.Simple question answering with subgraph ranking and joint-scoring[C]//NAACL-HLT.2019:324-334.
[20]OGUZ B,CHEN X,KARPUKHIN V,et al.UniK-QA:Unified representations of structured and unstructured knowledge for open-domain question answering[C]//Findings of the Association for Computational Linguistics(NAACL).2022:1535-1546.
[21]YU D,ZHANG S,NG P,et al.Decaf:Joint decoding of answers and logical forms for question answering over knowledge bases[C]//The Eleventh International Conference on LearningRe-presentations(ICLR).2023.
[22]DONG G,LI R,WANG S,et al.Bridging the kb-text gap:Leveraging structured knowledge-aware pre-training for kbqa[C]//Proceedings of the 32nd ACM International Conference on Information and Knowledge Management.2023:3854-3859.
[23]COHEN W W,SUN H,HOFER R A,et al.Scalable neuralmethods for reasoning with a symbolic knowledge base [C]//8th International Conference on Learning Representations(ICLR).2020:26-30.
[24]SAXEN A,KOCHSIEK A,GEMULLA R.Sequence-to-Se-quence Knowledge Graph Completion and Question Answering[C]//Annual Meeting of the Association for Computational Linguistics,Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics(ACL).2022:2814-2828.
[25]SUN H,DHINGRA B,ZAHEER M,et al.Open domain question answering using early fusion of knowledge bases and text[C]//Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing(ACL).2018:4231-4242.
[26]SUN H,BEDRAX-WEISS T,COHEN W W.PullNet:Open Domain Question Answering with Iterative Retrieval on Know-ledge Bases and Text[C]//Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing(EMNLP-IJCNLP).2019:2380-2390.
[27]YAN Y,LI R,WANG S,et al.Large-Scale Relation Learning for Question Answering over Knowledge bases with pre-trained language models[C]//Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing(EMNLP).2021:3653-3660.
[28]SUN H,ARNOLD A,BEDRAX-WEISS T,et al.Faithful embeddings for knowledge base queries[J].Advances in Neural Information Processing Systems,2020,33:22505-22516.
[29]ZHANG Y,DAI H,KOZAREVA Z,et al.Variational reasoning for question answering with knowledge graph[C]//Proceedings of the AAAI Conference on Artificial Intelligence.2018.
[30]QIU Y,WANG Y,JIN X,et al.Stepwise reasoning for multi-relation question answering over knowledge graph with weak supervision[C]//Proceedings of the 13th International Conference on Web Search and Data Mining.2020:474-482.
[31]HE G L,LAN Y S,JIANG J,et al.Improving multi-hop know-ledge base question answering by learning intermediate supervision signals[C]//Proceedings of the 14th ACM International Conference on Web Search and Data Mining(WSDM).2021:553-561.
[32]ZHANG J,ZHANG X,YU J,et al.Subgraph Retrieval En-hanced Model for Multi-hop Knowledge Base Question Answe-ring[C]//Annual Meeting of the Association for Computational Linguistics,Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics(ACL).2022:5773-5784.
[33]SEN P,SAFFARI A,OLIVA A.Expanding End-to-End Question Answering on Differentiable Knowledge Graphs with Intersection[C]//Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing(EMNLP).2021:8805-8812.
[34]SHI J,CAO S,HOU L,et al.TransferNet-An effective andtransparent framework for multi-hop question answering over relation graph[C]//Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing(EMNLP).2021:4149-4158.
[35]DAS R,GODBOLE A,NAIK A,et al.Knowledge base questionanswering by case-based reasoning over sub-graphs[C]//International Conference on Machine Learning(ICML).2022:4777-4793.
[36]XIE M,HAO C,ZHANG P.A Sequential Flow Control Framework for Multi-hop Knowledge Base Question Answering[C]//Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing(EMNLP).2022:8450-8460.
[37]LUO H,HAIHONG E,TANG Z,et al.UniKGQA:Unified retrieval and reasoning for solving multi-hop question answering over knowledge graph[C]//The Eleventh International Confe-rence on Learning Representations(ICLR).2023.
[38]JIANG J,ZHOU K,DONG Z,et al.Structgpt:A general frame-work for large language model to reason over structured data[J].arXiv:2305.09645,2023.
[39]BAHDANAU D,CHO K,BENGIO Y.Neural Machine Transla-tion by Jointly Learning to Align and Translate[C]//International Conference on Learning Representations(ICLR).2014.
[40]HOCHREITER S,SCHMIDHUBER J.Long Short-Term Me-mory[J].Neural Computation,1997,9(8):1735-1780.
[41]DAS R,DHULIAWALA S,ZAHEE R,et al.Go for a walk and arrive at the answer:Reasoning over paths in knowledge bases using reinforcement learning [C]//6th International Conference on Learning Representations(ICLR).2018.
[42]YIH S W,CHANG M W,HE X,et al.Semantic Parsing ViaStaged Query Graph Generation:Question Answering With Knowledge Base[C]//Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing(ACL).2015:1321-1331.
[43]TALMOR A,BERANT J.The web as a knowledge-base for answering complex questions[C]//NAACL-HLT.2018:641-651.
[44]RAFFEL C,SHAZEER N,ROBERTS A,et al.Exploring the limits of transfer learning with a unified text-to-text transformer[J].The Journal of Machine Learning Research,2020,21(140):1-67.
[45]HUDSON D,MANNING C D.Learning by Abstraction:TheNeural State Machine[C]//Conference on Neural Information Processing Systems(NeurIPS).2019:5901-5914.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!