Large model mapping knowledge domain question answering method and device based on potential unit fine tuning
Through the large-model graph question and answer method based on potential unit fine-tuning, the problems of inefficient and misleading context in the existing technology are solved, efficient and accurate knowledge graph question and answer are achieved, and the flexibility and generalization ability of the model are enhanced.
Patent Information
- Application Number
- CN202411487073.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-10-23
AI Technical Summary
The existing knowledge graph question and answer methods have problems with inefficiency and misleading contexts, and are insufficient in flexibility and generalization capabilities.
Through the large-scale model graph question and answer method based on latent unit fine-tuning, large language models and knowledge graphs are used for latent relationship learning, relationship inference paths are generated, and answers are obtained through the most relevant paths.
Effectively filter irrelevant context, improve operational efficiency, integrate graph retrieval and reasoning, enhance flexibility and generalization capabilities, and reduce dependence on external models.
Smart Images

Figure CN119443271A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of large-model knowledge graph question answering, and specifically to a large-model knowledge graph question answering method and device based on latent unit fine-tuning. Background Art
[0002] Knowledge graphs (KGs) are structured factual information repositories that have attracted much attention from researchers. The goal of KG reasoning is to derive new insights based on existing graph structures and facts. A major reasoning task in this field is knowledge graph question answering (KGQA), which aims to provide answers based on the knowledge contained in the KG. KGQA methods are generally divided into three categories: embedding-based methods, semantic parsing methods, and retrieval-enhanced methods.
[0003] Embedding-based methods represent entities and relations in an embedding space and use specialized model architectures for reasoning. For example, KVM uses a key-value memory network to store triples for reasoning, while EmbedKGQA and NSM use sequence models to simulate multi-hop reasoning processes. However, these methods usually require customized model architectures, limiting their flexibility and generalization capabilities. Semantic parsing methods translate questions into structured queries that can be executed by query engines to obtain answers. ArcaneQA dynamically generates queries based on intermediate results, while RnG-KBQA enumerates all possible queries and then ranks them to generate the final output. These methods rely heavily on the quality of generated queries, and if the query is not executable, the answer cannot be obtained. Retrieval enhancement methods focus on retrieving relevant facts from KG to enhance reasoning performance. Early methods used algorithms such as page ranking or random walks to retrieve subgraphs for reasoning, but they often ignored the semantic information in the question, resulting in noisy retrieval results. To solve this problem, some studies have proposed subgraph retrieval methods based on relation paths to improve performance. Other methods retrieve triplets through BM25 or DPR to enhance the performance of LLM, but they usually discard the structural information of KG, resulting in poor results.
[0004] Recently, UniKGQA integrates graph retrieval and reasoning into one model and achieves state-of-the-art results in KGQA tasks using LLM. DECAF combines semantic parsing with LLM reasoning to jointly generate answers and performs well in KGQA tasks. RoG proposes a graph-based reasoning method that combines the advantages of both: it first generates a planning path and then retrieves valid relational reasoning paths from KG as knowledge context to assist LLM in generating responses. However, they still face the problems of inefficiency and misleading context. Summary of the invention
[0005] In order to solve the above technical problems, the present invention provides a large-model graph question answering method and device based on latent unit fine-tuning.
[0006] The objective of the present invention is achieved through the following technical solutions:
[0007] In a first aspect, a large-model graph question answering method based on latent unit fine-tuning is provided, and the large-model graph question answering method based on latent unit fine-tuning comprises the following steps:
[0008] Based on the symbolic knowledge graph and relational path and using high-dimensional prompt words to represent the variables of the latent unit, the large language model and the knowledge graph are subjected to latent relational learning to generate a relational reasoning path, wherein the input layer of the large language model is attached with the trainable latent unit; and the latent unit is randomly initialized through a normal distribution and fine-tuned together with the large language model in the implicit learning process;
[0009] Performing relevance evaluation on the relationship reasoning paths and selecting the most relevant relationship reasoning path;
[0010] The natural language question is input, and the answer in the knowledge graph is obtained through the most relevant relational reasoning path.
[0011] In some embodiments, the knowledge graph is a repository containing factual information, the factual information is composed of triples, each triple includes two entities and a relationship between the two entities, all entities in the knowledge graph constitute an entity set, and all relationships between entities in the knowledge graph constitute a relationship set;
[0012] The relationship path is a path connected by multiple relationships in sequence, each relationship in the path belongs to the relationship set, and the length of the path represents the number of connected relationships.
[0013] In some embodiments, learning latent relationships between a large language model and a knowledge graph includes:
[0014] A set of such latent units is used to approximate the posterior information statistics of valid relation paths by minimizing the KL divergence.
[0015] In some embodiments, using a set of the potential units to approximate the posterior information statistics of the valid relation path by minimizing the KL divergence includes:
[0016] Given a question, an answer, and a set of potential units, identify the relational reasoning path connecting the question entity with the answer entity in the knowledge graph. The corresponding relational reasoning path is considered a valid relational path and serves as a solution to answer the question.
[0017] The posterior distribution in the posterior information statistics is formalized as the conditional probability of the existence of a path and is assumed to be uniformly distributed on all valid relation paths. The KL divergence is based on the shortest path between question-entity and answer-entity in the knowledge graph as a supervisory signal to maximize the probability that the large language model generates a valid relation path.
[0018] In some embodiments, performing relevance evaluation on the relational reasoning paths and selecting the most relevant relational reasoning path includes:
[0019] Based on the fine-tuned large language model and the latent unit set in implicit learning, a conditional probability function about the relational reasoning path is constructed. The relational reasoning path that maximizes the conditional probability is screened out through the conditional probability function, that is, under the conditions of a given question and reasoning path, the probability of the latent unit is the largest, among which the relational reasoning path that maximizes the conditional probability is the most relevant relational reasoning path;
[0020] To this end, the pairwise cosine similarities between the generated multiple token vectors and the corresponding potential units are calculated. The cosine similarity measures the similarity between vectors, and its value ranges from -1 to 1. The aggregate score is obtained by accumulation. By maximizing the aggregate score, the relational reasoning path that is most relevant to the problem and best matches the potential unit is screened out, thereby obtaining the most relevant relational reasoning path.
[0021] In a first aspect, a large-model knowledge graph question-answering device based on latent unit fine-tuning is provided, wherein the large-model knowledge graph question-answering device based on latent unit fine-tuning comprises a memory and one or more processors, wherein the memory stores executable code, and wherein the processor executes the executable code to implement the large-model knowledge graph question-answering method based on latent unit fine-tuning as described in any one of the first aspects.
[0022] The beneficial effects of the present invention are:
[0023] 1. Effectively filter irrelevant context: By filtering irrelevant or misleading context information, the method of the present invention can reduce noise interference and improve the accuracy of reasoning and model performance.
[0024] 2. Improve operational efficiency: Compared with traditional methods, this invention significantly improves operational efficiency and reduces the consumption of computing resources while maintaining model performance.
[0025] 3. Integrated graph retrieval and reasoning: This invention integrates graph retrieval and reasoning processes into one model, optimizes the overall process in the knowledge graph question-answering task, and achieves more efficient reasoning.
[0026] 4. Better flexibility and generalization ability: Compared with existing methods that require customized model architecture, the method of the present invention has better flexibility and generalization ability and can adapt to different knowledge graph scenarios.
[0027] 5. Taking into account the advantages of multiple reasoning methods: The method of the present invention combines the advantages of graph-based reasoning and path planning, can generate effective reasoning paths in the knowledge graph, and improve the question-answering ability of the model.
[0028] 6. Reduce dependence on external models: The method of the present invention does not rely on the performance of external models and can independently complete reasoning tasks, ensuring the stability and consistency of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0030] Figure 1 It is a schematic diagram of the overall process of a large-model graph question-answering method based on potential unit fine-tuning provided in one embodiment of the present invention;
[0031] Figure 2 It is a model diagram of a large model graph question answering method based on latent unit fine-tuning provided in one embodiment of the present invention;
[0032] Figure 3 It is a structural schematic diagram of a large model graph question-answering device based on latent unit fine-tuning provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0034] like Figure 1-2 In one embodiment, a large model graph question answering method based on latent unit fine-tuning is provided, and the large model graph question answering method based on latent unit fine-tuning includes the following steps:
[0035] Based on symbolic knowledge graphs and relational paths, and using high-dimensional prompt words to represent variables of latent units, large language models and knowledge graphs are used for latent relation learning to generate relational reasoning paths, where trainable latent units are added to the input layer of large language models; the latent units are randomly initialized through normal distribution and fine-tuned together with large language models during implicit learning; through this fine-tuning process, LLMs can generate relational paths, thereby strengthening the connection between large language models and underlying knowledge graph relationships. The latent units serve as a bridge to optimize the model's understanding and generation of these relational reasoning paths.
[0036] In some embodiments, a knowledge graph (KGs) is a repository containing factual information. The factual information is composed of triples. Each triple includes two entities and the relationship between the two entities. All entities in the knowledge graph constitute an entity set, and all relationships between entities in the knowledge graph constitute a relationship set. Specifically, the knowledge graph is: G = (e, r, e′) | e, e′∈E, r∈R, where E represents an entity set, R represents a relationship set, and a relationship path is defined as a sequence of relationships: z = r1, r2, ..., r l , where r i ∈R represents the i-th relation in the path, and l represents the length of the path.
[0037] A relationship path is a path connected by multiple relationships in sequence. Each relationship in the path belongs to a relationship set. The length of the path indicates the number of connected relationships. Specifically:
[0038] A relational reasoning path is a specific instance of a relational path $z$ in the knowledge graph: w z =e0→(r1)e1→(r2)...→(r l ) l , where e i ∈E represents the i-th entity in the path, r i Represents the i-th relationship in the relationship path z.
[0039] The large-scale graph question answering method based on latent unit fine-tuning is a reasoning method that uses knowledge graphs to answer questions. Given a natural language question q and a knowledge graph G, the goal is to design a function f to predict the answer a∈A based on the knowledge in G. q , that is, a=f(q,G). Assume that the entity e mentioned in question q q ∈T q and the answer a∈A q have been labeled and linked to the corresponding entities in G, i.e.
[0040] Prompt Tuning is implemented by appending additional trainable tokens (also called soft prompts) to the input layer, which can also be regarded as latent units. However, they only use these units to simulate the update direction of the parameters. These latent units are used in contextual learning to model implicit topics or concepts, and the formula is: P(x 1:T )=∫ Θ P(x 1:T |θ)P(θ)dθ,
[0041] Among them, θ∈ represents a high-dimensional latent variable, Θ is the variable space, x 1:T Refers to the input token. Based on PromptTuning, some new latent unit tokens are added to the original vocabulary of large language models (LLMs), represented as ([unitstoken0][unitstoken1]...). These latent units are distributed by normal They are randomly initialized and fine-tuned together with the LLMs during implicit learning.
[0042] In latent learning, the goal is to fine-tune large language models (LLMs) using a set of latent units to generate relational reasoning paths, thereby modeling the latent connections between LLMs and knowledge graphs (KGs).
[0043] In some embodiments, learning latent relationships between a large language model and a knowledge graph includes:
[0044] A set of latent units is used to approximate the posterior information statistics of valid relation paths by minimizing the KL divergence.
[0045] In some embodiments, approximating a posterior information statistic of a valid relation path by minimizing KL divergence using a set of latent units includes:
[0046] Given a question, an answer, and a set of potential units, identify the relational reasoning path connecting the question entity with the answer entity in the knowledge graph. The corresponding relational reasoning path is considered a valid relational path and serves as a solution to answer the question.
[0047] The posterior distribution in the posterior information statistics is formalized as the conditional probability of the existence of a path and is assumed to be uniformly distributed on all valid relationship paths. The KL divergence is based on the shortest path between question-entity and answer-entity in the knowledge graph as a supervisory signal to maximize the probability of a large language model generating a valid relationship path.
[0048] Specifically, we use a set of latent units ([unitstoken0][unitstoken1]...) to approximate the posterior information statistics Q(z) of the valid relation path by minimizing the KL divergence. Given a question q, an answer a, and a set of latent units U, we identify the entities e in the connected KGs. q and e a Path example: w z =e0→(r1)e1→(r2)...→(r l ) l The corresponding relationship path z = r1, r2, ..., r l is considered to be effective and a reliable solution to answer question q. The posterior distribution Q(z) can be formally approximated as:
[0049]
[0050] It is assumed that in all valid relationship paths The above is uniformly distributed, and Indicated in There is a connection entity e q and e a Therefore, the KL divergence can be calculated as:
[0051]
[0052] Among them, use KGs in e q and e a The shortest path between As a supervisory signal. By optimizing the above formula, the probability of LLMs generating valid relationship paths is maximized. This also involves learning the potential association between the relationship reasoning path and the query statement in the latent space.
[0053] Evaluating the relevance of relationship reasoning paths and selecting the most relevant relationship reasoning path can ensure that the selected relationship reasoning path can accurately represent the potential relationship in the graph.
[0054] In some embodiments, performing relevance evaluation on the relational reasoning paths and selecting the most relevant relational reasoning path includes:
[0055] Based on the fine-tuned large language model and the latent unit set in implicit learning, a conditional probability function about the relational reasoning path is constructed. The relational reasoning path that maximizes the conditional probability is screened out through the conditional probability function, that is, under the conditions of a given question and reasoning path, the probability of the latent unit is the largest, among which the relational reasoning path that maximizes the conditional probability is the most relevant relational reasoning path;
[0056] To this end, the pairwise cosine similarities between the generated multiple token vectors and the corresponding potential units are calculated. The cosine similarity measures the similarity between vectors, and its value ranges from -1 to 1. The aggregate score is obtained by accumulation. By maximizing the aggregate score, the relational reasoning path that is most relevant to the problem and best matches the potential unit is screened out, thereby obtaining the most relevant relational reasoning path.
[0057] Specifically, we use the fine-tuned large language model and the latent unit set U in implicit learning to screen the relational reasoning path, and we need to select the one that can maximize P θ (U|q,w i ) of the path (q, w1), ..., (q, w k ):
[0058]
[0059] Among them, q represents the problem, w i represents the corresponding reasoning path, P θ (U|q,w i ) is the conditional probability, indicating that given the question q and the reasoning path w i In order to improve the accuracy of the model in generating effective reasoning paths, it is necessary to find θ (U|q,w i )The largest path.
[0060] To this end, given the N token vectors v generated i , and considering that there are multiple potential units u in practical applications j , calculate each token vector v i With each potential unit u j The cosine similarity between the two pairs. The aggregated cosine similarity score, that is, the aggregate score S, is calculated as follows:
[0061]
[0062] Among them, cos_sim(v i ,u j ) represents the token vector v i With potential unit u j The cosine similarity between them. Cosine similarity measures the angle between two vectors, that is, their similarity, and its value is between -1 and 1, 1 means complete similarity, and -1 means complete dissimilarity. This aggregate score S is used as the final comparison criterion to evaluate and filter the generated reasoning paths. By maximizing this score, the reasoning path that is most relevant to the question q and best matches the potential unit U can be selected, thereby improving the accuracy and effectiveness of model reasoning.
[0063] Input a natural language question and get the answer in the knowledge graph through the most relevant relational reasoning path.
[0064] The fine-tuned latent units are used to filter out irrelevant and misleading context fragments during the LLM generation process. By eliminating these redundant elements, the performance of the model is significantly improved, making the response more accurate and efficient. This filtering process ensures that the output is not only relevant but also precise, thereby enhancing the effectiveness of the method chain as a whole. The core task of the reasoning module is to obtain a set of reasoning paths w based on the input question q and the set of reasoning paths w. t Generate an accurate answer a. In this process, the top k reasoning paths with the highest scores are selected from the path selection stage as the final reasoning path set w t These paths represent the most likely relationship paths found by the model in the knowledge graph to explain the question. Through this process, contextual information that is irrelevant to question q or misleading can be effectively filtered out. Traditional methods tend to introduce noise when dealing with a large number of possible paths, causing the model's reasoning results to deviate from the correct answer. The method of the present invention significantly reduces this risk by focusing on the most relevant paths. In addition, by selecting the optimal path set w t , which not only improves the reasoning accuracy of the model, but also reduces unnecessary computational overhead. This means that more efficient operation can be achieved without losing model performance, saving computing resources and speeding up reasoning. This improvement is particularly important in practical applications, especially in scenarios where large-scale knowledge graphs are processed or real-time response is required. Overall, the reasoning module ensures that the model not only generates high-quality answers, but also completes tasks in a more efficient manner by carefully selecting and processing reasoning paths. The effectiveness of this approach has been verified in multiple experiments, showing great potential in complex reasoning tasks.
[0065] In some embodiments, the method of the present invention is applied to two standard KGQA datasets: WebQuestionSP and Complex WebQuestions. The questions in these datasets contain up to four-hop reasoning. Both datasets are based on Freebase, a knowledge graph containing about 88 million entities, 20,000 relations, and 126 million triples.
[0066] 1) Evaluation indicators: Hits@1 and F1 scores are used for evaluation. Hits@1 evaluates the percentage of the best answer predicted by the model that is correct. Since a question may have multiple correct answers, the F1 score takes into account the comprehensiveness of all answers, thereby achieving a balance between the accuracy and recall of the model's predictions.
[0067] 2) Latent unit representation: 5 to 20 prompts are used for high-dimensional representation of latent units.
[0068] 3) Training and hyperparameters: The AdamW optimizer with a linear warm-up decay learning rate schedule was used. The peak learning rate of the pre-trained model was set to 2e-5 and the training batch size was 4. The model was trained for 10 epochs with dropout set to 0.1.
[0069] 4) Large language model reasoning and answer generation: Select the 4 most relevant KG relationship paths as the basis for reasoning, and use context learning to prompt the large model to output the required answer.
[0070] 5) Performance comparison: The evaluation results on WebQSP are shown in Table 1, where QGG, UniKGQA, and RoG are all proposed spectral question answering methods. Our method consistently outperforms these previous methods in terms of two performance indicators.
[0071] Table 1 Evaluation of prediction results
[0072] Hits@1 F1 Method of the present invention 0.878 0.804 QGG 0.730 0.738 UniKGQA 0.772 0.722 RoG 0.857 0.708
[0073] Corresponding to the aforementioned embodiment of the method for predicting molecular and olfactory body reactions based on a multimodal deep learning network, the present invention also provides an embodiment of a large-model graph question-answering method based on fine-tuning of potential units.
[0074] See also Figure 3 An embodiment of the present invention provides a large-model graph question-answering method based on fine-tuning of potential units, including a memory and one or more processors. The memory stores executable code. When the processor executes the executable code, it is used to implement the molecular and olfactory body reaction prediction method based on a multimodal deep learning network in the above embodiment.
[0075] The embodiment of the large-model graph question-answering method based on latent unit fine-tuning of the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented through software, or through hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located reading the corresponding computer program instructions in the non-volatile memory into the internal memory for execution. From the hardware level, if Figure 3 As shown, it is a hardware structure diagram of any device with data processing capability for the large model graph question answering method based on potential unit fine-tuning of the present invention, except Figure 3 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the apparatus in the embodiments is located may also include other hardware, generally based on the actual functions of the device with data processing capabilities, which will not be described in detail.
[0076] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0077] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, in which the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.
[0078] An embodiment of the present invention also provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the method for predicting molecules and olfactory body reactions based on a multimodal deep learning network in the above embodiment is implemented.
[0079] The computer-readable storage medium may be an internal storage unit of any device with data processing capability in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of any device with data processing capability, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store computer programs and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.
[0080] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0081] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0082] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0083] The above description is merely a preferred embodiment of one or more embodiments of the present invention and is not intended to limit one or more embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present invention shall be included in the scope of protection of one or more embodiments of the present invention.
Claims
1. A large-model knowledge graph question answering method based on latent unit fine-tuning, characterized in that: The following steps are involved: Based on the symbolic knowledge graph and relational path and using high-dimensional prompt words to represent the variables of the latent unit, the large language model and the knowledge graph are subjected to latent relational learning to generate a relational reasoning path, wherein the input layer of the large language model is attached with the trainable latent unit; and the latent unit is randomly initialized through a normal distribution and fine-tuned together with the large language model in the implicit learning process; Performing relevance evaluation on the relationship reasoning paths and selecting the most relevant relationship reasoning path; The natural language question is input, and the answer in the knowledge graph is obtained through the most relevant relational reasoning path.
2. The large-model knowledge graph question answering method based on latent unit fine-tuning according to claim 1 is characterized in that: The knowledge graph is a repository containing factual information, which is composed of triples. Each triple includes two entities and a relationship between the two entities. All entities in the knowledge graph constitute an entity set, and all relationships between entities in the knowledge graph constitute a relationship set. The relationship path is a path connected by multiple relationships in sequence, each relationship in the path belongs to the relationship set, and the length of the path represents the number of connected relationships.
3. The large-model knowledge graph question answering method based on latent unit fine-tuning according to claim 1 is characterized in that: Learning latent relationships between large language models and knowledge graphs includes: A set of such latent units is used to approximate the posterior information statistics of valid relation paths by minimizing the KL divergence.
4. The large-model knowledge graph question answering method based on latent unit fine-tuning according to claim 3 is characterized in that: The posterior information statistics for approximating a valid relation path by minimizing the KL divergence using a set of such latent units include: Given a question, an answer, and a set of potential units, identify the relational reasoning path connecting the question entity with the answer entity in the knowledge graph. The corresponding relational reasoning path is considered a valid relational path and serves as a solution to answer the question. The posterior distribution in the posterior information statistics is formalized as the conditional probability of the existence of a path and is assumed to be uniformly distributed over all valid relation paths. The KL divergence is based on the shortest path between question-entity and answer-entity in the knowledge graph as a supervisory signal to maximize the probability that the large language model generates a valid relation path.
5. The large-model knowledge graph question answering method based on latent unit fine-tuning according to claim 4 is characterized in that: Evaluating the relevance of the relationship reasoning paths and selecting the most relevant relationship reasoning paths includes: Based on the fine-tuned large language model and the latent unit set in implicit learning, a conditional probability function about the relational reasoning path is constructed. The relational reasoning path that maximizes the conditional probability is screened out through the conditional probability function, that is, under the conditions of a given question and reasoning path, the probability of the latent unit is the largest, among which the relational reasoning path that maximizes the conditional probability is the most relevant relational reasoning path; To this end, the pairwise cosine similarities between the generated multiple token vectors and the corresponding potential units are calculated. The cosine similarity measures the similarity between vectors, and its value ranges from -1 to 1. The aggregate score is obtained by accumulation. By maximizing the aggregate score, the relational reasoning path that is most relevant to the problem and best matches the potential unit is screened out, thereby obtaining the most relevant relational reasoning path.
6. A large model knowledge graph question-answering device based on potential unit fine-tuning, comprising a memory and one or more processors, wherein the memory stores executable code, characterized in that: When the processor executes the executable code, it is used to implement the large-model knowledge graph question-answering method based on potential unit fine-tuning as described in any one of claims 1-5.
Citation Information
Patent Citations
Weak supervision knowledge graph question answering method based on multi-view reasoning
CN113590799A
Knowledge graph generation type question answering method and system based on large language model
CN117033608A
Intelligent question and answer method based on cooperation of large language model and knowledge graph
CN118797017A
The voice for Early Childhood Education, learning benefits that can easily see the state.
KR1020230125899A