Method and system for selecting primitives in heterogeneous graph representation learning based on partial order relation
By constructing structural grids and communication matrix, and automatically selecting primitives based on partial order relationships, the subjectivity problem of primitive selection in the existing technology is solved, and the standardization and performance improvement of heterogeneous graph representation learning is achieved.
Patent Information
- Application Number
- CN202510313528.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-07-04
AI Technical Summary
The lack of systematic element mining and selection methods in the prior art leads to the element selection process relying on heuristic methods or field expert intuition, and is unable to effectively capture the complex latent structures and relationships in heterogeneous graphs, affecting the performance of heterogeneous graph representation learning.
Using a partially ordered relationship-based method, by constructing a structural grid set and communication matrix, the primitives are automatically selected to ensure the hierarchical organization and relationship capture between the primitives, and the information is fused using Hadamama product operations to form a standardized primitive selection strategy.
It improves the objectivity and accuracy of element selection, enhances the generalization ability of the model, and improves the accuracy and reliability of heterogeneous graph representation learning, especially in downstream tasks such as node classification and link prediction.
Smart Images

Figure CN120256900A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of heterogeneous graph representation learning, and particularly to a method and system for selecting graph primitives in heterogeneous graph representation learning based on a partial order relationship. Background Art
[0002] The statements in this section merely provide background technical information related to the present invention and do not necessarily constitute prior art.
[0003] In recent years, in many research fields, data usually forms heterogeneous information networks, which contain various types of entities and relationships. As a powerful tool, heterogeneous graphs can effectively model these networks. Many studies have made remarkable progress in multiple fields, such as knowledge graph learning, biomedical science, disease diagnosis, and question answering systems. The complexity of heterogeneous graphs stems from their semantics, because the relationships between entities often require higher-order structures to effectively capture potential patterns. Simple node-pair connections (such as the relationship between two nodes) usually cannot capture the rich semantic information in real-world datasets. For example, in academic network datasets, understanding the cooperation relationships or research trends among authors requires not only analyzing the directly connected edges (such as the relationship between an author and a paper), but also analyzing multi-node interactions involving terms, conference locations, and other authors.
[0004] A graph primitive (structural pattern) is an induced subgraph used to capture repeated patterns of node connections in a heterogeneous network. Graph primitives are used to extract repeated and meaningful patterns in heterogeneous graphs, especially in cases where higher-order structures are required. Graph primitives are crucial in network representation modeling tasks, such as community detection and network alignment, etc., and they can improve accuracy and effectiveness. In graph learning, graph primitives provide valuable insights into the structure and dynamics of graphs, thereby enhancing the performance of tasks. Multiple graph learning frameworks have adopted graph primitives to achieve excellent results in tasks such as dense subgraph discovery and graph representation learning. For example, graph primitives can be restricted to patterns involving target node pairs, and their statistical features can be used as feature inputs.
[0005] Although the importance of graph primitives in heterogeneous graphs is self-evident, in existing research, the relationships between graph primitives are too complex to be effectively mined. Due to the lack of a systematic theoretical framework, graph primitive selection still faces challenges in the mining of heterogeneous graphs. Traditional methods, such as graph primitive-based random walks and metapath techniques, usually rely on heuristic rules or domain-specific knowledge, resulting in a subjective and inconsistent graph primitive selection process. In addition, fewer studies have systematically explored how different graph primitives affect the performance of graph representation learning, and the relationships between graph primitives and the impact of their selection on the learning effect have not been fully understood. In heterogeneous graph representation learning tasks, the research will face the following technical problems and difficulties:
[0006] 1. Lack of a systematic method to mine graph primitives.
[0007] Currently, in the field of heterogeneous graph representation learning, the mining of graph elements mostly relies on heuristic methods or the intuition of domain experts, which leads to limitations of the methods. Although heuristic methods can achieve good results in certain specific scenarios, they usually cannot effectively discover complex potential structures from large-scale heterogeneous graphs, especially when dealing with different types of nodes (such as authors, papers, institutions, etc.) and edges (such as cooperation relationships, citation relationships, etc.). In addition, most of the existing graph element mining methods lack systematic theoretical support and often cannot automatically adapt to the diversity and complexity in the graph structure. For example, there may be a large number of different interaction patterns between different types of nodes and edges, but traditional mining methods often cannot identify these hidden and relatively complex patterns. Therefore, there is an urgent need for a systematic graph element mining method that can automatically discover various types of graph elements from heterogeneous graphs and provide a basis for subsequent selection and application.
[0008] 2. Lack of a systematic graph element selection method.
[0009] In the field of heterogeneous graph representation learning, graph element selection is a key step in the graph element mining process. However, the existing selection methods often rely on heuristic rules or domain knowledge, resulting in strong subjectivity and instability. Specifically, which graph elements to select as model inputs usually depends on experience or the intuition of domain experts, lacking a theoretical framework to guide the selection process. This approach may not only ignore some potential and valuable graph elements but also lead to biases in the selection results, thereby affecting the performance of downstream tasks (such as node classification). Summary of the Invention
[0010] To solve the technical problems existing in the above background technology, the present invention provides a graph element selection method and system for heterogeneous graph representation learning based on a partial order relationship. The present invention conducts scientific evaluation based on the relationships between graph elements and can automatically select according to the structural characteristics, relationships of graph elements, and their impacts on downstream tasks, thereby ensuring that the selected graph elements can effectively improve the performance of the model and have strong generalization ability.
[0011] To achieve the above object, the present invention adopts the following technical solutions:
[0012] The first aspect of the present invention provides a graph element selection method for heterogeneous graph representation learning based on a partial order relationship.
[0013] A graph element selection method for heterogeneous graph representation learning based on a partial order relationship includes:
[0014] Based on the user-input heterogeneous graph, construct a set of structural lattices, determine the first core node set and the first non-core node set; for each node in the first non-core node set, construct graph elements in a loop to update the set of structural lattices;
[0015] Mining different primitive elements according to the set of structure lattices, so that the primitive elements are rationally and hierarchically organized by the partial order relationship, and obtaining the set of structure lattices and the set of primitive elements with a structured representation;
[0016] Defining a communication matrix C for the set of primitive elements, which is used to store the primitive element information extracted from the set of structure lattices to represent the interaction relationship between different nodes in the heterogeneous graph; based on the set of primitive elements and the set of first core nodes, calculating to obtain a set of second non-core nodes, and traversing each node in it, defining a new primitive element for each node, and extracting a second communication matrix from the mapping function to represent the interaction or correlation between the nodes constructed based on the new primitive element; iteratively traversing the nodes in the set of first non-core nodes and the set of second non-core nodes to obtain a second communication matrix that meets the conditions.
[0017] Further, the process of iteratively traversing the nodes in the set of first non-core nodes includes: taking the union of each node in the set of first non-core nodes and the set of first core nodes to obtain a new set of primitive elements; if the current set of structure lattices is empty, then assigning the newly obtained set of primitive elements to the set of structure lattices; if the set of structure lattices already has content, then updating the newly obtained set of primitive elements to the set of structure lattices.
[0018] Further, the process of iteratively traversing the nodes in the set of second non-core nodes includes: defining a new primitive element to represent the relationship between the nodes in the set of second non-core nodes; according to the new primitive element, extracting a corresponding second communication matrix from the mapping function; the mapping function is expressed as: where represents a primitive element of an original structure, and W represents the second communication matrix corresponding to the primitive element.
[0019] Further, if the communication matrix of the currently studied set of primitive elements is empty, then assigning the second communication matrix to the communication matrix of the currently studied set of primitive elements; otherwise, using the Hadamard product operation to calculate the communication matrix of the currently studied set of primitive elements.
[0020] Further, the Hadamard product operation is represented by the following formula:
[0021]
[0022] where C represents the communication matrix of the currently studied primitive element, and W represents the second communication matrix.
[0023] Further, the heterogeneous graph includes a node set, an edge set, a node type set, and an edge type set. The node set includes authors, papers, locations, institutions, and keywords, and the edge set includes publications, citations, and affiliations.
[0024] The second aspect of the present invention provides a primitive selection system in heterogeneous graph representation learning based on a partial order relation.
[0025] A primitive selection system in heterogeneous graph representation learning based on a partial order relation, comprising:
[0026] A heterogeneous graph input module, which is configured to: based on the heterogeneous graph input by the user, construct a set of structural lattices, determine a first core node set and a first non-core node set; for each node in the first non-core node set, construct primitives in a loop to update the set of structural lattices;
[0027] A structural lattice construction module, which is configured to: mine different primitives according to the set of structural lattices, so that the primitives are reasonably and hierarchically organized by the partial order relation, and obtain a set of structural lattices and a set of primitives with a structured representation;
[0028] A matrix transformation module, which is configured to: define a communication matrix C for the set of primitives, used to store the primitive information extracted from the set of structural lattices, to represent the interaction relationship between different nodes in the heterogeneous graph; based on the set of primitives and the first core node set, calculate a second non-core node set, and traverse each node in it, define a new primitive for each node, and extract a second communication matrix from the mapping function, used to represent the interaction or correlation between the nodes constructed based on the new primitives; iterate through the nodes in the first non-core node set and the second non-core node set to obtain a second communication matrix that meets the conditions.
[0029] The third aspect of the present invention provides a computer-readable storage medium.
[0030] A computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the steps in the primitive selection method in heterogeneous graph representation learning based on a partial order relation as described in the first aspect above.
[0031] The fourth aspect of the present invention provides a computer device.
[0032] A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, it implements the steps in the primitive selection method in heterogeneous graph representation learning based on a partial order relation as described in the first aspect above.
[0033] The fifth aspect of the present invention provides a computer program product or a computer program.
[0034] The present invention provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the primitive selection method in the heterogeneous graph representation learning based on the partial order relation as described in the first aspect above.
[0035] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0036] Based on the partial order principle in lattice theory, the present invention can constrain heterogeneous graph primitives in a structural lattice, effectively partition and organize the heterogeneous graph primitives. At the same time, the heterogeneous graph primitives are organized into a hierarchical structure, thus forming a clear hierarchical relationship. According to the path dependence and partial order relation of the lattice itself, a method for selecting heterogeneous graph primitives is proposed, which overcomes the dependence on subjective experience and intuition, and can provide an effective selection strategy for heterogeneous graph representation learning and improve the model performance. Specifically, the primitives in a heterogeneous graph are sorted and selected through the partial order relation, thus avoiding the interference of human factors. This not only improves the objectivity of primitive selection, but also ensures that the complex relationships between the primitives in the heterogeneous graph are comprehensively and accurately captured. This technology makes the primitive selection process in heterogeneous graph representation learning more standardized, and improves the accuracy and reliability of heterogeneous graph representation learning.
[0037] The present invention precisely partitions and systematically organizes heterogeneous graph primitives through the hierarchical organization of the structural lattice. The structural lattice can sort the primitives according to the partial order relation. By mining the partial order relation of the primitive set, the fixed edge types between different nodes are used to determine the hierarchical relationship of the primitives, ensuring that the hierarchical relationship and dependence between the primitives are effectively captured. In the generation of the communication matrix, the Hadamard product operation further ensures the pairwise dependence relationship and the transmission of the hierarchical structure between the primitives, ensuring the correctness of information fusion and the hierarchical expression of the primitive relationship, and obtaining the primitives corresponding to the input graph structure in the heterogeneous graph dataset. This method overcomes the deficiencies of the traditional method, can comprehensively reflect the global relationship between the primitives, provides a more accurate framework for graph representation learning, and improves the model's ability to express complex relationships. The present invention can precisely partition and systematically organize the primitives in the heterogeneous graph. This process partitions the primitives in the heterogeneous graph according to the hierarchical structure, ensuring that the hierarchical relationship and dependence between different types of nodes and edges are effectively captured. For example, the cooperation relationship between scholars and the citation relationship between papers and scholars can be fully reflected through this hierarchical structure. This technology provides a more accurate and comprehensive framework for expressing complex node relationships in the heterogeneous graph, enhancing the effect of heterogeneous graph representation learning.
[0038] By optimizing the primitive selection strategy, the present invention effectively improves the generalization ability of the model. The primitive relationships provided by the structure lattice can help the model better learn the global structure of the graph, and thus show stronger adaptability in downstream tasks. Experimental results show that the optimized primitive selection strategy significantly improves the model performance in tasks such as node classification, reduces the risk of overfitting, and enhances the generalization ability of the model. Experimental results show that the optimized primitive selection strategy significantly improves the model performance in tasks such as node classification and link prediction in heterogeneous graph representation learning, and enhances the generalization ability of the model. Through this method, the performance of prediction tasks, classification tasks, and other types of tasks in heterogeneous graph downstream tasks can also be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings forming a part of this specification are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention.
[0040] Figure 1 is a flowchart of a primitive selection method in heterogeneous graph representation learning based on a partial order relationship shown in the present invention;
[0041] Figure 2 is a schematic diagram of a primitive selection method in heterogeneous graph representation learning based on a partial order relationship shown in the present invention;
[0042] Figure 3 is a schematic diagram of a process algorithm for constructing a structure lattice set shown in the present invention;
[0043] Figure 4 is a schematic flowchart of a process for mining heterogeneous graph primitives based on the constructed structure lattice shown in the present invention;
[0044] Figure 5 is a schematic flowchart of a process for objectively selecting a primitive combination based on a partial order relationship shown in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0046] It should be noted that the following detailed description is illustrative and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0047] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular forms are also intended to include the plural forms. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they specify the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0048] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of methods and systems according to various embodiments of the present disclosure. It should be noted that each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code may include one or more executable instructions for implementing the logical functions specified in each embodiment. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. Similarly, it should be noted that each block in the flowchart and / or block diagram, and the combinations of blocks in the flowchart and / or block diagram, may be implemented using a dedicated hardware-based system for performing the specified functions or operations, or may be implemented using a combination of dedicated hardware and computer instructions.
[0049] Embodiment 1
[0050] As Figure 1 shown, this embodiment provides a method for selecting graph elements in heterogeneous graph representation learning based on a partial order relationship. This embodiment takes the application of this method to a server as an example. It can be understood that this method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, web servers, cloud communications, middleware services, domain name services, security services CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal and the server can be directly or indirectly connected through wired or wireless communication methods, and this application does not limit this here. In this embodiment, the method includes the following steps:
[0051] Based on the heterogeneous graph input by the user, construct a set of structural lattices and determine the first core node set V c (1)and the first non-core node set V o (1) ; for each node in the first non-core node set, cyclically construct graph elements to update the set of structure lattices;
[0052] Mine different graph elements from the set of structure lattices so that the graph elements are reasonably and hierarchically organized by the partial order relationship, obtaining a set of structure lattices and a set of graph elements represented in a structured manner;
[0053] Define a communication matrix C for the set of graph elements, which is used to store the graph element information extracted from the set of structure lattices to represent the interaction relationships between different nodes in the heterogeneous graph; based on the set of graph elements and the first core node set V c (1) , calculate to obtain the second non-core node set V o (2) , and traverse each node in it, define new graph elements for each node, extract the second communication matrix from the mapping function, which is used to represent the interaction or correlation between the nodes constructed based on the new graph elements; iterate through the process of traversing the nodes in the first non-core node set and the second non-core node set to obtain the second communication matrix that meets the conditions.
[0054] The overall idea proposed by the present invention is: First, receive the heterogeneous graph data G=(V, E, T V , T E ), which includes the node set V, edge set E, node type set T V and edge type set T E . Then, use the structure lattice theory to model the heterogeneous graph and construct a set of structure lattices X m containing various graph elements, and mine out the graph elements with potential regularity from it. Next, represent the mined graph elements as a communication matrix, and effectively select the graph elements according to the partial order relationship of the structure lattice to ensure that the selected graph elements conform to the hierarchy and constraints of the graph structure. Finally, by performing standardization processing on the selected graph elements, generate data suitable for the heterogeneous graph representation learning task, further improve the performance of the model in downstream tasks, and enhance the accuracy and generalization ability of the model.
[0055] The following details the method for selecting graph elements in the heterogeneous graph representation learning based on the partial order relationship described in this embodiment, as shown in Figure 2 , Figure 3 . The embodiment selects the ACM academic network dataset (a heterogeneous graph dataset), and through necessary data cleaning and node screening, obtains the final data set G participating in the algorithm, and a core node set; this core node set includes two types of nodes: P papers and T terms, representing the core nodes in the representation task.
[0056] Represent this dataset as a heterogeneous graph data \(G=(V, E, T V ,T E ), where \(V\) represents the set of nodes in the graph, \(E\) represents the set of edges, and \(T V represents the set of node types, and \(T E represents the set of edge types; and a set of core nodes \(V c (1) . The set of non-core nodes composed of other nodes in the \(V\) set is denoted as \(V o (1) . For example, in the ACM dataset, the node set includes authors (A - author), papers (P - paper), venues (V - venue), faculties (F - faculty), keywords (T - term); the edge set includes publish, citation, belong, etc. Including:
[0057] Step 1: According to the actual situation, the user selects a heterogeneous graph data. In this embodiment, the academic network dataset (ACM) is selected and input into the system. Selecting the set of core nodes can help the system focus on the most important node information, avoid the interference of irrelevant nodes, and improve the efficiency of subsequent analysis. Selecting the set of core nodes can obtain a more accurate modeling direction. For example, in the ACM academic network, the selection of the set of core nodes determines which information (such as papers and keywords) is the focus of analysis, which lays the foundation for the construction of graph elements.
[0058] Step 2: For the heterogeneous graph input by the user, after completing data cleaning and the construction of set elements, construct the set of structural lattices, initialize the set of structural lattices \(X m , and determine the set of core nodes \(V c (1) =\{P, T\}\). According to the input set of core nodes \(V c (1) calculate the set of non-core nodes \(V o (1) . For each non-core node, number \(i\) (\(i = 1\) to \(n\)), and loop to construct graph elements to update the set of structural lattices. After each loop ends, update the graph element \(M i set (such as \(\{P, A, T\}\)) to the set \(X m . For the ACM dataset, the finally constructed set is:
[0059] \{\{P, T\}, \{P, A, T\}, \{P, V, T\}, \{P, F, T\}, \{P, A, V, T\}, \{P, V, F, T\}, \{P, F, A, T\}, \{P, V, A, F, T\}\}.
[0060] The construction of the structural lattice set is the core step of this method. By organizing the nodes according to their relationships, a structural lattice set containing the core nodes can be generated. Each structural lattice set X m contains multiple graph elements, and each graph element represents different nodes and their relationships. Constructing these graph elements helps to analyze the graph data from multiple dimensions and discover potential complex relationships between nodes.
[0061] Step 3: For the constructed set, since the types of edges between different nodes are fixed, for example, the edge between P and A is fixed as the publish relationship, therefore, different graph elements can be mined according to the structural lattice set X m and placed at different hierarchical levels according to the structural lattice set. In this way, the graph elements are clearly organized in a reasonable and hierarchical manner by the partial order relationship. A structural lattice set and its corresponding set of graph elements are constructed. The structured representation helps further analysis, such as the relative relationships and priorities between graph elements, and can improve the expressiveness and efficiency of the model.
[0062] Step 4: For the mined graph elements, define a corresponding communication matrix C to store the graph element information extracted from the structural lattice. Based on the input set of graph elements M i and the set of core nodes V c (1) , calculate the set of non-core nodes V o (1) = M i \V c (1) , and calculate its size n = |V o (1) |. Then, traverse the set of non-core nodes V o (1) . For each subset define a new graph element and extract the corresponding matrix from the communication matrix mapping function Map If the current communication matrix is empty, then assign to C; otherwise, use the Hadamard product operation to update the matrix. Finally, output the updated communication matrix C. By constructing the communication matrix, the communication relationships (i.e., the weight relationships of the edges) between nodes can be effectively captured. The Hadamard product update mechanism ensures that the elements of the communication matrix are multiplied term by term, which can effectively integrate the information between different graph elements. In this process, the communication matrix not only stores the relationship information between nodes, but also can further retain the interaction of different graph element information through the Hadamard product.
[0063] Step 5: Select graph elements according to the structure of the lattice itself and the partial order relationship. The graph elements have been represented as specific communication matrices at this step, and the calculation process of the communication matrix has been mentioned above. Therefore, when selecting graph elements, the corresponding communication matrix is default selected in this step. As Figure 4 、 Figure 5 shown, graph elements of the same hierarchical structure can be selected for combination as data for downstream tasks.
[0064] {{P,A,T},{P,V,T},{P,F,T}} and {{P,A,V,T},{P,V,F,T},{P,F,A,T}}.
[0065] Selecting appropriate graph elements is crucial for downstream tasks. Through partial order relationship mining and graph element selection, it can be ensured that downstream tasks only use the most relevant graph element information, thereby reducing computational complexity and improving the effect of the tasks.
[0066] The present invention eliminates the graph element selection method that relies on subjective experience and intuition in traditional methods, and performs automated selection through the partial order relationship, avoiding the interference of human factors. This improvement makes the graph element selection more objective and enhances the accuracy and reliability of the model. The model can automatically make reasonable selections based on mathematical theories, thereby improving the effect of graph representation learning.
[0067] This embodiment details an implementation manner of the method for mining heterogeneous graph elements and selecting heterogeneous graph elements based on the partial order relationship of the discrete lattice theory. When using the method of the present invention, users should not be limited to the manner described in this embodiment and can make appropriate adjustments according to their own business and actual situations.
[0068] Embodiment 2
[0069] This embodiment provides a graph element selection system in heterogeneous graph representation learning based on a partial order relationship, including:
[0070] A heterogeneous graph input module for receiving and processing a heterogeneous graph from an external data source or database to ensure that the input graph data format meets the requirements of subsequent processing. Specifically, the module parses the node set and edge set in the graph and extracts the node type set and edge type set from them. These type information will be used as the input of the system to provide a basis for subsequent graph element mining and structural analysis.
[0071] Specifically, initialize the lattice set X m , input a heterogeneous graph G=(V,E,T V ,T E ), where: V is the node set in the graph, E is the edge set in the graph, T V is the node type set, and T E is the edge type set.
[0072] In addition, the input also includes a set V of core nodes c (2) ={K1, K2}, and this set represents the graph elements that play a core role in the downstream tasks.
[0073] A data processing module, which is used to reasonably partition the data in the heterogeneous graph, optimize the organizational structure of nodes and edges, so as to capture the local structure information of the graph. This module adopts a graph partitioning algorithm, and by optimizing the grouping of nodes and edges in the graph, it effectively improves the structural degree of the graph data, enabling downstream tasks to better mine the potential patterns and relationships of the graph.
[0074] Specifically, according to the input set V of core nodes c (2) calculate the set V of non-core nodes o (2) , that is:
[0075] V o (2) = T V \ V c
[0076] where V o (2) is the set of all non-core nodes in the graph.
[0077] Calculate the number of elements in the set V of non-core nodes o (2) , that is:
[0078] n = |V o (2) |
[0079] where n represents the number of non-core nodes.
[0080] A structure lattice construction module, which is used to construct a structure lattice according to the processed data, and organize the graph elements into a hierarchical structure through a partial order relationship. The hierarchical organization method is convenient for expressing and comparing the relationships between graph elements, thus providing a clear framework for subsequent graph element mining and selection. In this process, the module not only captures the basic structure of nodes and edges in the graph, but also reveals the potential dependency relationships between them.
[0081] Specifically, for each non-core node, numbered i (i = 1 to n), construct graph elements in a loop; including the following sub-steps:
[0082] Fetch nodes: Fetch node elements
[0083] Construct new graph elements: Construct a new set M of graph elements i = vi ∪V c (2) , which combines the node v i and the core node set to construct a new graph element;
[0084] Update the structure lattice set: If the current structure lattice set X m is empty, assign the graph element set M i to X m ; otherwise, update the graph element set M i to the set X m ;
[0085] Output the structure lattice set X m .
[0086] The graph element mining module is used to perform graph element mining on the structure lattice, scan the local structures in the graph to identify and extract frequently occurring subgraph patterns. The extracted graph elements serve as the basic units in graph representation learning and are further screened and selected through the partial order relationship. The goal of this module is to identify meaningful and recurring structural patterns from complex heterogeneous graphs and provide representative and efficient inputs for graph representation learning tasks.
[0087] The matrix transformation module is used to transform the mined graph elements and the relationships between them into matrix form for efficient storage and processing in subsequent calculation processes. This transformation ensures the compactness and efficiency of data in mathematical operations and provides a more convenient calculation format for subsequent graph representation learning. The matrix representation method can simplify the operations of complex graph data and make the processing of graph elements and relationships more standardized and automated.
[0088] Specifically, the present invention discloses a method for converting specific graph elements in the constructed structure lattice X m into a specific communication matrix for constructing standard input information for the model of heterogeneous graph representation learning, including the following steps:
[0089] Initialize a communication matrix This matrix will store the graph element information extracted from the structure lattice; Initialize a mapping function of the basic graph element matrix represents a graph element of an original structure, and W represents the basic matrix corresponding to the graph element.
[0090] Define the non-core node set. Based on the input structure lattice graph element set M i and the core node V c , calculate the non-core node set V o , that is:
[0091] V o = M i\K
[0092] Among them, V o is the set of non-core nodes after removing the core node K from the set M i ;
[0093] Calculate the number of elements in the non-core node set V o , denoted as n = |V o |, and this quantity is used to traverse the nodes subsequently;
[0094] Traverse the non-core node set V o , and for each subset perform the following further operations:
[0095] Define a new primitive to represent the relationship between the elements in this subset . Due to the network structure of the heterogeneous graph itself, the edges between the element nodes are fixed, so is uniquely determined;
[0096] According to this primitive extract the corresponding matrix W from the mapping function Map;
[0097] Update the communication matrix and determine whether the current communication matrix C is empty. If it is empty, assign the current matrix W to C; otherwise, update the communication matrix C using the Hadamard Product, that is:
[0098]
[0099] Among them, represents the Hadamard product operation of multiplying elements term by term.
[0100] Output the final communication matrix C, which represents the interaction relationship between the nodes in the primitive.
[0101] In this step, after completing the matrix update, finally output the communication matrix C, which is the communication matrix constructed based on the input primitive.
[0102] The method of constructing a structure lattice from a heterogeneous graph primitive and the method of converting a structure lattice primitive into a communication matrix can be combined to constrain the heterogeneous graph primitive in the structure lattice data structure, and use the partial order relationship to model it and select the primitive, while generating a standardized communication matrix to provide standard data for heterogeneous graph representation learning.
[0103] The standardized data generation module is used to perform standardized processing on the transformed matrix data to ensure the consistency of all data in terms of range and unit. Through standardization, the module makes the data more comparable between different graph elements and different relationships, thus providing a more stable and efficient input for subsequent graph representation learning tasks. This step ensures the unity of data processing and helps to improve the stability and effectiveness of model training.
[0104] The present invention provides a graph element selection system in heterogeneous graph representation learning based on a partial order relationship. Through graph element mining and selection based on the partial order relationship, the accuracy and reliability of heterogeneous graph representation learning are improved; the graph elements are automatically partitioned and selected, eliminating human interference and enhancing the generalization ability of the model; by optimizing the graph element selection strategy, the performance of downstream tasks (such as node classification) is effectively improved; and it can be easily deployed online.
[0105] Embodiment III
[0106] This embodiment provides a computer-readable storage medium with a computer program stored thereon. When the program is executed by a processor, it implements the steps in the graph element selection method in heterogeneous graph representation learning based on a partial order relationship as described in Embodiment I above.
[0107] Embodiment IV
[0108] This embodiment provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in the graph element selection method in heterogeneous graph representation learning based on a partial order relationship as described in Embodiment I above.
[0109] Embodiment V
[0110] This embodiment provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to execute the steps in the graph element selection method in heterogeneous graph representation learning based on a partial order relationship as described in Embodiment I above.
[0111] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories and optical memories, etc.) containing computer-usable program code.
[0112] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce means for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.
[0113] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.
[0114] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or means for implementing the functions specified in one or more of the blocks.
[0115] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0116] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for selecting graph primitives in heterogeneous graph representation learning based on a partial order relation, characterized in that Including: Based on the heterogeneous graph input by the user, construct a set of structural lattices, and determine the first core node set and the first non-core node set; For each node in the first non-core node set, cyclically construct graph elements to update the set of structural lattices; Mine different graph elements according to the set of structural lattices, so that the graph elements are reasonably organized in a hierarchical manner by the partial order relationship, and obtain the set of structural lattices and the set of graph elements represented in a structured manner; Define a communication matrix C for the set of graph elements, which is used to store the graph element information extracted from the set of structural lattices to represent the interaction relationship between different nodes in the heterogeneous graph; based on the set of graph elements and the first core node set, calculate the second non-core node set, and traverse each node in it, define a new graph element for each node, and extract the second communication matrix from the mapping function, which is used to represent the interaction or correlation between the nodes constructed based on the new graph element; iterate through the nodes in the first non-core node set and the second non-core node set to obtain the second communication matrix that meets the conditions.
2. The method for selecting graph elements in heterogeneous graph representation learning based on a partial order relationship according to claim 1, wherein The process of iteratively traversing the nodes in the first non-core node set includes: taking the union of each node in the first non-core node set and the first core node set to obtain a new set of graph elements; if the current set of structural lattices is empty, assign the newly obtained set of graph elements to the set of structural lattices; if the set of structural lattices already has content, update the newly obtained set of graph elements into the set of structural lattices.
3. The method for selecting graph elements in heterogeneous graph representation learning based on a partial order relation according to claim 1, characterized in that The process of iteratively traversing the nodes in the second non-core node set, the method includes: defining a new graph element representing the relationship between the nodes in the second non-core node set; extracting a corresponding second communication matrix from the mapping function according to the new graph element; the mapping function is expressed as: where represents a graph element of an original structure, and W represents the second communication matrix corresponding to the graph element.
4. The method for selecting graph elements in heterogeneous graph representation learning based on partial order relationship according to claim 1, wherein If the communication matrix of the currently studied set of graph elements is empty, assign the second communication matrix to the communication matrix of the currently studied set of graph elements; otherwise, use the Hadamard product operation to calculate the communication matrix of the currently studied set of graph elements.
5. The method for selecting graph elements in heterogeneous graph representation learning based on partial order relation according to claim 4, wherein The Hadamard product operation is represented by the following formula: where C represents the communication matrix of the currently studied graph element, and W represents the second communication matrix.
6. The method for selecting graph elements in heterogeneous graph representation learning based on a partial order relationship according to claim 1, wherein, The heterogeneous graph includes a node set, an edge set, a node type set, and an edge type set. The node set includes authors, papers, locations, institutions, and keywords. The edge set includes publication, citation, and attribution.
7. A primitive selection system in heterogeneous graph representation learning based on a partial order relation, characterized in that Including: A heterogeneous graph input module, which is configured to: based on the heterogeneous graph input by the user, construct a set of structural lattices, and determine the first core node set and the first non-core node set; For each node in the first non-core node set, cyclically construct graph elements to update the set of structural lattices; A structural lattice construction module, which is configured to: mine different graph elements according to the set of structural lattices, so that the graph elements are reasonably organized in a hierarchical manner by the partial order relationship, and obtain the set of structural lattices and the set of graph elements represented in a structured manner; A matrix transformation module, which is configured to: define a communication matrix C for a set of primitive elements, for storing primitive element information extracted from a set of structural lattices, to represent the interaction relationships between different nodes in a heterogeneous graph; calculate a second non-core node set based on the set of primitive elements and the first core node set, and traverse each node therein, define a new primitive element for each node, and extract a second communication matrix from the mapping function, for representing the interaction or correlation between nodes constructed based on the new primitive elements; iterate through the process of traversing the nodes in the first non-core node set and the second non-core node set to obtain a second communication matrix that meets the conditions.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the steps in the primitive element selection method in the heterogeneous graph representation learning based on the partial order relationship described in any one of claims 1-6.
9. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the primitive element selection method in the heterogeneous graph representation learning based on the partial order relationship described in any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program, which, when executed by a processor, implements the steps in the primitive element selection method in the heterogeneous graph representation learning based on the partial order relationship described in any one of claims 1-6.