With the rapid development of Internet technology,some large general knowledge bases have also emerged.KBQA models have then sprung up and gradually integrated into people’s lives.However,there is one problem that can not be avoided in KBQA models which is lowinformation knowledge bases.When the answers or triples required for natural language questions do not exist in the knowledge base,the model will not be able to provide users with the required answers.Meanwhile,current KBQA models rely too much on the word distribution of text for learning the semantics of text.It causes that when facing questions with high text similarity but large differences in real semantics,the model will recognize them as the same class of questions,thus selecting the wrong knowledge base information and finally giving wrong answers.Therefore,based on the existing KBQA models,we present a contrastive learning approach to help alleviate the above problem.The main work of this article includes the following two parts:(1)For the low-information knowledge base,We propose a KBQA model based on screening momentum contrastive learning(s Mo Co).Our model first utilizes existing triplet information to expand new knowledge information,enriching the amount of information contained in the knowledge base;After that,difficult question and answer pairs were screened out through s Mo Co to further stimulate the ability of comparative learning and help the model better mine Semantic information in the knowledge base.Our model not only improves the generalizability of the model but also achieves good enhancement results from experiments on the Web Questions SP dataset.(2)In order to further improve the performance and accuracy of the model,We combine the information of the large corpus carried by the Pre-trained models and propose a KBQA model based on prompt contrastive learning(PCL).Firstly,for the problem of high semantic similarity brought by high text similarity,our model is expanded by prompt learning and Pre-trained models with different templates,and then dynamically constructs the required positive and negative.Then PCL further compares and learns the expanded QA pairs to help the model better distinguish and learn the QA pairs with high text similarity but low semantic similarity,and imitates the human reasoning process to deeply mine the knowledge base information required by the QA pairs.The model can not only effectively handle the lowresource knowledge base datasets,but also enrich the triples node information in the knowledge base,and the experimental results on both Web Questions SP and Meta QA-Text datasets are significantly improved.The above experimental results demonstrate that the study of KBQA model based on contrast learning can well help the model simulate the process of human reasoning to arrive at answers to questions and alleviate the current situation that the low-information knowledge base cannot be fully utilized;at the same time,the feature of contrast learning of pulling similar data samples close and pushing non-similar data samples far away also effectively improves the model’s ability to distinguish between interrogative sentences with high textual similarity but low semantic similarity. |