A collaborative filtering recommendation method based on hypergraph generative multi-granularity contrast learning

CN122507948APending Publication Date: 2026-08-04SUZHOU UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU UNIV OF SCI & TECH
Filing Date
2026-04-29
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

但现有超图方法存在明显不足:一方面,大多数方法依赖预定义的超边构建规则,缺乏端到端的自适应学习能力;另一方面,需要显式存储和计算密集的超图邻接矩阵,面临存储和计算瓶颈

Benefits of technology

1.本发明通过动态超图构造器自适应地学习用户与物品之间的复杂高阶关联,突破传统二部图仅能捕捉成对关系的局限,同时避免了预定义超边规则和超高计算开销,提升了高阶关系建模的表达能力和效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122507948A_ABST
    Figure CN122507948A_ABST
Patent Text Reader

Abstract

The application discloses a collaborative filtering recommendation method based on hypergraph generative multi-granularity contrast learning. The method comprises the following steps: obtaining historical interaction data of users and items, and constructing initial node embedding; adaptively constructing a hypergraph structure through a dynamic hypergraph constructor, and aggregating high-order collaborative signals by using a hypergraph convolution propagation mechanism; based on the enhanced node representation, a graph variational autoencoder is used to generate node-specific contrast views for each node; multi-granularity contrast learning is performed, including node-level contrast learning for maximizing the consistency of the same node under different views, and feature-level contrast learning for reducing feature redundancy and improving diversity; the recommendation task and the contrast learning loss are jointly optimized, and the model is trained to generate a recommendation list. Through dynamic hypergraph modeling of high-order correlation, generative contrast views and multi-granularity learning, the application effectively improves the accuracy, robustness and generalization ability of the recommendation, and can be widely applied to personalized scenarios such as e-commerce and content recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, specifically relating to information retrieval and recommendation system technology, and in particular to a collaborative filtering recommendation method based on hypergraph generative multi-granularity comparative learning. Background Technology

[0002] Recommender systems, as a key tool for alleviating information overload, play an indispensable role in numerous fields such as e-commerce, social media, and content platforms. Collaborative filtering, as the core technology of recommender systems, achieves personalized recommendations by mining historical interaction data between users and items.

[0003] Early collaborative filtering methods primarily relied on matrix factorization techniques. With the rise of graph neural networks, graph-based collaborative filtering methods have made significant progress. These methods naturally model user-item interactions as bipartite graphs and iteratively aggregate neighborhood information through graph convolutional networks. However, bipartite graph-based methods are inherently limited to modeling pairwise interaction relationships and struggle to effectively capture complex high-order association patterns.

[0004] To model complex group associations that go beyond pairwise relationships, researchers have introduced hypergraph structures. However, existing hypergraph methods have significant shortcomings: on the one hand, most methods rely on predefined hyperedge construction rules and lack end-to-end adaptive learning capabilities; on the other hand, they require explicit storage and computationally intensive hypergraph adjacency matrices, facing storage and computational bottlenecks.

[0005] Meanwhile, data sparsity has always been a core challenge for recommender systems. To alleviate this problem, contrastive learning has been widely introduced. Existing methods typically construct contrastive views by injecting random perturbations or uniform noise to augment data. However, these heuristics are prone to destroying key collaborative signals, ignoring node specificity, and mostly focusing only on node-level alignment while neglecting feature dimension optimization, thus limiting recommender performance. Summary of the Invention

[0006] This invention aims to overcome the shortcomings of existing technologies and provide a collaborative filtering recommendation method based on hypergraph generative multi-granularity contrastive learning, so as to simultaneously optimize node-level consistency and feature-level diversity, thereby improving the accuracy, generalization ability and robustness of recommendations.

[0007] To achieve the above objectives, a first aspect of the present invention provides a collaborative filtering recommendation method based on hypergraph generative multi-granularity contrastive learning, comprising the following steps: Includes the following steps: Step S1: Obtain historical interaction data of user set and item set, and construct the initial embedded representation of user node and item node; Step S2: Based on the initial node embedding representation, a hypergraph structure is adaptively constructed through a dynamic hypergraph builder to model the higher-order association between users and items, and information is aggregated through the hypergraph convolution propagation mechanism to obtain node representations enhanced with higher-order signals; Step S3: Based on the node representation enhanced by the higher-order signal, a node-specific contrast view is generated for each node using a generative contrast mechanism; Step S4: Based on the generated comparison view, perform multi-granularity comparison learning, which includes node-level comparison learning and feature-level comparison learning; The node-level contrastive learning is used to maximize the consistency of the representation of the same node under different contrastive views; the feature-level contrastive learning is used to improve the feature diversity of node representation and reduce feature redundancy. Step S5: Jointly optimize the node-level contrastive learning loss and the feature-level contrastive learning loss, train the recommendation model, and use the trained model to generate a recommendation list for the user.

[0008] In an optional embodiment, the dynamic hypergraph constructor in step S2 is implemented in the following way: Given the initial embedding matrix of all nodes Through a learnable matrix Calculate the correlation matrix between nodes and hyperedges of the hypergraph. :

[0009] in, M and N The number of users and items, respectively. For embedded dimensions, The number of superedges. The temperature parameter is learnable; The hypergraph convolutional propagation mechanism includes the following steps: Node-Hyperedge Aggregation: , Super-edge - Super-edge attention refinement: , Hyperedge-node propagation: , in, For the first Layer node representation, For the first Layer hyperedge representation, As a multi-head attention mechanism, For activation function, This is a layer normalization operation.

[0010] In an optional embodiment, the generative comparison mechanism in step S3 is implemented based on the idea of ​​a variational autoencoder, specifically including: For each node Learning a Gaussian distribution ; The mean represented by the nodes This is obtained by averaging the output embeddings of each layer: ; The node-specific log-standard deviation is obtained by linearly transforming the mean: ; Two contrast views of the node are generated by sampling using reparameterization techniques. and :

[0011]

[0012] in, , ⊙ represents the global scaling factor, and ⊙ indicates element-wise multiplication.

[0013] In an optional embodiment, the node-level contrastive learning in step S4 employs a bidirectional contrastive loss function based on InfoNCE loss, defined as:

[0014] in, These are the weighting coefficients. For users to compare losses to items, The specific calculation methods for the comparative loss from goods to users are as follows:

[0015] in, Indicates user Positive sample items that it has interacted with The positive sample pairs formed This refers to temperature hyperparameters.

[0016]

[0017] in, To balance the hyperparameters; Cross-entity decorrelation loss The cross-relevance matrix C driving user and item embeddings is close to the identity matrix:

[0018] loss of uniformity within the solid By penalizing the correlation of user / item features within a multinomial kernel, a more uniform feature distribution is promoted. in, Embedding matrices for users and items, respectively. This represents the expected value (mean) of all elements in the correlation matrix. These are the hyperparameters of the polynomial kernel. It is the weighting coefficient.

[0019] In an optional embodiment, the joint optimization loss function in step S5 is:

[0020] in, The Bayesian personalized ranking loss is used to optimize the main recommendation task; This is the KL divergence regularization term between the Gaussian distribution and the standard normal distribution in the generative contrast mechanism; The weighting coefficients for the KL divergence term; Node-level contrastive learning loss; It is the feature-level contrastive learning loss.

[0021] A second aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the steps of the method as described in any of the first aspects.

[0022] A third aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method as described in any of the first aspects.

[0023] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention adaptively learns the complex high-order relationships between users and items through a dynamic hypergraph builder, breaking through the limitation of traditional bipartite graphs that can only capture pairwise relationships. At the same time, it avoids predefined hyperedge rules and extremely high computational overhead, thus improving the expressive power and efficiency of high-order relationship modeling.

[0024] 2. This invention introduces a generative comparison mechanism based on graph variational autoencoders to generate a personalized comparison view for each node that retains the core semantics and has controllable diversity, thus avoiding the defects of traditional random perturbation methods that destroy key cooperative signals or ignore node specificity.

[0025] 3. This invention innovatively proposes a multi-granularity contrastive learning strategy, which simultaneously optimizes the consistency at the node level and the diversity at the feature level. By cross-entity decorrelation and intra-entity uniformity constraints, it effectively reduces feature redundancy and improves the generalization ability of the representation.

[0026] 4. Experimental results on multiple public datasets show that the recommendation performance of this invention significantly outperforms existing mainstream recommendation models in terms of recall and NDCG, and has higher accuracy, robustness and computational efficiency. Attached Figure Description

[0027] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 A schematic diagram of the dynamic constructor function for a collaborative filtering recommendation method based on hypergraph generative multi-granularity contrastive learning provided in this application.

[0028] Figure 2 This application provides a schematic diagram of a collaborative filtering recommendation method based on hypergraph generative multi-granularity contrastive learning, which generates a contrastive learning model.

[0029] Figure 3 This application provides a flowchart of a collaborative filtering recommendation method based on hypergraph generative multi-granularity contrastive learning. Detailed Implementation

[0030] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0031] This embodiment validates the proposed method (HyGMCL) on three publicly available datasets: Douban-Book, Dianping, and MovieLens-25M. The dataset statistics are as follows:

[0032] Please refer to Figure 1 to Figure 3 This embodiment provides a collaborative filtering recommendation method based on hypergraph generative multi-granularity contrastive learning, which includes the following steps: Problem Definition: Consider a recommendation platform, whose user set is denoted as . The collection of items is denoted as ,in and These represent the number of users and items, respectively. The historical interaction data between users and items forms a bipartite graph. , The node set edge set Each edge in Indicates user With items There was one interaction between them.

[0033] S1: Data acquisition and initialization.

[0034] Obtain historical interaction data between users and items, and construct an initial node embedding matrix. ,in M For the number of users, N For the number of items, d For the embedded dimension.

[0035] S2: Dynamic Hypergraph Construction and Convolutional Propagation.

[0036] Based on the initial embedding, a dynamic hypergraph builder is used to adaptively generate the hyperedge association matrix, and a high-order cooperative signal is aggregated through the hypergraph convolution propagation mechanism to obtain the enhanced node representation.

[0037] S3: Generative comparison view construction.

[0038] Based on the idea of ​​variational autoencoders, for each node... Learning Gaussian distribution And by using reparameterization techniques, a comparison view specific to two nodes is generated. and .

[0039] S4: Multi-granularity comparative learning.

[0040] Based on the generated comparison view, the following two parts of learning are performed: 1. Node-level comparative learning: Using bidirectional InfoNCE loss, the consistency of the representation of the same node under different views is maximized.

[0041] 2. Feature-level contrastive learning: Optimize feature distribution and reduce redundancy by using cross-entity decorrelation loss (CED) and intra-entity uniformity loss (IEU).

[0042] S5: Joint optimization and recommendation.

[0043] Constructing a joint loss function The model is trained through backpropagation, and the trained model is used to generate a recommendation list.

[0044] This embodiment describes a method for constructing hypergraph structures through end-to-end low-rank decomposition, aiming to adaptively capture implicit high-order group association patterns in data. The dynamic hypergraph process mainly includes the following four key steps: 1. Calculate the incidence matrix between nodes and hyperedges ( ) Input: Given the initial embedding matrix of all nodes. (Includes user and item nodes).

[0045] Calculation: Using a learnable matrix and learnable temperature parameters , It is the number of hyperedges; calculate the incidence matrix. .

[0046] Principle: and Multiply and then divide Then normalized by Softmax

[0047] The temperature parameter is a learnable parameter used to adjust the distribution smoothness: the smaller the value, the more clearly defined the node affiliation; the larger the value, the more uniform the distribution. Results The matrix describes the probability distribution of each node belonging to each hyperedge.

[0048] 2. Execution Node - Hyperedge Aggregation Objective: To aggregate features at the node level to the hyperedge level, obtaining the first... Layer superedge representation , .

[0049] Operation: Transpose the correlation matrix With the Layer node representation Multiply.

[0050] Effect: This is a weighted summation process where the representation of each hyperedge is formed by fusing the features of all its associated nodes, thereby capturing complex group collaboration signals.

[0051] 3. Perform hyperedge-hyperedge attention refinement Objective: To mine the semantic dependencies between different hyperedges and obtain a refined hyperedge representation. , .

[0052] Operation: To Apply a multi-head attention mechanism.

[0053] Effects: Allows the model to focus on different association patterns between hyperedges in parallel across different subspaces (such as user group overlap or item category similarity), breaking the assumption of hyperedge independence and improving modeling capabilities.

[0054] 4. Perform hyperedge-node propagation Objective: To feed the refined higher-level information back to the node and update the result to the [number]th [node]. Layer node representation , .

[0055] in, For the first Layer node representation, For the first Layer hyperedge representation, As a multi-head attention mechanism, For activation function, This is a layer normalization operation.

[0056] operate: 1. With the refined superedge representation Multiply.

[0057] 2. After activation function (Such as ReLU / GELU) processing.

[0058] 3. With the first Layer node representation Perform residual connections and apply layer normalization.

[0059] Effect: Ensures that the original information is not lost, enables the node representation to incorporate higher-order context information, and enhances robustness.

[0060] This scheme achieves the following advantages through the synergy of a dynamic hypergraph constructor and a hypergraph convolution propagation mechanism: Adaptive modeling avoids the rigidity of manually preset rules and dynamically adjusts the correlation strength through learnable parameters.

[0061] Two-way flow: This forms an information loop of "node-hyperedge-node", ensuring full interaction between local and global features.

[0062] High-efficiency computation: By combining low-rank decomposition with attention mechanism, the storage and computation complexity are significantly reduced compared with traditional dense methods, alleviating the bottleneck under large-scale data.

[0063] This embodiment describes a detailed implementation of a generative contrast mechanism. Based on the idea of ​​a variational autoencoder (VAE), it generates a high-quality contrast view by learning a Gaussian distribution and sampling for each node. The generative contrast mechanism mainly includes the following three key steps: 1. Learn the mean of the Gaussian distribution ( ) Objective: To obtain the stable semantic center of a node.

[0064] Calculation: For all levels during hypergraph convolution propagation (level 0 to level 1), Layer) node output embedding Accumulate and average.

[0065] formula:

[0066] Function: To fuse high-order cooperative signals from multiple layers and eliminate noise fluctuations in single-layer representations. For example, when =2, mean is The arithmetic mean.

[0067] 2. Calculate the log-standard deviation of node specificity ( ) Objective: To quantify the uncertainty of node representation and achieve adaptive distribution dispersion.

[0068] Calculate: the mean The input is fed into a learnable linear transformation layer.

[0069] formula:

[0070] in, This is the weight matrix. This is the bias vector.

[0071] Purpose: Allows the model to dynamically adjust the variance based on the semantic features of the nodes themselves (such as popular items and long-tail users), avoiding the use of a uniform global variance.

[0072] 3. Generate comparison views using reparameterization techniques. Objective: To generate two contrasting views that share a semantic center but also have differences. and .

[0073] Calculation: Using standard normal distribution noise Combined with node-specific standard deviation and global scaling factor Perform sampling.

[0074] formula:

[0075]

[0076] Where ⊙ denotes element-wise multiplication. This is the global scaling factor (used to adjust the overall noise intensity).

[0077] Function: Decouples randomness from the computation graph, enabling gradients to propagate backward, while ensuring that the generated view meets the requirements of contrastive learning for constructing positive sample pairs (consistency + diversity).

[0078] This scheme achieves the following technical effects through a generative comparison mechanism: Semantic stability: based on the mean of multi-level aggregation As semantic anchors, they ensure that the generated view does not deviate from the essential characteristics of the nodes.

[0079] Adaptive perturbation: utilizing node-specific log-standard deviation It automatically adjusts the noise amplitude based on data sparsity (confidence), thus solving the semantic distortion problem caused by uniform noise injection.

[0080] Lossless enhancement: It avoids explicit destruction of graph structure, preserves the integrity of high-order cooperative signals, and significantly improves the robustness and generalization ability of the model in sparse scenarios by explicitly modeling uncertainty.

[0081] Example 4: Specific Implementation Steps of Node-Level Contrastive Learning. This example describes a bidirectional contrastive mechanism based on InfoNCE loss, aiming to align the user and item embedding spaces by maximizing the consistency of the same node across different views. The node-level contrastive learning process mainly includes the following two key steps: 1. Construct a bidirectional contrastive loss function Objective: To establish a two-way alignment mechanism between users and items, and to balance the contribution of contrastive learning to the total loss.

[0082] formula:

[0083] Parameter description: (Weight coefficient): Used to adjust the strength of node-level contrastive learning. For example, in scenarios with extremely sparse data, it can be appropriately increased. To enhance the guiding role of self-monitoring signals.

[0084] (User to Item): From the user's perspective, we can bridge the representational distance between the user and the items they interact with.

[0085] (Item to User): From the perspective of the item, we can bridge the representational distance between the item and the user who interacts with it.

[0086] 2. Calculate the two-way mutual information loss. Utilizing temperature hyperparameters (For example, set to 0.2) Adjust the sharpness of the contrast distribution, as calculated below: User lost item ( ) Logic: Maximize user experience First view representation Its positive sample items The second view represents The similarity between them, while also pushing them away from other candidate items The distance.

[0087] formula:

[0088] Item to user loss ( ) Logic: Logic reversal, maximizing items The second view represents Interacting with users First view representation Similarity between them, while also pushing them away from other candidate users distance.

[0089] formula:

[0090] in, Represents a user Positive sample items that it has interacted with The positive sample pairs formed This is a temperature hyperparameter used to adjust the sharpness of the contrast distribution.

[0091] This scheme achieves the following technical effects by introducing a bidirectional comparison mechanism based on InfoNCE loss: Bidirectional calibration: via and The synergistic effect of these technologies solves the problem of traditional one-way contrastive learning ignoring interactive symmetry, ensuring that the user domain and the item domain are aligned in the semantic space.

[0092] Refined optimization: leveraging weighting coefficients and temperature parameters With adjustments, the model can flexibly adapt to different data distributions and effectively mine higher-order collaborative signals.

[0093] Robust representation: The constructed collaborative semantic space retains both user-specific preferences and the inherent attributes of items, significantly improving the model's generalization ability for long-tail items and cold-start users.

[0094] Example 5: Specific implementation of feature-level contrastive learning. This example aims to address the problem of existing methods neglecting feature dimension optimization. By introducing cross-entity decorrelation and intra-entity uniformity optimization, it improves the feature diversity of node representations and reduces redundancy.

[0095] Feature-level contrastive learning methods mainly include the following three key steps: 1. Construct the total loss function for feature-level contrastive learning. Objective: To jointly optimize the decoupling and uniformity of features.

[0096] formula:

[0097] (Cross-entity decorrelation loss): Drives the cross-relevance matrix of user and item embeddings to approach the identity matrix, eliminating spurious correlations.

[0098] (Intra-entity homogeneity loss): Promotes distribution homogenization by penalizing the high correlation of internal features through a multinomial kernel.

[0099] (Balancing Hyperparameter): Used to adjust the weights of the two losses. For example, when user preferences differ greatly and item popularity is severely biased, this value can be increased appropriately.

[0100] 2. Calculate the cross-entity decorrelation loss ( ) Objective: To establish a clear semantic mapping so that users can... Dimensional features are mainly related to the first item It correlates features across dimensions while suppressing erroneous associations between different dimensions.

[0101] formula:

[0102] Parameter description: : Represent the diagonal and off-diagonal elements of the cross-correlation matrix, respectively.

[0103] (Hyperparameter): Used to control the penalty for off-diagonal elements (i.e., correlations between different dimensions).

[0104] 3. Calculate the homogeneity loss within the entity ( ) Objective: To leverage the nonlinear properties of polynomial kernels to prevent a few dimensions from monopolizing representation capabilities and to force the model to activate more dimensions to represent subtle features.

[0105] formula:

[0106] Parameter description: : Represents the autocorrelation matrix within the user and the item, respectively. This represents the expected value (mean) of all elements in the correlation matrix. (Polynomial kernel hyperparameters): These control the scaling factor, bias term, and polynomial order (usually...). ).

[0107] Summary of core advantages This solution achieves the following technical effects through feature-level fine-grained optimization: Feature decoupling: using Establishing orthogonal constraints between the user and item spaces effectively mitigates feature confusion and ensures that recommendation results are not distorted by the popularity bias of popular items.

[0108] Preventing collapse: by By applying a uniform prior within the entity and using a multinomial kernel to amplify the high correlation penalty, feature dimension collapse is avoided.

[0109] Long-tail enhancement: This multi-granularity optimization strategy significantly enhances the model's generalization ability in data-sparse scenarios, especially in improving the exposure rate of niche items and the accuracy of long-tail recommendations.

[0110] Example 6: Specific implementation of the joint optimization loss function. This example constructs a multi-objective joint loss function to balance the ranking performance of the main recommendation task with the regularization requirements of representation learning, preventing model overfitting or posterior collapse.

[0111] The joint optimization loss function construction process mainly includes the following four key steps: 1. Construct the Bayesian personalized ranking loss term ( ) Objective: To optimize the ranking quality of the main recommendation task.

[0112] Principle: Based on user positive and negative sample pairs The loss is calculated based on the ranking difference.

[0113] Mechanism: By maximizing user engagement with positive sample items With negative sample items The difference between the predicted scores (i.e., maximizing) Using negative log-likelihood as the loss value, the model is directly driven to improve the accuracy of the recommendation list.

[0114] 2. Introducing a regularization loss term in a generative comparison mechanism ( ) Objective: To constrain the latent variable space and prevent posterior collapse.

[0115] Principle: Calculate the variational posterior distribution of nodes. Compared with the standard normal prior distribution The KL divergence between them.

[0116] formula:

[0117] Parameter description: (Weighting coefficient): Used to balance the main task loss and regularization loss. For example, it can be set to 1.5 or 2.0. A larger value... A higher value can enhance generalization ability, while a smaller value focuses more on fitting the training data.

[0118] 3. Integrate node-level and feature-level contrastive learning loss terms. Node-level loss ( ): Based on InfoNCE, bidirectional contrast loss is used to maximize the consistency of the same node under different generated views.

[0119] Feature-level loss ( ): Derived from cross-entity decorrelation loss ( ) and loss of uniformity within the solid ( It consists of components used to eliminate feature redundancy and promote distribution uniformity.

[0120] 4. Perform multi-objective joint optimization training Objective: To minimize the total loss and update the model parameters using the backpropagation algorithm.

[0121] Total loss formula:

[0122] Synergistic effect: Ensure the accuracy of the recommendation results.

[0123] Ensure the stability of the generation process.

[0124] Enhance the semantic robustness of nodes.

[0125] Improve the efficiency of feature space representation.

[0126] Summary of core advantages This scheme achieves the following technical effects through a multi-objective collaborative training paradigm: Deep collaboration: It organically combines task-oriented approach, structure regularization, node alignment and feature decoupling, which solves the problem that a single optimization objective cannot balance recommendation performance and representation quality.

[0127] Preventing degradation: Introducing It effectively alleviates the common posterior collapse problem of variational autoencoders and provides a high-quality view generation foundation for contrastive learning.

[0128] Example 7: Performance Evaluation Experiment To verify the effectiveness of the proposed method (hereinafter referred to as HyGMCL), this embodiment conducted extensive experiments on three publicly available benchmark datasets: Douban-Book, Dianping, and MovieLens-25M. Mainstream recommendation models, including NGCF, LightGCN, SGL, and SimGCL, were selected as benchmark models.

[0129] The evaluation metrics used are Recall@K (recall rate) and NDCG@K (normalized depreciation cumulative gain), which are widely used in the recommender system field. K is set to 20.

[0130] The experimental results are shown in Tables 1 to 3 below: Table 1: Performance comparison of different recommendation methods on the Douban-Book dataset

[0131] Table 2: Performance comparison of different recommendation methods on the Dianping dataset

[0132] Table 3: Performance comparison of different recommendation methods on the MovieLens-25M dataset

[0133] The optimal parameter selections for the model in this embodiment on the three datasets are as follows:

[0134] Experimental conclusion: The experimental results above demonstrate that the HyGMCL method proposed in this invention significantly outperforms existing benchmark models in both Recall@20 and NDCG@20 metrics on datasets of three different sizes and domains. Particularly in data-sparse scenarios (such as Douban-Book), this invention effectively alleviates the data sparsity problem through dynamic hypergraphs and multi-granularity contrastive learning, proving the superiority of this method in improving recommendation accuracy and generalization ability.

[0135] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A collaborative filtering recommendation method based on hypergraph generative multi-granularity contrastive learning, characterized in that, Includes the following steps: Step S1: Obtain historical interaction data of user set and item set, and construct the initial embedded representation of user node and item node; Step S2: Based on the initial node embedding representation, a hypergraph structure is adaptively constructed through a dynamic hypergraph builder to model the higher-order association between users and items, and information is aggregated through the hypergraph convolution propagation mechanism to obtain node representations enhanced with higher-order signals; Step S3: Based on the node representation enhanced by the higher-order signal, a node-specific contrast view is generated for each node using a generative contrast mechanism; Step S4: Based on the generated comparison view, perform multi-granularity comparison learning, which includes node-level comparison learning and feature-level comparison learning; The node-level contrastive learning is used to maximize the consistency of the representation of the same node under different contrastive views; the feature-level contrastive learning is used to improve the feature diversity of node representation and reduce feature redundancy. Step S5: Jointly optimize the node-level contrastive learning loss and the feature-level contrastive learning loss, train the recommendation model, and use the trained model to generate a recommendation list for the user.

2. The method according to claim 1, characterized in that, The dynamic hypergraph constructor in step S2 is implemented in the following way: Given the initial embedding matrix of all nodes Through a learnable matrix Calculate the correlation matrix between nodes and hyperedges of the hypergraph. : in, M and N The number of users and items, respectively. For embedded dimensions, The number of superedges. The temperature parameter is learnable; The hypergraph convolutional propagation mechanism includes the following steps: Node-Hyperedge Aggregation: , Super-edge - Super-edge attention refinement: , Hyperedge-node propagation: , in, For the first Layer node representation, For the first Layer hyperedge representation, As a multi-head attention mechanism, For activation function, This is a layer normalization operation.

3. The method according to claim 1, characterized in that, The generative comparison mechanism in step S3 is based on the idea of ​​variational autoencoders and specifically includes: For each node Learning a Gaussian distribution ; The mean represented by the nodes This is obtained by averaging the output embeddings of each layer: ; The node-specific log-standard deviation is obtained by linearly transforming the mean: ; Two contrast views of the node are generated by sampling using reparameterization techniques. and : in, , ⊙ represents the global scaling factor, and ⊙ indicates element-wise multiplication.

4. The method according to claim 1, characterized in that, The node-level contrastive learning in step S4 employs a bidirectional contrastive loss function based on InfoNCE loss, defined as: in, These are the weighting coefficients. For users to compare losses to items, The specific calculation methods for the comparative loss from goods to users are as follows: in, Indicates user Positive sample items that it has interacted with The positive sample pairs formed This refers to temperature hyperparameters.

5. The method according to claim 1, characterized in that, The feature-level contrastive learning in step S4 includes cross-entity decorrelation and intra-entity uniformity optimization, and its total loss function is defined as: in, To balance the hyperparameters; Cross-entity decorrelation loss The cross-relevance matrix C driving user and item embeddings is close to the identity matrix: loss of uniformity within the solid By penalizing the correlation of user / item features within a multinomial kernel, a more uniform feature distribution is promoted. in, Embedding matrices for users and items, respectively. This represents the expected value (mean) of all elements in the correlation matrix. These are the hyperparameters of the polynomial kernel. It is the weighting coefficient.

6. The method according to claim 1, characterized in that, The joint optimization loss function in step S5 is: in, The Bayesian personalized ranking loss is used to optimize the main recommendation task; This is the KL divergence regularization term between the Gaussian distribution and the standard normal distribution in the generative contrast mechanism; The weighting coefficients for the KL divergence term; Node-level contrastive learning loss; It is the feature-level contrastive learning loss.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 6.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.