A scientific literature recommendation method based on hypergraph attention and enhanced contrastive learning
By introducing hypergraph attention and enhanced contrast learning into the scientific literature recommendation system, we construct an interactive bipartite graph of users' scientific literature and construct comparisons through clustering. This solves the problem of the existing system's failure to fully utilize interactive relationships and data sparsity, and achieves Provides more accurate and personalized scientific literature recommendations.
Patent Information
- Application Number
- CN202410623377.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-20
AI Technical Summary
Existing scientific literature recommendation systems fail to make full use of the interactive relationship between users and scientific literature, resulting in the inability to obtain users' interests and personalized recommendations, and ignore the advantages of comparative learning when dealing with data sparseness, affecting recommendation accuracy. .
Using methods based on hypergraph attention and enhanced contrastive learning, by constructing user scientific literature interactive bipartite graphs, introducing hypergraph attention mechanism and contrastive learning, clustering to construct contrastive comparisons, and jointly training models to obtain the best feature representation of nodes , improve recommendation accuracy.
Capture high-order interactive information between users and scientific literature through the hypergraph structure, improve the accuracy and personalization of recommendations, alleviate the problem of data sparsity, enhance the performance of contrastive learning, and provide more accurate scientific literature recommendations.
Smart Images

Figure CN118210916B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of scientific and technological document information processing, and specifically relates to a scientific and technological document recommendation method based on hypergraph attention and enhanced contrastive learning. Background Art
[0002] With the rapid growth of scientific and technological literature, people are faced with a huge amount of scientific and technological literature information. In this case, users often find it difficult to find scientific and technological literature that meets their needs and interests, and are prone to information overload. The scientific and technological literature recommendation system can help users filter and screen scientific and technological literature and provide personalized recommendation services to solve the problem of information overload. Different users may have different needs and interests for scientific and technological literature. For example, researchers in different fields have different focuses on scientific and technological literature, or researchers in the same field have different needs for scientific and technological literature at different stages. The scientific and technological literature recommendation system can provide users with scientific and technological literature recommendations that meet their research directions and academic levels based on their personalized needs and interests, thereby improving the efficiency and accuracy of information retrieval. In addition, researchers need to constantly read, learn from and cite relevant scientific and technological literature to support their research work. The scientific and technological literature recommendation system can help researchers find scientific and technological literature related to their research topics more quickly, save retrieval time, and improve scientific research efficiency. In addition, the scientific and technological literature recommendation system can provide a convenient communication platform for the academic community to promote information sharing and academic exchanges in the academic community. Through the recommendation system, researchers can discover new achievements and research trends related to their research fields, thereby deepening their understanding of the field and conducting in-depth exchanges and cooperation with other researchers. The scientific and technological literature recommendation system can also recommend research results and cutting-edge advances in new fields to researchers based on their historical behavior and interests, guide researchers to discover new research directions and ideas, and promote academic innovation and discipline development.
[0003] In recent years, graph-based recommendation models have shown outstanding performance. Graph neural networks can be used to represent node relationships and transmit connection information between nodes. However, when processing graph data, most graph network models still only construct graph data as simple bipartite graphs for processing, which does not fully capture the complex high-order information between nodes, nor does it reflect the difference in the impact of different nodes on recommendation results. As a special graph structure, hypergraphs have been used to model high-order correlations between data and can be used in recommendation systems to represent rich node interaction information. The attention mechanism based on hypergraphs better represents the potential information of graph data by focusing on the different importance between nodes. At the same time, contrastive learning has achieved outstanding results in graph representation learning. It improves the quality of representation learning by obtaining unlabeled samples from the original data, and uses data enhancement to increase data labels, which can learn more general data features than supervised learning.
[0004] In the existing scientific literature recommendation system, the potential relationship between data is not fully utilized in the graph network construction stage, and the interactive relationship between users and scientific literature is ignored, which affects the optimal feature representation of nodes and thus fails to obtain user interests for personalized recommendations. In addition, when most models use self-supervised training to alleviate the problem of data label sparsity, they usually use random sampling or simply exchange rows and columns of the adjacency matrix to construct comparison pairs, which cannot take advantage of contrastive learning to train the network, affecting the accuracy of the recommendation structure. Summary of the invention
[0005] In view of the shortcomings of the existing technology, the present invention proposes a scientific literature recommendation method based on hypergraph attention and enhanced contrastive learning, which can solve the problem of data sparsity, meet personalized needs and improve the accuracy of scientific literature recommendation.
[0006] The present invention is implemented by the following technical solution: a method for recommending scientific and technological literature based on hypergraph attention and enhanced contrastive learning, comprising the following steps:
[0007] Step S1, collecting the interaction behaviors between users and scientific documents from the scientific document system to obtain an unstructured data set;
[0008] Step S2, constructing a user-scientific literature interaction bipartite graph: extracting the interaction relationship between users and scientific literature from an unstructured data set, treating each user and each scientific literature as a node of the graph, and establishing a unified user-scientific literature interaction bipartite graph; based on the user-scientific literature interaction bipartite graph, constructing each scientific literature interacted by a user into a hyperedge, that is, the same hyperedge includes all scientific literature interacted by a certain user; at the same time, constructing the users who interacted with each scientific literature into a hyperedge, that is, the same hyperedge includes all users who have interacted with a certain scientific literature;
[0009] Step S3: introduce the hypergraph attention mechanism, calculate the attention score of each node and the centroid after clustering, update the feature representation of users and scientific literature through the attention score, and establish the main model for scientific literature recommendation;
[0010] Step S4, constructing comparison pairs by clustering method, updating node feature representation of user scientific literature interaction bipartite graph by contrastive learning method, and establishing contrastive learning auxiliary model;
[0011] Step S5: jointly train the main scientific literature recommendation model and the comparative learning auxiliary model using the overall loss function to obtain the optimal feature representation of the node, and save the trained main scientific literature recommendation model, the comparative learning auxiliary model and parameters to obtain the trained scientific literature recommendation model;
[0012] Step S6: Use the trained scientific literature recommendation model to calculate the probability of each user interacting with all other scientific literature that has not been interacted with, sort the scientific literature according to the probability, and select the top k articles to recommend to the user.
[0013] Further preferably, the main model for scientific literature recommendation in step S3 includes two aggregation processes for obtaining feature representations of users and scientific literature; the first aggregation process is based on the hypergraph attention mechanism, aggregating node information onto hyperedges to update hyperedge representations, and the second aggregation process aggregates hyperedge information onto nodes to update node representations.
[0014] Further preferably, the first polymerization process is:
[0015] First, use the k-means algorithm to cluster all nodes and obtain k node clusters and k node cluster centroid sets. , represents the centroid of the first node cluster, represents the centroid of the second node cluster, Represents the centroid of the kth node cluster, and calculates the attention scores of all nodes and the centroid of the node cluster:
[0016] a it = exp ( LeakyReLu ( a T [ W 1 v i ⊕ W 1 c t ])) ∑ c t ∈ C exp ( LeakyReLu ( a T [ W 1 v i ⊕ W 1 c t ])) (1);
[0017] In the formula, is the attention score of node i and the centroid of the t-th node cluster, is the characteristic information of node i, is the trainable weight parameter of the first aggregation process, is the transposed matrix of the trainable parameter matrix, is the centroid of the t-th node cluster, C represents the centroid set, For splicing operation, Represents the LeakyReLu function;
[0018] Aggregate the node information weighted by the attention score to the hyperedge through the following formula:
[0019] (2);
[0020] In the formula, It is The representation of the layer hyperedge j after aggregating node information, σ(·) is the Sigmoid function, is a trainable weight matrix, represents the first Layer node i information, represents the set of nodes on hyperedge j.
[0021] Further preferably, the second polymerization process is:
[0022] Calculate the attention scores of all nodes on the hyperedge:
[0023] (3);
[0024] In the formula, is the attention score of node i on hyperedge j, is the trainable weight parameter of the second aggregation process, represents the set of all hyperedges connected by node i;
[0025] Aggregate the hyperedge information weighted by the attention score to the node through the following formula:
[0026] (4);
[0027] in, It is the current The updated feature information of layer node i, Represents a trainable weight matrix, and obtains the feature representation of the node through the scientific literature recommendation main model.
[0028] Further optimization is performed by using Bayesian personalized ranking (BPR) loss to update the node representation of the main model for scientific literature recommendation. The objective function of Bayesian personalized ranking loss is as follows:
[0029] (5);
[0030] in, is the loss of the main model for scientific literature recommendation, σ(·) is the Sigmoid function, represents all pairs of training data in the dataset, Indicates that user u has interacted with scientific document b. Indicates that user u has not interacted with scientific document d.
[0031] Further preferably, in step S4, the process of constructing the comparison pair by clustering method comprises:
[0032] The user comparison pairs are obtained by clustering all user feature information using the k-means algorithm. All users are divided into k categories, and k clusters and cluster centroids are obtained. Each user's comparison pair is the centroid of the cluster to which it belongs. The user comparison learning goal is to minimize the following function based on the noise entropy comparison estimation loss (InfoNCE):
[0033] (6);
[0034] In the formula, is a user-based contrastive learning objective, u represents the user, U represents the user set, is the feature representation of user u obtained after updating the main model of scientific literature recommendation, is the comparison pair of user u, is the set of all neighbor nodes of user u, is the comparison pair of neighbor node p of user u, is the temperature coefficient;
[0035] The comparison pairs of scientific and technological documents are obtained by clustering all user feature information using the k-means algorithm. All scientific and technological documents are divided into k categories, and k clusters and cluster centroids are obtained. The comparison pair of each scientific and technological document is the centroid of the cluster to which it belongs. The comparison learning goal of scientific and technological documents is to minimize the following function based on the comparison estimation loss (InfoNCE) based on noise entropy:
[0036] (7);
[0037] In the formula, is a comparative learning objective based on scientific and technological literature, z represents scientific and technological literature, Z represents the set of scientific and technological literature, is the feature representation of scientific literature z obtained after updating the main model of scientific literature recommendation, is the comparison pair of scientific literature z, is the set of all neighbor nodes of scientific document z, is the comparison pair of neighbor node q of scientific document z, is the temperature coefficient;
[0038] The final comparison target is the weighted sum of the user target and the scientific literature target, and the comparison learning loss of the comparison learning auxiliary model is for:
[0039] (8);
[0040] in, is a specifiable weight coefficient.
[0041] Further preferably, the overall loss function of the scientific literature recommendation model is the loss of the main scientific literature recommendation model and the contrastive learning loss of the contrastive learning auxiliary model. The weighted sum of is as follows:
[0042] (9);
[0043] in, is a hyperparameter, is the overall loss of the scientific literature recommendation model. Finally, the overall loss function is used to jointly train the main scientific literature recommendation model and the contrastive learning auxiliary model to obtain the optimal feature representation of users and scientific literature.
[0044] Beneficial effects of the present invention:
[0045] On the one hand, the graph-based scientific literature recommendation model shows outstanding performance. Most existing scientific literature recommendation models only use simple pairwise interaction relationships in the data to mine potential user preferences. However, in reality, the interaction between users and scientific literature is very complex, and the user relationship or scientific literature relationship or even the user-scientific literature relationship may be high-order. And ignore the more complex high-order relationship between users or scientific literature. Therefore, directly using the graph method to model data information is easy to lose some of the user's potential preferences, affecting the scientific literature recommendation system's judgment of user interests, and thus recommending scientific literature that users are not interested in. Most of the existing graph convolutional neural network technologies cannot make full use of the interaction relationship between nodes, and can only construct a one-to-one node interaction relationship, and cannot extract more comprehensive and complete feature information. The hypergraph structure is more explanatory than the graph convolutional neural network. The hypergraph structure can not only capture the one-to-one node interaction relationship, but also capture one-to-many and many-to-many interaction information. Therefore, the hypergraph structure can more accurately capture the potential relationship between data information than the general graph structure. Therefore, the present invention uses a hypergraph to construct a data structure, models the interaction between users and scientific literature through a hypergraph, trains and updates the feature representation of users and scientific literature in the data, and uses a simplified hypergraph attention to calculate the weights between different nodes, thereby better obtaining the feature representation of the nodes, which is conducive to the calculation of the recommendation results. Introducing a hypergraph neural network into the scientific literature recommendation system and using a hypergraph to construct the interactive relationship between users and scientific literature can more accurately obtain high-level information about the interaction between users and scientific literature.
[0046] On the other hand, graph collaborative filtering is an effective recommendation method that can capture user preferences for items by modeling the user-item interaction graph. Although effective, these methods suffer from data sparsity in practical scenarios. In order to increase data labels, graph collaborative filtering uses contrastive learning to improve performance. However, these methods usually construct comparison pairs in a random sampling manner, ignoring the proximity relationship between users or scientific literature, and cannot fully utilize the potential of contrastive learning for recommendation. To address this problem, the present invention adopts a clustering method to obtain nodes with similar information in the space to construct comparison pairs, and at the same time uses contrastive learning to increase data labels to solve the problem of data sparsity, thereby enhancing the performance of contrastive learning.
[0047] The current graph self-supervised learning model usually uses node loss, edge loss or random exchange of rows and columns of the association matrix when constructing comparison pairs. Although such data enhancement methods can increase data labels, there are also some defects, such as introducing a large amount of noise to the data information and not guaranteeing that the sampled samples have the opposite structural information to the original view. Therefore, the clustering method is used to construct the comparison pairs. On the basis of retaining the original data information, the clustering algorithm is used to screen out the comparison pairs with different structural information from the original view, and then the user or scientific literature views with similar representations are pulled in at the same time, thereby improving the auxiliary training effect of contrastive learning on the recommendation model, so as to update the feature representation of the node and improve the accuracy of the recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0049] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0050] Reference Figure 1 , a scientific literature recommendation method based on hypergraph attention and enhanced contrastive learning, including the following steps:
[0051] Step S1, collecting the interaction behaviors between users and scientific and technological documents from scientific and technological document systems such as academic scientific and technological document libraries and scientific research friends to obtain an unstructured data set;
[0052] Step S2, constructing a user-scientific literature interaction bipartite graph: extracting the interaction relationship between users and scientific literature from an unstructured data set, treating each user and each scientific literature as a node of the graph, and establishing a unified user-scientific literature interaction bipartite graph; based on the user-scientific literature interaction bipartite graph, constructing each scientific literature interacted by a user into a hyperedge, that is, the same hyperedge includes all scientific literature interacted by a certain user; at the same time, constructing the users who interacted with each scientific literature into a hyperedge, that is, the same hyperedge includes all users who have interacted with a certain scientific literature;
[0053] Step S3: introduce the hypergraph attention mechanism, calculate the attention score of each node and the centroid after clustering, update the feature representation of users and scientific literature through the attention score, and establish the main model for scientific literature recommendation;
[0054] Step S4, constructing comparison pairs by clustering method, updating node feature representation of user scientific literature interaction bipartite graph by contrastive learning method, and establishing contrastive learning auxiliary model;
[0055] Step S5: jointly train the main scientific literature recommendation model and the comparative learning auxiliary model using the overall loss function to obtain the optimal feature representation of the node, and save the trained main scientific literature recommendation model, the comparative learning auxiliary model and parameters to obtain the trained scientific literature recommendation model;
[0056] Step S6: Use the trained scientific literature recommendation model to calculate the probability of each user interacting with all other scientific literature that has not been interacted with, sort the scientific literature according to the probability, and select the top k articles to recommend to the user.
[0057] The main model for recommending scientific and technological documents in step S3 of this embodiment includes two aggregation processes for obtaining feature representations of users and scientific and technological documents.
[0058] The first aggregation process is based on the hypergraph attention mechanism, which aggregates node information onto hyperedges to update hyperedge representation. First, all nodes are clustered using the k-means algorithm to obtain k node clusters and k node cluster centroid sets. , represents the centroid of the first node cluster, represents the centroid of the second node cluster, Represents the centroid of the kth node cluster, and calculates the attention scores of all nodes and the centroid of the node cluster:
[0059] a it = exp ( LeakyReLu ( a T [ W 1 v i ⊕ W 1 c t ])) ∑ c t ∈ C exp ( LeakyReLu ( a T [ W 1 v i ⊕ W 1 c t ])) (1);
[0060] In the formula, is the attention score of node i and the centroid of the t-th node cluster, is the characteristic information of node i, is the trainable weight parameter of the first aggregation process, is the transposed matrix of the trainable parameter matrix, is the centroid of the t-th node cluster, C represents the centroid set, For splicing operation, Represents the LeakyReLu function.
[0061] Aggregate the node information weighted by the attention score to the hyperedge through the following formula:
[0062] (2);
[0063] In the formula, It is The representation of the layer hyperedge j after aggregating node information, σ(·) is the Sigmoid function, is a trainable weight matrix, represents the first Layer node i information, represents the set of nodes on hyperedge j.
[0064] Next, a second aggregation process is performed to aggregate the hyperedge information onto the nodes to update the node representation and calculate the attention scores of all nodes on the hyperedges:
[0065] (3);
[0066] In the formula, is the attention score of node i on hyperedge j, is the trainable weight parameter of the second aggregation process, represents the set of all hyperedges connected by node i.
[0067] Aggregate the hyperedge information weighted by the attention score to the node through the following formula:
[0068] (4);
[0069] in, It is the current The updated feature information of layer node i, Represents a trainable weight matrix, and obtains the feature representation of the node through the scientific literature recommendation main model.
[0070] In order to capture information directly from the interaction between users and scientific literature, the Bayesian personalized ranking (BPR) loss is used to update the node representation of the main model for scientific literature recommendation. The objective function of the BPR loss is as follows:
[0071] (5);
[0072] in, is the loss of the main model for scientific literature recommendation, σ(·) is the Sigmoid function, represents all pairs of training data in the dataset, Indicates that user u has interacted with scientific document b. Indicates that user u has not interacted with scientific document d.
[0073] Contrastive learning of graphs is a discriminative task that clusters positive pairs (augmented pairs of the same graph) together and pushes away negative pairs (augmented pairs of different graphs) for unsupervised representation learning. However, since the negative pairs are uniformly sampled from all graphs for contrasting pairs, existing methods face serious sampling bias problems, i.e., negative pairs may have similar feature information to contrasting pairs, or the method of manually selecting contrasting pairs is affected by subjective consciousness, resulting in performance degradation.
[0074] By merging nodes with similar information to expand the comparison pairs, although the centroid obtained by clustering may be a node that cannot be reached on the graph, it has similar features (scientific document nodes) or preferences (user nodes). Based on this idea, a clustering comparison objective is proposed to explore potential similar nodes with feature information and incorporate them into contrastive learning to better capture the characteristics of users and scientific documents in collaborative filtering. Similar users / scientific documents often fall in adjacent feature spaces. Therefore, a clustering algorithm is used for the feature representation of users and scientific documents to obtain the central nodes of users or scientific documents, so as to build a contrastive learning auxiliary model.
[0075] The process of constructing alignment pairs by clustering methods includes:
[0076] The user comparison pairs are obtained by clustering all user feature information using the k-means algorithm. All users are divided into k categories, and k clusters and cluster centroids are obtained. Each user comparison pair is the centroid of the cluster to which it belongs. Then, the proposed user comparison learning objective is to minimize the following function based on the noise entropy comparison estimation loss (InfoNCE):
[0077] (6);
[0078] In the formula, is a user-based contrastive learning objective, u represents the user, U represents the user set, is the feature representation of user u obtained after updating the main model of scientific literature recommendation, is the comparison pair of user u, is the set of all neighbor nodes of user u, is the comparison pair of neighbor node p of user u, is the temperature coefficient.
[0079] The comparison pairs of scientific and technological documents are obtained by clustering all user feature information using the k-means algorithm. All scientific and technological documents are divided into k categories, and k clusters and cluster centroids are obtained. The comparison pair of each scientific and technological document is the centroid of the cluster to which it belongs. Then, the proposed scientific and technological document comparison learning objective is to minimize the following function based on the noise entropy comparison estimation loss (InfoNCE):
[0080] (7);
[0081] In the formula, is a comparative learning objective based on scientific and technological literature, z represents scientific and technological literature, Z represents the set of scientific and technological literature, is the feature representation of scientific literature z obtained after updating the main model of scientific literature recommendation, is the comparison pair of scientific literature z, is the set of all neighbor nodes of scientific document z, is the comparison pair of neighbor node q of scientific document z, is the temperature coefficient.
[0082] The final contrastive target is the weighted sum of the user target and the scientific literature target. Therefore, the contrastive learning loss of the contrastive learning auxiliary model is for:
[0083] (8);
[0084] in, is a specifiable weight coefficient.
[0085] Since the main goal of the scientific literature recommendation model is to model the interaction between users and scientific literature, the proposed contrastive learning loss is regarded as a supplement, and the overall loss function is the loss of the main model for scientific literature recommendation and the contrastive learning loss of the contrastive learning auxiliary model. The weighted sum of is as follows:
[0086] (9);
[0087] in, is a hyperparameter, is the overall loss of the scientific literature recommendation model. Finally, the overall loss function is used to jointly train the main scientific literature recommendation model and the contrastive learning auxiliary model to obtain the optimal feature representation of users and scientific literature.
[0088] After the parameters of the main model for scientific literature recommendation and the auxiliary model for contrastive learning are optimized, the main model for scientific literature recommendation and the auxiliary model for contrastive learning can be used to form a trained scientific literature recommendation model, and the trained scientific literature recommendation model recommends scientific literature to users; the inner product of the best feature representations of the user and the scientific literature is performed to obtain the interaction probability of the user for the target scientific literature. Specifically, the inner product is used to calculate the user's score for the target scientific literature based on the best feature representation of the user and the best feature representation of the scientific literature obtained by the trained scientific literature recommendation model. Finally, the top k target scientific literature are selected as recommendations to users based on the score.
[0089] Compared with general scientific literature recommendation, scientific literature has different research fields and high professionalism, and its update speed is also very fast, which requires the scientific literature recommended to users to be professional and timely, so the recommendation of scientific literature is more complicated. In the past, the effect of ordinary scientific literature recommendation could not effectively distinguish the specific research fields and publication time of scientific literature, and could not meet the needs of users for scientific literature in different scientific fields. Therefore, the clustering-based hypergraph attention method is used to calculate the influence of different scientific literature on users. On the one hand, it can more easily calculate the attention coefficient between different nodes and avoid calculation redundancy; on the other hand, different weights are assigned to different scientific literature, so that the recommendation system can identify the research direction of users' interests to meet their personalized needs.
[0090] The present invention uses a clustering algorithm to perform hypergraph attention operations, reduces the redundancy of attention weight calculations, reduces complexity, pays more attention to nodes associated with users or scientific literature, accurately identifies users' needs for scientific literature in different research directions, and improves the recommendation effect of the model.
[0091] The present invention assists training through contrastive learning and generates contrast pairs by clustering to ensure that there are differences between the original image and the contrast negative pair. It can effectively bring the positive pairs closer and push the negative pairs further away, alleviating the problem of low model accuracy caused by inappropriate contrast pair settings, while increasing data labels to alleviate data sparsity problems.
[0092] Specifically, on the one hand, the hypergraph attention model is used to capture high-level information between users and scientific literature in order to more deeply explore their behavior patterns. At the same time, self-supervised contrastive learning is used to build auxiliary branches. By constructing appropriate contrast pairs for self-supervised training, the potential similar node relationships in the graph data space are explored to help improve the effectiveness of the recommendation system.
[0093] The preferred embodiments of the present invention disclosed above are only used to help explain the present invention. The preferred embodiments do not describe all the details in detail, nor do they limit the present invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A scientific literature recommendation method based on hypergraph attention and enhanced contrastive learning, characterized in that: The following steps are involved: Step S1, collecting the interaction behaviors between users and scientific documents from the scientific document system to obtain an unstructured data set; Step S2, constructing a user-scientific literature interaction bipartite graph: extracting the interaction relationship between users and scientific literature from an unstructured data set, treating each user and each scientific literature as a node of the graph, and establishing a unified user-scientific literature interaction bipartite graph; based on the user-scientific literature interaction bipartite graph, constructing each scientific literature interacted by a user into a hyperedge, that is, the same hyperedge includes all scientific literature interacted by a certain user; at the same time, constructing the users who interacted with each scientific literature into a hyperedge, that is, the same hyperedge includes all users who have interacted with a certain scientific literature; Step S3: introduce the hypergraph attention mechanism, calculate the attention score of each node and the centroid after clustering, update the feature representation of users and scientific literature through the attention score, and establish the main model for scientific literature recommendation; Step S4, constructing comparison pairs by clustering method, updating node feature representation of user scientific literature interaction bipartite graph by contrastive learning method, and establishing contrastive learning auxiliary model; Step S5: jointly train the main scientific literature recommendation model and the comparative learning auxiliary model using the overall loss function to obtain the optimal feature representation of the node, and save the trained main scientific literature recommendation model, the comparative learning auxiliary model and parameters to obtain the trained scientific literature recommendation model; Step S6: Use the trained scientific literature recommendation model to calculate the probability of each user interacting with all other scientific literature that has not been interacted with, sort the scientific literature according to the probability, and select the top k articles to recommend to the user; The main model for recommending scientific and technological literature in step S3 includes two aggregation processes for obtaining feature representations of users and scientific and technological literature. The first aggregation process aggregates node information onto hyperedges to update hyperedge representations based on the hypergraph attention mechanism, and the second aggregation process aggregates hyperedge information onto nodes to update node representations. The first aggregation process is: First, use the k-means algorithm to cluster all nodes and obtain k node clusters and k node cluster centroid sets. , represents the centroid of the first node cluster, represents the centroid of the second node cluster, Represents the centroid of the kth node cluster, and calculates the attention scores of all nodes and the centroid of the node cluster: (1); In the formula, is the attention score of node i and the centroid of the t-th node cluster, is the characteristic information of node i, is the trainable weight parameter of the first aggregation process, is the transposed matrix of the trainable parameter matrix, is the centroid of the t-th node cluster, C represents the centroid set, For splicing operation, Represents the LeakyReLu function; Aggregate the node information weighted by the attention score to the hyperedge through the following formula: (2); In the formula, It is The representation of the layer hyperedge j after aggregating node information, σ(·) is the Sigmoid function, is a trainable weight matrix, represents the first Layer node i information, represents the set of nodes on hyperedge j; The second aggregation process is: Calculate the attention scores of all nodes on the hyperedge: (3); In the formula, is the attention score of node i on hyperedge j, is the trainable weight parameter of the second aggregation process, represents the set of all hyperedges connected by node i; Aggregate the hyperedge information weighted by the attention score to the node through the following formula: (4); in, Is the current The updated feature information of layer node i, Represents a trainable weight matrix, and obtains the feature representation of the node through the scientific literature recommendation main model.
2. The method for recommending scientific and technological literature based on hypergraph attention and enhanced contrastive learning according to claim 1, characterized in that: The Bayesian personalized ranking loss is used to update the node representation of the main model for scientific literature recommendation. The objective function of the Bayesian personalized ranking loss is as follows: (5); in, is the loss of the main model for scientific literature recommendation, σ(·) is the Sigmoid function, represents all pairs of training data in the dataset, Indicates that user u has interacted with scientific document b. Indicates that user u has not interacted with scientific document d.
3. The method for recommending scientific and technological literature based on hypergraph attention and enhanced contrastive learning according to claim 2, characterized in that: In step S4, the process of constructing the comparison pair by clustering method includes: The user comparison pairs are obtained by clustering all user feature information using the k-means algorithm. All users are divided into k categories, and k clusters and cluster centroids are obtained. Each user's comparison pair is the centroid of the cluster to which it belongs. The user comparison learning goal is to minimize the comparison estimation loss based on noise entropy. The following function: (6); In the formula, is a user-based contrastive learning objective, u represents the user, U represents the user set, is the feature representation of user u obtained after updating the main model of scientific literature recommendation, is the comparison pair of user u, is the set of all neighbor nodes of user u, is the comparison pair of neighbor node p of user u, is the temperature coefficient; The comparison pairs of scientific and technological documents are obtained by clustering all user feature information using the k-means algorithm. All scientific and technological documents are divided into k categories, and k clusters and cluster centroids are obtained. The comparison pair of each scientific and technological document is the centroid of the cluster to which it belongs. The comparison learning goal of scientific and technological documents is to minimize the comparison estimation loss based on noise entropy. (7); In the formula, is a comparative learning objective based on scientific and technological literature, z represents scientific and technological literature, Z represents the set of scientific and technological literature, is the feature representation of scientific literature z obtained after updating the main model of scientific literature recommendation, is the comparison pair of scientific literature z, is the set of all neighbor nodes of scientific document z, is the comparison pair of neighbor node q of scientific document z, is the temperature coefficient; The final comparison target is the weighted sum of the user target and the scientific literature target, and the comparison learning loss of the comparison learning auxiliary model is for: (8); in, is a specifiable weight coefficient.
4. The method for recommending scientific and technological literature based on hypergraph attention and enhanced contrastive learning according to claim 3, characterized in that: The overall loss function of the scientific literature recommendation model is the loss of the main scientific literature recommendation model and the contrastive learning loss of the contrastive learning auxiliary model. The weighted sum of is as follows: (9); in, is a hyperparameter, is the overall loss of the scientific literature recommendation model. The overall loss function is used to jointly train the main scientific literature recommendation model and the contrastive learning auxiliary model to obtain the optimal feature representation of users and scientific literature.
