A multi-view self-supervised learning recommendation method for heterogeneous information networks
Patent Information
- Application Number
- CN202311757999.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-12-20
AI Technical Summary
[0005]本发明旨在解决现有技术中存在的无法生成具有高质量用户物品嵌入的交互标签,导致模型推荐精度低技术问题,特别创新地提出了一种面向异构信息网络的多视图自监督学习推荐方法
[0074]本发明的有益效果:本发明提出多视图推荐模型,结合了自监督学习,可同时从多个异构子图中学习用户和物品的特征表示,并利用自监督学习的损失函数对多视图推荐模型进行评价和优化,可有效地提高推荐系统的推荐精度和推荐系统的稳定性。本发明利用多视图自监督学习的方法,可从多个异构子图中学习用户和物品的特征表示,可解决数据稀疏性和异构性的问题,从而提高推荐模型的准确性和稳定性。本发明利用最大熵路径设置不同的元路径从异构图中提取异构子图,建立多视图推荐模型,对异构子图进行编码和解码,融合节点语义嵌入,生成用户节点嵌入和物品节点嵌入,进行余弦相似度计算,生成推荐列表。通过这种方法,可解决节点同一属性的问题,本发明可处理不同类型的信息,从而避免信息特征的提取不完整,减少信息的损失。本发明在局部视图内和全局视图内进行编码,更加完整的获取异构图中各节点之间的复杂关系,不同视图下获得的每个语义子图编码到自己的语义潜在空间,再解码到与其不同的语义空间,以捕获在不同视图下的语义相关性。综合利用多视图信息和不同视图的关联性,准确建模用户兴趣和物品特征。
Smart Images

Figure CN117743685B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of user interest recommendation technology, and in particular to a multi-view self-supervised learning recommendation method for heterogeneous information networks. Background Technology
[0002] In recent years, Graph Neural Networks (GNNs) have played a significant role in recommender systems. The core of a GNN consists of two parts: message passing and node updates. By aggregating the features of neighboring nodes to update the representation of the current node, a GNN can learn low-dimensional representations of each user and item. These representations capture the characteristics and interests of users and items, thereby supporting personalized recommendations.
[0003] However, existing recommendation systems still have problems. First, the graph neural networks in existing recommendation systems are often limited by the scarcity of training labels. In other words, most current heterogeneous graph neural network models are trained using supervised or semi-supervised learning methods, heavily relying on manually labeled information. Therefore, they cannot generate interactive labels with high-quality user-item embeddings, resulting in low recommendation accuracy.
[0004] Secondly, most graph neural networks inevitably exhibit homogeneity. Nodes tend to represent the same attribute, while heterogeneous graphs are more common in real life. Furthermore, most existing graph methods focus on processing different types of information from a single perspective, leading to incomplete feature extraction and information loss. Summary of the Invention
[0005] This invention aims to solve the technical problem in existing technologies that cannot generate interactive tags with high-quality user item embeddings, resulting in low model recommendation accuracy. In particular, it innovatively proposes a multi-view self-supervised learning recommendation method for heterogeneous information networks.
[0006] To achieve the above-mentioned objectives of the present invention, the present invention provides
[0007] A multi-view self-supervised learning recommendation method for heterogeneous information networks, the method comprising:
[0008] S100. Obtain the heterogeneous graph and use the maximum entropy path algorithm to set different meta-paths to extract heterogeneous subgraphs from the heterogeneous graph.
[0009] S200. Establish a multi-view recommendation model and train the multi-view recommendation model using the heterogeneous subgraph;
[0010] S300. Encode the heterogeneous subgraphs to obtain the node semantic embedding of each heterogeneous subgraph;
[0011] S400. Decode the node semantic embedding of each heterogeneous subgraph and fuse the node semantic embedding of each heterogeneous subgraph to obtain user node embedding and item node embedding.
[0012] S500: Map the features of each node in the local view and the global view to the same vector space, and fuse the features of each node; use the node embedding representation in the local view as positive samples and the node embedding representation in the global view as negative samples.
[0013] S600. Maximize the embedded representation of the interaction information between the positive and negative samples using the loss function of self-supervised learning;
[0014] S700: Evaluate and optimize the multi-view recommendation model using the interactive information;
[0015] S800. Calculate the cosine similarity between user nodes and item nodes, and generate a recommendation list based on the cosine similarity.
[0016] As an optional embodiment of the present invention, the step of using the maximum entropy path to set different meta-paths to extract heterogeneous subgraphs from the heterogeneous graph includes:
[0017] S101. Calculate the optimal value of the parameter vector, and obtain the heterogeneous subgraph of the starting node and the target node based on the optimal value of the parameter vector for the maximum entropy path.
[0018] The formula for calculating the optimal value of the parameter vector is:
[0019]
[0020]
[0021] Where P(p) represents the meta-path probability, θ agg Let L(θ) represent the parameter vector, Z represent the normalization factor, and L(θ) represent the parameter vector. agg ) represents the loss function.
[0022] As an optional embodiment of the present invention, optionally, encoding the heterogeneous subgraph to obtain the node semantic embedding of each heterogeneous subgraph includes:
[0023] S301. Calculate the semantic embedding of the nodes in the heterogeneous subgraph;
[0024] The calculation formula is:
[0025]
[0026] in, The semantic embedding representation of nodes under metapath P;
[0027] S302. Aggregate the neighboring nodes of the node and update the node;
[0028] The updated formula is:
[0029]
[0030] in, N represents the representation of node v at layer l. v This represents the set of neighboring nodes of node v. This represents the characteristics of node u in layer l-1;
[0031] S303. Update the features of the updated node again;
[0032] The feature update formula is:
[0033]
[0034] in, This represents the semantic embedding of node v at layer l, in MLP. l Denotes the l-th multilayer perceptron layer, ∈ l This represents a learnable parameter.
[0035] As an optional embodiment of the present invention, the formula for decoding the node semantic embedding of each heterogeneous subgraph is optionally:
[0036]
[0037] Where, d v This represents the representation of node v in the target semantic space.
[0038] As an optional embodiment of the present invention, the cosine similarity calculation of the user node embedding and the item node embedding is performed using the following formula:
[0039] Sim(x du ,x di )=(x u ·x i ) / (||x u ||*||x i ||)
[0040] Sim() represents cosine similarity.
[0041] As an optional embodiment of the present invention, optionally, the formula for mapping the features of each node in the local view and the global view to the same vector space is:
[0042]
[0043]
[0044] in, This represents the embedding of user node features and item node features in a local view. This represents the embedding of item node features and user node features in the global view.
[0045] As an optional embodiment of the present invention, optionally, maximizing the embedded representation of the interaction information between the positive sample and the negative sample using the loss function of self-supervised learning includes:
[0046] S601. Calculate the loss of user nodes in the local view and the loss of item nodes in the global view, and use the loss of user nodes and the loss of item nodes to calculate the weighted average of the loss of the local view and the global view.
[0047] The formula for calculating the loss of nodes in a local view is:
[0048]
[0049] Among them, L l This represents the loss of nodes in the local view;
[0050] The formula for calculating the loss of item nodes in the global view is:
[0051]
[0052] Among them, L o This represents the loss of nodes in the global view;
[0053] The formula for calculating the weighted average loss of the local view and the global view is:
[0054]
[0055] Among them, L lo θ represents the weighted average loss between the local view and the global view. path This represents the weighting coefficient.
[0056] As an optional embodiment of the present invention, optionally, evaluating and optimizing the multi-view recommendation model using the interaction information includes:
[0057] S701. Obtain the same nodes in different heterogeneous subgraphs and merge them;
[0058] S702. Utilize the maximum entropy path sampling strategy and select the meta-path with the maximum entropy value by maximizing the loss function;
[0059] S703. Optimize the encoding of heterogeneous subgraphs using the heterogeneous subgraph encoding loss function;
[0060] S704. Optimize the similarity between users and items using the multi-view recommendation loss function;
[0061] S705. Optimize the multi-view recommendation model using the overall loss function.
[0062] As an optional embodiment of the present invention, the formula for the maximum entropy path sampling loss function is optionally:
[0063]
[0064] Where L1(t,p,θ1) represents the maximum entropy path sampling loss, and s(t,p,θ1) is the score function of the metapath p;
[0065] The formula for the heterogeneous subgraph encoding loss function is:
[0066]
[0067] Where L2(t,p,θ2) represents the heterogeneous subgraph coding loss, X(t,p,θ2) represents the predicted coding vector, and H(t,p,θ2) represents the actual coding vector;
[0068] The formula for the multi-view recommendation loss function is as follows:
[0069]
[0070] Where L3(t,p,θ3) represents the multi-view recommendation fusion loss, f(X du ,X di θ3) represents the similarity score between user u and item i.
[0071] As an optional embodiment of the present invention, the formula for the overall loss function is optionally:
[0072] L total =ω1·L1(t,p,θ1)+ω2·L2(t,p,θ2)+ω3·L3(t,p,θ3)+ω lo ·L lo
[0073] Among them, L total This represents the overall loss of the multi-view recommendation model.
[0074] The beneficial effects of this invention are as follows: This invention proposes a multi-view recommendation model that combines self-supervised learning. It can simultaneously learn feature representations of users and items from multiple heterogeneous subgraphs and evaluates and optimizes the multi-view recommendation model using the loss function of self-supervised learning, effectively improving the recommendation accuracy and stability of the recommendation system. This invention utilizes multi-view self-supervised learning to learn feature representations of users and items from multiple heterogeneous subgraphs, solving the problems of data sparsity and heterogeneity, thereby improving the accuracy and stability of the recommendation model. This invention uses maximum entropy paths to set different meta-paths to extract heterogeneous subgraphs from the heterogeneous graph, establishes a multi-view recommendation model, encodes and decodes the heterogeneous subgraphs, fuses node semantic embeddings to generate user node embeddings and item node embeddings, calculates cosine similarity, and generates a recommendation list. This method solves the problem of nodes having the same attribute. This invention can handle different types of information, thereby avoiding incomplete feature extraction and reducing information loss. This invention performs encoding within both local and global views to more completely capture the complex relationships between nodes in a heterogeneous graph. Each semantic subgraph obtained under different views is encoded into its own semantic latent space and then decoded into a different semantic space to capture semantic relevance across different views. By comprehensively utilizing multi-view information and the correlation between different views, it accurately models user interests and item features. Attached Figure Description
[0075] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood in conjunction with the following description of the embodiments in conjunction with the accompanying drawings, wherein:
[0076] Figure 1 This is a schematic diagram of the process structure of an embodiment of the present invention.
[0077] Figure 2 This is a schematic diagram of the structure of the multi-view recommendation model according to an embodiment of the present invention. Detailed Implementation
[0078] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0079] like Figure 1 and 2 As shown, a multi-view self-supervised learning recommendation method for heterogeneous information networks is proposed, the method comprising:
[0080] S100. Obtain the heterogeneous graph and use the maximum entropy path algorithm to set different meta-paths to extract heterogeneous subgraphs from the heterogeneous graph.
[0081] It should be noted that the first step is to obtain heterogeneous graphs from the original data. Different heterogeneous graphs have different structures and attributes. This invention uses a maximum entropy path algorithm to select meta-paths, which can be used to extract heterogeneous subgraphs from the original graph. By selecting different meta-paths, different heterogeneous subgraphs can be extracted from the original graph. These subgraphs have different structures, containing user nodes and item nodes. For example, in a heterogeneous graph of users, movies, and movie genres, selecting the user and movie view results in a different view from the movie and movie genre view. The maximum entropy path sampling strategy prioritizes the importance of meta-paths, assigning higher probabilities to more important meta-paths and increasing the diversity of meta-paths. This allows the sampling results to focus more on important meta-paths, improving sampling efficiency and effectiveness, making the walk more consistent with specific semantic meanings, and enabling more targeted exploration of meta-paths related to specific node types and relationships. Specifically, given a starting node and a target node, meta-paths are set in the heterogeneous graph, and heterogeneous subgraphs are extracted under these meta-paths.
[0082] S200. Establish a multi-view recommendation model and train the multi-view recommendation model using the heterogeneous subgraph;
[0083] It should be noted that the multi-view recommendation model, combined with self-supervised learning, can simultaneously learn feature representations of users and items from multiple heterogeneous subgraphs. The loss function of self-supervised learning is used to evaluate and optimize the multi-view recommendation model, effectively improving the recommendation accuracy and stability of the system. This invention utilizes a multi-view self-supervised learning method to learn feature representations of users and items from multiple heterogeneous subgraphs, addressing the problems of data sparsity and heterogeneity, thereby improving the accuracy and stability of the recommendation model.
[0084] S300. Encode the heterogeneous subgraphs to obtain the node semantic embedding of each heterogeneous subgraph;
[0085] It should be noted that the purpose of encoding heterogeneous subgraphs is to obtain the potential low-dimensional vector representation of each heterogeneous subgraph. For example, encoding the node "movie" into a two-dimensional semantic space, then this two-dimensional vector value can represent the comedic level, romantic level, etc., of the movie, and can be represented as... This represents the semantic encoding of node vi under metapath p. R represents a set used to store the semantic encoding representation of node vi under different meta-paths p. 1×ds Let ds represent a real number field and ds represent the dimension of the entire vector. This embedding representation can better capture the structural and relational information of all nodes and edges in heterogeneous subgraphs, thus making the recommendation task more reliable.
[0086] S400. Decode the node semantic embedding of each heterogeneous subgraph and fuse the node semantic embedding of each heterogeneous subgraph to obtain user node embedding and item node embedding.
[0087] It should be noted that after obtaining the node semantic embeddings of each heterogeneous subgraph, the node semantic embeddings obtained within each heterogeneous subgraph are decoded into other semantic spaces. The different semantic information captured under different meta-paths is then fused together to obtain the node semantic embeddings for multiple views. For example, decoding the "movie" node into the "user" semantic space represents the user's preference for that movie; decoding it into the "movie genre" semantic space represents the feature representation of that movie across different movie genres. To fully utilize these multi-view node semantic embeddings, the node semantic embeddings from different heterogeneous subgraphs are integrated, comprehensively considering the semantic information of different views and improving the performance of the multi-view recommendation model.
[0088] S500: Map the features of each node in the local view and the global view to the same vector space, and fuse the features of each node; use the node embedding representation in the local view as positive samples and the node embedding representation in the global view as negative samples.
[0089] It should be noted that this invention maps the node features of local and global views to the same vector space. Different views provide information of different aspects and levels. Mapping them to the same space helps to integrate this information, so that the information between different views can be better compared and fused, thereby better representing the differences between nodes in different views, improving the richness of the representation and the performance of the model; the nodes mentioned above refer to user nodes and item nodes.
[0090] S600. Maximize the embedded representation of the interaction information between the positive and negative samples using the loss function of self-supervised learning;
[0091] It should be noted that in step S500, this implementation maps node features from different views to the same vector space. Furthermore, node features are treated as positive samples in the local view and as negative samples in the global view. Next, a self-supervised learning loss function is used to maximize the interaction information between positive and negative samples. This interaction information can be understood as the correlation between positive and negative samples. By maximizing this interaction information, the feature representations of users and items can be learned better, thereby further improving the accuracy and stability of the recommendation model. Specifically, a contrastive loss function can be used to calculate the interaction information between positive and negative samples. The contrastive loss function compares the correlation between positive and negative samples, allowing the multi-view recommendation model to pay more attention to the differences between positive and negative samples. By maximizing this interaction information, the potential relationships between users and items can be better explored, thereby providing users with more accurate and personalized recommendation services.
[0092] S700. The multi-view recommendation model is evaluated and optimized using the interaction information.
[0093] It should be noted that this invention utilizes four loss functions to optimize the multi-view recommendation model: maximum entropy path sampling loss, heterogeneous subgraph encoding loss, fusion multi-view recommendation loss, and overall loss. It employs a maximum entropy path sampling strategy and selects the meta-path with the maximum entropy value by maximizing the loss function, enabling the model to better understand the relationships between data. The heterogeneous subgraph encoding loss function optimizes the encoding of heterogeneous subgraphs by adjusting the parameters within the function to better capture heterogeneous information. The fusion multi-view recommendation loss function optimizes the similarity between users and items to train the multi-view recommendation model. Finally, the overall loss function optimizes the multi-view recommendation model by adjusting the weights of the maximum entropy path sampling loss, heterogeneous subgraph encoding loss, and fusion multi-view recommendation loss, thereby improving the recommendation accuracy of the multi-view recommendation model.
[0094] S800. Calculate the cosine similarity between user nodes and item nodes, and generate a recommendation list based on the cosine similarity.
[0095] It should be noted that step S800 uses cosine similarity to measure the similarity between user nodes and item nodes, calculated based on the cosine of the angle between their embeddings. A higher cosine similarity indicates greater similarity between the two nodes. This calculation method effectively measures the similarity between users and items, thus generating a more accurate recommendation list. When generating the recommendation list, step S800 sorts the embeddings of user nodes and item nodes according to their cosine similarity and selects the item node with the highest similarity to generate the recommendation list. Furthermore, S800 can also perform weighted processing based on users' historical behavior data and item attribute information to further improve the accuracy and diversity of the recommendation list.
[0096] In summary, this invention proposes a multi-view recommendation model by combining self-supervised learning and a multi-view recommendation model. This model can simultaneously learn feature representations of users and items from multiple heterogeneous subgraphs. The loss function of self-supervised learning is used to evaluate and optimize the multi-view recommendation model, effectively improving the recommendation accuracy and stability of the recommendation system. This invention utilizes a multi-view self-supervised learning method to learn feature representations of users and items from multiple heterogeneous subgraphs, addressing the problems of data sparsity and heterogeneity, thereby improving the accuracy and stability of the recommendation model. This invention uses maximum entropy paths to set different meta-paths to extract heterogeneous subgraphs from the heterogeneous graph, establishes a multi-view recommendation model, encodes and decodes the heterogeneous subgraphs, fuses node semantic embeddings to generate user node embeddings and item node embeddings, calculates cosine similarity, and generates a recommendation list. This method solves the problem of nodes having the same attribute. This invention can handle different types of information, thereby avoiding incomplete feature extraction and reducing information loss.
[0097] As an optional embodiment of the present invention, optionally, the step of using the maximum entropy path to set different meta-paths to extract heterogeneous subgraphs from the heterogeneous graph includes:
[0098] S101. Calculate the optimal value of the parameter vector, and obtain the heterogeneous subgraph of the starting node and the target node based on the optimal value of the parameter vector for the maximum entropy path.
[0099] The formula for calculating the optimal value of the parameter vector is:
[0100]
[0101]
[0102] Where P(p) represents the probability of the metapath p;
[0103] P represents the meta-path set;
[0104] θ aggRepresents a parameter vector;
[0105] Represents θ agg Transpose;
[0106] ψ(p) represents the eigenvector of the metapath p;
[0107] Z represents the normalization factor;
[0108] L(θ agg () represents the loss function;
[0109] |P| represents the size of the metapath set P;
[0110] logP(p) represents the logarithm of the probability of the metapath p;
[0111] p∈P means that the metapath p belongs to the metapath set P.
[0112] It should be noted that the above formula allows adjustment of the parameter vector to achieve its optimal value, at which point the selected meta-path has the maximum entropy. The goal of maximum entropy path sampling is to find a set of parameter vectors such that the sum of the probabilities of the meta-paths equals 1, and to maximize the loss function so that the selected meta-path has the maximum entropy value. After obtaining the optimal value of the parameter vector, this optimal value is used to extract heterogeneous subgraphs from the heterogeneous graph, thereby establishing a multi-view recommendation model.
[0113] As an optional embodiment of the present invention, optionally, encoding the heterogeneous subgraph to obtain the node semantic embedding of each heterogeneous subgraph includes:
[0114] S301. Calculate the semantic embedding of the nodes in the heterogeneous subgraph;
[0115] The calculation formula is:
[0116]
[0117] in, The semantic embedding representation of nodes within the metapath set P;
[0118] g p () indicates a specific graph encoder;
[0119] This represents the heterogeneous subgraph generated under node i and metapath p;
[0120] It should be noted that the encoder of this invention employs a Graph Isomorphism Network (GIN) encoder. The core of this encoder consists of multiple GIN Convolutional Layers (GIN Conv) and Multi-Layer Perceptron (MLP) layers, which work collaboratively to effectively capture and encode information from heterogeneous subgraphs. In each iteration step, the GIN Conv layer delves into the relationships between nodes and edges in the heterogeneous subgraph and sends these relationships as feature vectors to the MLP layer. The MLP layer then performs a non-linear transformation on these relationships to better capture the intrinsic structure of the subgraph. This encoding method generates clear and accurate encodings of heterogeneous subgraphs and obtains the latent relationships between nodes within the heterogeneous subgraph.
[0121] S302. Aggregate the neighboring nodes of the node and update the node;
[0122] The updated formula is:
[0123]
[0124] in, This represents the representation of node v at layer l;
[0125] N v Represents the set of neighboring nodes of node v;
[0126] This represents the characteristics of node u in layer l-1;
[0127] It should be noted that the purpose of aggregating neighboring nodes is to better capture local information about the nodes, so as to better update the nodes.
[0128] S303. Update the features of the updated node again;
[0129] The feature update formula is:
[0130]
[0131] in, This indicates the semantic embedding of node v in layer l;
[0132] MLP l () represents the l-th multilayer perceptron layer;
[0133] ∈ l This represents a learnable parameter;
[0134] This represents the representation of node v in the layer above layer l;
[0135] It should be noted that MLP l Used for transforming and mapping node features, ∈ l To distinguish between the central node and neighboring nodes, the multi-view recommendation model updates node features layer by layer through iterative steps S302 and 303, and obtains a higher-level semantic representation of the heterogeneous subgraph.
[0136] As an optional embodiment of the present invention, the formula for decoding the node semantic embedding of each heterogeneous subgraph is optionally:
[0137]
[0138] Where, d v This represents the representation of node v in the target semantic space.
[0139] Dec(·) represents the decoder;
[0140] This indicates the semantic embedding of node v in layer l.
[0141] It should be noted that after decoding, the embeddings of the nodes in multiple views are obtained. In order to make full use of these node embeddings in multiple views, this invention integrates the node embeddings in different views, which can comprehensively consider the semantic information of different views, thereby improving the performance of the multi-view recommendation model.
[0142] As an optional embodiment of the present invention, the cosine similarity calculation of the user node embedding and the item node embedding is performed using the following formula:
[0143] Sim(x du ,x di )=(x u ·x i ) / (||x u ||*||x i ||)
[0144] Where Sim(x) du ,x di ) represents x du and x di Cosine similarity;
[0145] x du Indicates the embedding of user u;
[0146] x di Indicates the embedding of item i;
[0147] x u Represents the user feature vector;
[0148] x i Represents the feature vector of an item;
[0149] ||x u || represents x u Take the mold;
[0150] ||x i || represents x i Take the mold.
[0151] It should be noted that the formulas for user node embedding and item node embedding are as follows:
[0152]
[0153]
[0154] Among them, X u Indicates user node embedding;
[0155] g represents encoder;
[0156] X i This indicates that the item node is embedded.
[0157] The formula for calculating cosine similarity uses x. du and x di The values are taken from the user node embedding and item node embedding matrices to calculate the cosine similarity between users and items. The higher the cosine similarity, the more similar the user and the item are. This calculation method can effectively measure the similarity between users and items, thereby generating a more accurate recommendation list.
[0158] As an optional embodiment of the present invention, optionally, the formula for mapping the features of each node in the local view and the global view to the same vector space is:
[0159]
[0160]
[0161] in, This represents the embedding of user node features and item node features in a local view.
[0162] MLP() represents a multilayer perceptron;
[0163] This represents the embedding of item node features and user node features in the global view.
[0164] It should be noted that this embodiment uses a two-layer multilayer perceptron with the ReLU activation function. In practical applications, depending on the specific problem, other types of neural network structures can be selected, or parameters such as the number of layers and the number of neurons in each layer can be adjusted.
[0165] As an optional embodiment of the present invention, optionally, maximizing the embedded representation of the interaction information between the positive sample and the negative sample using the loss function of self-supervised learning includes:
[0166] S601. Calculate the loss of user nodes in the local view and the loss of item nodes in the global view, and use the loss of user nodes and the loss of item nodes to calculate the weighted average of the loss of the local view and the global view.
[0167] It should be noted that the purpose of calculating the weighted average of the losses for the local and global views is to preserve the semantic information between positive and negative samples. Specifically, the loss value of the objective function is calculated using the formula for the weighted average of the losses for the local and global views. Based on the loss value of the objective function, the user and item node embeddings in the local view and the global view are updated to maximize the interaction information between positive and negative samples. This embodiment utilizes self-supervised learning techniques to calculate the losses for user nodes and item nodes, and uses these losses to update the embedding representations to preserve the semantic information between positive and negative samples.
[0168] The formula for calculating the loss of nodes in a local view is:
[0169]
[0170] Among them, L l This represents the loss of nodes in the local view;
[0171] log() represents the logarithmic function;
[0172] exp() represents an exponential function with base e.
[0173] sim(·) represents the cosine similarity between two nodes;
[0174] This represents the embedding representation of node features in the local view;
[0175] τ represents the temperature parameter;
[0176] N i Represents the set of negative samples;
[0177] o represents N i One negative sample;
[0178] It's important to note that the temperature parameter here controls the cosine similarity value in the loss function calculation. Specifically, the temperature parameter affects the cosine similarity value calculated by the loss function, thus influencing the final loss value. In this embodiment, a larger temperature parameter value results in a smaller cosine similarity value and a smaller loss value; conversely, a smaller temperature parameter value results in a larger cosine similarity value and a larger loss value. Therefore, by adjusting the temperature parameter value, the calculation result of the loss function can be controlled, thereby controlling the training process of the multi-view recommendation model and helping it to train more effectively.
[0179] The formula for calculating the loss of item nodes in the global view is:
[0180]
[0181] Among them, L o This represents the loss of nodes in the global view;
[0182] n represents the number of partial views;
[0183] The formula for calculating the weighted average loss of the local view and the global view is:
[0184]
[0185] Among them, L lo This represents the weighted average loss of the local view and the global view;
[0186] |v| indicates the number of local views and global views;
[0187] i represents the i-th user;
[0188] θ path Indicates the weighting coefficient;
[0189] As an optional embodiment of the present invention, optionally, evaluating and optimizing the multi-view recommendation model using the interaction information includes:
[0190] S701. Obtain the same nodes in different heterogeneous subgraphs and merge them;
[0191] It should be noted that the "identical nodes" here refer to the same user node embeddings and / or item node embeddings in different heterogeneous subgraphs. By merging these identical nodes, subsequent optimization of the multi-view recommendation model can be performed on them. Representing these identical nodes avoids redundancy and makes the heterogeneous subgraph structure more concise and clear. Representing identical nodes also avoids repeated calculations on the same node, thus saving computational resources.
[0192] The expression for merging the same node in different heterogeneous subgraphs is:
[0193]
[0194]
[0195] in, This indicates that node i is in view V. j Embedded vector after internal encoding;
[0196] q vi This represents the encoded node representation within the local view;
[0197] This indicates that node i is in view V. i and V j The encoded embedding vector between them;
[0198] V j and V i Representing different views;
[0199] d vj This represents the node representation within the global view;
[0200] This indicates a splicing operation.
[0201] S702. Utilize maximum entropy path sampling to select the meta-path with the maximum entropy value by maximizing the loss function;
[0202] It's important to note that maximizing the loss function to select the meta-path with the highest entropy value aims to ensure that during training, the higher the entropy value selected by the multi-view recommendation model, the greater the probability that the meta-path will be chosen. Therefore, maximizing the loss function is necessary to select the meta-path with the highest entropy. Using the maximum loss function focuses on meta-paths with larger entropy values, enabling the multi-view recommendation model to better understand the relationships between data. Furthermore, when predicting user behavior, the multi-view recommendation model can more accurately predict user preferences.
[0203] S703. Optimize the encoding of heterogeneous subgraphs using the heterogeneous subgraph encoding loss function;
[0204] It should be noted that the purpose of optimizing the encoding of heterogeneous subgraphs is to enable multi-view recommendation models to better capture information from heterogeneous subgraphs, thereby more accurately predicting user behavior preferences.
[0205] S704. Optimize the similarity between users and items using the multi-view recommendation loss function;
[0206] It should be noted that the purpose of optimizing the similarity between users and items using the fusion multi-view recommendation loss function is to enable the multi-view recommendation model to better measure the similarity between users and items, thereby more accurately predicting user behavioral preferences. Specifically, the fusion multi-view recommendation loss function allows the multi-view recommendation model to comprehensively consider information from different views when calculating the similarity between users and items, thus calculating the similarity between users and items more accurately.
[0207] S705. Optimize the multi-view recommendation model using the overall loss function.
[0208] It should be noted that by comprehensively considering the weights of the maximum entropy path sampling loss, heterogeneous subgraph encoding loss, and multi-view recommendation fusion loss using the overall loss function, the performance of the multi-view recommendation model can be comprehensively optimized. By adjusting the weights of different loss functions, the model's preferences in capturing meta-paths, heterogeneous subgraph information, and user-item similarity can be controlled, thereby enabling the model to better adapt to different recommendation scenarios and data characteristics.
[0209] As an optional embodiment of the present invention, the formula for the maximum entropy path sampling loss function is optionally:
[0210]
[0211] Where L1(t,p,θ1) represents the maximum entropy path sampling loss;
[0212] t represents the target node;
[0213] p represents a meta-path;
[0214] θ1 represents the parameter vector in the formula of the maximum entropy path sampling loss function;
[0215] |p| represents the length of the metapath or the number of nodes contained in the metapath;
[0216] P represents the meta-path set;
[0217] p' represents a variable in the metapath used to traverse each path in the metapath.
[0218] s(t,p,θ1) is the score function of the metapath p;
[0219] The formula for calculating the maximum entropy path sampling loss function is to calculate the selection probability of each metapath in the metapath set, and finally sum them by a logarithmic function to maximize the loss function and improve the diversity of the selection of the entire metapath.
[0220] The formula for the heterogeneous subgraph encoding loss function is:
[0221]
[0222] Where L2(t,p,θ2) represents the heterogeneous subgraph encoding loss;
[0223] θ2 represents the parameter vector in the formula for the heterogeneous subgraph encoding loss function;
[0224] X(t,p,θ2) represents the prediction encoding vector;
[0225] H(t,p,θ2) represents the actual encoded vector;
[0226] ||2 represents the L2 norm between reality and truth;
[0227] The formula for calculating the heterogeneous subgraph coding loss function is used to calculate the sum of squares between the predicted coding vector and the actual coding vector to measure the difference between the two. It can reduce the difference between the predicted coding vector and the actual coding vector. If the deviation between the predicted coding vector and the actual coding vector is large, the difference between the predicted coding vector and the actual coding vector can be reduced by adjusting θ2, thereby improving the coding accuracy.
[0228] The formula for the multi-view recommendation loss function is as follows:
[0229]
[0230] Where L3(t,p,θ3) represents the multi-view recommendation fusion loss;
[0231] θ3 represents the parameter vector in the formula of the multi-view recommendation loss function;
[0232] f(X du ,X di θ3) represents the similarity score between user u and item i.
[0233] The purpose of fusing the multi-view recommendation loss function is to optimize the accuracy of multi-view recommendation models in predicting user behavior. Specifically, this loss function utilizes user behavior data from different views, comprehensively considers information from each view, and calculates the similarity between users and items, thereby more accurately predicting user behavioral preferences. By optimizing the similarity between users and items, the fusing multi-view recommendation loss function can improve the recommendation performance and accuracy of multi-view recommendation models.
[0234] As an optional embodiment of the present invention, the formula for the overall loss function is optionally:
[0235] L total =ω1·L1(t,p,θ1)+ω2·L2(t,p,θ2)+ω3·L3(t,p,θ3)+ωlo ·L lo
[0236] Among them, L total This represents the overall loss of the multi-view recommendation model;
[0237] ω1 represents the weight of the maximum entropy path sampling loss;
[0238] ω2 represents the weight of the heterogeneous subgraph encoding loss;
[0239] ω3 represents the weight of the multi-view recommendation fusion loss;
[0240] ω lo The weights represent the weighted average of the loss for the local view and the global view.
[0241] ω1, ω2, ω3 and ω lo The sum of these values equals 1. By adjusting the weight of each loss function, the model's preference in capturing different types of information can be controlled. Specifically, if you want the multi-view recommendation model to focus more on the information of the meta-path, you can increase the weight of the maximum entropy path sampling loss; if you want the multi-view recommendation model to focus more on the information of the heterogeneous subgraph, you can increase the weight of the heterogeneous subgraph encoding loss; if you want the multi-view recommendation model to focus more on the similarity between users and items, you can increase the weight of the fusion multi-view recommendation loss; if you want the multi-view recommendation model to focus more on the information of the local and global views, you can increase the weight of the weighted average of the local and global view losses. By flexibly adjusting the weights of different loss functions, the model can adapt to different recommendation scenarios and data characteristics.
[0242] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A multi-view self-supervised learning recommendation method for heterogeneous information networks, characterized in that, The method includes: S100. Obtain the heterogeneous graph and use the maximum entropy path algorithm to set different meta-paths to extract heterogeneous subgraphs from the heterogeneous graph. S200. Establish a multi-view recommendation model and train the multi-view recommendation model using the heterogeneous subgraph; S300. Encode the heterogeneous subgraphs to obtain the node semantic embedding of each heterogeneous subgraph; S400. Decode the node semantic embedding of each heterogeneous subgraph and fuse the node semantic embedding of each heterogeneous subgraph to obtain user node embedding and item node embedding. S500: Map the features of each node in the local view and the global view to the same vector space, and fuse the features of each node; use the node embedding representation in the local view as positive samples and the node embedding representation in the global view as negative samples. S600. Maximize the embedded representation of the interaction information between the positive and negative samples using the loss function of self-supervised learning; S700: Evaluate and optimize the multi-view recommendation model using the interactive information; S800. Calculate the cosine similarity between user nodes and item nodes, and generate a recommendation list based on the cosine similarity.
2. The multi-view self-supervised learning recommendation method for heterogeneous information networks as described in claim 1, characterized in that, The method of using the maximum entropy path to set different meta-paths to extract heterogeneous subgraphs from the heterogeneous graph includes: S101. Calculate the optimal value of the parameter vector, and obtain the heterogeneous subgraph of the starting node and the target node based on the optimal value of the parameter vector for the maximum entropy path. The formula for calculating the optimal value of the parameter vector is: , , in, Metapath The probability, Represents the set of metapaths. Represents a parameter vector. express Transpose Metapath eigenvectors, Represents the normalization factor. Represents the loss function. Represents the meta-path set Size, Metapath The logarithm of the probability, Metapath Belongs to the meta-path set .
3. The multi-view self-supervised learning recommendation method for heterogeneous information networks as described in claim 1, characterized in that, The step of encoding the heterogeneous subgraph to obtain the node semantic embedding of each heterogeneous subgraph includes: S301. Calculate the semantic embedding of the nodes in the heterogeneous subgraph; The calculation formula is: , in, Represents the meta-path set Semantic embedding representation of the next node This indicates a specific graph encoder; the specific encoder uses a graph isomorphic network encoder. Indicates at node Harmony Path The generated heterogeneous subgraph; S302. Aggregate the neighboring nodes of the node and update the node; The updated formula is: , in, Represents a node exist Layer representation, Represents a node The set of neighboring nodes, Represents a node exist Features of the layer; S303. Update the features of the updated node again; The feature update formula is: , in, Represents a node exist Semantic embedding of layers Indicates the first Multilayer perceptron layer, Represents a learnable parameter. Represents a node exist The layer above the previous layer.
4. The multi-view self-supervised learning recommendation method for heterogeneous information networks as described in claim 3, characterized in that, The formula for decoding the node semantic embedding of each heterogeneous subgraph is as follows: , in, Represents a node Representation in the target semantic space This indicates the decoder.
5. The multi-view self-supervised learning recommendation method for heterogeneous information networks as described in claim 1, characterized in that, The formula for calculating the cosine similarity between the user node and the item node is as follows: , in, Represents cosine similarity. Indicates user Embedded, Represents items Embedded, Represents the user feature vector. Represents the feature vector of an item. Indicates to Take the mold. Indicates to Take the mold.
6. The multi-view self-supervised learning recommendation method for heterogeneous information networks as described in claim 1, characterized in that, The formula for mapping the features of each node in the local view and the global view to the same vector space is: , , in, This represents the embedding of item node features and user node features in the global view. This represents the embedding of item node features and user node features in the local view. This represents a multilayer perceptron.
7. The multi-view self-supervised learning recommendation method for heterogeneous information networks as described in claim 6, characterized in that, The step of maximizing the embedded representation of the interaction information between the positive and negative samples using a loss function derived from self-supervised learning includes: S601. Calculate the loss of user nodes in the local view and the loss of item nodes in the global view, and use the loss of user nodes and the loss of item nodes to calculate the weighted average of the loss of the local view and the global view. The formula for calculating the loss of nodes in a local view is: , in, This represents the loss of nodes in the local view. Represents the logarithmic function. Represented by natural base An exponential function with base 0. The cosine similarity between two nodes is represented by the following expression: Indicates temperature parameter, Represents the set of negative samples. express One negative sample; The formula for calculating the loss of item nodes in the global view is: , in, This represents the loss of nodes in the global view. Indicates the number of partial views; The formula for calculating the weighted average loss of the local view and the global view is: , in, This represents the weighted average of the losses for the local view and the global view. Indicates the number of local views and global views. This represents the weighting coefficient.
8. The multi-view self-supervised learning recommendation method for heterogeneous information networks as described in claim 1, characterized in that, The process of evaluating and optimizing the multi-view recommendation model using the interaction information includes: S701. Obtain the same nodes in different heterogeneous subgraphs and merge them; S702. Utilize the maximum entropy path sampling strategy and select the meta-path with the maximum entropy value by maximizing the loss function; S703. Optimize the encoding of heterogeneous subgraphs using the heterogeneous subgraph encoding loss function; S704. Optimize the similarity between users and items using the multi-view recommendation loss function; S705. Optimize the multi-view recommendation model using the overall loss function.
9. The multi-view self-supervised learning recommendation method for heterogeneous information networks as described in claim 8, characterized in that, The formula for maximizing the loss function is: , in, This represents the maximum entropy path sampling loss. Indicates the target node. Indicates the meta-path. The parameter vector in the formula for the maximum entropy path sampling loss function. This indicates the length of the metapath or the number of nodes contained in the metapath. Represents the set of metapaths. express One of the variables is used to iterate through each path in the metapath. Metapath The scoring function; The formula for the heterogeneous subgraph encoding loss function is: , in, This represents the encoding loss of heterogeneous subgraphs. Represents the predicted encoding vector. The parameter vector in the formula for the heterogeneous subgraph encoding loss function. Represents the actual encoded vector; The formula for the multi-view recommendation loss function is as follows: , in, This represents the loss from fusing multiple views for recommendation. The parameter vector in the formula for the multi-view recommendation fusion loss function is represented by: Indicates user and items Similarity score between them.
10. The multi-view self-supervised learning recommendation method for heterogeneous information networks as described in claim 9, characterized in that, The formula for the overall loss function is: , in, This represents the overall loss of the multi-view recommendation model. The weights represent the maximum entropy path sampling loss. The weights represent the weights of the heterogeneous subgraph encoding loss. The weights represent the weights in the multi-view recommendation loss. The weights represent the weighted average of the loss for the local view and the global view.
Citation Information
Patent Citations
Recommendation method and system for node and meta-path contrast learning enhancement
CN114117232A
Social recommendation method based on multi-feature heterogeneous graph neural networks
US20220414792A1