Heterogeneous information similarity matching method and system based on graph representation

Through the heterogeneous information similarity matching method based on graph representation, heterogeneous graphs are extracted and feature embedded, combined with global position encoding and cross-attention mechanism, to solve the problem of limited heterogeneous information matching effect and achieve more efficient and accurate Similarity matching.

CN119337148AActive Publication Date: 2025-01-21ZHEJIANG UNIV

Patent Information

Application Number
CN202411869600.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-01-21
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

When the prior art processes variable and complex heterogeneous information, the similarity matching effect is limited and the learning curve is steep, resulting in an increase in the risk of inconsistency.

Method used

A heterogeneous information similarity matching method based on graph representation is used to generate graph-graph similarity score prediction results by extracting heterogeneous graphs, converting high-dimensional features into low-dimensional embeddings, and using global position encoding and cross-attention mechanisms.

Benefits of technology

This method can map heterogeneous information to a unified low -dimensional space, improve the efficiency and accuracy of similarity matching, reduce the dependence of characteristic engineering, and apply to the matching of multiple types of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337148A_ABST
    Figure CN119337148A_ABST
Patent Text Reader

Abstract

The invention discloses a heterogeneous information similarity matching method and system based on graph representation. The method comprises the following steps: extracting a heterogeneous graph of heterogeneous information; high-dimensional information of nodes in the heterogeneous graph is converted into a low-dimensional information vector space, and a node-level graph embedded vector is obtained after splicing; extracting similarity feature vectors of graph-graph nodes in the aligned similar matrix; aggregating the embedded vectors of the graph pairs by adopting a cross attention mechanism to obtain an aggregated graph-level embedded vector; and inputting the similarity feature vector of the graph-graph node and the aggregated graph-level embedded vector into a multi-layer perceptron to obtain a graph-graph similarity score prediction result. According to the graph-based representation method, heterogeneous information can be mapped into a unified low-dimensional space, so that similarity matching becomes more efficient and accurate, dependence on feature engineering is reduced, and the matching effect is good when multiple types of data and the relation between the data are involved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of information processing, and in particular to a method and system for similarity matching of heterogeneous information based on graph representation. Background Art

[0002] Heterogeneous Information Similarity Matching has received extensive attention in recent years. With the development of big data technology, more and more practical application scenarios are filled with multi-source heterogeneous information. How to effectively perform similarity matching on these heterogeneous data has become a research focus in the field of data mining and artificial intelligence. Existing research methods are mainly divided into traditional methods based on feature engineering and methods based on deep learning.

[0003] Traditional methods based on feature engineering: Early research mainly focused on converting heterogeneous data into a unified feature representation through feature engineering, such as text vectorization, image feature extraction, etc. This type of method relies on the knowledge of domain experts to construct features. Although it has a certain effect, it is easily affected by feature selection and data quality when processing complex heterogeneous information.

[0004] Methods based on deep learning: With the development of deep learning, many studies have begun to use neural networks to automatically learn features, especially for the representation of unstructured data such as images and texts. For example, the publication number CN118378683A discloses a heterogeneous information network representation learning method based on artificial intelligence, which relates to the field of network learning technology, including: extracting each node of the heterogeneous information network, and performing initial modeling based on each node and the corresponding node features to obtain an initial learning model; extracting and transforming each node and the node semantic relationship based on the network feature matching embedding method of the target heterogeneous information network; combining the initial learning model with the extraction and transformation results to construct a first learning model, and optimizing the model to obtain a first optimized model; performing network representation of the target heterogeneous information network based on the first optimized model, and performing verification and evaluation. By combining the initial learning model constructed by network nodes and node features with the results of extracting and transforming the node semantic relationship according to the corresponding embedding method, constructing a first learning model for network representation and verification and evaluation of the representation results, the network representation of the target heterogeneous information network can be made more accurate and effective. This type of method can reduce the dependence on feature engineering to a certain extent, but when it comes to multiple types of data and the relationship between them, the effect is still limited.

[0005] CN113035319 A A method and system for automatically recommending lifestyle management paths for diabetic patients, comprising: acquiring data related to lifestyle management for diabetic patients to form multi-source heterogeneous data; constructing a multimodal knowledge graph for lifestyle management for diabetic patients based on the multi-source heterogeneous data; completing relationships in the multimodal knowledge graph; inputting the semantic information of the multimodal knowledge graph after relationship completion into a deep learning model for training and learning; constructing a sub-knowledge graph based on pathological information and target lifestyle information of a certain diabetic patient, inputting the semantic information of the sub-knowledge graph into the trained deep learning model for graph similarity matching prediction, and extracting the part of the multimodal knowledge graph with the highest similarity to the sub-knowledge graph as a recommended lifestyle management path for diabetic patients.

[0006] Graph structures can effectively represent different types of nodes and edges, thereby expressing the relationship between complex heterogeneous information. In recent years, graph neural networks have shown great potential in the field of similarity matching of heterogeneous information, but there are not many studies on them. Summary of the invention

[0007] In view of the variable and complex characteristics of heterogeneous information, the difficulty and accuracy of similarity matching need to be improved. The present invention provides a heterogeneous information similarity matching method based on graph representation to solve the higher inconsistency risk caused by limited matching effect of variable and complex heterogeneous data features and a steeper learning curve.

[0008] To achieve the above object, the technical solution adopted by the present invention is: A method for similarity matching of heterogeneous information based on graph representation, comprising the steps of: S1, heterogeneous graph for extracting heterogeneous information; S2, convert the high-dimensional feature vectors of nodes in the heterogeneous graph into low-dimensional feature vectors, and concatenate the low-dimensional feature vectors to obtain the node-level graph embedding vector; S3, global position encoding is used to ensure the uniqueness of the generated similarity matrix. After global position encoding, the node-level graph embedding vectors are concatenated to obtain the similarity matrix. The similarity matrix is ​​aligned by supplementing zero embedding, and the similarity feature vectors of graph-graph nodes in the aligned similarity matrix are extracted. S4, uses the cross attention mechanism to aggregate the embedding vectors of the graph pair to obtain the aggregated graph-level embedding vector; S5, inputs the graph-graph node similarity feature vector of S3 and the aggregated graph-level embedding vector of S4 into the multi-layer perceptron to obtain the graph-graph similarity score prediction result.

[0009] In some specific embodiments, S1 specifically comprises the steps of: S11, determining the correspondence between elements and attributes in the heterogeneous information and nodes, edges and attributes in the graph; S12, extract elements and attributes from heterogeneous information, convert them into nodes and edges to obtain a heterogeneous graph data structure.

[0010] In some specific embodiments, S2 specifically includes the steps of: S21, meta-path extraction: traverse the meta-paths of nodes in the heterogeneous graph by fusion of depth-first search and breadth-first search, and extract the meta-path set of nodes in the heterogeneous graph; S22, node content conversion: transforming different types of node feature maps in the heterogeneous graph into the same latent vector space to obtain the transformed node feature vector; S23, the inner and outer aggregation of meta-paths are performed to obtain the node-level graph embedding vector.

[0011] Furthermore, S23 specifically includes the steps of: The meta-path instance extracted in S21 is encoded to obtain a node feature vector, and the meta-path feature vector of the node is obtained by weighted summation; all meta-path instances of the node are encoded and weighted summation is performed to obtain a set of meta-path feature vectors of the node; The mean of multiple meta-path feature vector sets of the same type of nodes is aggregated by the same meta-path to obtain the meta-path specific node vector representation. The attention mechanism is used to fuse the weighted sum of the specific node vector representations. After additional linear transformation, the high-dimensional feature vector of the node containing all meta-path features is embedded and mapped to the vector space of low-dimensional information to obtain the low-dimensional feature vector of the node. After splicing, the node-level graph embedding vector is obtained.

[0012] In some specific implementations, using global position coding to ensure the uniqueness of generating a similarity matrix specifically includes the following steps: By marking seed nodes and key nodes to merge graph pairs, a random walk method is used to sort nodes according to the probability of nodes returning to themselves to perform global position encoding rearrangement.

[0013] In some specific implementations, the method of aligning the similarity matrix by supplementing zero embedding in step 3 specifically includes the steps of: For node-level graph embeddings with different dimensions, fake nodes are constructed to supplement zero embeddings in graph embeddings with smaller node numbers to fill in the dimensions and achieve aligned similarity matrices.

[0014] In some specific implementations, extracting the node similarity feature vector in step 3 specifically includes the steps of: A convolutional neural network is used to transform the similarity calculation of the aligned similarity matrices into a pattern recognition problem for feature extraction, and the similarity feature vector of the graph-graph nodes is obtained.

[0015] In some specific embodiments, S4 specifically includes the steps of: S41, S4 specifically include the steps of: S41, node v in computation graph G1 i ∈V 1 With all other nodes v in graph G2 j ∈V 2 The cross-graph attention coefficient α ij ; At the same time, calculate the node v in graph G2 j ∈V 2 With all other nodes v in graph G1 i ∈V 1 The cross-graph attention coefficient β ji ;

[0016] in: is the attention function that calculates the similarity score between two node embedding vectors, is the node v in graph G1 i The embedding vector of For Figure G j Middle node v j The embedding vector of S42, at G1 node v i ∈V 1 In the view of G2, the attention graph-level embedding vector of G2 is calculated by taking the weighted average of all node embeddings of G2 ; At node v in G2 j ∈V 2 In the view of G1, the attention graph-level embedding vector of G1 is calculated by taking the weighted average of all node embeddings of G1 ;

[0017] S43, using BiLSTM (bidirectional long short-term memory network) to embed the attention graph-level vector of graph G1 And the attention graph-level embedding vector of graph G2 Aggregate them separately to obtain the aggregated graph-level embedding vectors of graph G1 and graph G2.

[0018] In some specific implementations, S5 specifically includes the steps of: The graph-graph node similarity feature vector obtained in S3 and the aggregated graph-level embedding vector obtained in S4 are input into a multi-layer perceptron, and the sigmoid activation function is performed on them to obtain the graph-graph similarity score.

[0019] The present invention also provides a system for implementing similarity matching of heterogeneous information based on graph representation by using the method, comprising a heterogeneous graph extraction module, a low-dimensional embedding vector module, a similarity feature extraction module, an aggregation graph-level embedding module and a similarity score prediction module; The heterogeneous graph extraction module is used to extract heterogeneous graphs of heterogeneous information; The low-dimensional embedding vector module is used to convert the high-dimensional information of nodes in the heterogeneous graph into a low-dimensional information vector space that aggregates the semantic and structural features of neighboring nodes and the node itself, and obtain a node-level graph embedding vector after splicing; The similarity feature extraction module is used to use global position encoding to ensure the uniqueness of the generated similarity matrix, and after global position encoding, the node-level graph embedding vectors are spliced ​​to obtain the similarity matrix; the similarity matrix is ​​aligned by supplementing zero embedding, and the similarity feature vector of the graph-graph node in the aligned similarity matrix is ​​extracted; The aggregated graph-level embedding module is used to aggregate the embedding vectors of the graph pairs using a cross-attention mechanism to obtain an aggregated graph-level embedding vector; The similarity score prediction module is used to input the similarity feature vector of the graph-graph node and the aggregated graph-level embedding vector into a multi-layer perceptron to obtain a graph-graph similarity score prediction result.

[0020] Compared with the prior art, the present invention has the following beneficial effects: The graph-based representation method in the present invention can map heterogeneous information into a unified low-dimensional space, making similarity matching more efficient and accurate, reducing dependence on feature engineering, and achieving good matching effects when multiple types of data and the relationships between them are involved. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a model diagram of the heterogeneous information similarity matching algorithm based on graph representation in the present invention.

[0022] Figure 2 Schematic diagram of meta-path extraction based on DFS and BFS fusion traversal in the present invention.

[0023] Figure 3 It is the global position coding map in the present invention.

[0024] Figure 4 It is a schematic diagram of similarity score prediction in the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with embodiment. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Those skilled in the art can make modifications or equivalent substitutions based on the understanding of the technical scheme of the present invention without departing from the spirit and scope of the technical scheme of the present invention, and all should be included in the protection scope of the present invention.

[0026] Example A similarity matching method for heterogeneous information based on graph representation, specifically Figure 1 As shown, the steps include: S1, extracting a heterogeneous graph of heterogeneous information, wherein the semantics and relationships of the original heterogeneous information model are retained in the heterogeneous graph; specifically, in this embodiment, taking the SysML model as an example, the steps include: S11, determine the correspondence between the elements and attributes in the heterogeneous information and the nodes, edges and attributes in the graph; the nodes can represent various elements in SysML, such as Block, Port, Activity, etc. The edges can represent the relationship between elements, such as Connector, Dependency, Association, etc.

[0027] S12, in the conversion process, in addition to mapping elements and relationships, it is also necessary to convert the attribute information in the SysML model into the attributes of nodes and edges in the graph. Extract elements and attributes from heterogeneous information, convert them into nodes and edges to obtain a heterogeneous graph data structure. For example, it includes: Node attributes: such as the name of the Block, the direction of the Port (input or output), the operation name of the Activity, etc. Edge attributes: such as the type of Connector (such as data flow, control flow), the weight of the Dependency, the implementation conditions of Realization, etc.

[0028] S2, transforms the high-dimensional information of nodes in the heterogeneous graph into a low-dimensional information vector space that aggregates the semantic and structural features of neighboring nodes and the node itself; specifically, S21, meta-path extraction: Figure 2 As shown in the figure, the depth-first search (DFS) and breadth-first search (BFS) are combined to traverse the meta-paths of nodes in the heterogeneous graph and extract the meta-path set of nodes in the heterogeneous graph; for example, given a heterogeneous graph node V of type A, it is necessary to extract the maximum number of equal-length meta-paths that start with type A and end with type A nodes. BFS controls the step length s of the meta-path from a macro perspective, and DFS generates a set of meta-paths that meet the extraction conditions based on different step numbers from a micro perspective. Then, the set with the largest number of meta-paths K is selected from the step length set to obtain a meta-path set of type A nodes. ,in , , , … Represents the number of meta-paths with step length 1, 2, 3, ... n.

[0029] S22, node content conversion: transform the node feature maps of different types in the heterogeneous graph into the same latent vector space to obtain the transformed node feature vector; for a node v of node type A, the transformation process is as follows:

[0030] Where: x v is the original feature vector of node v, h v is the feature vector in the mapping space after the node v is transformed, W A is the parameter weight matrix of type A nodes. After this transformation, the mapping features of all nodes share the same dimension, which provides conditions for the aggregation of the next part.

[0031] S23, aggregation within the meta-path: encoding the meta-path instance extracted in S21 to obtain a node feature vector, and obtaining the meta-path feature vector of the node by weighted summation; encoding all meta-path instances and performing weighted summation to obtain a set of meta-path feature vectors of the node; Given a meta path instance , ; Internal aggregation refers to learning the structure and semantic information of the target node and the contextual information of the neighboring domain in the meta-path. In this embodiment, a special meta-path instance encoder is used to convert all node features along the meta-path instance into a single vector. The process is as follows:

[0032]

[0033] Where: h P(v,u) is the node feature vector, is the starting point feature in the meta-path, is the endpoint feature in the meta-path, is the feature of all intermediate nodes in the meta-path; encoder is a linear average encoder, . Where W P is the linear transformation matrix, MEAN is the element-by-element mean of the node vector.

[0034] After the meta-path instance is vectorized, in order to achieve that different meta-path instances promote the representation of the target node to different degrees, an attention mechanism is used to perform a weighted summation of all relevant meta-paths of the target node:

[0035] in: is the attention vector of the meta-path, It means that the target node and the expression vector whose attention weight is to be solved are concatenated. LeakyReLU is a commonly used activation function, and the importance of the meta-path P(v,u) to the target node v is obtained - the attention weight .

[0036] Next, in order to unify the comparison, the softmax normalization process is obtained. , combining all meta-path based neighbors and attention weights The normalized importance weight of each meta-path of the target node is obtained , and the node feature vector h P(v,u) After activation function Sum to get the meta-path feature vector of the embedded node .

[0037] In summary, given a target node mapped feature vector and a set of meta-paths whose start and end points are both of type A , this module can generate a set of meta-path vectors of M target nodes , each vector representation can be regarded as an aggregation of semantic information of node v.

[0038] S24, meta-path external aggregation: perform mean aggregation of multiple meta-path feature vector sets of the same type of nodes on the same meta-path to obtain a meta-path specific node vector representation , the attention mechanism is used to fuse the weighted sum of the meta-path feature vector set of the node to obtain a high-dimensional feature vector of the node containing all meta-path features ; The node contains a high-dimensional feature vector of all meta-path features The node feature vector is embedded and mapped into the vector space of low-dimensional information through additional linear transformation to obtain the low-dimensional feature vector of the node. , and concatenate to get the node-level graph embedding vector.

[0039] Specifically, because different meta-paths contribute differently to the representation of the current node, it is necessary to continue to aggregate the semantic information of all meta-paths through the attention layer. After aggregating the information of nodes and edges on each meta-path, a meta-path vector set of type A nodes is obtained. , where M is the number of meta-paths of type A nodes. Given a meta-path P i First, the meta-path instance vector set of each specific type of node is averaged and aggregated to obtain the meta-path specific node vector representation :

[0040]

[0041] Where: M A and b A are all learnable parameters, |V A | is the number of type A node vector sets, .

[0042] Then, an attention mechanism is used to fuse the feature vectors of the target node v in different meta-paths. The meta-path specific node (type A) vector is represented After the dot product operation, we get a scalar that reflects the correlation between the attention vector of the type A node and the vector representation of the specific node (type A) of the meta-path. The larger the value, the larger the meta-path P. i The higher the importance of type A nodes.

[0043] Then, the scalar of the correlation is normalized by the normalization function Converted to importance weight β Pi , importance weight β Pi The meta-path feature vector of the node After activation function The weighted summation obtains the high-dimensional feature vector of the node containing all meta-path features The formula is as follows:

[0044]

[0045] in: is the parameterized attention vector for type A nodes.

[0046] Finally, an additional linear transformation with a nonlinear function is used to transform the node into a high-dimensional feature vector containing all meta-path features. Mapped to a vector space with the desired output dimension, the low-dimensional feature vector of the node is obtained :

[0047] in: is an activation function, W o is a weight matrix.

[0048] For graph G i After all the nodes are vectorized and spliced ​​through the above steps, we can get the graph G i Node-level graph embedding of , n is the number of nodes in the graph.

[0049] S3, aligns the similarity matrix by supplementing zero embedding, extracts the similarity feature vector of the graph-graph nodes in the aligned similarity matrix; and uses global position encoding to ensure the uniqueness of the generated similarity matrix.

[0050] The node-level graph embedding obtained in step S24 When splicing, different similarity matrices S and eigenvectors vec(S) are generated due to different initial node sorting. To ensure uniqueness, encoding rearrangement is required. In addition, in the heterogeneous information similarity matching task, the positions of the two graphs cannot be encoded separately, but the global position encoding of the nodes needs to be calculated by merging the graphs.

[0051] First, Figure 3 As shown in the figure, key nodes and predefined seed nodes are used to connect and merge graph pairs. Key nodes can be defined as the two nodes with the highest matching degree in the graph pair, and seed nodes are nodes that match the two key nodes and their corresponding subgraphs G1 and G2. A k-step random walk is used to encode on the merged graph, which is defined as follows:

[0052]

[0053] Where: k is the step size, K is the maximum step size; T is the state transfer matrix of the random walk, T k represents the kth power of T. ii is the random walk matrix that only focuses on the probability of node i returning to itself; finally, the probability of node i returning to itself is The nodes are sorted in reverse order by size, and the smaller the probability, the higher the ranking.

[0054] After determining the global encoding of the node, reconstruct the node-level graph and embed it into U i and U j , and obtain the similarity matrix .

[0055] For two graphs with different numbers of nodes, the node-level graph embedding dimensions are different and matrix multiplication cannot be performed. The method of supplementing zero embedding in step 3 to align the similarity matrix specifically includes the following steps: for node-level graph embeddings with different dimensions, zero embedding is supplemented in the graph embedding with a smaller number of nodes by constructing fake nodes to fill the dimension and realize alignment of the similarity matrix.

[0056] The step of extracting the node similarity feature vector in step 3 specifically includes the following steps: using a convolutional neural network to convert the similarity calculation of the aligned similarity matrix into a pattern recognition problem for feature extraction, and obtaining a graph-graph node similarity feature vector .

[0057] S4, using the cross attention mechanism to aggregate the embedding vectors of the graph pair to obtain the aggregated graph-level embedding vector; specifically includes the following steps: S41, node v in computation graph G1 i ∈V 1 With all other nodes v in graph G2 j ∈V 2 The cross-graph attention coefficient α ij; At the same time, calculate the node v in graph G2 j ∈V 2 With all other nodes v in graph G1 i ∈V 1 The cross-graph attention coefficient β ji ;

[0058] in: is the attention function that calculates the similarity score between two node embedding vectors, is the node v in graph G1 i The embedding vector of For Figure G j Middle node v j In this embodiment, the cosine function cosine is used, and other similarity measurement indicators can also be used.

[0059] S42, at G1 node v i ∈V 1 In the view of G2, the attention graph-level embedding vector of G2 is calculated by taking the weighted average of all node embeddings of G2 ; At node v in G2 j ∈V 2 In the view of G1, the attention graph-level embedding vector of G1 is calculated by taking the weighted average of all node embeddings of G1 ;

[0060] S43, using BiLSTM (bidirectional long short-term memory network) to embed the attention graph-level vector of graph G1 And the attention graph-level embedding vector of graph G2 Aggregate them separately to get the aggregated graph-level embedding vectors of graph G1 and graph G2 ; .

[0061] S5, inputs the graph-graph node similarity feature vector of S3 and the aggregated graph-level embedding vector of S4 into the multi-layer perceptron to obtain the graph-graph similarity score prediction result. Figure 4 As shown, four standard fully connected layers are used to gradually project the dimension of the resulting vector onto a scalar of dimension 1. Since the desired similarity score It should be in the range of [0,1], so a sigmoid activation function is performed to map the similarity score into this range.

[0062] The graph-graph node similarity feature vector obtained in S3 and the aggregated graph-level embedding vector obtained in S4 are input into the multi-layer perceptron, and the sigmoid activation function is performed to obtain the graph-graph similarity score. ; .

[0063] Finally, the HGraphSim model is used in a set of two input heterogeneous graph structures and two icon similarity scores. The model is trained on n triplet data. And the mean square error loss function is used to train the model, and the calculated similarity score is Compared with the true similarity score y, the loss function Loss is as follows:

[0064]

[0065] In this embodiment, the AIDS dataset and the LINUX dataset are specifically taken as examples, and the above-mentioned graph representation method of the present invention is used to perform similarity matching on the information in the dataset. AIDS is a molecular graph representation dataset of AIDS antiviral active compounds. It contains 42,687 simplified compound structures, and converts molecules into graphs in a direct way by representing atoms as nodes and covalent bonds as edges. LINUX is composed of 48,747 program dependency graphs (PDGs) generated from the Linux kernel, each of which represents a function, in which a node represents a statement, and an edge represents the dependency relationship between the two statements.

[0066] The similarity scoring criterion is to calculate the graph edit distance (GED) based on the predicted GED and the true GED: The edit distance between two graphs G1 and G2 refers to the minimum number of operations to convert G1 to G2. Operations include inserting or deleting nodes, inserting or deleting edges, and relabeling nodes or edges. If you want to convert GED into a scoring criterion for measuring the similarity of two graphs, you need to use a normalization function to convert GED to the range of 0 to 1.

[0067] In order to verify the effectiveness and stability of the proposed method, based on the above content, the GED similarity scoring standard was experimented on the dataset using the method proposed in this paper and the baseline Noah method. The evaluation indicators in the experimental results are shown in Table 1, where the method proposed in this paper is defined as HGraphSim.

[0068] Table 1 Similarity matching evaluation indicators of different datasets

[0069] Noah is different from the end-to-end learning model in that it combines the A* algorithm with the graph neural network to optimize the search direction of the A* algorithm and learns the heuristic function to flexibly adjust the size of the search range.

[0070] Mean Squared Error (MSE): It measures the average squared difference between the calculated similarity score and the true similarity score, and is used to evaluate the stability of the model in calculating similarity.

[0071] Spearman rank correlation coefficient (ρ), Kendall rank correlation coefficient (τ): These two indicators measure the matching ratio between the calculated ranking results and the actual ranking results.

[0072] Precision at k (p@k): This metric measures the matching ratio between the calculated top k results and the true top k results, and focuses on the top k results instead of the global ranking results. Specifically, the k used in this paper in the evaluation is 10 and 20 respectively.

[0073] The symbol ↑ represents that the higher the value, the better the evaluation effect of the indicator, while ↓ represents that the lower the value, the better. It can be seen that the method proposed in this paper has surpassed the baseline method in the performance of multiple indicators. From this, the following conclusions can be drawn: (1) HGraphSim has an excellent model structure and stable computing power. Specifically, when obtaining heterogeneous graph node embedding, it can well aggregate the domain structure and its own semantics, and can well extract the similar features between graphs and nodes through the similarity matrix and cross attention. (2) HGraphSim has a stronger ability to learn similarity scores in different samples. Whether in the AIDS molecular dataset or the program dependency graph dataset, it performs better in completing the similarity matching task.

Claims

1. A similarity matching method for heterogeneous information based on graph representation, characterized in that: Includes steps: S1, heterogeneous graph for extracting heterogeneous information; S2, convert the high-dimensional feature vectors of nodes in the heterogeneous graph into low-dimensional feature vectors, and concatenate the low-dimensional feature vectors to obtain the node-level graph embedding vector; S3, global position encoding is used to ensure the uniqueness of the generated similarity matrix. After global position encoding, the node-level graph embedding vectors are concatenated to obtain the similarity matrix. The similarity matrix is ​​aligned by supplementing zero embedding, and the similarity feature vectors of graph-graph nodes in the aligned similarity matrix are extracted. S4, uses the cross attention mechanism to aggregate the embedding vectors of the graph pair to obtain the aggregated graph-level embedding vector; S5, inputs the graph-graph node similarity feature vector of S3 and the aggregated graph-level embedding vector of S4 into the multi-layer perceptron to obtain the graph-graph similarity score prediction result.

2. The method for similarity matching of heterogeneous information based on graph representation according to claim 1, characterized in that: S1 specifically includes the following steps: S11, determining the correspondence between elements and attributes in the heterogeneous information and nodes, edges and attributes in the graph; S12, extract elements and attributes from heterogeneous information, convert them into nodes and edges to obtain a heterogeneous graph.

3. The method for similarity matching of heterogeneous information based on graph representation according to claim 1, characterized in that: S2 specifically includes the following steps: S21, meta-path extraction: traverse the meta-paths of nodes in the heterogeneous graph by fusion of depth-first search and breadth-first search, and extract the meta-path set of nodes in the heterogeneous graph; S22, node content conversion: transforming different types of node feature maps in the heterogeneous graph into the same latent vector space to obtain the transformed node feature vector; S23, the inner and outer aggregation of meta-paths are performed to obtain the node-level graph embedding vector.

4. The method for similarity matching of heterogeneous information based on graph representation according to claim 3 is characterized in that: S23 specifically includes the following steps: The meta-path instance extracted in S21 is encoded to obtain a node feature vector, and the meta-path feature vector of the node is obtained by weighted summation; all meta-path instances of the node are encoded and weighted summation is performed to obtain a set of meta-path feature vectors of the node; The mean of multiple meta-path feature vector sets of the same type of nodes is aggregated by the same meta-path to obtain the meta-path specific node vector representation. The attention mechanism is used to fuse the weighted sum of the specific node vector representations. After additional linear transformation, the high-dimensional feature vector of the node containing all meta-path features is embedded and mapped to the vector space of low-dimensional information to obtain the low-dimensional feature vector of the node. After splicing, the node-level graph embedding vector is obtained.

5. The method for similarity matching of heterogeneous information based on graph representation according to claim 1, characterized in that: S3 uses global position coding to ensure the uniqueness of the generated similarity matrix, which specifically includes the following steps: merging graph pairs by marking seed nodes and key nodes, and using a random walk method to sort nodes according to the probability of nodes returning to themselves to perform global position coding rearrangement.

6. The method for similarity matching of heterogeneous information based on graph representation according to claim 1, characterized in that: The method of aligning the similarity matrix by supplementing zero embedding in step 3 specifically includes the following steps: For node-level graph embeddings with different dimensions, fake nodes are constructed to supplement zero embeddings in graph embeddings with smaller node numbers to fill in the dimensions and achieve aligned similarity matrices.

7. The method for similarity matching of heterogeneous information based on graph representation according to claim 1, characterized in that: The step 3 of extracting the node similarity feature vector specifically includes the following steps: A convolutional neural network is used to transform the similarity calculation of the aligned similarity matrices into a pattern recognition problem for feature extraction, and the similarity feature vector of the graph-graph nodes is obtained.

8. The method for similarity matching of heterogeneous information based on graph representation according to claim 1, characterized in that: S4 specifically includes the following steps: S41, node v in computation graph G1 i ∈V 1 With all other nodes v in graph G2 j ∈V 2 The cross-graph attention coefficient α ij ; At the same time, calculate the node v in graph G2 j ∈V 2 With all other nodes v in graph G1 i ∈V 1 The cross-graph attention coefficient β ji ; ; in: is the attention function that calculates the similarity score between two node embedding vectors, is the node v in graph G1 i The embedding vector of For Figure G j Middle node v j The embedding vector of S42, at G1 node v i ∈V 1 In the view of G2, the attention graph-level embedding vector of G2 is calculated by taking the weighted average of all node embeddings of G2 ; At node v in G2 j ∈V 2 In the view of G1, the attention graph-level embedding vector of G1 is calculated by taking the weighted average of all node embeddings of G1 ; ; S43, using BiLSTM to embed the attention graph level vector of graph G1 And the attention graph-level embedding vector of graph G2 Aggregate them separately to obtain the aggregated graph-level embedding vectors of graph G1 and graph G2.

9. The method for similarity matching of heterogeneous information based on graph representation according to claim 1, characterized in that: S5 specifically includes the following steps: The graph-graph node similarity feature vector obtained in S3 and the aggregated graph-level embedding vector obtained in S4 are input into a multi-layer perceptron, and the sigmoid activation function is performed on them to obtain the graph-graph similarity score.

10. A system for implementing graph-based heterogeneous information similarity matching using the method described in any one of claims 1 to 9, characterized in that: It includes a module for extracting heterogeneous graphs, a module for low-dimensional embedding vectors, a module for extracting similarity features, a module for aggregating graph-level embeddings, and a module for predicting similarity scores; The heterogeneous graph extraction module is used to extract heterogeneous graphs of heterogeneous information; The low-dimensional embedding vector module is used to convert the high-dimensional information of nodes in the heterogeneous graph into a low-dimensional information vector space that aggregates the semantic and structural features of neighboring nodes and the node itself, and obtain a node-level graph embedding vector after splicing; The similarity feature extraction module is used to use global position encoding to ensure the uniqueness of the generated similarity matrix, and after global position encoding, the node-level graph embedding vectors are spliced ​​to obtain the similarity matrix; the similarity matrix is ​​aligned by supplementing zero embedding, and the similarity feature vector of the graph-graph node in the aligned similarity matrix is ​​extracted; The aggregated graph-level embedding module is used to aggregate the embedding vectors of the graph pairs using a cross-attention mechanism to obtain an aggregated graph-level embedding vector; The similarity score prediction module is used to input the similarity feature vector of the graph-graph node and the aggregated graph-level embedding vector into a multi-layer perceptron to obtain a graph-graph similarity score prediction result.

Citation Information

Patent Citations

  • Diabetes patient lifestyle management path automatic recommendation method and system

    CN113035319A

  • Heterogeneous information network representation learning method based on artificial intelligence

    CN118378683A

  • Legal case similarity calculation method and system based on knowledge graph matching

    CN114092283A

  • Code similarity detection method based on code attribute graph

    CN115438709A

  • User personality portrait prediction method based on text similarity graph

    CN116955823A

Cited By

  • Similarity matching method for complex graph data

    CN121167316A