A label-aware recommendation method based on attention mechanism and hypergraph convolution
By introducing hypergraph structure and hypergraph convolution into graph neural networks, combined with attention mechanism, the problem that traditional methods are difficult to reflect high-order relationships of users, projects, and labels is solved, and more accurate feature representation and recommendation effects are achieved.
Patent Information
- Application Number
- CN202111461962.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-12-02
AI Technical Summary
Traditional graph neural networks are difficult to effectively reflect the complex and high-order relationships between users, projects, and labels, resulting in poor recommendation results.
Introduce hypergraph structure and hypergraph convolution to model higher-order relationships, and combine attention mechanisms to build hypergraphs through the interactive relationship between users and projects, users and tags, and projects and tags, extract higher-order relationship information, and use different Distinguish between information of importance.
It effectively reduces information loss during information transmission, makes full use of high-order interactive relationships, improves the accuracy and recommendation performance of feature representation, and avoids the problem of high-value information being masked by low-value information.
Smart Images

Figure CN114117142B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information service and computer software technology application, and specifically relates to a label-aware recommendation method based on attention mechanism and hypergraph convolution. Background Art
[0002] With the rapid growth of various information resources on the Internet, how to recommend resources or products that meet users' needs from huge amounts of data has attracted more and more attention from industry and academia, which requires service providers to have appropriate recommendation methods. In order to improve the accuracy of recommendations, many Internet service providers have adopted user-generated content (UGC) tagging systems, allowing users to actively tag products, videos, information, etc. Traditional recommendation methods such as collaborative filtering are difficult to reflect the complex, diverse, and high-order interactive relationships between users and projects, so the effect is not good. With the introduction of deep learning methods, recommendation methods based on graph neural networks have attracted attention because they can reflect topological structures. However, ordinary graph structures only reflect the relationship between two nodes through edges, but cannot reflect the relationship between three or more nodes. Summary of the invention
[0003] In order to solve the problem that the complex high-order relationships among users, projects, and tags in label-aware recommendation cannot be represented using traditional graph neural networks, the present invention introduces a hypergraph to model the high-order relationships between nodes, uses hypergraph convolution to complete the information transmission in the neural network, and uses the attention mechanism to reflect the importance of different information, thereby effectively alleviating the problem of high-order information loss in traditional recommendation methods.
[0004] In order to achieve the above object, the present invention is achieved through the following technical solutions:
[0005] The present invention is a tag-aware recommendation method based on attention mechanism and hypergraph convolution. The tag-aware recommendation method constructs different hypergraphs on the user side and the project side respectively through the direct interaction relationship between users and projects and the brief interaction relationship between users, projects and tags, extracts information of high-order relationship reactions through hypergraph convolution, and uses attention mechanism to distinguish information of different importance, and recommends through the obtained feature representation, which specifically includes the following steps:
[0006] Step 1: Initialize the feature representation of users and items to obtain u and i;
[0007] Step 2: Obtain the user feature u represented by the label based on the interaction between the user and the item and the label respectively tag and project characteristics i tag ;
[0008] Step 3: Construct three interactive bipartite graphs G based on the interaction relationships between users and items, users and tags, and items and tagsuser-item , G user-tag , G item-tag ;
[0009] Step 4: Based on the bipartite graph of users and items obtained in step 3, construct the hypergraph structures on the user side and the item side representing the direct interaction relationship.
[0010] Step 5: Based on the bipartite graphs of user and label, and item and label obtained in step 3, construct the hypergraph structures of the user side and item side respectively representing the label relationship.
[0011] Step 6: Use the two hypergraphs obtained in step 4 for the features u and i obtained in step 1 Perform hypergraph convolution respectively to obtain the neighborhood feature representation u of the updated direct relationship representation on the user side and the item side 1 、i 1 ;
[0012] Step 7: For the features u and i obtained in step 1, the two hypergraphs obtained in step 5 Perform hypergraph convolution respectively to obtain the neighborhood feature representation u of the updated label relationship representation on the user side and the item side 2 、i 2 ;
[0013] Step 8: Use the attention mechanism to process the features obtained in steps 2, 6, and 7 to obtain the weights of different feature representations to obtain the final user and item feature representation u * 、i * ;
[0014] Step 9: Concatenate the user and item feature representations obtained in step 8 to obtain z = [u * ;i * ], input it into the fully connected layer and use the Sigmoid function to obtain the predicted probability, and make recommendations based on the ratings.
[0015] A further improvement of the present invention is that in step 2, based on the number of times the user tags and the number of times the item is tagged, the tag representation features of the user and the item are initialized and normalized.
[0016] A further improvement of the present invention is that in step 4: hypergraphs on the user side and the project side representing the direct interaction relationship are respectively constructed based on the bipartite graph of users and projects. Take the user side as an example: if there is a path between two projects m and n, and the number of users passed through the path is less than k, then the two projects are k-order reachable neighbors; for project m, if it has a k-order reachable neighbor n and user u interacts directly with m, then user u is a k-order reachable user of project n. For each project, its k-order reachable users are regarded as a set, and the users on the set are nodes. The set can be regarded as a hyperedge, thus constructing a hypergraph. The project side is similar to the user side, building a hypergraph
[0017] A further improvement of the present invention is that in step 5, hypergraphs on the user side and the project side represented by the label relationship are respectively constructed according to the bipartite graphs of users and labels, and projects and labels. The idea is similar to the fourth step, but instead of using the user-project relationship, the user-label and project-label relationships are respectively used. Take the user side as an example: if there is a path between two labels m and n, and the number of users passed through the path is less than k, then the two labels are k-order reachable neighbors; for label m, if it has a k-order reachable neighbor n and user u interacts directly with m, then user u is a k-order reachable user of label n. For each label, its k-order reachable users are regarded as a set, and the users on the set are nodes. The set can be regarded as a hyperedge, thereby constructing a hypergraph. The project side is similar to the user side, building a hypergraph
[0018] The beneficial effects of the present invention are:
[0019] (1) The present invention utilizes the characteristics of the hypergraph data structure to represent the high-order relationships between users and projects, and uses hypergraph convolution to update information. Compared with graph neural networks, it can reduce information loss during information transmission and make full use of high-order interactive relationships to obtain domain feature representations.
[0020] (2) The present invention combines the attention mechanism to effectively distinguish features of different importance in multiple feature representations, thereby preventing high-value information from being overshadowed by low-value information.
[0021] (3) In tag-aware recommendation, the relationship between users, items, and tags is used for feature representation and relationship modeling, making full use of multiple information for feature representation.
[0022] (4) In the result prediction, the method of first concatenating the features on the user side and the project side and then processing them with a fully connected layer and a Sigmoid activation function is adopted, which reduces the impact of the information loss problem caused by directly performing the inner product of the features. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a relationship graph between users, projects and tags.
[0024] Figure 2 It is a hypergraph convolution that represents multiple hypergraphs.
[0025] Figure 3 It is a multi-feature processing process based on the attention mechanism.
[0026] Figure 4 It is the rating prediction process. DETAILED DESCRIPTION
[0027] The following will disclose the embodiments of the present invention with drawings. For the purpose of clear description, many practical details will be described together in the following description. However, it should be understood that these practical details should not be used to limit the present invention. That is, in some embodiments of the present invention, these practical details are not necessary. In addition, for the purpose of simplifying the drawings, some conventional structures and components will be depicted in a simple schematic manner in the drawings.
[0028] In order to solve the problems in label-aware recommendation, the present invention introduces a hypergraph to model the high-order relationships between nodes, uses hypergraph convolution to complete the information transmission in the neural network, and uses the attention mechanism to reflect the importance of different information, thereby effectively alleviating the problem of high-order information loss in traditional recommendation methods. Figure 1 The interactive relationship between users, items, and tags is given, including both the direct interactive relationship between users and items, and the relationship between users, tags, and items. In order to extract features from complex relationships for recommendation, the present invention introduces attention mechanism and hypergraph convolution.
[0029] Figure 2-3 As shown, the present invention is a label-aware recommendation method based on attention mechanism and hypergraph convolution. The method constructs different hypergraphs on the user side and the project side respectively through the direct interaction relationship between users and projects and the brief interaction relationship between users, projects and labels, extracts information of high-order relationship reactions through hypergraph convolution, and uses attention mechanism to distinguish information of different importance, and recommends through the obtained feature representation, which specifically includes the following steps:
[0030] Step 1: Initialize features. Here, the initial feature u is established on the user side based on personal information such as user ID, gender, age, etc., and the initial feature i is established on the project side based on product information. In this step, the tag perception part is not involved.
[0031] Step 2: Use the tuple F = (U, I, T, A) to represent the user set U, the item set I, the tag set T, and the relationship representation set A. In the user-tag feature, the number of times the user marks the tag is represented as a feature Similarly, the item-label feature is in and They represent the number of times user u and item i are marked with label p, and σ represents the normalization operation.
[0032] Step 3: Construct three interactive bipartite graphs G based on the interaction relationships between users and items, users and tags, and items and tags user-item , G user-tag , G item-tag . Figure 1 It can be regarded as a combined representation of three bipartite graphs. The purpose of establishing a bipartite graph is to construct a hypergraph structure, in which the bipartite graph of users and items uses the direct interaction between users and items, such as the rating matrix.
[0033] Step 4: Based on the bipartite graph of users and projects, respectively construct hypergraphs on the user side and project side that represent direct interaction relationships. Take the user side as an example: if there is a path between two projects m and n, and the number of users passed in the path is less than k, then the two projects are k-order reachable neighbors; for project m, if it has a k-order reachable neighbor n and user u interacts directly with m, then user u is a k-order reachable user of project n. For each project, its k-order reachable users are regarded as a set, and the users on the set are nodes. The set can be regarded as a hyperedge, thus constructing a hypergraph The project side is similar to the user side, building a hypergraph Specifically, if there is a path between two users u and v, and the number of items passed in the path is less than k, then the two users are k-order reachable neighbors; for user u, if it has a k-order reachable neighbor v and item m interacts directly with u, then item m is a k-order reachable item of user u. For each user, its k-order reachable items are regarded as a set, and the items on the set are regarded as nodes. The set can be regarded as a hyperedge, thus constructing a hypergraph.
[0034] Step 5: Based on the bipartite graphs of user and label, and project and label, respectively, construct the hypergraphs on the user side and project side represented by the label relationship. Take the user side as an example: if there is a path between two labels m and n, and the number of users passed in the path is less than k, then the two labels are k-order reachable neighbors; for label m, if it has a k-order reachable neighbor n and user u interacts directly with m, then user u is a k-order reachable user of label n. For each label, its k-order reachable users are regarded as a set, and the users on the set are nodes. The set can be regarded as a hyperedge, thus constructing a hypergraph The project side is similar to the user side, building a hypergraph Specifically, if there is a path between two labels m and n, and the number of items passed in the path is less than k, then the two labels are k-order reachable neighbors; for label m, if it has a k-order reachable neighbor n and item p interacts directly with m, then item p is a k-order reachable item of label n. For each label, its k-order reachable items are regarded as a set, and the items on the set are regarded as nodes. The set can be regarded as a hyperedge, thus constructing a hypergraph.
[0035] Step 6: Express the hypergraph structure in the form of an association matrix H = (V, E), where V is the node set and E is the hyperedge set. Use the following method to indicate whether node v is on the hyperedge e:
[0036]
[0037] Therefore, we get the hypergraph The incidence matrix of H d-user , H d-item .
[0038] Taking the user side as an example, the hypergraph convolution can be expressed as:
[0039]
[0040] Here we use the spectrum method to perform hypergraph convolution. (l) represents the learnable parameter matrix on the lth layer, σ is the activation function, D v is the degree matrix of the node, D E is the degree matrix of the hyperedge. d-user Hypergraph The incidence matrix of is H = (V, E), where V is the node set and E is the hyperedge set. The multiplication operation represents the direct interaction relationship on the user side, which represents the hypergraph The aggregation from node features to hyperedge features is similar to H d-user The multiplication operation represents At the same time, according to the idea of ResNet, in each layer of the hypergraph convolution, the original features are added to retain the influence of the previous features to prevent the neighbor features from having too much influence and causing the initial features to fail to be reflected.
[0041] The project side is similar to the user side. The hypergraph convolution can be expressed as:
[0042]
[0043] Where: Θ (l) represents the learnable parameter matrix on the lth layer, σ is the activation function, D v is the degree matrix of the node, D Eis the degree matrix of the hyperedge. d-item Hypergraph The incidence matrix of is H = (V, E), where V is the node set and E is the hyperedge set. The multiplication operation represents the direct interaction relationship between items and represents the hypergraph The aggregation from node features to hyperedge features is similar to H d-item The multiplication operation represents Aggregation from hyperedge features to node features.
[0044] Therefore, at each layer of the hypergraph convolution, information is updated in the form of node-hyperedge-node, and information is extracted from high-order relationships in the form of a hypergraph neural network.
[0045] Step 7: Similar to step 6, get the hypergraph The incidence matrix of H t-user , H t-item .
[0046] The user-side hypergraph convolution can be expressed as:
[0047]
[0048] Where: Θ (l) represents the learnable parameter matrix on the lth layer, σ is the activation function, D v is the degree matrix of the node, D E is the degree matrix of the hyperedge. Hypergraph The incidence matrix of is H = (V, E), where V is the node set and E is the hyperedge set. The multiplication operation represents the user-side label representation hypergraph The aggregation from node features to hyperedge features is similar to H t-user The multiplication operation represents Aggregation from hyperedge features to node features.
[0049] The project-side hypergraph convolution can be expressed as:
[0050]
[0051] Where: Θ (l) represents the learnable parameter matrix on the lth layer, σ is the activation function, D v is the degree matrix of the node, D E is the degree matrix of the hyperedge. t-item Hypergraph The incidence matrix of is H = (V, E), where V is the node set and E is the hyperedge set. The multiplication operation represents the item side label representation hypergraph The aggregation from node features to hyperedge features is similar to The multiplication operation represents Aggregation from hyperedge features to node features.
[0052] Step 8: Figure 3 As shown, the feature u obtained according to step 2, step 6, and step 7 tag 、i tag 、u 1 、i 1 、u 2 、i 2 , use the attention mechanism to obtain the final feature representation u on the user side and the item side * 、i * .
[0053] Take the user side as an example, because u tag with u 1 、u 2 The dimensions of are different, so it is not suitable to perform a direct addition operation. Therefore, they are concatenated separately to obtain u 1-tag and u 2-tag .
[0054] Get u 1-tag and u 2-tag After that, the attention mechanism is used to process the two feature representations into the final feature representation:
[0055] a(u, k) = W T tanh(Wu k-tag +b2)
[0056]
[0057] The weights obtained by the attention mechanism can obtain the final feature representation u on the user side. *
[0058] u * =α(u,1)u 1-tag +α(u,2)u 2-tag
[0059] will i tag with i 1 、i 2 Perform splicing operations respectively to obtain i 1-tag and i 2-tag , and then use the attention mechanism to process the two feature representations into one feature representation:
[0060] a(i, k) = W T tanh(Wi k-tag +b2)
[0061]
[0062] According to the attention mechanism, the weights are obtained to obtain the final feature representation i on the project side. * :
[0063] i * =α(i,1)i 1-tag +α(i,2)u 2-tag .
[0064] Step 9: Figure 4 As shown, according to u * with i * Perform concatenation operation to obtain z = [u * ;i * ], and uses the Sigmoid function as the activation function to obtain the user-item probability prediction for recommendation.
[0065]
[0066] Based on the obtained probability prediction, the projects are ranked in Top-K order and recommended to users.
[0067] Use the cross entropy function as the loss function for model training:
[0068]
[0069] Where X is the training sample set.
[0070] The present invention introduces hypergraph convolution to mine high-order relationships for feature extraction. At the same time, the attention mechanism is used to weight the features obtained from the hypergraph of direct user-item interaction and the hypergraph constructed by label perception, which can better distinguish information of different importance. By cleverly combining hypergraph convolution and attention mechanism, the method proposed in the present invention can fully extract the features in the direct interaction relationship between users and items and the interaction relationship with labels, effectively improving the performance of the recommendation method.
[0071] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.
Claims
1. A label-aware recommendation method based on attention mechanism and hypergraph convolution, characterized by: The tag-aware recommendation method constructs different hypergraphs on the user side and the project side through the direct interaction between users and projects and the brief interaction between users, projects, and tags. It extracts information about high-order relationship responses through hypergraph convolution, and uses the attention mechanism to distinguish information of different importance. It makes recommendations based on the obtained feature representation. The specific steps are as follows: Step 1: Initialize the feature representation of user u and item i, and obtain the initial feature u of user u and the initial feature i of item i; Step 2: Obtain the user feature u represented by the label based on the interaction between the user and the item and the label respectively tag and project characteristics i tag ; Step 3: Construct three interactive bipartite graphs G based on the interaction relationships between users and items, users and tags, and items and tags user-item , G user-tag , G item-tag ; Step 4: Based on the bipartite graph of users and items obtained in step 3, construct the hypergraph structures on the user side and the item side representing the direct interaction relationship. Step 5: Based on the bipartite graphs of user and label, and item and label obtained in step 3, construct the hypergraph structures of the user side and item side respectively representing the label relationship. Step 6: Use the two hypergraphs obtained in step 4 for the features u and i obtained in step 1 Perform hypergraph convolution respectively to obtain the neighborhood feature representation u of the updated direct relationship representation on the user side and the item side 1 、i 1 ; Step 7: For the features u and i obtained in step 1, the two hypergraphs obtained in step 5 Perform hypergraph convolution respectively to obtain the neighborhood feature representation u of the updated label relationship representation on the user side and the item side 2 、i 2 ; Step 8: Use the attention mechanism to process the features obtained in steps 2, 6, and 7 to obtain the weights of different feature representations to obtain the final user and item feature representation u * 、i * ; Step 9: Concatenate the user and item feature representations obtained in step 8 to obtain z = [u * ;i * ], input it into the fully connected layer and use the Sigmoid function to obtain the predicted probability, and make recommendations based on the ratings, where: The user-side and project-side feature processing in step 8 is specifically as follows: According to the feature u obtained in step 2, step 6 and step 7 tag 、i tag 、u 1 、i 1 、u 2 、i 2 , use the attention mechanism to obtain the final feature representation u on the user side and the item side * 、i * ,in: will u tag with u 1 、u 2 Perform splicing operations separately to obtain u 1-tag and u 2-tag , and then use the attention mechanism to process the two feature representations into one feature representation: a(u,k)=W T tanh(Wu k-tag +b2) According to the attention mechanism, the weights are obtained to obtain the final feature representation u on the user side. * : in * = α(u, 1)u 1-tag +α(u,2)u 2-tag ; will i tag with i 1 、i 2 Perform splicing operations respectively to obtain i 1-tag and i 2-tag , and then use the attention mechanism to process the two feature representations into one feature representation: a(i,k)=w T tanh(wi k-tag +b2) According to the attention mechanism, the weights are obtained to obtain the final feature representation i on the project side. * : i * =α(i,1)i 1-tag +α(i,2)u 2-tag 。 2. According to claim 1, a label-aware recommendation method based on attention mechanism and hypergraph convolution is characterized by: The hypergraph structure on the user side in step 4 The construction of is as follows: if there is a path between two projects m and n, and the number of users passed in the path is less than k, then the two projects are k-order reachable neighbors; for project m, if it has a k-order reachable neighbor n and user u interacts directly with m, then user u is a k-order reachable user of project n. For each project, its k-order reachable users are regarded as a set, and the users on the set are nodes. The set can be regarded as a hyperedge, thus constructing a hypergraph 3. According to claim 2, a label-aware recommendation method based on attention mechanism and hypergraph convolution is characterized in that: Hypergraph structure of the project side in step 4 The construction is specifically: If there is a path between two users u and v, and the number of items passed in the path is less than k, then the two users are k-order reachable neighbors; for user u, if it has a k-order reachable neighbor v and item m directly interacts with u, then item m is a k-order reachable item of user u. For each user, its k-order reachable items are regarded as a set, and the items on the set are regarded as nodes. The set can be regarded as a hyperedge, thus constructing a hypergraph.
4. According to claim 1, a label-aware recommendation method based on attention mechanism and hypergraph convolution is characterized in that: The hypergraph structure on the user side in step 5 The construction of is as follows: if there is a path between two labels m and n, and the number of users passed in the path is less than k, then the two labels are k-order reachable neighbors; for label m, if it has a k-order reachable neighbor n and user u interacts directly with m, then user u is a k-order reachable user of label n. For each label, its k-order reachable users are regarded as a set, and the users on the set are regarded as nodes. The set can be regarded as a hyperedge, thus constructing a hypergraph 5. According to claim 4, a label-aware recommendation method based on attention mechanism and hypergraph convolution is characterized in that: Hypergraph structure of the project side in step 5 The construction is as follows: if there is a path between two labels m and n, and the number of items passed in the path is less than k, then the two labels are k-order reachable neighbors; for label m, if it has a k-order reachable neighbor n and item p interacts directly with m, then item p is a k-order reachable item of label n. For each label, its k-order reachable items are regarded as a set, and the items on the set are regarded as nodes. The set can be regarded as a hyperedge, thus constructing a hypergraph 6. The label-aware recommendation method based on attention mechanism and hypergraph convolution according to claim 1, characterized in that: The user-side hypergraph convolution in step 6 is expressed as: Where: Θ (l) represents the learnable parameter matrix on the lth layer, σ is the activation function, D v is the degree matrix of the node, D E is the degree matrix of the hyperedge, H d-user Hypergraph The incidence matrix, H = (V, E), where V is the node set, E is the hyperedge set, and The multiplication operation represents the direct interaction relationship on the user side, which represents the hypergraph The aggregation from node features to hyperedge features is similar to H d-user The multiplication operation represents Aggregation from hyperedge features to node features; The project side hypergraph convolution in step 6 is expressed as: Where: Θ (l) represents the learnable parameter matrix on the lth layer, σ is the activation function, D v is the degree matrix of the node, D E is the degree matrix of the hyperedge, H d-item Hypergraph The incidence matrix, H = (V, E), where V is the node set, E is the hyperedge set, and The multiplication operation represents the direct interaction relationship between items and represents the hypergraph The aggregation from node features to hyperedge features is similar to H d-item The multiplication operation represents Aggregation from hyperedge features to node features.
7. The label-aware recommendation method based on attention mechanism and hypergraph convolution according to claim 1, characterized in that: The user-side hypergraph convolution in step 7 is expressed as: Where: Θ (l) represents the learnable parameter matrix on the lth layer, σ is the activation function, D v is the degree matrix of the node, D E is the degree matrix of the hyperedge, Hypergraph The incidence matrix, H = (V, E), where V is the node set, E is the hyperedge set, and The multiplication operation represents the user-side label representation hypergraph The aggregation from node features to hyperedge features is similar to H t-user The multiplication operation represents Aggregation from hyperedge features to node features; The project side hypergraph convolution in step 7 is expressed as: Where: Θ (l) represents the learnable parameter matrix on the lth layer, σ is the activation function, D v is the degree matrix of the node, D E is the degree matrix of the hyperedge, H t-item Hypergraph The incidence matrix, H = (V, E), where V is the node set, E is the hyperedge set, and The multiplication operation represents the item side label representation hypergraph The aggregation from node features to hyperedge features is similar to H t-item The multiplication operation represents Aggregation from hyperedge features to node features.
