A feature interaction-based meta-path heterogeneous graph aggregation method
By constructing a meta-path heterogeneous graph aggregation method with multi-feature interaction, and utilizing a multi-head attention model and graph convolutional neural network, combined with the feature information of users and items, this method solves the problem of existing models' insufficient capture of structural and semantic information in heterogeneous graphs, achieving more efficient recommendation results and better interpretability.
Patent Information
- Application Number
- CN202311310810.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2043-10-10
AI Technical Summary
Existing models struggle to capture the rich structural and semantic information in heterogeneous graphs and ignore the content features of the nodes themselves, resulting in poor recommendation performance and a lack of interpretability.
By constructing a meta-path heterogeneous graph aggregation method with multi-feature interaction, this method utilizes a multi-head attention model and graph convolutional neural network to learn the embedded representations of users and items by combining user and item feature information. Information aggregation is then performed through a meta-path instance encoder and attention mechanism to capture the relationships between nodes.
It improves the accuracy and interpretability of the recommendation model, enabling it to better explain the recommendation results and enhance the model's performance.
Smart Images

Figure CN117251635B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of recommendation system application, and in particular to a meta-path heterogeneous graph aggregation method based on feature interaction. BACKGROUND
[0002] Most of the graphs or networks in the real world are heterogeneous in nature, which involves the diversity of node types and relationship types. Traditional models often face difficulties in capturing the rich structure and semantic information embedding in the graph when processing heterogeneous graphs.
[0003] While meta-paths can learn the rich structure and semantic information embedding in heterogeneous graphs, most existing framework models ignore the content features of nodes themselves and only learn the final embedded representation of users and items through the unique encoding of users and items, which cannot well explain the reasons why users pay attention to and like items, cannot well explain the behavior and decision reasons of nodes, and limits the improvement of model performance. SUMMARY
[0004] To overcome the problems in the related art, the embodiments of the present application provide a meta-path heterogeneous graph aggregation method based on feature interaction, which can more accurately capture the rich structure and semantic information of the graph and provide explanations for the recommendation results, thereby achieving better performance in the recommendation task.
[0005] The embodiments of the present application provide a meta-path heterogeneous graph aggregation method based on feature interaction, comprising the following steps:
[0006] Map the unique encoding of users and items and the features of users and items to a vector representation to generate high-dimensional feature representations of the corresponding input data;
[0007] Map the unique encoding of users and items and the features of users and items to the same low-dimensional feature space;
[0008] Use a multi-head attention model to construct user preferences for different combinations of user features and item features;
[0009] Construct a meta-path between the unique encoding of users and items and the features of users and items, use a meta-path instance encoder to convert all node features along the meta-path instance into a single vector, and then concatenate the vector of each node on the meta-path to obtain a vector representation of the entire meta-path;
[0010] Represent each node and its neighbor node in the meta-path as a feature matrix, each row of the feature matrix representing a feature vector of a node, and use a graph convolutional neural network to aggregate the feature matrix to calculate the aggregated vector representation and obtain a vector representation of each node aggregated with all related nodes on the meta-path;
[0011] The state representation of the current node is updated according to the state of the meta-path neighbor, and after multi-layer convolution, the final embedding vector representation of the user and item nodes is obtained;
[0012] The dot product operation is performed on the final learned embedding vector representation of the user and item nodes to calculate the user's preference for each item.
[0013] The use of a multi-head attention model to construct the user's preference for different combinations of user features and item features further includes the following steps:
[0014] The correlation between feature m and feature k under a specific attention head h is calculated using the following formula:
[0015]
[0016]
[0017] Where M is the number of features, L is a variable, and the value of L varies from 1 to M;
[0018] By combining the coefficients All relevant features are guided to update the representation of feature m in subspace h:
[0019]
[0020] Where is the attention function, which defines the similarity between feature m and feature k, W q (h) , W k (h) and W v (h) are transformation matrices that map the original embedding space to a new space.
[0021] Further including the following steps:
[0022] When a feature involves different combination features, multiple attention heads are used to create different subspaces and learn different feature interactions. The combination features learned under the multi-head attention mechanism are as follows:
[0023]
[0024]
[0025] Where H is the total number of heads, W Res is the projection matrix in the case of feature dimension mismatch, e m is the original vector representation of the feature;
[0026] The initial features of the nodes in the network are added to the learned feature representation to preserve the original features of the nodes, each of which is updated to a new feature representation is a representation of a high-order combination feature.
[0027] The constructing the meta-path between the unique code of the user and the item and the features of the user and the item further includes the following steps:
[0028] Random walk sampling is performed from any node, sampling a fixed length, visiting neighbor nodes or returning to the initial node each time with the same probability, the number of samples of each type of node is fixed, ensuring that each type of node will be sampled, and each node of the heterogeneous graph is sampled to strongly related neighbor nodes, obtaining relevant path information.
[0029] The aggregation further includes the following steps:
[0030] Given a meta-path P, the neighbor nodes inside the meta-path are aggregated, and the obtained embedding contains the structure and semantic information of the neighbor nodes in the meta-path and the context between them;
[0031] p(v,u) is a meta-path instance connecting the target node v and the neighbor node u based on the meta-path, the intermediate nodes of p(v,u) are defined as p(v,u)}=p(v,u)\(v,u);
[0032] Using a meta-path instance encoder, all node features along the meta-path instance are converted into a single vector:
[0033]
[0034] Where h′ v represents the vector representation of the node v after the feature interaction transformation;
[0035] An attention mechanism is used to weight sum the neighbor nodes on the meta-path instance P related to the target node v, and the standardized importance weight of each meta-path instance is learned to model, and all instances are weighted and summed:
[0036]
[0037]
[0038]
[0039] Where is the parameterized attention vector of the meta-path P, The importance of the neighbor node u to the node v on the meta-path instance p(v, u) is represented, and the vector representation of the node v is updated according to the attention coefficient, to obtain a new vector representation of the node v aggregating vector representations of its meta-path neighbors;
[0040] The inter-meta-path aggregation layer is performed to combine semantic information displayed by all meta-paths containing the node, and different meta-path information is aggregated by assigning different weights to different meta-paths through the attention mechanism:
[0041]
[0042]
[0043] wherein is the spliced vector representation of all nodes on the entire meta-path, is explained as the meta-path P i The relative importance of the A-type node, and the weighted node type vector specific to the node v of all meta-paths of the node v is obtained to obtain a new vector representation of the node v
[0044] The embedding vector representation of the node v is projected and transformed to a reasonable output dimension:
[0045]
[0046] wherein Wo is a parameter matrix, and a final feature vector representation of the target node is obtained.
[0047] The dot product operation is performed on the finally learned user and item embedding vector representations to calculate the preference of the user for each item, and the method further comprises the following steps:
[0048] Given a user u, an item i and their corresponding learned embeddings, an estimated score y is calculated to measure the preference of the user u for the item i, and the preference score of the user is defined as follows:
[0049]
[0050] wherein T is the transpose of the vector, and σ is an activation function.
[0051] The method further comprises the following steps:
[0052] The preference of each user for the negative sample and the positive sample is calculated respectively;
[0053] The learnable parameters are updated according to the difference between the negative sample and the positive sample, and the following is a loss calculation function:
[0054]
[0055] where s is an activation function, Ω is a set of observed positive node pairs, Ω - is a set of negative node pairs sampled from all unobserved node pairs.
[0056] The technical scheme provided by the embodiment of the application has the advantages that the multi-head attention mechanism is used to learn the implicit preference representation of the user and the item to the multi-attribute feature, and the meta-path representation of the user and the item is modeled from a real scene; and the meta-path aggregation graph convolutional neural network model of multi-feature interaction is proposed, which can more accurately mine the internal implicit correlation between the user, the item and the multi-feature, and experimental analysis is performed; compared with other models, the recommendation effect of the model proposed in the application is significantly improved, and the model has good interpretability.
[0057] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the application. BRIEF DESCRIPTION OF DRAWINGS
[0058] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
[0059] Figure 1 is a flowchart of the meta-path heterogeneous graph aggregation based on feature interaction in the embodiment of the application.
[0060] Figure 2 is a structural schematic diagram in the embodiment of the application.
[0061] Figure 3 is a meta-path encoding schematic diagram.
[0062] Figure 4 is a meta-path aggregation schematic diagram.
[0063] Figure 5 is a flowchart of learning the embedding representation of the target node in the meta-path aggregation layer. DETAILED DESCRIPTION
[0064] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers refer to the same or similar elements throughout the drawings, unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the application. Instead, they only represent examples of apparatuses and related applications, methods consistent with some aspects of the application, as detailed in the appended claims.
[0065] The application proposes a new model, called multi-feature interaction meta-path aggregation graph convolutional neural network, to improve the final performance. Specifically, the model constructs a heterogeneous graph composed of user nodes and item nodes and their attribute feature type nodes, and fuses the attribute feature information of users and items into their node representations. Different types of nodes are constructed as meta-path representations to capture the association between different types of nodes, and a graph convolutional neural network recommendation algorithm is used to realize meta-path information aggregation to obtain a recommendation result, thereby proposing an attention feature interaction fusion meta-path information heterogeneous graph convolutional neural network recommendation algorithm.
[0066] The application develops a feature interaction meta-path heterogeneous graph aggregation recommendation model to solve the problems in the prior art, and proposes a novel GCN model. Compared with previous methods, first, a multi-head attention mechanism is designed to learn the implicit preference representation of users and items for multiple attribute features, and the meta-path representation of users and items is modeled from real scenarios. Then a multi-feature interaction meta-path aggregation graph convolutional neural network model is proposed, which can more accurately mine the internal implicit association between users, items and multiple features, and experimental analysis is performed. Compared with other models, the proposed model has significantly improved recommendation effect and good interpretability.
[0067] Specifically, these studies have made significant progress in applying meta-paths to heterogeneous graph recommendation in recent years. They combine the relationships between different types of nodes and graph neural network technology to provide good recommendation results. However, there are still some shortcomings and limitations. First, selecting appropriate meta-paths is a critical step. However, in complex heterogeneous graphs, finding effective meta-paths can be a challenge. There is a trade-off in meta-path selection, which needs to balance the complexity, coverage and effectiveness of meta-paths. The second problem is the lack of interpretability. Some meta-path-based recommendation methods may lack interpretability and it is difficult to explain why a certain recommendation result is given. This can be a problem for users who want to understand the reasons behind the recommendations. And most existing GCN models designed based on user-item interaction graphs only use unique encodings of items and users to build the entire model. The final learned embedding is only the embedding of the unique encoding of users and items.
[0068] Based on the above problems, the attribute feature preferences of the user and the item are modeled under the premise of considering the historical interaction of the user and the item. The meta-path embedding information conforming to the explainability is constructed. Therefore, the attribute feature information of the user and the item is fully learned in the heterogeneous graph combined with the meta-path, and the recommendation is realized through the transmission of information. The model considers the historical preferences of the user, the multiple attribute feature information of the user and the item, and the meta-path information between the item and the user, and fuses them together to realize the recommendation. Specifically, a user-item-feature interaction layer is designed to capture the implicit embedding information between the user and the item and the feature by using the feature information of the user and the item. Then a path information mapping to the graph convolutional neural network is designed to learn the representation containing the meta-path information. Finally, the embedding representation of the user and the item containing the multiple feature interaction and the meta-path information is learned respectively, so that the learned user and item representation has explainability, thereby greatly improving the effect of recommendation.
[0069] The meta-path is constructed, each user is represented as a node, the node features include the unique code of the user and the attribute features of the user, each item is represented as a node, the node features include the unique code of the item and the type attribute of the item. The type of the item can also be represented as a node, and the node feature is a vector coding representation corresponding to the item type. In this way, there are three different types of nodes in the heterogeneous graph. There are two different edges, namely the edge relationship between the user node and the corresponding item node, which represents the association between the user and the item, and the edge relationship between the item node and the corresponding item type node, which represents the association between the item and the item type.
[0070] The meta-path is a way to describe the path relationship between nodes in the heterogeneous graph, which is composed of the order between node types. It can help to define the semantic association information between different types of nodes. The form of the meta-path defined in this study is A->B->A, where A represents the user node and B represents the item node. This meta-path represents that two users are connected through the same item, that is, two users have the same favorite item. And it can be constructed as A->B->C->B->A, where C represents the type node of the item. This meta-path represents that two users are connected through the common item type, that is, two users have similar favorite item types. Through the construction of the meta-path instance, it can be clearly represented as a node sequence on the given heterogeneous graph. According to the path set formed by these meta-paths, the association information between different types of nodes is captured, and the meta-path is encoded through vector coding representation.
[0071] Figure 1 is the flowchart of the feature interaction-based meta-path heterogeneous graph aggregation in the embodiment of the application. Figure 2 is a structural schematic diagram in the embodiment of the application. Figure 3is a meta-path encoding schematic diagram, which is an encoding representation of the meta-path passing through the target node. Figure 4 is a meta-path aggregation schematic diagram, including intra-meta-path aggregation and inter-meta-path aggregation. The intra-meta-path aggregation mainly aggregates the internal information of the meta-path, and the inter-meta-path aggregation aggregates the information of different meta-paths passing through the target node. Figure 5 is a flowchart of learning the embedding representation of the target node in the meta-path aggregation layer.
[0072] As shown in Figures 1 to 5 , the feature interaction-based meta-path heterogeneous graph aggregation process includes the following steps:
[0073] Step 101, in the input layer, the unique codes of users and items representing the identities of users and items are mapped to a vector representation with the features of users and items, generating a high-dimensional feature representation of the corresponding input data.
[0074] This is also a parameter matrix that needs to be learned. The initial representation is randomly generated. In the past recommendation model, only the final learned embedding representation vector of users and items is used to predict the final preference of each user for the item, but in the model of the present embodiment, the attribute features of users and items are represented as a high-dimensional vector, and are embedded into the historical interaction graph of users and items, so that the feature embedding representation of users and items can be learned more effectively. By mapping the features to a high-dimensional space, the deep semantic information of each feature can be learned more finely.
[0075] Step 102, in the embedding layer, the unique codes of users and items are mapped to the same low-dimensional feature space with the features of users and items.
[0076] Since the features of users and items have categorical features or numerical features, they may not be able to interact with the unique codes of users and items, so they are represented as low-dimensional space vectors (e.g., word embeddings). Specifically, in order to allow interaction between features and unique codes, the unique codes of users and items are mapped to the same low-dimensional feature space with the features of users and items for subsequent operations.
[0077] Step 103, in the feature interaction layer, a multi-head attention model is used to construct the preferences of users for different combinations of user features and item features.
[0078] When the features of all nodes are in the same low-dimensional space, high-order combined features can be modeled in this space. The key problem is to determine which features should be combined to form meaningful high-order features. Users can learn the preferences of different feature combinations and extract semantic information from different feature combinations. The present embodiment uses a multi-head attention model to construct user preferences for different combinations of user features and item features. Specifically, multi-head attention is used to discover which combinations of user features and item features are more in line with user preferences. Mapping the vector representations of users and items and their features to the same dimension low-dimensional space helps to model high-level interaction representations between different features and users. Next, how to define it will be explained in detail.
[0079] Take feature m as an example to identify multiple meaningful high-order features involving feature m. The correlation between feature m and feature k under a specific attention head h is calculated using the following formula:
[0080]
[0081]
[0082] where M is the number of features, L is a variable, and the value of L varies from 1 to M;
[0083] All relevant features are updated by combining the coefficients directed to the representation of feature m in subspace h:
[0084]
[0085] where is an attention function that defines the similarity between feature m and feature k, W q (h) , W k (h) and W v (h) are transformation matrices that map the original embedding space to a new space.
[0086] In addition, when a feature is involved in different combined features, it is achieved by using multiple attention heads, creating different subspaces and learning different feature interactions respectively. The combined features learned under the multi-head attention mechanism are as follows:
[0087]
[0088]
[0089] where H is the total number of heads, W Res is a projection matrix in the case of feature dimension mismatch, e ma raw vector representation of a feature;
[0090] adding the initial features of the nodes in the network to the learned feature representation to preserve the original features of the nodes, each feature being updated to a new feature representation is a representation of a high-order combined feature.
[0091] Step 104, in the meta-path aggregation layer, a meta-path between the unique encoding of the user and the item and the features of the user and the item is constructed, that is, different types of nodes strongly related to the node are sampled by using random walk, random walk sampling is started from any node, a fixed length is sampled, each time a neighbor node is accessed or returned to the initial node with the same probability, the number of samples of each type of node is fixed, ensuring that each type of node will be sampled, and the relevant path information is obtained by sampling the strongly related neighbor nodes of each node of the heterogeneous graph.
[0092] Using a meta-path instance encoder, all node features along the meta-path instance are converted into a single vector, and the vector of each node on the meta-path is spliced to obtain the vector representation of the entire meta-path.
[0093] Each node and its neighbor node in the meta-path is represented as a feature matrix, each row of the feature matrix representing a feature vector of a node, and a graph convolutional neural network is used to aggregate the feature matrix to calculate the aggregated vector representation, thereby obtaining a vector representation of each node aggregated with all related nodes on the meta-path.
[0094] By aggregating the meta-path neighbors of the node, each node will be updated to contain information of all neighbors on the meta-path, so that the recommendation effect is better.
[0095] The state representation of the current node is updated according to the state of the meta-path neighbor, and after multiple layers of convolution, the final embedding vector representation of the user and item nodes is obtained.
[0096] The aggregation process is mainly implemented in two steps, and the specific aggregation method is as follows.
[0097] Given a meta-path P, the embedding obtained by aggregating the internal neighbor nodes of the meta-path contains the structure and semantic information of the neighbors of the meta-path and the context between them.
[0098] p(v,u) is a meta-path instance connecting the target node v and the meta-path-based neighbor u, and the intermediate node of p(v,u) is defined as {m p(v,u)}=p(v,u)\(v,u)。
[0099] Using a meta-path instance encoder, all node features along the meta-path instance are converted into a single vector:
[0100]
[0101] where h' = h + h v denotes the vector representation of node v after the feature interaction transformation.
[0102] Then, the neighbor nodes on the meta-path instance P related to the target node v are weighted and summed using the attention mechanism, and the key idea is that different meta-path instance neighbors will promote the representation of the target node to different degrees.
[0103] By learning the standardized importance weight of each meta-path instance Modeling, weighted sum of all instances:
[0104]
[0105]
[0106]
[0107] where is the parameterized attention vector of the meta-path P, denotes the importance of the neighbor node u on the meta-path instance p(v, u) to the node v, and the vector representation of the node v is updated according to the attention coefficient to obtain the new vector representation of the node v aggregated by its meta-path neighbors.
[0108] Inter-meta-path aggregation layer, that is, merge all meta-paths containing this node to display semantic information, and assign different weights to different meta-paths through the attention mechanism to aggregate different meta-path information:
[0109]
[0110]
[0111] where is the spliced vector representation of all nodes on the entire meta-path, interpreted as the relative importance of the node type vector of the node v to the meta-path P i to all meta-path specific node types of the node v to obtain the new vector representation of the node v
[0112] Project the embedding vector representation of the node v to a reasonable output dimension:
[0113]
[0114] where Wo is the parameter matrix, and the final feature vector representation of the target node is obtained.
[0115] Step 105, in the prediction layer, dot product operation is performed on the finally learned user and item embedding vector representation to calculate the user's preference for each item.
[0116] After the information propagation through the meta-path aggregation layer, the user preference for each item can be clearly understood. It can also be inferred that the user likes those combination attribute features of the item. Then, dot product operation is performed on the finally learned user and item embedding vector representation to calculate the user's preference for each item. For the user, the model is mainly to generate a set of items that the user may like.
[0117] Given a user u, an item i and their corresponding learned embeddings, an estimated score y is calculated to measure the user's preference for the item i, and the user's preference score is defined as follows:
[0118]
[0119] Where T is the transpose of the vector, and sigma is the activation function.
[0120] Step 106, for this model, the trainable parameters are the unique encoding embedding vector representation of the user and the item, the feature embedding vector representation of the user and the item, the preference coefficient of the user for different combination features, and the weight coefficient of the combination between different features. The definition of the loss function is to optimize the model weight by minimizing the following loss function through negative sampling, that is, the preference of each user for the negative sample and the positive sample is calculated respectively, and then the difference between the negative sample and the positive sample is used to update the learnable parameters, and the following is the loss calculation function:
[0121]
[0122] Where sigma is the activation function, Omega is the set of observed positive node pairs, and Omega - is the set of negative node pairs sampled from all unobserved node pairs. The embodiment uses Adam as the optimizer to train the model.
[0123] By using the embodiment of the present application, the rich structure and semantic information embedding of the heterogeneous graph are fully utilized, and by constructing a heterogeneous graph and using a multi-feature interaction meta-path aggregation graph convolutional neural network model, the complex structure and semantic information in the heterogeneous graph can be better captured. Compared with the existing model which only uses meta-path definition and node unique encoding to represent the relationship and node, the embodiment of the present application fuses node content features, so that the model has better expressiveness and accuracy.
[0124] The content features of the nodes are used to improve the model performance and interpretability, compared with the existing models that ignore the content features of the nodes and only use the unique codes of the nodes, the embodiment of the application fully utilizes the content features of the nodes, and integrates the attribute feature information of the users and the items into the node representation. In this way, the performance and prediction accuracy of the model can be improved, the reasons for the recommendation results can be explained, and the interpretability of the model is enhanced.
[0125] Attention feature interaction and high-order fusion, the embodiment of the application adopts an attention mechanism, through multi-head attention feature interaction, the potential preferences of users and items for various features can be explored, so that the recommendation accuracy of the model is improved. At the same time, through the neighborhood aggregation of the meta-path information by the graph convolutional neural network, the high-order fusion of the node features can be realized, and the association relationship between the nodes can be more accurately captured.
[0126] In summary, the embodiment of the application has obvious advantages in processing heterogeneous graphs, utilizing node content features and improving recommendation performance, can more accurately capture the rich structure and semantic information of the graph, and provide explanations for the recommendation results, so that better performance is achieved in the recommendation task.
[0127] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. Variations and modifications of the embodiments described herein can be effected including the substitution of known equivalents for Ranges 1 to 3, the substitution of means 4 to 6 for 7 to 9, and the substitution of alternating sequences of 10 to 12 for 13 to 15, by those skilled in the art, once the principles described herein are understood. It is intended that the application(s) be limited only by the appended claims.
[0128] It should be understood that the application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the appended claims.
Claims
1. A method for meta-path heterogeneous graph aggregation based on feature interaction, characterized in that, Includes the following steps: The unique codes of users and items are mapped to the features of users and items into a vector representation, generating a high-dimensional feature representation of the corresponding input data; The unique codes of the users and items are mapped to the same low-dimensional feature space along with the features of the users and items; Use a multi-head attention model to construct user preferences for different combinations of user and item characteristics; A meta-path is constructed between the unique codes of the user and item and the features of the user and item. A meta-path instance encoder is used to convert the features of all nodes along the meta-path instance into a single vector. The vectors of each node on the meta-path are then concatenated to obtain the vector representation of the entire meta-path. The construction of the meta-path between the unique codes of the user and the item and the characteristics of the user and the item further includes the following steps: Starting from any node, random walk sampling is performed with a fixed sampling length. Each time, neighboring nodes are visited or the initial node is returned with the same probability. The number of samples for each type of node is fixed to ensure that each type of node is sampled. Strongly related neighboring nodes are sampled for each node in the heterogeneous graph to obtain relevant path information. Each node in the metapath and its neighboring nodes are represented as a feature matrix, where each row of the feature matrix represents a node's feature vector. A graph convolutional neural network is used to aggregate these feature matrices, and the aggregated vector representation is calculated. This yields the vector representation of each node that aggregates all relevant nodes in the metapath. The aggregation further includes the following steps: Given a metapath P, aggregate the internal neighbor nodes of the metapath to obtain an embedding that contains the neighbors of the metapath as well as the structural and semantic information of the context in between. p(v,u) is a metapath instance connecting the target node v and its neighbor u based on the metapath. The intermediate nodes of p(v,u) are defined as {m... p(v,u) }=p(v,u)\(v,u); Using a meta-path instance encoder, all node features along a meta-path instance are transformed into a single vector: Where h′ v This represents the vector representation of node v after feature interaction transformation. An attention mechanism is used to perform a weighted summation of the neighboring nodes of the meta-path instance P related to the target node v, by learning the standardized importance weights of each meta-path instance. To model this, we perform a weighted summation over all instances: in It is the parameterized attention vector of the metapath P. The importance of neighbor node u on metapath instance p(v,u) to node v is represented. The vector representation of node v is updated according to the attention coefficient to obtain a new vector representation of node v that aggregates its metapath neighbors. A meta-path aggregation layer is performed to merge the semantic information displayed by all meta-paths containing this node. Different meta-path information is aggregated by assigning different weights to different meta-paths through an attention mechanism. in It is a concatenated vector representation of all nodes along the entire metapath. Interpreted as metapath P i The relative importance of type A nodes is determined by weighting the node type vectors of all metapaths of node v to obtain a new vector representation of node v. Project the embedding vector representation of node v to a reasonable output dimension: Where Wo is the parameter matrix, which yields the final feature vector representation of the target node; The state representation of the current node is updated based on the state of the meta-path neighbors. After multiple convolutions, the final embedding vector representations of the user and item nodes are obtained. The dot product operation is performed on the finally learned embedding vector representations of user and item nodes to calculate the user's preference for each item.
2. The meta-path heterogeneous graph aggregation method based on feature interaction according to claim 1, characterized in that, The method of using a multi-head attention model to construct user preferences for different combinations of user and item features further includes the following steps: The correlation between feature m and feature k under a specific attention head h is calculated using the following formula: Where M is the number of features, and l is a variable whose value varies from 1 to M; By combining coefficients Guided by all relevant features, update the representation of feature m in subspace h: in It is an attention function that defines the similarity between feature m and feature k, W. q (h) W k (h) and W v (h) It is a transformation matrix that maps the original embedding space to a new space.
3. The meta-path heterogeneous graph aggregation method based on feature interaction according to claim 2, characterized in that, It also includes the following steps: When a feature involves different combined features, multiple attention heads are used to create different subspaces and learn different feature interactions separately. The combined features learned under the multi-head attention mechanism are as follows: Where H is the total number of heads, W Res It is the projection matrix in the case of feature dimension mismatch, e m The original vector representation of the features; In the network, the initial features of the nodes are added to the learned feature representations to preserve the original features of the nodes, and each feature is updated with a new feature representation. It is a representation of a high-order combinatorial feature.
4. The meta-path heterogeneous graph aggregation method based on feature interaction according to claim 1, characterized in that, The step of performing a dot product operation on the finally learned user and item embedding vector representations to calculate the user's preference for each item further includes the following steps: Given a user u, an item i, and its corresponding learned embedding, compute an estimated score y to measure user u's preference for item i. The user's preference score is defined as follows: Where T is the transpose of the vector, and σ is the activation function.
5. The meta-path heterogeneous graph aggregation method based on feature interaction according to claim 1, characterized in that, It also includes the following steps: Calculate each user's preference for negative and positive samples separately; The learned parameters are updated based on the difference between negative and positive samples. The loss calculation function is as follows: Where σ is the activation function, and Ω is the set of observed positive node pairs. - It is the set of negative node pairs sampled from all unobserved node pairs.
Citation Information
Patent Citations
Bidirectional cross-domain recommendation method of heterogeneous graph neural network based on meta-path enhancement
CN116166875A
Group recommendation method for feature enhancement based on context of meta-path
CN116842258A