Graph contrastive learning recommendation method fusing multi-scale information and intention perception
Patent Information
- Application Number
- CN202610987834.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-07-03
AI Technical Summary
静态特征聚合不仅不能自适应满足不同活跃度用户的表征需求,还容易引发过平滑问题,导致用户的个性化特征被过度同质化的全局信息掩盖
[0121] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Smart Images

Figure CN122528950B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of social network technology, and in particular to a graph contrastive learning recommendation method that integrates multi-scale information and intent awareness. Background Technology
[0002] Recommender systems, as a core means of alleviating information overload and meeting the personalized needs of massive numbers of users, essentially infer users' potential preferences from their historical interactions with items. In recent years, graph neural networks have made groundbreaking progress in the recommendation field. Their core advantage lies in their ability to unfold the bipartite graph of user-item interactions and explicitly capture higher-order connectivity and collaborative signals through message passing mechanisms. For example, NGCF injects graph topology into embedding propagation; LightGCN and LR-GCCF have pointed out that the nonlinear activation and feature transformation in traditional GCNs are redundant in collaborative filtering. By proposing a minimalist linear propagation architecture, they have greatly improved the training efficiency of models on large-scale graphs and have now become the mainstream paradigm for graph collaborative filtering.
[0003] GNN-based recommender systems utilize dense user-item interactions as supervisory signals for node representation updates. However, in real-world applications, user-item interaction data often exhibits high sparsity, making it difficult to obtain high-quality supervisory signals. Against this backdrop, researchers have introduced self-supervised learning into the recommender field, using self-supervised signals to alleviate data sparsity and driving the development of graph contrastive learning. Contrastive learning (CL)-based recommender models employ alignment and uniformity principles to distribute node embeddings while maximizing the information entropy in the embedding space. This allows similar nodes to be placed closely together, while dissimilar nodes are kept apart. Early classic works such as SGL enhance graphs by randomly discarding nodes and edges at a discrete graph topology level. To overcome the computational overhead caused by structural destruction, SimGCL proposes directly injecting isotropic random noise into the continuous embedding space. LightGCL utilizes singular value decomposition (SVD) to extract global feature perspectives. DDGCL further introduces a double diffusion mechanism. However, in reality, user interaction behavior is influenced by multiple factors and driven by various intentions. For example, user purchasing behavior is often influenced by social factors such as the bandwagon effect. Therefore, intention perception and deentanglement representation have gradually become research hotspots in the recommendation field. For instance, DGCF pioneered intention stripping through multi-channel graph convolution; NCL constructed semantic prototype clusters using the expectation-maximization algorithm; and IHGCL achieved joint modeling of fine-grained interaction intentions through bottleneck autoencoders.
[0004] Although current graph-based comparison learning-based recommendation methods have shown great potential in alleviating data sparsity, they still have limitations in the following core aspects:
[0005] (1) Traditional graph neural encoders generally employ static mean pooling or fixed-weight summation strategies in the multi-layer perception and aggregation stages. This design assumes that neighborhood information of all orders contributes equally to the target intent, but user behavior is highly heterogeneous. For example, active users have rich first-order direct interactions, and forcibly introducing higher-order networks often introduces irrelevant topological noise, while highly sparse users rely on high-order smooth signals to establish cooperative connections. Static feature aggregation not only fails to adaptively meet the representation needs of users with different activity levels, but also easily leads to oversmoothing problems, causing users' personalized features to be masked by overly homogenized global information.
[0006] (2) Current mainstream graph comparison recommendation methods often ignore the underlying intentions behind user-item interactions, making it difficult to capture users' true interests and provide stable self-supervised signals. On the one hand, mainstream models generally rely on the standard InfoNCE loss during optimization, and the full negative sampling strategy ignores a large number of false negative samples generated by popularity bias in the recommendation system. Forcibly pushing away these semantic neighbors that share similar underlying intentions will generate erroneous repulsion forces, ultimately causing the collapse of the compact semantic clusters that were originally formed in the feature manifold space, making it difficult to capture the finer-grained underlying intentions between users and items. On the other hand, common graph augmentation strategies are prone to destroying key collaborative connected components and disrupting the intrinsic manifold structure of the graph. Although continuous space additive noise, represented by SimGCL, is computationally efficient, random perturbations without directional constraints can easily push the embedding vectors at the edge of the manifold beyond the classification decision boundary, easily causing semantic flipping.
[0007] Based on the aforementioned theoretical shortcomings and challenges, this invention proposes a graph contrastive learning recommendation method (MixGCL) that integrates multi-scale adaptive hybridization and intent-awareness. Summary of the Invention
[0008] This invention aims to at least solve the technical problems existing in the prior art, and in particular, it innovatively proposes a graph contrastive learning recommendation method that integrates multi-scale information and intent perception.
[0009] To achieve the above-mentioned objectives of this invention, this invention provides a graph contrastive learning recommendation method that integrates multi-scale information and intent awareness, comprising the following steps:
[0010] S1. Design a multi-scale information hybrid encoder to dynamically balance high-frequency personalized features and low-frequency group commonalities, so as to adaptively meet the representation needs of users with different activity levels.
[0011] S2, first sample noise in a uniform distribution in the continuous embedding space and perform L2 normalization, then combine symbol masking to inject perturbation into the final embedding to generate two enhanced views;
[0012] Subsequently, semantic masks are introduced to block false negative samples, and composite energy loss is incorporated to optimize feature compactness;
[0013] S3, obtain preference scores;
[0014] S4, recommendations are made based on preference scores.
[0015] In a preferred embodiment of the present invention, step S1, the multi-scale information hybrid encoder, includes:
[0016] (4)
[0017] in, Indicates the first Layer node embedding;
[0018] Represents the normalized adjacency matrix Power of;
[0019] Indicates the initial embedding;
[0020] (5)
[0021] in, Indicates the first Attention weights of layers;
[0022] This represents an exponential function with base e.
[0023] Indicates the first The parameters that a layer can learn;
[0024] Indicates the number of convolutional layers in the graph;
[0025] Indicates the first The parameters that a layer can learn;
[0026] (6)
[0027] in, This represents the final user and project profile;
[0028] Indicates the first Attention weights of layers.
[0029] In a preferred embodiment of the present invention, the expression for L2 normalization of noise in step S2 is as follows:
[0030] (9)
[0031] in, This represents the normalized noise vector;
[0032] Represents the basic noise vector;
[0033] express The L2 norm.
[0034] In a preferred embodiment of the present invention, the expression for the symbol masking in step S2 is:
[0035] (10)
[0036] in, Indicates symbol masking;
[0037] Represents a symbolic function;
[0038] This represents the final user and project profile;
[0039] The expression for the disturbance in step S2 is:
[0040] (11)
[0041] in, Represents the perturbation vector;
[0042] Hyperparameters representing the control of disturbance amplitude;
[0043] It represents the Hadamardi (or Hadama) stack;
[0044] This represents the normalized noise vector;
[0045] The expressions for the two enhanced views in step S2 are:
[0046] (12)
[0047] (13)
[0048] in, This indicates the first enhanced view;
[0049] Indicates the first disturbance vector;
[0050] This indicates the second enhanced view;
[0051] This represents the second perturbation vector.
[0052] In a preferred embodiment of the present invention, the expression for the semantic mask in step S2 is:
[0053] (15)
[0054] in, Indicates the determination of user Is it a user? semantic neighbors; =1 indicates user For users semantic neighbors, =0 indicates user Not for users semantic neighbors;
[0055] Indicates if;
[0056] Indicates user and users Cosine similarity;
[0057] This represents the threshold for identifying false negative samples;
[0058] Indicates otherwise;
[0059] (16)
[0060] in, Indicates a semantic mask;
[0061] Indicates the determination of user Is it a user? Semantic neighbors.
[0062] In a preferred embodiment of the present invention, step S3 includes the following steps:
[0063] ,
[0064] in, Indicates user For the project Preference scores;
[0065] Indicates user The embedding vector;
[0066] express transpose;
[0067] Indicates project The embedding vector.
[0068] In a preferred embodiment of the present invention, the expression for the composite energy loss in step S2 is:
[0069] (twenty one)
[0070] in, Indicates composite energy loss;
[0071] This represents the set of users in the current training batch;
[0072] The energy term represents the positive sample pair;
[0073] This represents the negative sample energy term of the project;
[0074] This represents the negative sample energy term for users.
[0075] In a preferred embodiment of the present invention, the energy term expression for positive sample pairs is:
[0076] (17)
[0077] This represents an exponential function with base e.
[0078] Indicates user The original embedding and user Another enhanced view embedding Similarity between them;
[0079] Indicates the temperature coefficient;
[0080] The expression for the negative sample energy term of the project is:
[0081] (18)
[0082] in, This represents a negative sample in the project set;
[0083] Indicates user Embedding and Project The similarity between embeddings;
[0084] The expression for the user's negative sample energy term is:
[0085] (20)
[0086] in, This represents a negative sample in the user set;
[0087] This indicates the user after masking. With users Corrected similarity between them;
[0088] (19)
[0089] in, Indicates user and users Cosine similarity;
[0090] Indicates a semantic mask;
[0091] This represents a minimum value.
[0092] In a preferred embodiment of the present invention, the following steps are also included:
[0093] (27)
[0094] in, This represents the Bayesian personalized ranking loss;
[0095] Represents the set of training triples;
[0096] Represents the Sigmoid function;
[0097] Indicates user For the project Preference scores;
[0098] Indicates user For the project Predicted preference scores;
[0099] (28)
[0100] in, This represents the parameter regularization term;
[0101] Indicates the initial embedding;
[0102] express The square of the L2 norm;
[0103] Represents a learnable hybrid weight vector;
[0104] express The square of the L2 norm;
[0105] (29)
[0106] in, Represents the total loss function;
[0107] This represents the Bayesian personalized ranking loss;
[0108] The weights that control the strength of regularization;
[0109] This represents the parameter regularization term;
[0110] This indicates the weights for controlling the self-supervised task;
[0111] This represents the set of users in the current training batch;
[0112] This indicates that for users The combined energy loss.
[0113] The present invention also discloses a computer system, comprising:
[0114] processor;
[0115] Memory used to store processor-executable instructions;
[0116] The processor is configured to implement the graph contrastive learning recommendation method that integrates multi-scale information and intent awareness when executing the executable instructions.
[0117] The present invention also discloses a computer-readable storage medium, comprising:
[0118] A memory on which computer programs are stored;
[0119] A processor is configured to execute the program in the memory to implement the graph contrastive learning recommendation method that integrates multi-scale information and intent awareness.
[0120] In summary, by employing the above technical solutions, this invention adaptively and dynamically captures high and low frequency signals through learnable filters; achieves efficient and secure feature view enhancement using a quadrant-constrained noise injection strategy in continuous space; and precisely truncates the erroneous repulsion force of false negative samples by constructing a composite energy loss mechanism that integrates semantic masking, thereby realizing compact clustering of intent in the feature manifold space. Furthermore...
[0121] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0122] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0123] Figure 1 This is a schematic diagram of the overall framework of the model of this invention.
[0124] Figure 2 (a) shows the comparison results of different models on the real dataset 1. Figure 2 (b) shows the comparison results of different models on the real dataset 2.
[0125] Figure 3 (a) shows the comparison results under the experimental evaluation index recall @20. Figure 3 (b) is the comparison result under the normalized cumulative gain of the experimental evaluation index @20.
[0126] Figure 4 (a) is a schematic diagram of the evolution on real dataset 2. Figure 4 (b) is a schematic diagram of the evolution on the real dataset 3.
[0127] Figure 5 (a) is a schematic diagram of the experimental results on the real dataset 1. Figure 5 (b) is a schematic diagram of the experimental results on the real dataset 3. Figure 5 (c) is a schematic diagram of the experimental results on the real dataset 2. Figure 5 (d) is a schematic diagram of the experimental results on the real dataset 4. Detailed Implementation
[0128] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0129] 1. The MixGCL system architecture of the present invention is as follows: Figure 1 As shown, it is mainly divided into three core parts: multi-scale information hybrid encoding, noise hybrid view enhancement, and intent-aware contrastive learning.
[0130] 1.1 Preliminary Knowledge
[0131] In recommendation scenarios with implicit feedback, the main challenge lies in how to extract deep user intent from sparse interaction data. Following a common collaborative filtering paradigm, the user set is defined as... , Indicates the first user. Indicates the first Users, project sets , Project 1 Indicates the first Project, among which and These represent the size of the user and the project, respectively. User-project interaction data is encoded into a binary matrix. ,in Indicates user With the project There are interactions between them. To leverage the aggregation capabilities of graph neural networks, these interactions are modeled as an undirected bipartite graph. , where the node set , Represents the union and edge set. Corresponding to Non-zero elements in This represents a binary matrix representing user-project interactions.
[0132] The original adjacency matrix assigns excessive weights to popular nodes, leading to feature magnitude explosion. Therefore, the degree bias in the graph structure must be addressed before feature propagation. Following the standard graph convolution paradigm, a symmetric normalized Laplacian operator is used as the basis for graph filtering. The normalization operation strictly constrains the eigenvalues of the Laplacian matrix within the interval [-1, 1]. This ensures that the signal energy does not diverge during subsequent multi-layer recursive propagation, preventing gradient vanishing or exploding, thus ensuring numerical stability. To perform feature propagation on a unified graph structure, the user-item interaction relationship is further extended into an adjacency matrix. It has a block matrix form as shown in equation (1).
[0133] (1)
[0134] in, Represents the adjacency matrix;
[0135] Represents a binary matrix of user-project interactions;
[0136] express transpose;
[0137] Represents the space of real numbers;
[0138] Indicates the size of the user base;
[0139] Indicates the size of the project;
[0140] Define degree matrix Its diagonal elements Represents the degree of a node. Represents a node With nodes The connection relationships between them are introduced. A symmetric-normalized Laplace operator is introduced. As the core of the filter in graph convolution, the normalized adjacency matrix The structure is as shown in equation (2).
[0141] (2)
[0142] in, Represents the normalized adjacency matrix;
[0143] Degree matrix;
[0144] Represents the adjacency matrix;
[0145] The ultimate goal is to learn a mapping function. , Represents a mapping. Representing dimensions, mapping each node to a dimension. In a low-dimensional dense vector space of dimension 1. The initial embedding matrix of layer 0 is parameterized as... And predict users through models For the project Preference score ,in, Indicates user For the project Preference scores, Indicates user Embedded vector, express transpose, Indicates project The embedding vector.
[0146] 1.2 Multi-scale information hybrid encoder
[0147] Existing lightweight graph convolutional networks typically employ simple mean pooling or fixed-weight summation strategies during the hierarchical aggregation stage. This static design assumes that neighborhood information of all orders contributes equally to user intent, severely neglecting the heterogeneity of user behavior. That is, the preferences of active users are mainly determined by first-order direct interactions. This oversmoothing can lead to the suppression of unique user characteristics. However, since the interactions of long-tail users are extremely sparse, higher-order neighborhoods, i.e., low-frequency smoothed signals, are needed to supplement collaborative information.
[0148] To address this oversmoothing problem, MixGCL proposes a data-driven adaptive hierarchical mixing mechanism. First, following a simplified graph convolution paradigm, it utilizes a linear propagation mechanism to obtain graph representations at different scales. Layer node embedding The calculation is performed using a recursive formula as shown in equation (3).
[0149] (3)
[0150] in, Indicates the first Layer node embedding;
[0151] Represents the normalized adjacency matrix;
[0152] Indicates the first Layer node embedding;
[0153] By recursively expanding equation (3), the first... The representation of a layer can be viewed as the initial embedding. In the spectral domain The diffusion results are shown in equation (4).
[0154] (4)
[0155] in, Indicates the first Layer node embedding;
[0156] Represents the normalized adjacency matrix Power of;
[0157] Indicates the initial embedding;
[0158] Among them, matrix exponentiation It acted as a low-pass filter, as With the addition of weights, high-frequency noise in the graph signal is filtered out, preserving smoother structural information. To achieve adaptive fusion of multi-scale signals, instead of pre-setting weights, a learnable parameter vector is introduced. To fit the optimal filter response, the weights are calculated using the Softmax function to ensure they have a clear probabilistic meaning and to conserve filter energy. The calculation process is shown in equation (5).
[0159] (5)
[0160] in, Indicates the first Attention weights of layers;
[0161] This represents an exponential function with base e.
[0162] Indicates the first The parameters that a layer can learn;
[0163] Indicates the number of convolutional layers in the graph;
[0164] Indicates the first The parameters that a layer can learn;
[0165] By learning the attention distribution, and then weighting and superimposing signals of different orders, the final user and item representations are obtained. The calculation is shown in equation (6).
[0166] (6)
[0167] in, This represents the final user and project profile;
[0168] Indicates the number of convolutional layers in the graph;
[0169] Indicates the first Attention weights of layers;
[0170] Indicates the first Layer node embedding;
[0171] in The calculation process essentially constructs a parameterized adaptive graph filter, whose transfer function is shown in equation (7).
[0172] (7)
[0173] in, Represents the transfer function of the adaptive graphical filter;
[0174] Indicates the number of convolutional layers in the graph;
[0175] Indicates the first Attention weights of layers;
[0176] Representing eigenvalues Power of;
[0177] Adaptive graph filters enable the model to dynamically find the optimal balance between preserving the individual characteristics of high-frequency signals and the commonalities of the group under low-frequency signals, based on the sparsity and noise level of the data, thereby generating more robust node representations.
[0178] 1.3 Noise Mixing View Enhancement Module
[0179] Current mainstream methods mostly employ structural perturbations, and the effectiveness of contrastive learning highly depends on the quality of the augmented view. This discrete structural disruption has two inherent drawbacks: first, it may unintentionally sever key connected components in the graph, leading to the loss of semantic information; second, for large-scale graphs, frequent reconstruction of the adjacency matrix incurs enormous computational overhead. Based on the manifold assumption, similar users should be distributed within the local neighborhood of a low-dimensional manifold in the embedding space. Therefore, MixGCL proposes directly introducing isotropic noise and quadrant constraints into a continuous embedding space to achieve efficient and lossless data augmentation.
[0180] First, a base noise vector is sampled from a uniform distribution. The sampling process is shown in equation (8).
[0181] (8)
[0182] in, Represents the basic noise vector;
[0183] This represents a uniform distribution on the d-dimensional hypercube [0,1]d;
[0184] Indicates dimension;
[0185] Since the vector magnitude of uniform sampling is random, in order to ensure the fairness of the disturbance in all directions, it is L2 normalized to construct the noise vector on the unit sphere as shown in equation (9).
[0186] (9)
[0187] in, This represents the normalized noise vector;
[0188] Represents the basic noise vector;
[0189] express The L2 norm;
[0190] Simple additive noise can push the embedding vector beyond the decision boundary, causing positive preferences to turn negative, i.e., the semantic flip problem. To address this issue, this model introduces quadrant constraints to force the direction of the noise to remain consistent with the direction of the original embedding, and defines a symbol mask. The calculation is shown in equation (10).
[0191] (10)
[0192] in, Indicates symbol masking;
[0193] Represents a symbolic function;
[0194] This represents the final user and project profile;
[0195] Final injected perturbation vector The calculation is shown in equation (11).
[0196] (11)
[0197] in, Represents the perturbation vector;
[0198] Hyperparameters representing the control of disturbance amplitude;
[0199] Indicates symbol masking;
[0200] It represents the Hadamardi (or Hadama) stack;
[0201] This represents the normalized noise vector;
[0202] The perturbation vector obtained through calculation Generate two enhanced views and The enhanced view generation process is shown in equations (12) and (13).
[0203] (12)
[0204] (13)
[0205] in, This indicates the first enhanced view;
[0206] This represents the final user and project profile;
[0207] Indicates the first disturbance vector;
[0208] This indicates the second enhanced view;
[0209] Indicates the second disturbance vector;
[0210] perturbation vector The calculation ensured the augmentation of the samples Always located in the original Within the same superquadrant centered on the model, while introducing necessary data diversity to challenge model robustness, the core semantic direction of user preferences is preserved to the greatest extent possible.
[0211] 1.4 Intent-Aware Contrastive Learning Module
[0212] Traditional InfoNCE loss functions typically employ a full negative sampling strategy, treating all samples within a batch except itself as negative samples. However, in recommender systems, due to popularity bias, many users, despite having different IDs, share highly similar underlying intentions driven by common interests. Directly pushing away these spurious negative samples can lead to incorrect gradient directions in the model during optimization, disrupting the semantic clusters already formed in the embedding space. To fundamentally address this issue, MixGCL proposes an intent-aware contrastive learning mechanism based on a composite energy model.
[0213] 1.4.1 Latent Intent Recognition and Semantic Masking
[0214] To identify potential false negatives, it is necessary to measure the semantic consistency of users in the feature space and compute the semantic consistency between any two users in the augmented view. and cosine similarity cosine similarity The calculation is shown in equation (14).
[0215] (14)
[0216] in, Indicates user and users Cosine similarity;
[0217] Indicates user The embedding vector;
[0218] Indicates user The embedding vector;
[0219] express The L2 norm;
[0220] express The L2 norm;
[0221] Based on this similarity, an indicator function is defined. To determine the user Is it a user? The semantic neighbors are indicated by the function shown in Equation (15).
[0222] (15)
[0223] in, Indicates the determination of user Is it a user? semantic neighbors; =1 indicates user For users semantic neighbors, =0 indicates user Not for users semantic neighbors;
[0224] Indicates if;
[0225] Indicates user and users Cosine similarity;
[0226] This represents the threshold for identifying false negative samples;
[0227] Indicates otherwise;
[0228] Then, construct a semantic mask based on the indicator function. A semantic mask used to label true negative samples that should be retained. The calculation is shown in equation (16).
[0229] (16)
[0230] in, Indicates a semantic mask;
[0231] Indicates the determination of user Is it a user? semantic neighbors;
[0232] 1.4.2 Construction of Composite Energy Loss
[0233] Contrastive learning in recommendation can be viewed as an energy-shaping process, continuously pulling in positive sample pairs while pushing away negative samples, optimizing the feature space through the interaction of these two energies. However, in actual recommendation processes, popularity bias often leads to the rejection of spurious negative samples with potential intent, impacting recommendation performance. Therefore, by treating the contrast target as a composite energy loss function, which maximizes the energy of positive sample pairs while selectively minimizing the energy of truly negative samples, recommendation performance can be improved while maintaining the uniformity of the feature space. For users... Another view of itself That is, the energy term of positive sample pairs The definition is shown in equation (17).
[0234] (17)
[0235] The energy term represents the positive sample pair;
[0236] This represents an exponential function with base e.
[0237] Indicates user The original embedding and user Another enhanced view embedding Similarity between them;
[0238] Indicates the temperature coefficient;
[0239] Furthermore, the energy distribution of negative samples is decomposed into two parts, the first part being negative samples from the item set. This part retains the exclusionary principle of standard InfoNCE, negative samples The calculation is shown in equation (18).
[0240] (18)
[0241] in, This represents the negative sample energy term of the project;
[0242] This represents a negative sample in the project set;
[0243] This represents an exponential function with base e.
[0244] Indicates user Embedding and Project The similarity between embeddings;
[0245] Indicates the temperature coefficient;
[0246] The second part of the energy distribution of negative samples comes from negative samples in the user set. MixGCL utilizes semantic masks The similarity is corrected, and the corrected similarity is... As shown in equation (19).
[0247] (19)
[0248] in, This indicates the user after masking. With users Corrected similarity between them;
[0249] Indicates user and users Cosine similarity;
[0250] Indicates a semantic mask;
[0251] To represent a local minimum; here we take... ;
[0252] Corresponding user negative sample energy term The calculation is shown in equation (20).
[0253] (20)
[0254] in, This represents the negative sample energy term for users;
[0255] This represents a negative sample in the user set;
[0256] This represents an exponential function with base e.
[0257] This indicates the user after masking. With users Corrected similarity between them;
[0258] Indicates the temperature coefficient;
[0259] The final MixCL loss function integrates the above items to form an intention-aware contrastive target, and its intention-aware contrastive learning loss function (composite energy loss) is shown in Equation (21).
[0260] (twenty one)
[0261] in, Indicates composite energy loss;
[0262] This represents the set of users in the current training batch;
[0263] The energy term represents the positive sample pair;
[0264] This represents the negative sample energy term of the project;
[0265] This represents the negative sample energy term for users;
[0266] 1.4.3 Gradient Dynamics Analysis
[0267] To further reveal theoretically how MixGCL eliminates the impact of spurious negative samples, therefore, the loss function... Regarding negative sample pairs Similarity The gradient is rigorously derived mathematically. First, the total energy in the denominator is defined. As shown in equation (22).
[0268] (twenty two)
[0269] in, Represents total energy;
[0270] The energy term represents the positive sample pair;
[0271] This represents the negative sample energy term of the project;
[0272] This represents the negative sample energy term for users;
[0273] According to the differentiation rule of logarithmic functions, the loss function is... The partial derivatives are expressed as shown in equation (23).
[0274] (twenty three)
[0275] in, Indicates partial derivative;
[0276] Indicates composite energy loss;
[0277] Indicates user and users Cosine similarity;
[0278] The energy term represents the positive sample pair;
[0279] Represents total energy;
[0280] This represents the negative sample energy term for users;
[0281] exist Among them, only with Related items It contributes to the gradient. According to the chain rule, equation (23) can be further decomposed as shown in equation (24).
[0282] (twenty four)
[0283] in, Indicates partial derivative;
[0284] This represents the negative sample energy term for users;
[0285] Indicates user and users Cosine similarity;
[0286] Indicates intermediate variables;
[0287] This indicates the user after masking. With users Corrected similarity between them;
[0288] Indicates the temperature coefficient;
[0289] Indicates a semantic mask;
[0290] Substituting equation (24) into equation (23), we obtain the final gradient expression as shown in equation (25).
[0291] (25)
[0292] in, Indicates partial derivative;
[0293] Indicates composite energy loss;
[0294] Indicates user and users Cosine similarity;
[0295] Indicates the temperature coefficient;
[0296] Indicates intermediate variables;
[0297] Represents total energy;
[0298] Indicates a semantic mask;
[0299] Based on the above calculations, we can then analyze the gradient dynamics in two cases:
[0300] (1) True negative samples, i.e. At this point, the gradient is ,in It's the probability of the Softmax function. This is a positive repulsive force, pushing... and Separate in the feature space.
[0301] (2) False negative samples, i.e. ,because ,lead to and mask item Therefore, the gradient is always 0 as shown in equation (26).
[0302] (26)
[0303] in, Indicates partial derivative;
[0304] Indicates composite energy loss;
[0305] Indicates user and users Cosine similarity;
[0306] The above proof demonstrates that MixGCL possesses the ability to automatically truncate gradients; when a potential semantic neighbor is detected, the model automatically cuts off its repulsive force field. This mechanism fundamentally prevents the de-clustering of semantic clusters, enabling the model to learn more compact and discriminative intent representations.
[0307] 1.5 Multi-task joint optimization
[0308] To balance the accuracy of the recommendation task with the robustness of representation learning, MixGCL adopts a multi-task joint training strategy. The main task uses Bayesian personalized ranking loss to optimize the relative ranking relationship of observation interactions, as shown in Equation (27).
[0309] (27)
[0310] in, This represents the Bayesian personalized ranking loss;
[0311] Represents the set of training triples;
[0312] Represents the Sigmoid function;
[0313] Indicates user For the project Preference scores;
[0314] Indicates user For the project Predicted preference scores;
[0315] To prevent the model from overfitting, a parameter regularization term is introduced, and the calculation of the regularization term is shown in equation (28).
[0316] (28)
[0317] in, This represents the parameter regularization term;
[0318] Indicates the initial embedding;
[0319] express The square of the L2 norm;
[0320] Represents a learnable hybrid weight vector;
[0321] express The square of the L2 norm;
[0322] The final overall objective function The total loss is composed of a weighted sum of Bayesian personalized ranking loss, regularization term and intent-aware contrast loss, as shown in Equation (28).
[0323] (29)
[0324] in, Represents the total loss function;
[0325] This represents the Bayesian personalized ranking loss;
[0326] The weights that control the strength of regularization;
[0327] This represents the parameter regularization term;
[0328] This indicates the weights for controlling the self-supervised task;
[0329] This represents the set of users in the current training batch;
[0330] This indicates that for users The combined energy loss;
[0331] The training process of the MixGCL recommendation method is shown in Algorithm 1.
[0332] Algorithm 1: The learning process of the MixGCL method
[0333] Input: Image Parameter set { , , , , Learning rate Training rounds Number of convolutional layers in the graph
[0334] Output: Final Embedded Layer weights
[0335] 1. Initialize attention parameters and initial embedding
[0336] 2. Pre-compute the normalized adjacency matrix
[0337] 3. Loop to calculate
[0338] 4. Loop to calculate
[0339] 5. Calculate the first... Layer embedding:
[0340] 6. Loop ends
[0341] 7. Calculate dynamic attention weights
[0342] 8.
[0343] 9. Sampling batch And calculate
[0344] 10.
[0345] 11.
[0346] 12. Calculate the pairwise similarity matrix.
[0347] 13. Generate the mask matrix
[0348] 14. Utilize , and calculate
[0349] 15.
[0350] 16. Update parameters via Adam optimizer
[0351] 17. Loop ends
[0352] 18. Return to the final embedding
[0353] in, This represents the noise-free embedding after multi-scale information hybrid encoder fusion;
[0354] Indicates the copy operator;
[0355] Represents the quadrant constraint noise generation function;
[0356] This represents the indicator function used to generate the semantic mask matrix;
[0357] 1.6 Time Complexity Analysis
[0358] The computational overhead of MixGCL mainly consists of two parts: graph convolution and contrastive loss. Graph convolution: Due to the use of the LightGCN structure, its complexity is O(log n). ,in The number of convolutional layers in the graph. Let be the number of sides. The dimension is represented. The computation of hierarchical attention involves only vector operations, and its complexity is negligible. For the contrastive learning part: the noise generation complexity is... The complexity of calculating the similarity matrix is O(n log n). ,in This refers to the batch size. Because... This overhead is within a manageable range. Overall, MixGCL and LightGCN have the same linear-time complexity metric, which ensures their scalability on large-scale datasets.
[0359] 2. Analysis of Experimental Results
[0360] To evaluate the performance and effectiveness of MixGCL, experiments were conducted to compare it with various mainstream recommendation methods on four different real-world datasets.
[0361] 2.1 Dataset Evaluation
[0362] MixGCL selected four representative real-world datasets for experiments to test the model's performance. Real Dataset 1: Contains book preference data from Platform 1. Real Dataset 2: From a well-known US merchant review website, recording user ratings of merchants. Real Dataset 3: Contains movie preference data from Platform 1. Real Dataset 4: Contains book purchase records from Platform 2. These datasets differ in domain, size, and sparsity; Table 1 shows detailed statistical information for each dataset.
[0363] Table 1. Dataset Statistics
[0364]
[0365] 2.2 Evaluation Indicators
[0366] To ensure fairness in the evaluation, following standard settings, the same processing methods as existing work are adopted. The two most commonly used evaluation metrics in the recommendation field—Recall@K and Normalized Diminished Cumulative Gain (NDCG)@K—are used to evaluate the Top-K recommendation performance of the model. Unless otherwise specified, the default value of K is 20. The calculation methods for Recall and NDCG are as follows.
[0367] 1) Recall: Recall measures the proportion of user-item pairs that the recommendation system can successfully predict from all actual user-item pairs that have interacted, reflecting the degree to which the recommendation system covers items that the user is actually interested in. R(u) represents the Top-K recommendation list provided to the user based on learned user behavior; T(u) represents the set of items actually selected by the user after the recommendation system recommends them to the user.
[0368] (30)
[0369] in, Indicates recall rate;
[0370] Represents a user set;
[0371] Represented as user Recommended Top-K project list;
[0372] This represents the intersection operation of sets;
[0373] Indicates user A collection of projects with actual interaction;
[0374] 2) CG (Cumulative Gain): This sums the relevance scores of each recommendation in the list. It only adds up the relevance scores and does not consider the position of the recommendation in the list. In some cases, high-scoring results may be ranked lower, while low-scoring results may be ranked higher.
[0375] (31)
[0376] in, Indicates cumulative gain;
[0377] Indicates the length of the recommendation list;
[0378] Indicates the first Relevance labels of each recommendation result;
[0379] This indicates the position index in the recommendation list;
[0380] 3) DCG (Discounted Cumulative Gain): DCG introduces the positional factor into CG. By considering the ranking order, it increases the gain of items ranked higher and decreases the gain of items ranked lower.
[0381] (32)
[0382] in, Indicates the cumulative gain due to loss;
[0383] Indicates the length of the recommendation list;
[0384] Indicates the first Relevance labels of each recommendation result;
[0385] This indicates the position index in the recommendation list;
[0386] 4) NDCG (Normalized Depreciation Cumulative Gain): When evaluating a recommender system, the evaluation is not limited to a single user's recommendation list, but rather considers the entire set of user recommendation lists. Therefore, the evaluation scores of different users' recommendation lists need to be normalized. Normalized Depreciation Cumulative Gain is the depreciation cumulative gain of the current result normalized using the ideal depreciation cumulative gain. It is used to represent how close the current result is to the ideal result. The ideal depreciation cumulative gain is the list of best recommendation results returned by the recommender system for a specific user.
[0387] (33)
[0388] in, This represents the ideal cumulative gain after loss.
[0389] Indicates the length of the recommendation list;
[0390] Indicates the total number of related items;
[0391] Indicates the first Relevance labels of each recommendation result;
[0392] This indicates the position index in the recommendation list;
[0393] This represents the normalized cumulative gain;
[0394] Indicates the cumulative gain due to loss;
[0395] 2.3 Hyperparameter Settings
[0396] Following a general implementation approach, MixGCL was implemented using PyTorch, and computer simulations were performed using a Quadro RTX 5000 GPU and an Intel Core i9-10980XE CPU. Specifically, the model's embedding size was set to 64, and the training batch size ranged from {2048, 4096, 10240}. The default optimizer was the Adam optimizer, initialized using the Xavier method. For MixGCL, the number of GCN layers ranged from {1, 2, 3}, the temperature coefficient was set to {0.22, 0.28, 0.45}, the constant was set to 1e-8, and the graph contrast learning weights were {0.1, 1.0, 5.0}. Furthermore, hyperparameters... and The values were set in the ranges {0.001, 0.005, 0.01, 0.05, 0.1, 0.15} and {0.7, 0.75, 0.8, 0.85, 0.9, 0.95} to explore their impact on model performance. To ensure a fair baseline performance, all models were optimized using the Adam optimizer for all compared methods.
[0397] 2.4 Baseline Comparison Method
[0398] A comprehensive comparison of recall @20 and normalized depreciation cumulative gain @20 was conducted based on the following 13 current state-of-the-art recommendation system methods. A brief overview of the relevant baselines is shown below.
[0399] (I) Graph Convolution Model
[0400] BPR-MF: A classic matrix factorization model based on pairwise preference ranking, which learns representations by explicitly modeling users' relative preferences for items.
[0401] NGCF: The first to introduce graph neural networks into recommender systems, capturing high-order collaboration signals by performing message passing on the user-item graph.
[0402] LightGCN simplifies the graph convolution architecture and significantly improves the efficiency and accuracy of recommendations by removing linear transformations and non-linear activation functions.
[0403] LightCCF reveals the essential role of contrastive learning in graph filtering and achieves efficient collaborative filtering using a minimalist linear architecture.
[0404] (II) Based on contrastive learning model
[0405] SGL: Enhances model learning by performing operations that randomly discard nodes or edges on the graph structure and utilizing the self-supervised signals generated by the structure expansion.
[0406] NCL: Introduces neighborhood-level and prototype-level contrastive learning tasks to enhance features by capturing the relationship between users / items and their semantic neighbors and clusters.
[0407] SimGCL abandons complex structural amplification and constructs efficient contrast pairs by adding uniform random noise to the characterization space.
[0408] LightGCL: Combines singular value decomposition to capture global topological information, enabling long-distance dependency modeling with a lightweight contrastive learning framework.
[0409] CGCL: Introduces a candidate object perception mechanism to better identify and utilize difficult negative samples through contrastive learning to enhance discrimination capabilities.
[0410] MixRec employs feature fusion technology for representation-level data augmentation, effectively mitigating the problems of interaction sparsity and uneven data distribution.
[0411] (III) Intended Decoupling Model
[0412] DCCF combines contrastive learning with decoupling mechanisms to improve the robustness of representations by modeling and distinguishing user behavior patterns under different intentions.
[0413] BIGCF: A filtering model designed for bipartite graphs that optimizes alignment by simultaneously mining the individual characteristics and common intentions of the group behind user interactions.
[0414] IHGCL: An intent guidance framework designed for heterogeneous graphs, which uses contrastive learning to capture deep semantic connections and interaction motivations between different types of nodes.
[0415] 2.5 Performance Comparison
[0416] To verify the effectiveness and logic of the proposed MixGCL method, experiments were conducted using four real-world datasets (Real Dataset 1, Real Dataset 2, Real Dataset 3, and Real Dataset 4) to compare its performance with 13 baseline methods, including LightCCF, BIGCF, and IHGCL. Table 2 shows the performance comparison results, where R@20 and N@20 represent recall@20 and normalized depreciation cumulative gain@20, respectively. The best results for each metric on each dataset in Table 2 are indicated in bold, and the second-best results are indicated by underline.
[0417] Table 2 Experimental Results
[0418]
[0419] Experimental results show that MixGCL outperforms the other 13 baseline methods across all four datasets in the top-20 setting, achieving significant performance improvements. Quantitative analysis demonstrates that this invention achieves significant improvements compared to the current state-of-the-art baselines. Compared to the baseline model LightCCF, on real dataset 1, recall@20 and normalized loss cumulative gain@20 are improved by 3.84% and 2.58%, respectively; on real dataset 4, recall@20 and NDCG@20 are also improved by 3.29% and 3.03%, respectively; and on real dataset 3, recall@20 and normalized loss cumulative gain@20 are improved by 2.53% and 3.39%, respectively. Compared to the baseline model IHGCL, on real dataset 2, recall@20 and normalized loss cumulative gain@20 are improved by 6.90% and 6.01%, respectively. These experimental results demonstrate the superiority and rationality of MixGCL. MixGCL utilizes an adaptive hierarchical attention mechanism to effectively balance high-frequency personalized features with low-frequency group commonalities, alleviating the oversmoothing problem common in traditional graph neural models. Furthermore, the noise-mixed view augmentation, by injecting quadrant-constrained isotropic noise into the continuous embedding space, ensures data augmentation diversity while preventing semantic flipping. Additionally, the proposed intent-aware contrastive learning utilizes composite energy loss and semantic masking to reduce the erroneous rejection force of false negatives, thereby effectively improving the data sparsity problem commonly found in implicit feedback and learning a more compact intent representation.
[0420] Current self-supervised learning-based recommendation methods (such as SGL, SimGCL, and NCL) generally outperform traditional graph neural network-based methods (such as LightGCN), demonstrating the positive benefits of contrastive self-supervised signals for graph collaborative filtering models. However, most existing SSL methods employ brute-force graph structure destruction or blind full-negative sampling for contrast, making it difficult to exclude potential positive samples with similar intentions and easily losing key collaborative signals, leading to semantic collapse in the embedded representation. MixGCL eliminates the high cost of graph reconstruction by using quadrant constraints in continuous space, while fundamentally correcting the gradient dynamics of contrastive learning through a spurious negative sample masking mechanism. This further confirms that meticulous handling of "spurious negative samples" and "semantic boundaries" in graph contrastive learning is absolutely necessary for deeply mining the potential intentions behind user-item interactions, greatly improving the accuracy and interpretability of recommendation methods.
[0421] 2.6 Ablation Experiment
[0422] To further verify the effectiveness of the recommendation method, ablation analysis experiments were conducted to verify the contribution of different core components to performance improvement on different datasets and to verify their effectiveness. Specifically, the performance of the MixGCL component was demonstrated from three perspectives: (1) multi-scale information mixing encoding; (2) noise mixing view enhancement; and (3) intent awareness and false negative sample masking. Table 3 shows the comparison of the recall and normalized depreciation cumulative gain of the top-20 on four datasets (real dataset 1, real dataset 2, real dataset 3, and real dataset 4) of three different variant models with the proposed recommendation method, where R@20 and N@20 represent recall@20 and normalized depreciation cumulative gain@20, respectively. The specific variants are shown below:
[0423] -MIME: Removes the mixing of multi-scale information;
[0424] -NMVA: Noise removal and enhanced mixed view;
[0425] -IACL: Removes intent-aware and spurious negative sample masks.
[0426] Table 3 Ablation Analysis Experiment
[0427]
[0428] In Table 3, the evaluation metrics are recall @20 and normalized loss cumulative gain @20. The best results for each metric on each dataset in Table 3 are indicated in bold, and the second-best results are indicated by underline. After removing the multi-scale information mixing module, the performance of MixGCL on the four datasets significantly decreased, especially on the extremely sparse real dataset 2, where recall @20 dropped sharply from 0.1116 to 0.0638. Furthermore, after removing the noisy mixed view enhancement and intent-aware spurious negative sample masking modules respectively, all metrics also showed a downward trend. The multi-scale information mixing module significantly improves the oversmoothing problem caused by static mean aggregation in existing graph neural networks, preserving the personalized characteristics of active users under high-frequency signals, while supplementing the collaborative information of long-tail users using low-frequency signals. The noisy mixed view enhancement module avoids the semantic flipping problem in contrastive learning by injecting quadrant-constrained isotropic noise into the continuous embedding manifold space, ensuring high-quality self-supervised signals. The intent-aware and spurious negative sample masking module improves the embedding space collapse problem caused by blindly pushing away latent semantic neighbors in traditional contrastive learning, enabling the model to learn more realistic intent expressions and improving the accuracy of recommendations.
[0429] 2.7 Sparsity Test
[0430] In this section, to further verify whether the proposed method can effectively alleviate the data sparsity problem, the representative LightGCN and two high-performing algorithms, SGL and LightCCF, are compared on two real datasets, Real Dataset 1 and Real Dataset 2. Based on the scale of user-item interactions, the interaction data in the training set is evenly divided into four user groups {U1, U2, U3, U4}, where U1 is the sparsest user group with the smallest user interaction scale. User interaction activity increases progressively from U1 to U4, with U4 being the most active user group. Recommendation accuracy is measured using normalized loss cumulative gain@20. The sparsity experimental analysis results of MixGCL compared to LightGCN, SGL, and LightCCF are as follows: Figure 2 As shown, where Figure 2 (a) shows the comparison results of different models on the real dataset 1. Figure 2 (b) shows the comparison results of different models on the real dataset 2.
[0431] Figure 2 In the results, MixGCL consistently outperforms baselines LightGCN, SGL, and LightCCF across different datasets and groupings, providing more accurate recommendations for users with varying activity levels. This demonstrates the effectiveness of recommendation methods in mitigating the sparsity problem of implicit feedback data. This performance improvement is primarily attributed to the synergistic effect of the proposed multi-scale information hybrid encoder and the intent-aware graph contrastive learning framework. This framework provides high-quality, robust self-supervised signal supplementation while significantly enriching the feature representations of sparse users through a global collaborative graph structure.
[0432] 2.8 Experiment on the number of convolutional layers
[0433] To investigate the impact of different graph convolutional layer numbers on the recommendation performance of MixGCL, tests were conducted on four datasets based on two metrics: recall@20 and normalized depreciation cumulative gain@20. The model performance at different times, and the experimental results for different numbers of convolutional layers are shown in Table 4. Recall@20 and NDCG@20 represent recall@20 and normalized depreciation cumulative gain@20, respectively. In Table 4, the best results for each metric on each dataset are indicated in bold, and the second-best results are indicated by underline. To more intuitively demonstrate the performance of different numbers of layers, two sets of stacked line graphs are used to present the impact of the number of layers on the performance trend. Figure 3 As shown, where Figure 3 (a) shows the comparison results under the experimental evaluation index recall @20. Figure 3 (b) is the comparison result under the normalized cumulative gain of the experimental evaluation index @20.
[0434] Figure 3 The experiment showed that when When the initial embedding is 0, the model relies solely on the matrix factorization of the initial embedding. Because it fails to utilize the structural information of the bipartite graph, its performance on all datasets is the worst. As the number of layers increases, the performance on all datasets shows a significant improvement, strongly demonstrating the crucial role of aggregating neighborhood interaction information in mining user preferences. In contrast, for the extremely sparse real datasets 2 and 3, the model requires a deeper network architecture to propagate cooperative signals, and its optimal performance occurs in [the following data points]. The value is 3. This indicates that in highly sparse scenarios, low-level direct interactions alone cannot effectively characterize user features. It is necessary to rely on low-frequency smoothing signals from high-level neighborhoods to supplement the collaborative information of long-tail users.
[0435] Typically, traditional graph convolutional networks experience a sharp performance drop after three layers due to oversmoothing. However, MixGCL even... At an extremely deep layer count of 4, although performance drops slightly compared to the optimal layer count, it does not experience a precipitous collapse. MixGCL's multi-scale information hybrid encoder can dynamically select and fuse features of different orders through an adaptive attention mechanism. This allows the model to automatically reduce the weights of overly smoothed or noisy high-order features when exploring deep networks, thus making the model more robust.
[0436] Table 4 Performance comparison of MixGCL under different convolutional layers
[0437]
[0438] The evaluation metrics in Table 4 are recall rate @20 and normalized cumulative gain @20.
[0439] 2.9 layer attention weights
[0440] To further demonstrate the effectiveness of multi-scale information mixing, we examine the learnable hierarchical attention weight parameters in MixGCL. Further research is needed. Based on the formula... The evolution of attention weights at different numbers of convolutional layers during training on two datasets, Real Data Set 2 and Real Data Set 3, is plotted as a heatmap. The heatmap is shown below. Figure 4 As shown, where Figure 4 (a) is a schematic diagram of the evolution on real dataset 2. Figure 4 (b) is a schematic diagram of the evolution on the real dataset 3.
[0441] In the early stages of training, since high-order features are beneficial for constructing the initial user preference space, high-order graph convolutions are extensively used to cross the sparse interaction network, capturing the global topology and collaborative filtering signals. The attention distribution across layers is relatively uniform, and the proportion of high-order features is at its highest during training. As training progresses, both datasets exhibit significant evolutionary trends, with the initial features... The weights of higher-order features increase sharply while their weights gradually decrease. This phenomenon demonstrates the effectiveness of the multi-scale information fusion design. As the main task and intent-aware contrastive loss continuously update the underlying parameters through backpropagation of the graph structure, the basic embedding has absorbed sufficiently rich and accurate collaborative information. At this point, to reduce the oversmoothing effect and high-frequency noise interference caused by higher-order graph convolution, multi-scale information fusion actively reduces the proportion of higher-order smoothed signals transmitted through data-driven adaptive optimization, thereby preserving the personalized representation of users and projects to the greatest extent.
[0442] 2.10 Hyperparameter Analysis
[0443] To investigate the amplitude of noise injection and false negative sample mask threshold To assess the impact on experimental performance, a grid search was performed on four datasets to evaluate these two parameters, with noise injected into the amplitude. The value range is set to {0.001, 0.005, 0.01, 0.05, 0.1, 0.15}, which is the threshold for the false negative sample mask. The value range is set to {0.7, 0.75, 0.8, 0.85, 0.9, 0.95}. The performance under different parameter combinations is measured by recall rate @20. Hyperparameter analysis experiments are as follows: Figure 5 As shown, where Figure 5 (a) is a schematic diagram of the experimental results on the real dataset 1. Figure 5 (b) is a schematic diagram of the experimental results on the real dataset 3. Figure 5 (c) is a schematic diagram of the experimental results on the real dataset 2. Figure 5 (d) is a schematic diagram of the experimental results on the real dataset 4.
[0444] Experiments show that, Too small a value will result in a lack of diversity in the augmented view and weak self-supervised signals; while Excessive values can disrupt the embedded manifold structure, potentially introducing excessive noise into the recommendation task despite quadrant constraints. On the more densely interacting real datasets 1, 3, and 2, relatively smaller values achieve optimal performance, while the less densely interacting real dataset 4 benefits from slightly larger perturbations. Parameters This determines the strictness of the judgment of potential semantic neighbors in the IACL module. When When the value approaches 1.0, the masking mechanism fails, and the model degenerates into a standard InfoNCE loss that blindly rejects all other samples, leading to semantic collapse of the feature space; conversely, if... If the threshold is set too low, the model will incorrectly mask a large number of true negative samples, thus weakening the discriminative learning's ability to differentiate between different feature clusters. The heatmap clearly reveals the optimal values for each dataset. The values are all stably distributed within the narrow interval [0.85, 0.95], which strongly confirms that a moderate gradient truncation mechanism can effectively balance the contradiction between "protecting existing semantic clusters" and "maintaining the uniformity of the feature space".
[0445] Overall, the highlighted central regions of all four heatmaps exhibit smooth performance transition boundaries, indicating that MixGCL possesses excellent robustness within a reasonable parameter space and does not show severe overfitting to specific extreme values. and The joint optimization results further validate the core hypothesis: while providing a continuous spatial augmentation view with topological security, it is necessary to supplement it with an accurate intent-aware mask. The synergy between the two is the key to maximizing the efficiency of graph contrastive learning.
[0446] 3. Summary
[0447] This invention proposes a graph contrastive learning recommendation method (MixGCL) that integrates multi-scale adaptive hybridization and intent-aware learning. This framework addresses the oversmoothing caused by static aggregation and semantic collapse resulting from blind full negative sampling in existing graph recommendation methods. It utilizes a layer attention mechanism to dynamically balance high-frequency personalized features with low-frequency group common signals, thereby designing a multi-scale information hybrid encoder. At the data augmentation level, isotropic noise is safely injected into the continuous feature space, proposing a quadrant-constrained noise hybrid view augmentation that effectively prevents semantic flipping caused by traditional perturbations. Finally, an intent-aware contrastive learning module is constructed, innovatively incorporating a semantic masking mechanism into the composite energy loss function. During the optimization phase, it automatically truncates erroneous gradients of spurious negative samples, achieving compact clustering of intents in the feature manifold space. Comparative experiments, ablation analysis, and sparsity tests on four real-world datasets and 13 state-of-the-art baseline methods comprehensively verify the superiority of MixGCL in improving recommendation accuracy, robustness, and mitigating data sparsity.
[0448] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A graph contrastive learning recommendation method that integrates multi-scale information and intent awareness, characterized in that, The graph contrastive learning recommendation method processes data including: book preference data, user ratings of merchants, movie preference data, and book purchase records. This graph contrastive learning recommendation method includes the following steps: S1, Design a multi-scale information hybrid encoder to dynamically balance high-frequency personalized features and low-frequency group commonalities, so as to adaptively meet the representation needs of users with different activity levels; the multi-scale information hybrid encoder includes: , in, Indicates the first Layer node embedding; Represents the normalized adjacency matrix Power; Indicates the initial embedding; , in, Indicates the first Attention weights of layers; This represents an exponential function with base e. Indicates the first The parameters that a layer can learn; Indicates the number of convolutional layers in the graph; Indicates the first The parameters that a layer can learn; , in, This represents the final user and project profile; Indicates the first Attention weights of layers; S2, first, noise is sampled in a uniform distribution within the continuous embedding space and L2 normalized. Then, a perturbation is injected into the final embedding using a symbol mask to generate two enhanced views. The expression for the symbol mask is: , in, Indicates symbol masking; Represents a symbolic function; This represents the final user and project profile; The expression for the disturbance is: , in, Represents the perturbation vector; Hyperparameters representing the control of disturbance amplitude; It represents the Hadamardi (or Hadama) stack; This represents the normalized noise vector; The expressions for the two enhanced views are: , , in, This indicates the first enhanced view; Indicates the first disturbance vector; This indicates the second enhanced view; Indicates the second disturbance vector; Subsequently, semantic masks are introduced to block false negative samples, and composite energy loss is incorporated to optimize feature compactness; S3, obtain preference scores; S4, recommendations are made based on preference scores.
2. The graph contrastive learning recommendation method integrating multi-scale information and intent awareness as described in claim 1, characterized in that, The expression for L2 normalization of the noise in step S2 is as follows: , in, This represents the normalized noise vector; Represents the basic noise vector; express The L2 norm.
3. The graph contrastive learning recommendation method integrating multi-scale information and intent awareness as described in claim 1, characterized in that, The expression for the semantic mask in step S2 is: , in, Indicates the determination of user Is it a user? semantic neighbors; =1 indicates user For users semantic neighbors, =0 indicates user Not for users semantic neighbors; Indicates if; Indicates user and users Cosine similarity; This represents the threshold for identifying false negative samples; Indicates otherwise; , in, Indicates a semantic mask; Indicates the determination of user Is it a user? Semantic neighbors.
4. The graph contrastive learning recommendation method integrating multi-scale information and intent awareness as described in claim 1, characterized in that, Step S3 includes the following steps: , in, Indicates user For the project Preference scores; Indicates user The embedding vector; express Transpose of; Indicates project The embedding vector.
5. The graph contrastive learning recommendation method integrating multi-scale information and intent awareness according to claim 1, characterized in that, The expression for the composite energy loss in step S2 is: , in, Indicates composite energy loss; This represents the set of users in the current training batch; The energy term represents the positive sample pair; This represents the negative sample energy term of the project; This represents the negative sample energy term for users.
6. The graph contrastive learning recommendation method integrating multi-scale information and intent awareness according to claim 5, characterized in that, The energy term expression for positive sample pairs is: , This represents an exponential function with base e. Indicates user The original embedding and user Another enhanced view embedding Similarity between them; Indicates the temperature coefficient; The expression for the negative sample energy term of the project is: , in, This represents a negative sample in the project set; Indicates user Embedding and Project The similarity between embeddings; The expression for the user's negative sample energy term is: , in, This represents a negative sample in the user set; This indicates the user after masking. With users Corrected similarity between them; , in, Indicates user and users Cosine similarity; Indicates a semantic mask; This represents a minimum value.
7. The graph contrastive learning recommendation method integrating multi-scale information and intent awareness according to claim 6, characterized in that, It also includes the following steps: , in, This represents the Bayesian personalized ranking loss; Represents the set of training triples; Represents the Sigmoid function; Indicates user For the project Preference scores; Indicates user For the project Predicted preference score; , in, This represents the parameter regularization term; Indicates the initial embedding; express The square of the L2 norm; Represents a learnable hybrid weight vector; express The square of the L2 norm; , in, Represents the total loss function; This represents the Bayesian personalized ranking loss; The weights that control the strength of regularization; This represents the parameter regularization term; This indicates the weights for controlling the self-supervised task; This represents the set of users in the current training batch; This indicates that for users The combined energy loss.
Citation Information
Patent Citations
Diversified recommendation method based on graph contrast learning
CN118606552A
Federal map neural network-based intention perception fair recommendation method
CN121682128A