A method and system for representing heterogeneous graph elements based on Euler paths

Through the heterogeneous element representation method based on Euler path, the limitations and artificial dependence problems of existing models when capturing complex semantic relationships are solved, and effective representation and efficient capture of complex structures in heterogeneous information networks are realized.

CN114329079BActive Publication Date: 2024-11-26SHANDONG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111612657.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2024-11-26
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

Existing models have limitations in chain relationships when capturing complex semantic relationships in heterogeneous information networks, rely on artificial predefined, resulting in information loss and structural redundancy, and are not suitable for rich types of heterogeneous information networks.

Method used

Using a heterogeneous element representation method based on Euler path, by obtaining heterogeneous information network, estimating the element distribution, selecting the largest unrelated element, converting it to Euler path, and using the attention mechanism to learn nodes and elementals The weight between the nodes is realized.

Benefits of technology

Effectively capture tree-like or mesh-like complex semantic relationships, reduce human dependence, improve the speed and accuracy of model capture metapaths, and is suitable for heterogeneous information networks with rich node and edge types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329079B_ABST
    Figure CN114329079B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of heterogeneous information networks, and provides a heterogeneous graph element representation method and system based on Euler paths. The method includes obtaining a heterogeneous information network, estimating the distribution of heterogeneous graph elements; selecting a number of heterogeneous graph elements with the greatest degree of irrelevance from all categories of heterogeneous graph elements, and converting the selected heterogeneous graph elements into corresponding Euler paths; using the attention mechanism within the heterogeneous graph element, learning the weights between the nodes and the neighbors on the Euler paths corresponding to the heterogeneous graph elements, and then obtaining the node representation within the heterogeneous graph element; using the attention mechanism between heterogeneous graph elements, learning the weights between different heterogeneous graph elements, and then obtaining the node representation between heterogeneous graph elements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of heterogeneous information networks, and in particular relates to a heterogeneous graph element representation method and system based on Euler paths. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] In the real world, many data such as academic networks and movie networks can be represented as heterogeneous information networks (HINs) or heterogeneous graphs. Heterogeneous information networks are structured data containing multiple types of entities and multiple types of relationships. In recent years, research based on heterogeneous information networks has attracted the attention of a large number of researchers to solve tasks such as social networks, network mining, and recommendations. For example, Figure 2(a) shows an academic network that contains nodes of author, paper, conference, and term type. Heterogeneous information networks contain rich structural relationships, and a large number of models have been proposed to capture the complex structural relationships in heterogeneous information networks and improve the performance of models in specific tasks. Although these models have good performance on their respective problems, they still have the following shortcomings:

[0004] (1) Most existing models use metapath to capture the interaction relationship between nodes in heterogeneous information networks. However, this method can only capture chain relationships and cannot effectively capture complex semantic relationships in tree or network form. Figure 2(b) can only represent the co-operation relationship between A1 and A3, and cannot represent complex relationships such as those shown in Figure 2(c);

[0005] (2) Existing models rely on artificial pre-definition to capture meta-paths, which requires the model designer to have a deep understanding of the specific data. This not only consumes a lot of pre-definition time, but also causes the performance of the model to be greatly affected by human factors. For example, to define a meta-path as shown in Figure 2(b), the designer needs to have a good understanding of the academic network data.

[0006] (3) The introduction of multiple complex high-order structures indicates that there are rich semantic relationships. When representing them, more effective methods are needed to reduce the information loss and structural redundancy of nodes and edges. For example, there is a certain structural redundancy between Figure 2(b) and Figure 2(c), which needs to be processed when representing them;

[0007] (4) Most existing methods for mining complex structures are based on homogeneous information networks with a single node type and edge type, which are not suitable for heterogeneous information networks with rich node and edge types, and the above methods are relatively inefficient. Summary of the invention

[0008] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a heterogeneous graph element representation method and system based on Euler path, which can mine the distribution of complex structures in heterogeneous information networks and effectively represent these complex structures.

[0009] In order to achieve the above object, the present invention adopts the following technical solution:

[0010] A first aspect of the present invention provides a heterogeneous primitive representation method based on an Euler path, comprising:

[0011] Obtain heterogeneous information networks and estimate the distribution of heterogeneous graph elements;

[0012] Selecting a number of heterogeneous graph elements with the greatest degree of irrelevance from all categories of heterogeneous graph elements;

[0013] Convert the selected heterogeneous primitives into corresponding Euler paths;

[0014] By utilizing the attention mechanism within heterogeneous graphs, the weights between nodes and neighbors on the Euler path corresponding to the heterogeneous graphs are learned, thereby obtaining the node representation within the heterogeneous graphs; by utilizing the attention mechanism between heterogeneous graphs, the weights between different heterogeneous graphs are learned, thereby obtaining the node representation between heterogeneous graphs.

[0015] A second aspect of the present invention provides a heterogeneous graph primitive representation system based on Euler paths, comprising:

[0016] A heterogeneous graph element distribution estimation module, which is used to obtain a heterogeneous information network and estimate the distribution of heterogeneous graph elements;

[0017] A heterogeneous image element de-redundancy sorting module is used to select a number of heterogeneous image elements with the greatest degree of irrelevance from all categories of heterogeneous image elements;

[0018] An Euler path conversion module, which is used to convert the selected heterogeneous primitives into corresponding Euler paths;

[0019] The heterogeneous graph representation output module is used to utilize the attention mechanism within the heterogeneous graph to learn the weights between the nodes and the neighbors on the Euler path corresponding to the heterogeneous graph, and then obtain the node representation within the heterogeneous graph; utilize the attention mechanism between heterogeneous graphs to learn the weights between different heterogeneous graphs, and then obtain the node representation between heterogeneous graphs.

[0020] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the heterogeneous graph primitive representation method based on Euler paths as described above.

[0021] A fourth aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the heterogeneous graph element representation method based on Euler paths as described above are implemented.

[0022] Compared with the prior art, the present invention has the following beneficial effects:

[0023] (1) The present invention is guided by heterogeneous graphs, estimates the distribution of heterogeneous graphs, and uses the number of nodes in the heterogeneous graphs to achieve the effect of covering as many semantics as possible, thereby effectively capturing complex semantic relationships in tree or network form.

[0024] (2) The present invention utilizes the attention mechanism within heterogeneous graph elements to learn the weights between nodes and neighbors on the Euler path corresponding to the heterogeneous graph elements, thereby obtaining the node representation within the heterogeneous graph elements; and utilizes the attention mechanism between heterogeneous graph elements to learn the weights between different heterogeneous graph elements, thereby obtaining the node representation between heterogeneous graph elements. In this way, the capture of meta-paths does not rely on artificial pre-definition, thereby improving the speed and accuracy of capturing meta-paths.

[0025] (3) The present invention selects several heterogeneous graph elements with the greatest degree of irrelevance from all categories of heterogeneous graph elements, and performs redundancy sorting on the heterogeneous graph elements to maximize semantics and minimize structural redundancy, thereby accelerating the prediction speed.

[0026] (4) The present invention uses Euler paths to transform heterogeneous graph elements, which solves the problem of representing the lost structural relationship information of heterogeneous graph elements. It is suitable for heterogeneous information networks with rich node and edge types, and achieves the purpose of mining the distribution of complex structures in heterogeneous information networks and effectively representing these complex structures.

[0027] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0029] Figure 1 is a flow chart of a heterogeneous graph primitive representation method based on Euler path according to an embodiment of the present invention;

[0030] Figure 2(a) is a schematic diagram of the academic network;

[0031] Figure 2(b) is a sample diagram of the metapath;

[0032] Figure 2(c) is an example of a heterogeneous primitive;

[0033] FIG3( a ) is a heterogeneous graph element with 5 nodes according to an embodiment of the present invention;

[0034] FIG3( b ) is a schematic diagram of the Euler path conversion of FIG3( a );

[0035] Figure 4 It is a schematic diagram of the structure of a heterogeneous graph element representation system based on Euler paths according to an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0037] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0038] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0039] Embodiment 1

[0040] like Figure 1 As shown, this embodiment provides a heterogeneous graph primitive representation method based on Euler path, which specifically includes the following steps:

[0041] Step 1: Obtain a heterogeneous information network and estimate the distribution of heterogeneous graph elements.

[0042] In a specific implementation, the heterogeneous information network includes the number of nodes and edges and the node types.

[0043] Specifically, the process of estimating the distribution of heterogeneous primitives in step 1 is:

[0044] Step 1.1: Randomly select a node from the heterogeneous graph as the initial node.

[0045] For example: given a heterogeneous graph Where ν represents a set of nodes, ε represents a set of edges, and a node is randomly selected from ν as the initial node and added to an empty queue Queue.

[0046] Step 1.2: Select a set number of nodes from the heterogeneous graph according to the geometric distribution of each node in the heterogeneous graph.

[0047] For example: remove a node current_node from the queue, and select the first num nodes with the largest degrees from the neighboring nodes of current_node, where num follows a geometric distribution with parameter p.

[0048] Step 1.3: Add the above selected nodes and corresponding edges to the heterogeneous graph to be generated.

[0049] For example: the edges connecting the above-selected num nodes and current_node and the edges between num nodes are added to the heterogeneous graph elements to be generated.

[0050] Step 1.4: Repeat the above process until the number of nodes reaches the preset maximum value.

[0051] For example: Repeat the above process until the Queue is empty or the number of nodes reaches the preset maximum number of nodes max.

[0052] Step 1.5: Finally, classify the heterogeneous primitives according to their heterogeneous structures.

[0053] Repeating the above process will result in a large number of heterogeneous primitives. For the heterogeneous primitives obtained, the heterogeneous isomorphic primitives are classified into one category to obtain a heterogeneous primitive set

[0054] In view of the above method of generating heterogeneous primitives, in order to include as many node types as possible, the theoretical proof and upper bound estimation of the value of num are given below. The specific process is as follows:

[0055] Let X represent the number of nodes included in the heterogeneous graph until the last type of node is selected, and solve its expectation E[x]. i It means that after obtaining i-1 types of nodes, the number of nodes that need to be selected to obtain the i-th type of node is obviously Decompose the random variable X into n random variables X i , i = 1, ..., n has the advantage that every X i All obey the geometric distribution.

[0056] When i-1 node types have been obtained, the probability of obtaining a new node type therefore, According to the linear additivity of mathematical expectation, we can conclude that:

[0057] in, is a harmonic number H(n), and ln(n+1)≤H(n)≤lnn+1.

[0058] It can be concluded that the probability of not selecting all types of nodes after 2(n) steps is:

[0059]

[0060] Therefore, choose no more than Each heterogeneous graph element can contain as many node types as possible to achieve the purpose of covering structural semantics.

[0061] Step 2: Select several heterogeneous graph elements with the greatest degree of irrelevance from all categories of heterogeneous graph elements.

[0062] In the specific implementation process, before selecting a number of heterogeneous graphic elements with the greatest degree of irrelevance, the following steps are also included:

[0063] Various types of heterogeneous graphs are sorted based on Jaccard coefficients.

[0064] For example, the heterogeneous graph elements are sorted based on Jaccard coefficients, and the first K heterogeneous graph elements are selected to obtain K heterogeneous graph elements with the greatest degree of irrelevance.

[0065] for For each pair of heterogeneous primitives in , compute:

[0066]

[0067] Where l(v 1i ,v 1j |H) represents node v 1i and node v 1j The reachability probability between them through heterogeneous graph elements H, Y ij Indicates the node type.

[0068] In order to reduce computation and load redundancy, the present invention selects Top_K heterogeneous primitives and deletes the remaining heterogeneous primitives. Finally, a set of heterogeneous primitives is obtained.

[0069] Step 3: Convert the selected heterogeneous primitives into corresponding Euler paths.

[0070] For example: let w=(v1,e1,v2,e2,…,v n ,e n ,v n+1) represents a path in the graph, where v i represents a node, e i denotes an edge. Then, an Euler path is a path that contains a copy of all the edges in the graph.

[0071] Figure 3(a) shows a heterogeneous graph with 5 nodes. An Euler path of the heterogeneous graph can be expressed as w = (v e ,e1,v a ,e2,v b ,e3,v c ,e4,v a ,e5,v d ,e6,v b ), the path is shown in Figure 3(b). For each heterogeneous primitive in , perform the above operation and output a set of Euler paths

[0072] Step 4: Using the intro-hetGraphlets attention mechanism, learn the weights between the nodes and the neighbors on the Euler path corresponding to the heterogeneous graphlets, and then obtain the node representation within the heterogeneous graphlets; using the inter-hetGraphlets attention mechanism, learn the weights between different heterogeneous graphlets, and then obtain the node representation between heterogeneous graphlets.

[0073] Among them, the softmax function is used to normalize the weights between nodes and neighbors on the Euler path corresponding to heterogeneous graph elements. The softmax function is used to normalize the weights between different heterogeneous graph elements.

[0074] In the specific implementation, the attention mechanism in the heterogeneous graph is used to learn the weights between the nodes and the neighbors on the Euler path corresponding to the heterogeneous graph, and then the process of obtaining the node representation in the heterogeneous graph is as follows:

[0075] (1) Calculate the weight between node i and its neighbors on the Euler path corresponding to the heterogeneous graph element h:

[0076] where a T represents the attention vector, LeakyReLU represents the activation function, and u i and u j Represents the feature vector of node i and node j;

[0077] (2) Use the softmax function to normalize these weights, calculated as follows:

[0078] in Represents the set of neighbor nodes of node i in the heterogeneous graph h.

[0079] (3) The nodes in the heterogeneous graph are represented as:

[0080] Where C represents the number of attention heads of multi-head attention, σ represents the activation function, and || represents the concatenation of vectors.

[0081] In the specific implementation, the attention mechanism between heterogeneous graph elements is used to learn the weights between different heterogeneous graph elements, and then the process of obtaining the node representation between heterogeneous graph elements is as follows:

[0082] (1) First, map the node features through a one-layer MLP layer, and then standardize the weights between all nodes. The calculation process is:

[0083] where q T represents the attention vector, W represents the transformation matrix, and tanh represents the linear layer.

[0084] (2) Use the softmax function to normalize the above weights. The calculation process is as follows:

[0085] in β h Represents the weight of the heterogeneous primitive h.

[0086] (3) Node v i The final representation is:

[0087]

[0088] Embodiment 2

[0089] like Figure 4 As shown, this embodiment provides a heterogeneous graph primitive representation system based on Euler path, which specifically includes the following modules:

[0090] (1) A heterogeneous graph element distribution estimation module, which is used to obtain a heterogeneous information network and estimate the distribution of heterogeneous graph elements;

[0091] In the specific implementation process, the process of estimating the distribution of heterogeneous primitives is:

[0092] Randomly select a node from the heterogeneous graph as the initial node;

[0093] Selecting a set number of nodes from the heterogeneous graph according to the geometric distribution of each node in the heterogeneous graph;

[0094] Add the above selected nodes and corresponding edges to the heterogeneous graph primitives to be generated;

[0095] Repeat the above process until the number of nodes reaches the preset maximum value;

[0096] Finally, classification is performed based on the heterogeneous structures of heterogeneous primitives.

[0097] (2) a heterogeneous image element de-redundancy sorting module, which is used to select a number of heterogeneous image elements with the greatest degree of irrelevance from all categories of heterogeneous image elements;

[0098] (3) an Euler path conversion module, which is used to convert the selected heterogeneous primitives into corresponding Euler paths;

[0099] (4) A heterogeneous graph representation output module, which is used to utilize the attention mechanism within the heterogeneous graph to learn the weights between the node and the neighbors on the Euler path corresponding to the heterogeneous graph, and then obtain the node representation within the heterogeneous graph; and utilize the attention mechanism between heterogeneous graphs to learn the weights between different heterogeneous graphs, and then obtain the node representation between heterogeneous graphs.

[0100] It should be noted here that each module in this embodiment corresponds to each step in Example 1 one by one, and the specific implementation process is the same, which will not be repeated here.

[0101] Embodiment 3

[0102] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the heterogeneous graph primitive representation method based on Euler paths as described above are implemented.

[0103] Embodiment 4

[0104] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the heterogeneous graph element representation method based on the Euler path as described above are implemented.

[0105] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products of the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram and the combination of the processes 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 a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0106] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, 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 heterogeneous graph primitive representation method based on Euler path, characterized in that: include: Obtain heterogeneous information networks and estimate the distribution of heterogeneous graph elements; Selecting a number of heterogeneous graph elements with the greatest degree of irrelevance from all categories of heterogeneous graph elements; Convert the selected heterogeneous primitives into corresponding Euler paths; By using the attention mechanism within heterogeneous graphs, the weights between nodes and neighbors on the Euler path corresponding to the heterogeneous graphs are learned, thereby obtaining the node representation within the heterogeneous graphs; by using the attention mechanism between heterogeneous graphs, the weights between different heterogeneous graphs are learned, thereby obtaining the node representation between heterogeneous graphs; The process of estimating the distribution of heterogeneous primitives is: Randomly select a node from the heterogeneous graph as the initial node; given a heterogeneous graph in represents the node set, ε represents the edge set, from Randomly select a node as the initial node and add it to an empty queue Queue; According to the geometric distribution of each node in the heterogeneous graph, a set number of nodes are selected from the heterogeneous graph; a node current_node is dequeued from the queue, and the first num nodes with the largest degree are selected from the neighboring nodes of current_node; where num follows a geometric distribution with parameter p; Add the above selected nodes and corresponding edges to the heterogeneous graph to be generated; add the edges connecting the above selected num nodes and current_node and the edges between num nodes to the heterogeneous graph to be generated; Repeat the above process until the number of nodes reaches the preset maximum value; Repeat the above process until the Queue is empty or the number of nodes reaches the preset maximum number of nodes max; Finally, the heterogeneous primitives are classified according to their heterogeneous structures; the above process is repeated to obtain a large number of heterogeneous primitives; for the obtained heterogeneous primitives, the heterogeneous isomorphic primitives are classified into one category to obtain a heterogeneous primitive set The heterogeneous information network is an academic network, which includes nodes of the author, article, conference and term types.

2. The heterogeneous graph primitive representation method based on Euler path according to claim 1, characterized in that: Before selecting a number of heterogeneous primitives with the greatest degree of irrelevance, the following steps are also included: Various types of heterogeneous primitives are sorted based on the Jaccard coefficient.

3. The heterogeneous graph primitive representation method based on Euler path according to claim 1, characterized in that: The softmax function is used to normalize the weights between nodes and their neighbors on the Euler path corresponding to heterogeneous primitives.

4. The heterogeneous graph primitive representation method based on Euler path according to claim 1, characterized in that: The softmax function is used to standardize the weights between different heterogeneous primitives.

5. The method for representing heterogeneous graph elements based on Euler paths according to claim 1, characterized in that: The heterogeneous information network includes the number of nodes and edges and the types of nodes.

6. A heterogeneous graph primitive representation system based on Euler paths, characterized in that: include: A heterogeneous graph element distribution estimation module, which is used to obtain a heterogeneous information network and estimate the distribution of heterogeneous graph elements; A heterogeneous image element de-redundancy sorting module is used to select a number of heterogeneous image elements with the greatest degree of irrelevance from all categories of heterogeneous image elements; An Euler path conversion module, which is used to convert the selected heterogeneous primitives into corresponding Euler paths; The heterogeneous graph representation output module is used to utilize the attention mechanism within the heterogeneous graph to learn the weights between the nodes and the neighbors on the Euler path corresponding to the heterogeneous graph, and then obtain the node representation within the heterogeneous graph; utilize the attention mechanism between heterogeneous graphs to learn the weights between different heterogeneous graphs, and then obtain the node representation between heterogeneous graphs.

7. The heterogeneous graph primitive representation system based on Euler path according to claim 6, characterized in that: In the heterogeneous primitive distribution estimation module, the process of estimating the distribution of heterogeneous primitives is: Randomly select a node from the heterogeneous graph as the initial node; Selecting a set number of nodes from the heterogeneous graph according to the geometric distribution of each node in the heterogeneous graph; Add the above selected nodes and corresponding edges to the heterogeneous graph primitives to be generated; Repeat the above process until the number of nodes reaches the preset maximum value; Finally, classification is performed based on the heterogeneous structures of heterogeneous primitives.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in the heterogeneous graph primitive representation method based on Euler path as described in any one of claims 1 to 5 are implemented.

9. A computer device 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 program, the steps in the heterogeneous graph primitive representation method based on Euler path as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Heterogeneous drawing node parallel figure drawing method based on sort-first load balance

    CN106600522A

  • Heterogeneous graph neural network representation method based on meta-path

    CN113191482A

  • Heterogeneous graph information extraction method and device based on meta-path subgraph

    CN113569906A

  • Method and apparatus for generating model for representing heterogeneous graph node

    US20210397947A1