A knowledge graph common sense generation method based on hierarchical modeling

CN117829286BActive Publication Date: 2026-09-08NAT UNIV OF DEFENSE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410114352.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-26
Publication Date
2026-09-08
Estimated Expiration
2044-01-26

AI Technical Summary

Technical Problem

比较来说,两阶段框架能生成更多具有信服力的否定常识知识,但是它们还有以下两个缺陷:(1)在候选生成阶段,实体短语之间层次关系的不充分建模

Benefits of technology

[0012]An efficient framework for generating negation common sense knowledge based on hierarchical modeling is proposed, which can generate deceptive negation knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117829286B_ABST
    Figure CN117829286B_ABST
Patent Text Reader

Abstract

The application discloses a kind of knowledge graph common sense generation methods based on hierarchical modeling, including steps: obtaining knowledge graph;Similar entity of each entity phrase in knowledge graph is extracted using box embedding;Generate preliminary candidate by replacing head and tail entity phrase;The preliminary candidate generated is filtered, including the reachable path search of head and tail entity phrase to measure whether triple is accepted by given common sense knowledge base;And filter based on the grouping instruction large language model LLM;Output negative common sense knowledge.The application proposes an efficient negative common sense knowledge generation framework based on hierarchical modeling, generates misleading negative knowledge;More meaningful negative candidates are generated using box embedding to identify similar entities;Valuable negative statements are identified by two-step filtering strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, and in particular relates to a method for generating common sense knowledge graphs based on hierarchical modeling. Background Technology

[0002] Knowledge graphs are a branch of knowledge engineering, based on semantic networks and incorporating the latest advancements in machine learning, natural language processing, and knowledge representation and reasoning. Driven by big data, they have garnered widespread attention from industry and academia. Machine learning, natural language processing, and knowledge representation and reasoning are all crucial aspects of artificial intelligence. Artificial intelligence (AI) utilizes digital computers or computers-controlled machines to simulate, extend, and expand human intelligence, enabling machines to perceive their environment, acquire knowledge, and use that knowledge to achieve optimal results. AI essentially studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities.

[0003] Common sense knowledge is crucial for building powerful artificial intelligence. Because knowledge graphs are widely used to organize and store knowledge, several common sense knowledge bases have emerged, such as the clinical proteomics data knowledge graphs CKG, ConceptNet, ATOMIC, Ascent, and Ascent++. Recent research has focused on acquiring positive knowledge, with little attention paid to negative knowledge. However, knowing and understanding "what not to do" is also important. For traditional models, negative knowledge helps machine learning models train better, thereby improving model performance. For large language models (LLMs), negative statements allow LLMs to know the exact nature of the negative knowledge, thus mitigating the problem of errors to some extent.

[0004] The most common method for generating negative examples is negative sampling, which samples negative examples from a given distribution, such as UNIFORM, NSCaching, and M-Mix. However, these methods are task-oriented and less effective in generating negative commonsense knowledge. Therefore, in recent years, some works have begun to investigate how to obtain high-quality negative commonsense knowledge. Most of these studies follow a two-stage "generation-filtering" framework, generating negative triplet candidates by replacing the head or tail entity phrases with similar entities, and then filtering to generate the final negative commonsense knowledge. NegatER is an earlier work that uses k-nearest neighbors to generate similar entities to replace the head and tail entity phrases, while fine-tuning the language model to obtain high-quality positive knowledge, and then ranking the negative candidates based on their degree of contradiction with the positive knowledge in the language model. UnCommonSense first extracts similar concepts from the commonsense knowledge base, uses phrases of similar concepts as negative candidates, and then filters to obtain the final negative commonsense knowledge. In addition, recent works have used zero-sample and few-sample LLMs to directly generate negative commonsense knowledge.

[0005] In recent years, knowledge graphs, also known as knowledge bases, have become a research hotspot. Knowledge graphs store knowledge in the form of triples. Simultaneously, there has been much research on the construction of commonsense knowledge bases. ConceptNet is a widely used and continuously updated commonsense knowledge base where triples consist of head and tail entities and predefined structured relations. Furthermore, ATOMIC focuses on reasoning knowledge organized with variable-typed if-then relations. Ascent and Ascent++ break the limitations of ConceptNet's predefined relations, extracting triples in natural language form from large amounts of web page text. The Clinical Proteomics Data Knowledge Graph (CKG) database continues to grow, currently using 10 ontology-based annotations from 26 biomedical databases, organizing this information into nearly 20 million nodes connected by 220 million relations. Of these relations, over 50 million involve "publication" nodes, which link scientific publications on human systems research (encoded using PubMed identifiers) with proteins, drugs, diseases, functional regions, and tissues.

[0006] A commonsense knowledge base typically consists of a finite set of affirmative triples (h,r,t), denoted as κ. pos ={(h,r,t) i Let {i = 1, 2, ..., M}, where h is the head entity phrase, t is the tail entity phrase, r represents the relationship between h and r, and M is the number of triples in the common sense knowledge base. + (h,r,t), high-dimensional representation is + (X h ,X r ,Xt Based on previous research definitions, negative knowledge will be defined as... - (h',r,t),h'∈CSKB, - (h,r,t'),t'∈CSKB. Simultaneously, the common sense knowledge base can also be represented as a directed graph G. The goal of generating negative common sense knowledge is to generate a series of negative and misleading common sense knowledge κ given affirmative facts. neg Based on previous research, denying common-sense knowledge must be grammatically correct and semantically reasonable. Furthermore, considering that not all triples outside the common-sense knowledge base are incorrect, it is also necessary to avoid false denials. More often than not, denying common-sense knowledge is deceptive; that is, it needs to be difficult for humans to detect as wrong.

[0007] Some common sense knowledge bases incorporate negative common sense knowledge during their construction. ConceptNet defines six negation relations and provides corresponding negative triples. Quasimodo, obtained by extracting text data, contains 350k negative statements, but the quality of these statements is poor due to the extraction process. In recent years, negative knowledge generation has also attracted attention. NegatER obtains negative candidates by replacing the beginning and end entity phrases, then fine-tunes the language model to remove low-quality triples. UnCommonSense uses affirmative statement phrases of similar entities as negative candidates, and then filters the candidates through step design. Furthermore, Arnaout et al. used large language models to generate negative common sense knowledge. However, they found that large language models typically generate low-quality or fuzzy negative common sense knowledge. Further, existing techniques analyze the ability of large language models to process negative knowledge and point out that large language models lack a deep understanding of negative knowledge.

[0008] While existing methods can generate a large amount of negative common sense knowledge, most of it is incorrect. LLM-based methods, lacking a deep understanding of negative knowledge, consistently generate erroneous or vague negative common sense knowledge, for example… Figure 1 The examples shown are (sea fish, IsA, fish) and (blue planet, IsA, mammal). Comparatively, the two-stage framework generates more convincing negative common-sense knowledge, but it also has the following two drawbacks: (1) Insufficient modeling of hierarchical relationships between entity phrases during the candidate generation stage. For example... Figure 2As shown, there is a hierarchical relationship between entity phrases. For example, whales and sharks are both marine organisms. Therefore, when generating similar entities of whales, this hierarchical relationship should be considered to generate more convincing negative common sense knowledge, such as (blue whale, IsA, fish) and (shark, IsA, mammal). However, NegatER only considers the high-dimensional embedding of the pre-trained language model to select similar entities. Although Arnaout et al. used systematic Wikipedia data to guide the generation of similar entities, this approach has limitations and is not applicable. (2) Inefficiency of the candidate filtering stage. For a large number of negative candidates, the existing filtering methods are not efficient. NegatER requires 12 hours to fine-tune the entire model to filter negative candidates. For UnCommonSense, the language model-based step requires querying the language model one by one for negative candidates, which is time-consuming. Summary of the Invention

[0009] Large language models (LLMs) are trained on massive datasets containing hundreds of billions of parameters. In particular, when the model's parameter size exceeds a certain critical value, large language models exhibit emergent capabilities, significantly improving the performance of downstream tasks such as translation and question answering. While large language models possess powerful generative capabilities, they lack the ability to detect false positives in the generated content. Therefore, this invention avoids directly processing negative knowledge, instead leveraging the powerful generative capabilities of large language models to select positive statements.

[0010] In view of this, to address the aforementioned problems, this application proposes an efficient framework for generating negative commonsense knowledge based on hierarchical modeling. In the candidate generation stage, to obtain more relevant similar entities, this invention utilizes box embeddings to represent entity phrases, as the structure of the boxes themselves contains hierarchical information. Then, negative candidates are generated by replacing the head or tail entity phrases in each positive triple with similar entities generated by box embeddings. In the candidate filtering stage, this invention designs an efficient two-step filtering strategy. First, this invention uses reachable path search for preliminary filtering, deleting negative triples that have reachable paths in the original commonsense knowledge base. Then, this invention designs LLMs based on grouping instructions. This strategy first groups the negative candidates, and then inputs the grouped negative candidates into the LLM for filtering. This strategy not only reduces time consumption but also enables negative candidates to obtain information about competitors in the same group, thus producing better results. This invention has been evaluated from both internal and external perspectives, and the results show that this invention achieves better performance and can generate more deceptive negative commonsense knowledge.

[0011] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0012] An efficient framework for generating negation common sense knowledge based on hierarchical modeling is proposed, which can generate deceptive negation knowledge.

[0013] By using box embedding to identify similar entities, it can capture the hierarchical relationships between entity phrases, thereby generating more meaningful negation candidates.

[0014] Valuable negative statements are identified through a two-step filtering strategy, which includes reachability path search and LLMs based on grouping instructions. Attached Figure Description

[0015] Figure 1 Examples of negating common-sense knowledge in existing methods;

[0016] Figure 2 Hierarchical relationships between entities in existing methods;

[0017] Figure 3 A schematic diagram of the present invention. Detailed Implementation

[0018] The present invention will be further described below with reference to the accompanying drawings, but this is not intended to limit the present invention in any way. Any modifications or substitutions made based on the teachings of the present invention shall fall within the protection scope of the present invention.

[0019] like Figure 3 As shown, the method of this invention consists of four main steps. In the candidate generation stage, box embedding is first used to extract similar entities for each entity phrase; then, preliminary candidates are generated by replacing the beginning and end entity phrases. In the candidate filtering stage, this invention designs an efficient two-step filtering strategy, including reachability path search and LLMs based on grouping instructions. Finally, high-quality negative commonsense knowledge is obtained.

[0020] Candidate generation stage

[0021] Similar Entity Recognition: The number of triples outside the knowledge base is vast, and most are meaningless. Therefore, this invention proposes to generate negative candidates by replacing entity phrases in triples with strongly related entity phrases. Compared to previous studies that utilize semantic similarity to select similar entities, this invention employs box embeddings that consider hierarchical information (see Dasgupta, S., Boratko, M., Zhang, D., Vilnis, L., Li, X., McCallum, A.: Improving local identification in probabilistic box embeddings. Advances in Neural Information Processing Systems 33, 182–192 (2020)) to generate similar entities.

[0022] Box embedding represents entities as n-dimensional hyperrectangles. The representation of each box is obtained by calculating its minimum and maximum angles. First, this invention obtains the n-dimensional embedding X of each entity phrase e using the pre-trained language model BERT (see Devlin, J., Chang, MW, Lee, K., Toutanova, K.: BERT: Pre-training of deep bidirectional transformers for language understanding. In: Burstein, J., Doran, C., Solorio, T. (eds.) Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1). e Next, X e From two points It means that among them These are the smallest and largest corners of the box. d is the dimension of the embedding vector, which is called a box representation. Therefore, the box representation not only contains implicit information about the hierarchical structure but also enhances the semantic information representation of the box. This invention uses box volume as a feature of similar entities:

[0023]

[0024] V e d is the volume of the entity phrase e, and d is the dimension of the embedding vector.

[0025] Intuitively, the smaller the difference in volume between two entities, for example, ΔV = V e1 -V e2 The greater the similarity in hierarchical structure and semantic information, the better. For a given entity phrase, the k entity phrases with the smallest volume difference are selected as similar entities C.

[0026] In order to generate candidate negative common sense, this invention replaces the head or tail entity of each triple in the common sense knowledge base with the similar entity generated in the first step.

[0027] For triples + (h,r,t), using C h and C tReplacing either h or t yields negative candidates. Due to the open-world assumption, these negative candidates may be incorrect. Therefore, removing negative candidates for entity phrase relations that are not within the given common-sense knowledge base is crucial. + (h,r,t), its preliminary candidate representation is as follows:

[0028]

[0029] p is C h Given a commonsense knowledge base, G represents a similar entity, and - indicates negation. t Tail entities that represent similar entities.

[0030] After removing triples that already exist in the common sense knowledge base, the final preliminary rejection candidates are as follows:

[0031]

[0032] M is the number of affirmative triples in the common sense knowledge base. + (h,r,t) M It is the Mth negative triplet, where pos represents affirmation and K is common knowledge.

[0033] Candidate filtering stage:

[0034] This invention designs an efficient two-step filtering strategy to select negative knowledge that is deceptive but does not conflict with a given common-sense knowledge base.

[0035] Reachability path search: If a triple is accepted by a given common-sense knowledge base, then the triple is more likely to be correct and affirmative. Conversely, if the head and tail entity phrases of a triple have no reachable paths in the common-sense knowledge base, then the triple is likely negative. Therefore, this invention uses reachability path search to measure whether a triple is accepted by a given common-sense knowledge base.

[0036] Specifically, this invention uses a bidirectional Dijkstra algorithm (see Johnson, DB: A note on Dijkstra's shortest path algorithm. Journal of the ACM (JACM) 20(3), 385–388 (1973)) to search for reachable paths. The traditional Dijkstra algorithm is a unidirectional search, using a breadth-first search to find the neighbors of the current node, and then sorting the reachable paths of the current node to obtain the shortest path. The traditional Dijkstra algorithm repeats this process until the current node is the destination. This invention uses a bidirectional Dijkstra algorithm, which simultaneously executes the traditional Dijkstra algorithm from the start node and the destination (e.g., the head entity phrase and the tail entity phrase), referred to as forward search and backward search. When the forward search reaches a node, and the backward search sequence simultaneously includes that node, the shortest path is obtained. It should be noted that this invention uses the existence of the shortest path to indicate whether a reachable path exists.

[0037] Assumption - (h,r,t) is a negation triple in I. If a reachable path between the head entity h and the tail entity t can be obtained through the bidirectional Dijkstra algorithm, the triple is removed from the negation candidates. The negation candidates after filtering by reachable path search are denoted as I1.

[0038] LLMs Based on Grouping Instructions: The information in the commonsense knowledge base is insufficient to identify truly negative knowledge. Therefore, this invention introduces additional information to detect negative candidates. Specifically, this invention utilizes LLMs that have been pre-trained with a large amount of knowledge and have strong question-answering capabilities as additional information (these LLM models refer to Zhao, WX, Zhou, K., Li, J., Tang, T., Wang, X., Hou, Y., Min, Y., Zhang, B., Zhang, J., Dong, Z., et al.: A survey of large language models. arXiv preprint arXiv:2303.18223(2023)). Compared to the poorly performing direct input of negative candidates into LLMs, this invention transforms negative candidates into positive forms, thereby utilizing the powerful positive knowledge processing capabilities of LLMs. Furthermore, considering the time consumption of LLMs, this invention divides I1 into multiple groups and then designs an LLMs strategy based on grouping instructions to identify false negative triples.

[0039] More specifically, this invention argues that triples sharing (h,r) are similar, and that inputting triples one by one into LLMs would result in invalid reuse of information, leading to unnecessary time overhead. Therefore, this invention divides negative candidates into multiple groups based on (h,r). For each group, LLMs are required to select tail entity phrases from T based on (h,r). The specific LLM input instruction is: "A triple consists of a head phrase, an relation, and a tail phrase. Give the head phrase h and the relation r, and pick the missing tail phrases from the candidates' list T." It is important to note that this invention allows LLMs to select tail entity phrases that can form positive knowledge from (h,r), rather than directly selecting incorrect tail entity phrases. Ultimately, the negated common sense knowledge is as follows:

[0040] κ neg =I1\{D1,...,D U}, i = 1, ..., U (6)

[0041] Where negation indicates negation, U is the group number, and D is the group number. U Let U represent the set of affirmative triples selected by the LLMs in group U to form affirmative knowledge. LLMs based on grouping instructions not only make full use of the information between competitors in the same group, but also significantly improve the detection efficiency of additional information compared to querying LLMs one by one.

[0042] In some embodiments, this invention utilizes Matthias Mann's "A knowledge graph to interpret clinical proteomics data," published in Nature Biotechnology. The authors developed an open-source platform, the Clinical Knowledge Graph (CKG), based on clinically relevant experimental data, public databases, and literature. CKG currently contains nearly 20 million nodes and 220 million relationships. CKG combines statistical and machine learning algorithms to accelerate proteomics workflow analysis and knowledge mining.

[0043] To fully verify the performance of this invention, six baseline models from three categories were selected as comparison models:

[0044] Negative sampling-based methods: UNIFORM and COMET. This invention uses NegatER's code.

[0045] Two-stage "generate-filter" approaches: NegatER and UnCommonSense.

[0046] Methods based on large language models: Baichuan2-7B and Llama2-7B.

[0047] In the similar entity recognition stage, this invention generates 10 similar entities for each entity phrase. For the grouping instruction strategy based on a large language model, this invention uses Baichuan2-7B-Chat. In the external experimental evaluation, the batch size is 16, the learning rate is 2×10⁻⁵, the number of warm-up steps is 10k, and the maximum sequence length is 32. All experiments were conducted using PyTorch 2.0.1 and a GeForce RTX 3090 with 24GB of VRAM.

[0048] Internal Evaluation: This section assesses the quality of the generated negative commonsense knowledge. Because negative commonsense knowledge follows the open-world assumption, it is difficult to construct a dataset containing all truly negative knowledge. Therefore, this section utilizes human evaluation to assess the quality of the generated negative statements.

[0049] Specifically, the evaluation is conducted using prior knowledge. For each piece of knowledge that negates common sense, the following two questions are evaluated: (1) Truthfulness: Is this triple incorrect? (2) Deceptiveness: If this triple is incorrect, is it deceptive? For each question, this application replaces the 0 / 1 scoring system with a 4-level scoring system. For truthfulness, the 4 levels are “completely correct,” “slightly incorrect,” “somewhat incorrect,” and “probably incorrect,” corresponding to 0, 0.33, 0.66, and 1, respectively. For deceptiveness, the levels are “not deceptive at all,” “slightly deceptive,” “somewhat deceptive,” and “probably deceptive,” corresponding to 0, 0.33, 0.66, and 1, respectively.

[0050] For each method's generated negative common sense knowledge, 100 triples were randomly sampled. The evaluation scores were averaged to obtain the authenticity and deceptiveness scores. As shown in Table 1, this invention performs best in both authenticity and deceptiveness. This indicates that this invention can effectively generate more authentic and deceptive negative common sense knowledge. For other baseline models, UnCommonSense achieved suboptimal results in the authenticity test, but performed poorly in the deceptiveness test. This may be because the method generates simple negative samples, which are easily recognized by humans. NegatER achieved suboptimal results in the deceptiveness test, possibly because this method uses a language model to score negative triples. Furthermore, the two methods that directly generate negative knowledge based on large language models performed worst in both authenticity and deceptiveness tests. This may be because large language models cannot understand negative common sense knowledge, thus generating false content. In summary, the negative common sense knowledge generated by this invention can serve as an adjunct to the common sense knowledge base, helping humans better understand the negative aspects of the common sense world.

[0051] Table 1. Human Assessment Results. (Bold: Optimal Results) underline : Suboptimal result.

[0052]

[0053] Specifically, this invention uses a triplet classification dataset extracted from CKG, consisting of 36210 / 3278 / 3278 training / validation / test triples, containing 12 relations and 41528 entity shorts. The validation and test sets contain 1639 positive examples and 1639 negative examples from CKG. Regarding evaluation metrics, this invention uses accuracy, precision, recall, and F1 score to evaluate the binary classification results. This invention conducted five repeated experiments, and the results are shown in Table 2.

[0054] As shown in Table 2, compared to other models, this invention demonstrates superior performance in accuracy and F1 score, exceeding other baseline models by 0.89%-3.43% and 0.31%-6.34%, respectively. This indicates that the proposed method is more effective. This is because simple negative samples impair model performance, while sufficient difficult samples improve it. This demonstrates that this invention can improve performance on more difficult samples than other baseline models.

[0055] Table 2 shows the experimental results of triplet classification on the CKG dataset. (Bold: Optimal results) underline Suboptimal results. Each result is expressed as mean ± standard error, where mean represents the average of each experiment and standard error represents the standard error across multiple experiments.

[0056]

[0057] Ablation Experiments: To verify the impact of the components of this invention, ablation experiments were conducted on a triplet classification task. Specifically, "w / o similar entity recognition" means replacing box embeddings with K-nearest neighbors. "w / o reachable path search" means removing this module. "w / o grouping instruction-based LLMs" means removing the entire module, while "input-by-input LLM strategy" means replacing "grouping instruction-based LLMs" with querying the large language model one by one whether the negative triples are correct.

[0058] As shown in Table 3, "Similar Entity Recognition," "Reachable Path Search," and "Grouping Instruction-Based LLMs" all have a positive impact on the overall model performance. Furthermore, to verify the effectiveness of the grouping strategy instructions, this invention replaces "Grouping Instruction-Based LLMs" with querying the large language model one by one to check if the negation triples are correct. Clearly, "Grouping Instruction-Based LLMs" outperforms the individual input LLM strategy. It is noteworthy that replacing the similar entity recognition step results in the largest performance drop. This may be due to two reasons: (1) The most crucial module for generating negation candidates lies in the entity phrase replacement, which can produce high-quality negation seed candidates; (2) In "Similar Entity Recognition," this invention utilizes box embeddings to fully explore the hierarchical information between entity phrases, which can generate higher-quality entity phrases.

[0059] Table 3 shows the ablation experimental results on the CKG dataset. (Bold: Optimal results) underline Suboptimal results. Each result is expressed as mean ± standard error, where mean represents the average of each experiment and standard error represents the standard error across multiple experiments.

[0060]

[0061] The method proposed in this invention generates authentic and deceptively misleading negative common sense knowledge from CKG. For example, (each person's birthday, HasProperty, happy) is a negative statement, and this statement often confuses children. Furthermore, this invention can generate statements where there is a correlation between the head and tail entity phrases, but the tail entity phrase is not a necessary prerequisite for the head entity phrase.

[0062] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0063] This invention presents an efficient framework for generating negative common sense knowledge based on hierarchical modeling. It can generate truly negative and somewhat misleading common sense knowledge. This negative common sense knowledge provides high-quality negative samples during model training to improve model performance.

[0064] As used herein, the term "preferred" is meant as an example, illustration, or illustration. Any aspect or design described herein as "preferred" need not be construed as being more advantageous than other aspects or designs. Rather, the use of the term "preferred" is intended to present the concept in a specific manner. As used in this application, the term "or" is intended to mean an inclusive "or" rather than an exclusionary "or." That is, unless otherwise specified or clear from the context, "X uses A or B" naturally includes either of the permutations. That is, if X uses A; X uses B; or X uses both A and B, then "X uses A or B" is satisfied in any of the foregoing examples.

[0065] Furthermore, although this disclosure has been shown and described with respect to one or more implementations, equivalent variations and modifications will occur to those skilled in the art based on a reading and understanding of this specification and the accompanying drawings. This disclosure includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the aforementioned components (e.g., elements, etc.), the terminology used to describe such components is intended to correspond to any component (unless otherwise indicated) that performs the specified function of said component (e.g., is functionally equivalent to it), even if structurally not equivalent to the disclosed structure performing the functions in the exemplary implementations of this disclosure shown herein. Moreover, although specific features of this disclosure have been disclosed with respect to only one of several implementations, such features may be combined with one or more features of other implementations that may be desirable and advantageous for a given or particular application. Furthermore, with regard to the use of the terms “comprising,” “having,” “containing,” or variations thereof in the Detailed Description or claims, such terms are intended to be included in a manner similar to the term “including.”

[0066] The functional units in this invention embodiment can be integrated into a processing module, or each unit can exist physically separately, or multiple units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. The aforementioned devices or systems can execute the storage methods in the corresponding method embodiments.

[0067] In summary, the above embodiments are one implementation of the present invention, but the implementation of the present invention is not limited to the embodiments described above. Any changes, modifications, substitutions, combinations, or simplifications made that deviate from the spirit and principle of the present invention should be considered equivalent substitutions and are included within the protection scope of the present invention.

Claims

1. A method for generating common sense knowledge graphs in clinical proteomics based on hierarchical modeling, characterized in that, A knowledge graph (CKG) for clinical proteomics data is used. The CKG is a knowledge graph that collects and annotates information from biomedical databases and organizes it into nodes connected by relationships. These nodes include proteins, drugs, diseases, functional regions, and tissues. The relationships represent the connections between these nodes. The method includes the following steps: Obtain the knowledge graph of the clinical proteomics data; Box embedding is used to extract similar entities for each entity phrase in the knowledge graph of the clinical proteomics data; Initial candidates are generated by replacing the beginning and end entity phrases; The generated preliminary candidates are filtered, including reaching path search of the head and tail entity phrases to measure whether the triples are accepted by the given common sense knowledge base; and filtering is performed based on large language models (LLMs) of grouping instructions. Output negative common sense knowledge, which is used to provide high-quality negative samples for machine learning models or to mitigate the error generated by large language models (LLMs). The method of extracting similar entities for each entity phrase using box embedding includes: The box embedding represents the entity as an n-dimensional hyperrectangle, and obtains the representation of each box by calculating the minimum and maximum angles of the boxes; The n-dimensional embedding of each entity phrase e is obtained through a pre-trained language model. , From two points It means that among them These two are the smallest and largest corners of the box, respectively. d is the dimension of the embedding vector, which is called a box representation. Therefore, the box representation not only contains the implicit information of the hierarchical structure, but also enhances the semantic information representation of the box. Using box volume as a feature of similar entities: V e It refers to the volume of the entity phrase 'e'; The smaller the difference in box volume between two entities, the greater their similarity in hierarchical structure and semantic information; for a given entity phrase, the k entity phrases with the smallest volume difference are selected as similar entities C; In order to generate candidate negative common sense, the head or tail entity of each triple in the common sense knowledge base is replaced by the similar entity C; For the negation triplet h is the head entity, t is the tail entity, and r is the relation. Replace h with Replace t, negate candidate, C h It is a similar entity to the head entity, C t It is a similar entity to the tail entity. Remove negative candidates for entity phrase relations that are not in the given commonsense knowledge base. The preliminary candidate representation is as follows: p is C h Given a commonsense knowledge base, G represents a similar entity, and - indicates negation. t Let q represent the set of tail entities of similar entities; After removing triples that already exist in the common sense knowledge base, the final preliminary rejection candidates are as follows: M is the number of affirmative triples in the common sense knowledge base. + (h,r,t) M It is the Mth negative triplet, where pos represents affirmation and K is common knowledge.

2. The method for generating common sense knowledge graphs of clinical proteomics based on hierarchical modeling according to claim 1, characterized in that, The reachable path is represented by the existence of the shortest path. The shortest path is searched using a bidirectional Dijkstra algorithm. When the forward search reaches a certain node and the backward search sequence contains that node, the shortest path is obtained. yes In the negation triplet, if a reachable path between the head entity h and the tail entity t can be obtained through the bidirectional Dijkstra algorithm, the triplet is removed from the negation candidate. The negation candidates after filtering by reachable path search are denoted as . .

3. The method for generating common sense knowledge graphs of clinical proteomics based on hierarchical modeling according to claim 2, characterized in that, LLMs based on grouping instructions include: By using LLMs that have been trained with a large amount of knowledge in advance as additional information, negative candidates are transformed into positive forms, thereby taking advantage of the powerful positive knowledge processing capabilities of LLMs. Will The data are divided into multiple groups, and then false negative triples are identified using an LLMs strategy based on grouping instructions.

4. The method for generating common sense knowledge graphs of clinical proteomics based on hierarchical modeling according to claim 3, characterized in that, shared The triples are similar, that is, similar triples have the same h and r, then according to The negative candidates are divided into multiple groups; for each group, LLMs are required to combine... from Select the final entity phrase.

5. The method for generating common sense knowledge graphs of clinical proteomics based on hierarchical modeling according to claim 4, characterized in that, Let LLMs choose to Instead of directly selecting incorrect tail entity phrases, we form affirmative knowledge tail entity phrases; ultimately, we negate common-sense knowledge as follows: Where neg represents negation, U is the group number, and D U Let U represent the set of affirmative triples that the U-th group of LLMs chooses to form affirmative knowledge.