A conceptual abstraction method and apparatus based on pooling networks
By constructing an input graph-pooling graph-output graph structure based on a pooling network method, and using a graph neural network model to learn and update entity and relation representations, the problem of the inability to effectively utilize entity hierarchical information in existing technologies is solved, and more accurate knowledge graph completion is achieved.
Patent Information
- Application Number
- CN202310931096.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-27
- Publication Date
- 2026-05-26
- Estimated Expiration
- 2043-07-27
AI Technical Summary
Existing graph neural network models are unable to effectively learn and utilize the latent hierarchical information of entities when constructing product knowledge graphs, and they cannot be used on knowledge graphs that lack entity concept information, resulting in incomplete graphs.
By using a pooling network-based approach, an input graph-pooling graph-output graph structure is constructed. Graph neural network models are used to learn and update entity and relation representations. Combined with concept-entity mapping, concepts are automatically abstracted and knowledge graph completion is achieved.
It enables more accurate knowledge graph completion even when entity concept information is missing, thus improving the completeness and accuracy of the knowledge graph.
Smart Images

Figure CN116932662B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of knowledge graph and graph neural network technology, specifically relating to a conceptual abstraction method and apparatus based on pooling networks. Background Technology
[0002] Knowledge graphs are large-scale semantic network knowledge bases that organize data in a structured form, use triples to describe the knowledge within the data, and visualize it through directed graphs. They offer advantages such as ease of understanding and convenient use. In recent years, knowledge graphs have been widely applied to knowledge-driven tasks such as search engines, recommendation systems, and intelligent question-answering systems to improve business performance. Common open-domain knowledge graphs include Wikidata and DBpedia, while vertical-domain knowledge graphs include product knowledge graphs and medical knowledge graphs.
[0003] Product knowledge graphs store product information in the form of triples. Each triple is represented as (head entity, relation, tail entity), where the head entity is the product, the tail entity is a product attribute or category, and the relation is a product attribute or category, etc. For example, the triple (skim milk, category, milk) indicates that skim milk is a type of milk. Here, "skim milk" is called the head entity, "milk" is called the tail entity, and "category" is called the relation.
[0004] Because the construction of product knowledge graphs is often carried out through automated or semi-automated methods, the constructed graphs suffer from incompleteness. To address this issue, many graph neural network models have been proposed for predicting new knowledge, such as the methods for predicting new knowledge based on graph neural network models published in existing literature Schlichtkrull M, Kipf TN, Bloem P, et al. Modeling relational data with graph convolutional networks [C] / / The Semantic Web:15th International Conference, ESWC 2018 and Vashishth S, Sanyal S, Nitin V, et al. Composition-based Multi-Relational Graph Convolutional Networks [C] / / International Conference on Learning Representations.2020.
[0005] However, these methods represent entities in a flat way, failing to effectively learn and utilize the latent hierarchical information of entities. Furthermore, existing modeling of entity concepts typically requires pre-defined conceptual signals, making it unusable on knowledge graphs lacking entity conceptual information. Therefore, it is necessary to focus on how to utilize existing triples in knowledge graphs to model the latent conceptual information of entities. Summary of the Invention
[0006] In view of the above, the purpose of this invention is to provide a concept abstraction method and apparatus based on pooling networks, which automatically constructs a pooling graph to achieve automatic concept abstraction by providing a given input graph, and learns and utilizes concepts by modeling the representation of entities and relationships on the structure of input graph-pooling graph-output graph, and effectively completes concept abstraction and knowledge graph completion.
[0007] To achieve the above-mentioned objectives, this invention provides a conceptual abstraction method based on pooling networks, comprising the following steps:
[0008] Step 1: Obtain the knowledge graph as the input graph relation, extract the head entity set and tail entity set of each relation in the knowledge graph, and divide the entities in each set into multiple subsets according to the entity representation;
[0009] Step 2: Select any two subsets that do not belong to the same set to form a subset pair. By processing the subset pairs, abstract concepts are automatically obtained and concept-entity mappings are established.
[0010] Step 3: Based on the relationship between the concept-entity mapping and the current triples, the knowledge graph is converted into an abstract concept graph as a pooling graph, and the output graph is obtained based on the pooling graph;
[0011] Step 4: Use a graph neural network model to learn entity representations and relation representations on the input graph, and after converting the entity representations of the input graph into concept representations, initialize the concept representations and relation representations in the pooling graph;
[0012] Step 5: Based on the initial concept and relation representations of the pooling graph, update the concept and relation representations using a graph neural network model on the pooling graph, convert the concept representation of the pooling graph into an entity representation, use the entity representations of the input graph and the pooling graph to initialize the entity representation in the output graph, and use the relation representation in the pooling graph to initialize the relation representation in the output graph.
[0013] Step 6: Based on the initial entity representation and relation representation of the output graph, use a graph neural network model to update the entity representation and relation representation on the output graph and use them as input to the knowledge representation learning model for learning;
[0014] Step 7: During learning, calculate the contrast loss for the entity representation and concept representation of the input graph-output graph, input graph-pooling graph, and pooling graph-output graph respectively.
[0015] Step 8: After learning is complete, the head entity, relation and candidate tail entity are combined into candidate triples and the knowledge representation score of the candidate triples is calculated. Based on the score, reliable triples are selected to complete the knowledge graph.
[0016] Preferably, in step 1, the head entity set r is extracted based on each relation r in the knowledge graph. H ={e|(e,r,t)} and the tail entity set r T = {e|(h,r,e)}, where e is the entity of interest to the set, i.e., the head entity or the tail entity, t is the tail entity, and h is the head entity;
[0017] For each relation, extract the entity {e|e∈r} from the head entity set and tail entity set. H ∪r T The entity representations are obtained through pre-training with TransE, and then clustered using the k-means clustering algorithm based on these entity representations to divide the entities in each set into k subsets. And it meets the following conditions:
[0018]
[0019]
[0020] Preferably, in step 2, two subsets that do not belong to the same set are randomly selected to form a subset pair, and the abstract concept is automatically obtained and a concept-entity mapping is established by processing the subset pair as follows:
[0021] Calculate the similarity of subset pairs, retain subset pairs with similarity higher than the threshold, and merge subset pairs containing the same subset into a single abstract concept; for the retained subset pairs that are not merged, each subset pair is treated as an abstract concept; for subsets that do not appear in the retained subset pairs, each subset is treated as a separate abstract concept; automatically obtain all abstract concepts and the subsets contained in the abstract concepts, and establish a concept-entity mapping based on the entities contained in each subset.
[0022] Preferably, in step 3, the knowledge graph is converted into an abstract concept graph as a pooling graph based on the relationship between the concept-entity mapping and the current triples, including:
[0023] Based on the relationship of the current triple, obtain the set of head / tail entities to which the head / tail entities belong, thereby obtaining all subsets contained in the set. Based on the concept-entity mapping, obtain the abstract concept to which the head / tail entities belong. Select the abstract concept that contains the above subsets as the abstract concept of the head / tail entities in the current triple, thereby automatically abstracting the head / tail entity nodes in the triple into concept nodes, forming concept triples. Remove duplicate concept triples to obtain an abstract concept graph as a pooling graph.
[0024] Preferably, in step 3, the process of obtaining the output graph based on the pooling graph is as follows: based on the inverse of the correspondence between entities and concepts in the input graph and the pooling graph, the correspondence between concepts and entities in the pooling graph and the output graph is obtained, and then the output graph is obtained.
[0025] Preferably, in step 4, a graph neural network model is used on the input graph to learn entity representations and relation representations:
[0026]
[0027] in, Let n represent entity representation and relation representation respectively. e ,n r Here, represents the number of entities and the number of relations, respectively, and d is the dimension of the vector representation. This represents the input knowledge graph;
[0028] Based on the entity-concept mapping and the shared relationships between the input graph and the pooling graph, the entity representations in the input graph are converted into concept representations, and the concept and relation representations in the pooling graph are initialized:
[0029]
[0030] in, This represents the initialization representation of the i-th concept in the pooling graph, n. c For the number of concepts, R p This represents the initial representation of the relationships in the pooling graph. Represents a concept-entity mapping matrix, where the elements M of the matrix are... c2e (j,k) being 1 or 0 indicates whether the j-th concept contains the k-th entity, m i Let be the total number of entities contained in the i-th concept.
[0031] Preferably, in step 5, based on the initial concept representation and relation representation of the pooling graph, the concept representation and relation representation are updated using a graph neural network model on the pooling graph:
[0032]
[0033] in, For pooling graphs, These are the updated concept representation and relation representation, C, R. p These are the initialization concept representation and the relational representation, respectively;
[0034] Based on the output diagram and input Figure 1 To achieve this, the conceptual representation in the pooling graph is converted into an entity representation:
[0035]
[0036] Among them, E p The entity representation of concept transformation in the pooling graph. Represents the entity-concept mapping matrix, (E p ) i For the representation of the i-th entity, the elements M of the matrix e2c (j,k) being 1 or 0 indicates whether the j-th entity belongs to the k-th concept, n i Let i be the total number of concepts to which the i-th entity belongs;
[0037] The entity representation in the output graph is initialized using the entity representations from the input graph and the pooling graph, and the relation representation in the output graph is initialized using the relation representation from the pooling graph.
[0038]
[0039] Among them, E o This represents the initial representation of entities in the output graph, R. o This represents the relationship in the output graph, α. e and α c E represents the weights of entities in the input graph and the pooling graph, respectively. g This represents the entity representation in the input.
[0040] Preferably, in step 6, based on the initial entity and relation representations of the output graph, the entity and relation representations are updated again on the output graph using a graph neural network model to become the final entity and relation representations:
[0041]
[0042] in, For the output image, These are the updated entity representation and relation representation, E. o ,R o These are the initial entity representation and relation representation of the output graph, respectively.
[0043] Preferably, in step 7, the contrast loss between the input image and the output image is... for:
[0044]
[0045] Where, x i This represents the entity representation on the input graph. x represents i The representation of positive samples is the representation of the same entity on the output graph, x i The negative samples are other entities in the currently sampled batch of entities, denoted as x. j P(i) and N(i) represent the positive and negative sample sets of the entity, respectively, and τ is the temperature;
[0046] Contrast loss between input graph and pooling graph for:
[0047]
[0048] Where, x i This represents the entity representation on the input graph. x represents i The representation of the concept of belonging, c j Representation of other concepts in the currently sampled batch of entities;
[0049] Contrast loss between pooling graph and output graph for:
[0050]
[0051] Where, x o This indicates the representation of entities on the output graph. x represents o The representation of the concept of belonging, c j This represents the representation of other concepts in the currently sampled batch of entities.
[0052] To achieve the above-mentioned objectives, the present invention also provides a conceptual abstraction device based on pooled networks, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned conceptual abstraction method based on pooled networks.
[0053] Compared with the prior art, the beneficial effects of the present invention include at least the following:
[0054] Based on the entity sets corresponding to the triple relationships in the input graph, the entity sets are partitioned and merged to form abstract concepts. A concept-entity mapping is established, and automatic concept abstraction is performed to obtain the pooling graph. This process involves obtaining and inputting the relevant data. Figure 1The system constructs an input graph-pooling graph-output graph structure. In the input graph, a graph neural network model is used to learn entity and relation representations and initialize concept and relation representations in the pooling graph. In the pooling graph, the graph neural network model updates the concept and relation representations, combining them with the entity representations from the input graph to initialize the entity and relation representations in the output graph. In the output graph, the graph neural network model updates the entity and relation representations again. The updated entity and relation representations are then input into the knowledge representation learning model. Simultaneously, contrastive losses between the input graph-output graph, input graph-pooling graph, and pooling graph-output graph are added to constrain the entity representations to fully utilize concepts, optimizing entity and relation representations and achieving more accurate knowledge graph completion. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] Figure 1 This is a flowchart of a conceptual abstraction method based on pooling networks provided in an embodiment of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the scope of protection of this invention.
[0058] To implicitly model the conceptual information of entities, so that the entity representation contains conceptual information when the entity concept is missing, thereby improving the accuracy of knowledge graph completion, this embodiment provides a concept abstraction method based on pooling networks. First, a pooling graph is constructed to complete the automatic abstraction of entity concepts. Then, the representations of entities and relations in the input graph-pooling graph-output graph structure are modeled to complete the use of entity concepts.
[0059] like Figure 1 As shown, the conceptual abstraction method based on pooling networks provided in this embodiment includes the following steps:
[0060] Step 1: Obtain the knowledge graph as the input graph relation, extract the head entity set and tail entity set of each relation in the knowledge graph, and divide the entities in each set into multiple subsets according to the entity representation.
[0061] The knowledge graph is a product knowledge graph, which contains product information triples (head entity, relation, tail entity). The head entity is the product, the tail entity is a product attribute value or product category, and the relation is an attribute or category. The set of head entities r is extracted from each relation r in the product knowledge graph. H ={e|(e,r,t)} and the tail entity set r T = {e|(h,r,e)}, where e is the entity of interest to the set, i.e., the head entity or the tail entity, t is the tail entity, and h is the head entity.
[0062] For each relation, extract the entity {e|e∈r} from the head entity set and tail entity set. H ∪r T The entity representations are obtained through pre-training with TransE, and then clustered using the k-means clustering algorithm based on these entity representations to divide the entities in each set into k subsets. And it meets the following conditions:
[0063]
[0064]
[0065] Step 2: Select any two subsets that do not belong to the same set to form a subset pair. Process the subset pair to automatically obtain abstract concepts and establish concept-entity mapping.
[0066] In this embodiment, two subsets that do not belong to the same set are randomly selected from the two sets to form a subset pair. Similarity, such as Jaccard similarity
[0067]
[0068] in, This represents the number of entities that intersect two subsets. This represents the total number of entities in the two subsets;
[0069] Preserving similarity subsets above the threshold δ Select subset pairs that contain the same subset. Merge into an abstract concept For the retained unmerged subset pair {(i,j)|i,j∈r H ∪r T}, each subset pair is an abstract concept c0={(i,j)}; for subsets {m|m∈r that do not appear in the retained subset pairs H ∪rT Each subset is a separate abstract concept c1 = {m}; all abstract concepts and their constituent subsets are automatically retrieved, and a concept-entity mapping is established based on the entities contained in each subset.
[0070] Step 3: Based on the concept-entity mapping and the relationship between the current triples, the knowledge graph is converted into an abstract concept graph as a pooling graph, and the output graph is obtained based on the pooling graph.
[0071] In the embodiment, the set r of the head / tail entities to which the head / tail entities belong is obtained based on the relationship r of the current triple (h,r,t). H / r T Thus, the included subset is obtained. Based on the concept-entity mapping, obtain the abstract concepts to which the head / tail entities h / t belong. Select the abstract concepts that contain the above subsets as the abstract concepts of the current head / tail entities in the current triple. This will automatically abstract the head / tail entity nodes in the triple into concept nodes, forming concept triples. Remove duplicate concept triples and obtain the abstract concept graph as the pooling graph.
[0072] In this embodiment, after obtaining the pooling graph, an output graph is obtained based on the pooling graph. This output graph and the input graph... Figure 1 To achieve this, we establish an input graph-pooling graph-output graph structure, where the correspondence between concepts and entities in the pooling graph-output graph is the inverse of the correspondence between entities and concepts in the input graph-pooling graph.
[0073] Step 4: Use a graph neural network model to learn entity representations and relation representations on the input graph. After converting the entity representations of the input graph into concept representations, initialize the concept representations and relation representations in the pooling graph.
[0074] In this embodiment, a graph neural network model is used on the input graph to learn entity representations and relation representations:
[0075]
[0076] in, Let n represent entity representation and relation representation respectively. e ,n r Here, represents the number of entities and the number of relations, respectively, and d is the dimension of the vector representation. The input knowledge graph is represented by the graph neural network f, which includes RGCN or CompGCN.
[0077] Based on the entity-concept mapping and the shared relationships between the input graph and the pooling graph, the entity representations in the input graph are converted into concept representations, and the concept and relation representations in the pooling graph are initialized:
[0078]
[0079] in, This represents the initialization representation of the i-th concept in the pooling graph, n. c For the number of concepts, R p This represents the initial representation of the relationships in the pooling graph. Represents a concept-entity mapping matrix, where the elements M of the matrix are... c2e (j,k) being 1 or 0 indicates whether the j-th concept contains the k-th entity, m i Let be the total number of entities contained in the i-th concept.
[0080] Step 5: Based on the initial concept and relation representations of the pooling graph, update the concept and relation representations using a graph neural network model on the pooling graph, convert the concept representation of the pooling graph into an entity representation, use the entity representations of the input graph and the pooling graph to initialize the entity representation in the output graph, and use the relation representation in the pooling graph to initialize the relation representation in the output graph.
[0081] In this embodiment, based on the initial concept and relation representations of the pooling graph, a graph neural network model is used to update the concept and relation representations on the pooling graph:
[0082]
[0083] in, For pooling graphs, These are the updated concept representation and relation representation, C, R. p These are the initialization of concept representation and relation representation, respectively. The graph neural network f includes RGCN or CompGCN.
[0084] Based on the output diagram and input Figure 1 To achieve this, the conceptual representation in the pooling graph is converted into an entity representation:
[0085]
[0086] Among them, E p The entity representation of concept transformation in the pooling graph. Represents the entity-concept mapping matrix, (E p ) i For the representation of the i-th entity, the elements M of the matrix e2c (j,k) being 1 or 0 indicates whether the j-th entity belongs to the k-th concept, n i Let i be the total number of concepts to which the i-th entity belongs;
[0087] The entity representation in the output graph is initialized using the entity representations from the input graph and the pooling graph, and the relation representation in the output graph is initialized using the relation representation from the pooling graph.
[0088]
[0089] Among them, E o This represents the initial representation of entities in the output graph, R. o This represents the relationship in the output graph, α. e and α c E represents the weights of entities in the input graph and the pooling graph, respectively. g This represents the entity representation in the input.
[0090] Step 6: Based on the initial entity representation and relation representation of the output graph, use a graph neural network model to update the entity representation and relation representation on the output graph, and use them as input to the knowledge representation learning model for learning the final entity representation and relation representation.
[0091] In this embodiment, based on the initial entity and relation representations of the output graph, a graph neural network model is used to update the entity and relation representations on the output graph to obtain the final entity and relation representations:
[0092]
[0093] in, For the output image, These are the updated entity representation and relation representation, E. o ,R o These are the initial entity representation and relation representation of the output graph, respectively. The graph neural network f includes RGCN or CompGCN.
[0094] The updated entity and relation representations on the output graph are used as the final entity and relation representations and fed into a knowledge representation learning model for learning, where the knowledge representation model includes TransE, DistMult, or ConvE.
[0095] Step 7: During learning, calculate the comparative loss constraint entity representation and concept representation for the input graph-output graph, input graph-pooling graph, and pooling graph-output graph respectively.
[0096] In the embodiment, the contrast loss between the input and output graphs is calculated.
[0097]
[0098] Where, x i This represents the entity representation on the input graph. x represents i The representation of positive samples is the representation of the same entity on the output graph, x j x represents i The negative samples are represented by P(i) and N(i), which represent the positive and negative sample sets of the entity, respectively, and τ is the temperature.
[0099] Calculate the contrast loss between the input graph and the pooling graph.
[0100]
[0101] Where, x i This represents the entity representation on the input graph. x represents i The representation of the concept of belonging, c j This represents the representation of other concepts in the currently sampled batch of entities.
[0102] Compute the contrast loss of the pooling graph and the output graph.
[0103]
[0104] Where, x o This indicates the representation of entities on the output graph. x represents o The representation of the concept of belonging, c j This represents the representation of other concepts in the currently sampled batch of entities.
[0105] Step 8: After learning is complete, the head entity, relation and candidate tail entity are combined into candidate triples and the knowledge representation score of the candidate triples is calculated. Based on the score, reliable triples are selected to complete the knowledge graph.
[0106] In this embodiment, the head entity, relation, and candidate tail entity are combined to form a candidate product information triplet. Based on the knowledge representation score, candidate product information triplets with a score greater than the score threshold are selected as reliable candidate product information triplets to complete the product information.
[0107] Based on the same inventive concept, the embodiment also provides a conceptual abstraction device based on pooling networks, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a conceptual abstraction method based on pooling networks, including the following steps:
[0108] Step 1: Obtain the knowledge graph as the input graph relation, extract the head entity set and tail entity set of each relation in the knowledge graph, and divide the entities in each set into multiple subsets according to the entity representation;
[0109] Step 2: Select any two subsets that do not belong to the same set to form a subset pair. By processing the subset pairs, abstract concepts are automatically obtained and concept-entity mappings are established.
[0110] Step 3: Based on the relationship between the concept-entity mapping and the current triples, the knowledge graph is converted into an abstract concept graph as a pooling graph, and the output graph is obtained based on the pooling graph;
[0111] Step 4: Use a graph neural network model to learn entity representations and relation representations on the input graph, and after converting the entity representations of the input graph into concept representations, initialize the concept representations and relation representations in the pooling graph;
[0112] Step 5: Based on the initial concept and relation representations of the pooling graph, update the concept and relation representations using a graph neural network model on the pooling graph, convert the concept representation of the pooling graph into an entity representation, use the entity representations of the input graph and the pooling graph to initialize the entity representation in the output graph, and use the relation representation in the pooling graph to initialize the relation representation in the output graph.
[0113] Step 6: Based on the initial entity representation and relation representation of the output graph, use a graph neural network model to update the entity representation and relation representation on the output graph and use them as input to the knowledge representation learning model for learning;
[0114] Step 7: During learning, calculate the contrast loss for the entity representation and concept representation of the input graph-output graph, input graph-pooling graph, and pooling graph-output graph respectively.
[0115] Step 8: After learning is complete, the head entity, relation and candidate tail entity are combined into candidate triples and the knowledge representation score of the candidate triples is calculated. Based on the score, reliable triples are selected to complete the knowledge graph.
[0116] Experimental Example
[0117] For the product knowledge graph shown in Figure 1, the triplet of each product information is shown in Table 1.
[0118] Table 1 Product Knowledge Graph
[0119] e1 r2 e2 e3 r1 e1 e3 r1 e2 e3 r1 e6 e4 r2 e2 e4 r2 e3 e4 r2 e5 e7 r1 e1
[0120] The method for automatically completing a product knowledge graph includes the following steps:
[0121] (1) Based on the product knowledge graph shown in Table 1, obtain the head entity set and tail entity set for each relation: r1_H={e3,e7}, r1_T={e1,e2,e6}, r2_H={e1,e4}, r2_T={e2,e3,e5}.
[0122] (2) The entities in the entity set are divided into k-means clustering algorithm. The entities in each set are divided into k subsets. When k=2, r1_H_0={e3}, r1_H_1={e7}, r1_T_0={e1}, r1_T_1={e2,e6}, r2_H_0={e1}, r2_H_1={e4}, r2_T_0={e2,e5}, r2_T_1={e3}.
[0123] (3) Calculate the Jaccard similarity of subset pairs to obtain the concept-entity mapping: c1={r1_H_0,r2_T_1}={e3}, c2={r1_H_1}={e7}, c3={r1_T_0,r2_H_0}={e1}, c4={r1_T_1}={e2,e6}, c5={r2_H_1}={e4}, c6={r2_T_0}={e2,e5}.
[0124] (4) Convert the triples in the product knowledge graph into concept triples, remove duplicate concept triples, and obtain the product concept graph as a pooling graph. The concept graph contains triples (c1,r1,c3), (c1,r1,c4), (c2,r1,c3), (c3,r2,c6), (c5,r2,c1), and (c5,r2,c6). Table 1 is used as the output graph.
[0125] (5) Use a graph neural network model to learn entity and relation representations in the input graph and initialize concept and relation representations in the pooling graph. Use a graph neural network model to update concept and relation representations in the pooling graph and initialize entity and relation representations in the output graph together with entity representations in the input graph. Use a graph neural network model to update entity and relation representations in the output graph and input entity and relation representations in the output graph into the knowledge representation learning model.
[0126] (6) Calculate the contrast loss between the input graph-output graph, the input graph-pooling graph, and the pooling graph-output graph respectively.
[0127] (7) Input the entity and relation representations of the output graph into an existing knowledge representation learning model, such as ConvE, calculate scores for candidate triples, and select the triples with higher scores as the correct triples. Suppose that the candidate triples (e7,r1,e6) and (e7,r1,e3) have scores of 0.8 and 0.5 respectively, then (e7,r1,e6) is considered to be the triple for completing the product information of the product entity.
[0128] In summary, the concept abstraction method based on pooling networks provided in the embodiments is illustrated using a product knowledge graph as an example. It automatically extracts abstract concepts from triples in the product knowledge graph, automatically abstracts the input graph into a pooling graph, and establishes an entity-concept mapping, while simultaneously acquiring and processing the input graph. Figure 1 To construct a complete output graph, a structure of input graph-pooling graph-output graph is established. In the input graph, a graph neural network model learns entity and relation representations, which are then used to initialize the concept and relation representations in the pooling graph. In the pooling graph, the graph neural network model updates the concept and relation representations, combining them with the entity representations from the input graph to initialize the entity and relation representations in the output graph. Finally, the graph neural network model updates the entity and relation representations in the output graph again, and this information is fed into a knowledge representation learning model for training. This ensures that the learned entity representations contain concept information even without it. Simultaneously, contrast constraints between the input graph-output graph, input graph-pooling graph, and pooling graph-output graph are used to shorten the distance between identical entities and between entities and their respective concepts, thus enhancing entity representations. Finally, the learned representations are used to calculate the scores corresponding to candidate product information triples, and the tail entities corresponding to the candidate triples with the highest scores are selected as the tail entities to be completed for the product.
[0129] The specific embodiments described above illustrate the technical solution and beneficial effects of the present invention in detail. It should be understood that the above description is only the most preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, additions, and equivalent substitutions made within the scope of the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A conceptual abstraction method based on pooling networks, characterized in that, Includes the following steps: Step 1: Obtain the knowledge graph as the input graph relation. The knowledge graph is a product knowledge graph, which contains product information triples (head entity, relation, tail entity). The head entity is the product, the tail entity is the product attribute value or product category, and the relation is the attribute or category. Extract the head entity set and tail entity set of each relation in the product knowledge graph, and divide the entities in each set into multiple subsets according to the entity representation. Step 2: Select any two subsets that do not belong to the same set to form a subset pair. By processing the subset pairs, abstract concepts are automatically obtained and concept-entity mappings are established. Step 3: Based on the concept-entity mapping and the relationship of the current triples, convert the product knowledge graph into an abstract concept graph as a pooling graph, and obtain the output graph based on the pooling graph; Step 4: Use a graph neural network model to learn entity representations and relation representations on the input graph, and after converting the entity representations of the input graph into concept representations, initialize the concept representations and relation representations in the pooling graph; Step 5: Based on the initial concept and relation representations of the pooling graph, update the concept and relation representations using a graph neural network model on the pooling graph, convert the concept representation of the pooling graph into an entity representation, use the entity representations of the input graph and the pooling graph to initialize the entity representation in the output graph, and use the relation representation in the pooling graph to initialize the relation representation in the output graph. Step 6: Based on the initial entity representation and relation representation of the output graph, use a graph neural network model to update the entity representation and relation representation on the output graph and use them as input to the knowledge representation learning model for learning; Step 7: During learning, calculate the contrast loss for the entity representation and concept representation of the input graph-output graph, input graph-pooling graph, and pooling graph-output graph respectively. Step 8: After learning, the head entity, relation, and candidate tail entity are combined into candidate product information triples. Based on the knowledge representation score, candidate product information triples with a score greater than the score threshold are selected as reliable candidate product information triples to complete the product information.
2. The conceptual abstraction method based on pooling networks according to claim 1, characterized in that, In step 1, the head entity set r of each relationship r in the commodity knowledge graph is extracted H = {e | (e, r, t)} and the tail entity set r T = {e | (h, r, e)}, where e is an entity of interest in the set, i.e., a head entity or a tail entity, t is a tail entity, and h is a head entity. For each relation, extract the entity {e|e∈r} from the head entity set and tail entity set. H ∪r T The entity representations are obtained through pre-training with TransE, and then clustered using the k-means clustering algorithm based on these entity representations to divide the entities in each set into k subsets. And it meets the following conditions:
3. The conceptual abstraction method based on pooling networks according to claim 1, characterized in that, In step 2, two subsets that do not belong to the same set are randomly selected to form a subset pair. The abstract concept is automatically obtained and a concept-entity mapping is established by processing the subset pair as follows: Calculate the similarity of subset pairs, retain subset pairs with similarity higher than the threshold based on the similarity threshold, and merge subset pairs that contain the same subset into an abstract concept; For the retained unmerged subset pairs, treat each subset pair as an abstract concept; For subsets that do not appear in the reserved subset pairs, each subset is treated as a separate abstract concept; all abstract concepts and the subsets contained in the abstract concepts are automatically obtained, and a concept-entity mapping is established based on the entities contained in each subset.
4. The conceptual abstraction method based on pooling networks according to claim 1, characterized in that, In step 3, the product knowledge graph is converted into an abstract concept graph as a pooling graph based on the concept-entity mapping and the relationship of the current triples, including: Based on the relationship of the current triple, obtain the set of head / tail entities to which the head / tail entities belong, thereby obtaining all subsets contained in the set. Based on the concept-entity mapping, obtain the abstract concept to which the head / tail entities belong. Select the abstract concept that contains the above subsets as the abstract concept of the head / tail entities in the current triple, thereby automatically abstracting the head / tail entity nodes in the triple into concept nodes, forming concept triples. Remove duplicate concept triples to obtain an abstract concept graph as a pooling graph.
5. The conceptual abstraction method based on pooling networks according to claim 1, characterized in that, In step 3, the process of obtaining the output graph based on the pooling graph is as follows: based on the inverse of the correspondence between entities and concepts in the input graph and the pooling graph, the correspondence between concepts and entities in the output graph is obtained from the pooling graph, and thus the output graph is obtained.
6. The conceptual abstraction method based on pooling networks according to claim 1, characterized in that, In step 4, a graph neural network model is used on the input graph to learn entity representations and relation representations: in, Let n represent entity representation and relation representation respectively. e ,n r Here, represents the number of entities and the number of relations, respectively, and d is the dimension of the vector representation. The input knowledge graph is represented by f, which represents the graph neural network model. Based on the entity-concept mapping and the shared relationships between the input graph and the pooling graph, the entity representations in the input graph are converted into concept representations, and the concept and relation representations in the pooling graph are initialized: in, This represents the initialization representation of the i-th concept in the pooling graph, n. c For the number of concepts, R p This represents the initial representation of the relationships in the pooling graph. Represents a concept-entity mapping matrix, where the elements M of the matrix are... c2e (j,k) being 1 or 0 indicates whether the j-th concept contains the k-th entity, m i Let be the total number of entities contained in the i-th concept.
7. The conceptual abstraction method based on pooling networks according to claim 1, characterized in that, In step 5, based on the initial concept and relation representations of the pooling graph, a graph neural network model is used to update the concept and relation representations on the pooling graph: in, For pooling graphs, C * , These are the updated concept representation and relation representation, C, R. p These represent the initial concept representation and relation representation, respectively, and f represents the graph neural network model; Based on the consistency between the output and input graphs, the conceptual representations in the pooling graph are converted into entity representations: Among them, E p The entity representation of concept transformation in a pooling graph. Represents the entity-concept mapping matrix, n e , where n is the number of entities. c For the number of concepts, (E) p ) i For the representation of the i-th entity, the elements M of the matrix e2c (j,k) being 1 or 0 indicates whether the j-th entity belongs to the k-th concept, n i Let i be the total number of concepts to which the i-th entity belongs; The entity representation in the output graph is initialized using the entity representations from the input graph and the pooling graph, and the relation representation in the output graph is initialized using the relation representation from the pooling graph. where E o denotes the initialized representation of entities in the output graph, R o denotes the representation of relations in the output graph, a e and a c denote the weights of entities in the input graph and the pooled graph, respectively, E g denotes the entity representation in the input.
8. The conceptual abstraction method based on pooling networks according to claim 1, characterized in that, In step 6, based on the initial entity and relation representations of the output graph, a graph neural network model is used to update the entity and relation representations on the output graph to obtain the final entity and relation representations. in, For the output image, These are the updated entity representation and relation representation, E. o ,R o denoted as the initial entity representation and relation representation of the output graph, respectively, and f represents the graph neural network model.
9. The conceptual abstraction method based on pooling networks according to claim 1, characterized in that, In step 7, the contrast loss between the input and output graphs. for: Where, x i This represents the entity representation on the input graph. x represents i The representation of positive samples is the representation of the same entity on the output graph, x i The negative samples are other entities in the currently sampled batch of entities, denoted as x. j P(i) and N(i) represent the positive and negative sample sets of the entity, respectively, and τ is the temperature; Contrast loss between input graph and pooling graph for: Where, x i This represents the entity representation on the input graph. x represents i The representation of the concept of belonging, c j Representation of other concepts in the currently sampled batch of entities; Contrast loss between pooling graph and output graph for: Where, x o This indicates the representation of entities on the output graph. x represents o The representation of the concept of belonging, c j This represents the representation of other concepts in the currently sampled batch of entities.
10. A conceptual abstraction device based on pooling networks, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the conceptual abstraction method based on pooling networks as described in any one of claims 1-9.
Citation Information
Patent Citations
Knowledge graph representation learning model method fusing entity description and path information
CN115438189A
Method and device for text-enhanced knowledge graph joint representation learning
US20220147836A1