Social recommendation method based on cross-topic contrastive learning
By introducing cross-theme comparison learning and balance theory in the social recommendation system, separating user interest topics and building self-supervised signals, the problem of recommendation performance degradation caused by sparse ratings and diversified social relationships in the existing technology is solved, and more efficient User interest distinction and recommendation effects are improved.
Patent Information
- Application Number
- PCT/CN2024/089930
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-11
- Filing Date
- 2024-04-26
- Publication Date
- 2025-01-16
AI Technical Summary
The existing social recommendation system is poor in dealing with sparse user rating matrix and diverse social relationships, and is prone to introducing negative information, resulting in a degradation of recommendation performance.
Using a method based on cross-theme comparison learning, user interests are divided into different topics, cross-theme social relationship is constructed through InfoNCE objective function and balance theory, combining self-supervised tasks and Bayesian personalized ranking losses, and training the recommendation system to maximize users Differences in interest and noise reduction.
It effectively alleviates social noise, improves the performance of the recommendation system, and improves the accuracy and distinction of recommendations through multi-theme separation and cross-theme learning.
Smart Images

Figure CN2024089930_16012025_PF_FP_ABST
Abstract
Description
A social recommendation method based on cross-topic contrastive learning Technical Field
[0001] The present invention relates to the field of social networks, and in particular to a social recommendation method based on cross-topic comparative learning. Background Art
[0002] With the development of information technology, the amount of information on the Internet has grown exponentially, making it extremely difficult to process and select the required information. In this context, recommendation systems have become an important approach to solving this problem. Recommendation systems model users' historical behavior data and the content of items to recommend information that users need and are interested in. Currently, mainstream recommendation algorithms are generally categorized as collaborative filtering-based, content-based, and hybrid methods. Collaborative filtering is one of the most popular techniques for building recommendation systems. It can learn from users' historical interactions with items to understand their interests. Traditional user-based collaborative filtering methods utilize the ratings and preferences of similar users to generate recommendations for other users. However, in real-world environments, user rating matrices are often very sparse, resulting in insufficient shared items to calculate user similarity, often leading to poor recommendation system performance.
[0003] Since the low cost of establishing connections in online social networks may cause a person to have too many friends in the online world, making the social network composed of valuable friends, accidental friends and event friends, users are not necessarily similar. Social relationships that mix useful and noisy connections may introduce negative information into the recommendation system. Therefore, indiscriminately using all the social relationships of a user may perform worse than traditional recommendation systems.
[0004] Summary of the Invention
[0005] The purpose of the present invention is to provide a social recommendation method based on cross-topic comparative learning. In order to alleviate the possible conflicts in social relationships based on symbolic networks, multiple topics are introduced into the construction method of symbolic networks, and user interests are divided into different topics to further alleviate the social noise of users. At the same time, in order to distinguish user interests under each topic as much as possible, a cross-topic comparative learning mechanism is adopted to maximize the differences in user interests under different topics and integrate them into the recommendation framework.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] A social recommendation method based on cross-topic contrastive learning includes the following steps:
[0008] Step 1) Obtain the user-item interaction graph in the recommendation system;
[0009] Step 2) Item representation learning is performed based on the user-item interaction graph, and items are clustered and divided into topics;
[0010] Step 3) Construct topic-based social relationships by comparing across topics:
[0011] Step 31) Constructing a user's behavior social matrix under different topics;
[0012] Step 32) Using the InfoNCE method to construct the objective function of cross-subject comparative learning;
[0013] Step 4) SGCN-based information propagation within the topic:
[0014] Step 41) Calculate the user sets of balanced paths and unbalanced paths from the user's perspective;
[0015] Step 42) Using the balance theory, obtain balanced or unbalanced user embeddings through information aggregation;
[0016] Step 43) Aggregate user interests under each topic through the attention mechanism;
[0017] Step 5) Self-supervision method based on extended equilibrium theory:
[0018] Step 51) Following the extended structural balance theory, construct the objective function of the self-supervised task under different topics;
[0019] Step 52) Using Bayesian personalized ranking loss in the recommendation task, combining the objective function of cross-topic contrastive learning and the objective function of the self-supervised task based on balance theory, to determine the total loss function of the recommendation system;
[0020] Step 53) The recommendation system is trained based on the total loss function to obtain recommendation results that take user differences into consideration.
[0021] Described step 2) comprises the following steps:
[0022] Step 21) A biased random walk method is used to sample the node sequence of the user-item interaction graph. After obtaining the sampled sequence, the Skip-gram model and negative sampling method are used to learn item representations within the view and train to obtain item embeddings;
[0023] Step 22) Cluster the trained item embeddings to obtain the corresponding user interest topics and the initial embeddings of users within each topic.
[0024] The Skip-gram model and negative sampling method are used to learn item representations within the view. The item embedding obtained by training is specifically:
[0025] The Skip-gram model aims to maximize the average logarithmic probability of the sequence to obtain node representation:
[0026] Among them, c is the context window of the sequence, T is the sequence length, i t represents the tth item in the sequence, the most important p(i k+j |i t ) is expressed as follows using the softmax function:
[0027] Among them, e i and e′ i is the vector representation of the input and output of the item node, and N is the total number of items;
[0028] Since the time complexity of calculating the denominator of the above formula is high, the negative sampling method is used to approximately maximize the logarithmic probability of the softmax function, and the above formula is expressed as:
[0029] Among them, k is the negative sample obtained by the negative sampling method. Here, the negative sample can be obtained from the negative sample set when the item view is constructed; σ is the sigmoid function;
[0030] The item embedding is trained based on the Skip-gram model.
[0031] The step 31) is specifically as follows:
[0032] The social relationships of users are divided into two categories: the original social network G s and behavioral social networks G b , the adjacency matrix of the original social network is represented by A s It indicates that user behavior social network refers to an implicit social network in which there is no social relationship between users but they have historical behaviors on the same item. and negative behavior social network graph The adjacency matrix of the positive behavior social network graph is The adjacency matrix of the negative behavior social network graph is Then its calculation method under topic t is as follows:
[0033] in, are the positive behavior social matrix and the negative behavior social matrix under topic t, respectively. The positive rating matrix and negative rating matrix of users under topic t are respectively, where if the user's rating r>3 under the topic t, then his rating is considered positive, otherwise it is considered negative. The original social network is considered to be a positive social relationship and integrated into the positive behavior social network, where the positive social relationship adjacency matrix under topic t is Negative social relationship adjacency matrix under topic t
[0034] The step 32) specifically includes the following steps:
[0035] Determine the positive neighbor embeddings of user u under topic t. The neighbor embeddings are expressed as:
[0036] in, and are the positive neighbors and positive neighbor embeddings of user u under topic t, respectively. is the adjacency matrix The row vector centered at user u, Measures the number of neighbor connections of user u under topic t;
[0037] Given a user u and topic t, the objective function obtained by using infoNCE is:
[0038] Among them, v ut is the user interest of user u under topic t, t′ is other topics, and τ is the hyperparameter of the objective function, which is used to control the model's discrimination of negative samples;
[0039] Determine the objective function of cross-topic comparative learning based on the user's objective function under the topic:
[0040] Where m is the number of users and K is the number of topics.
[0041] The user set for calculating the balanced path and the unbalanced path from the user's perspective is defined as:
[0042] in, represents the active friends of user i under topic t when the path length is l+1, represents the negative neighbors of user i under topic t when the path length is l+1, and u represents the user.
[0043] The user embedding obtained by information aggregation to obtain balanced or unbalanced users is:
[0044] in, and represents the positive and negative embeddings of user u under topic t, and are the parameters that need to be trained, i.e., at each level of information aggregation under a topic, the positive embedding is composed of the positive interests of the user in the previous level, the positive embeddings of the positive neighbors, and the negative embeddings of the negative neighbors;
[0045] Specifically, when l = 1, a user’s positive embedding is aggregated only by the embeddings of its positive neighbors, while a user’s negative embedding is aggregated only by the embeddings of its negative neighbors:
[0046] After obtaining the positive and negative embeddings of users under different topics, we use neural networks to aggregate the positive and negative embeddings of users within the topic to obtain the user embedding within the topic:
[0047] Here, MLP stands for Multi-Layer Perceptron.
[0048] The method of aggregating user interests under different topics through the attention mechanism is to coherently aggregate user embeddings of different topics through the attention mechanism to obtain a complete user interest embedding:
[0049] Among them, v u is the complete user embedding, K is the number of topics, and v ut is the user interest of user u under topic y, α t is the attention coefficient of topic t:
[0050] Among them, a and W T are parameters that need to be trained. The user embeddings of different topics are coherently aggregated through the attention mechanism to obtain the complete user interest embedding.
[0051] Following the extended structural balance theory, we design an objective function for the self-supervised task to correctly aggregate positive and negative social embeddings and mine the semantic information therein. Within a topic t, the objective function of the self-supervised task is:
[0052] in, and represents the positive and negative neighbors of the user in topic t, v ut is the interest embedding of user u under topic t, is the similarity measurement function.
[0053] The total loss function of the recommendation system is:
[0054] Among them, λ c and λ b To control the hyperparameters of the auxiliary task effect, is the objective function of the self-supervised task, is the objective function of cross-topic comparative learning, is the Bayesian Personalized Ranking (BPR) loss:
[0055] Where Φ represents the parameter of CTCL, is the predicted score of user u for item i, σ is the sigmoid function, λ r is the regularization parameter.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] (1) In order to alleviate the possible conflicts in social relationships based on symbolic networks, the present invention introduces multiple topics into the construction method of symbolic networks, divides user interests into different topics, and constructs users' social relationships under different interest topics, further alleviating users' social noise.
[0058] (2) The present invention distinguishes user interests under different topics as much as possible, adopts a cross-topic comparative learning mechanism to maximize the differences in user interests under different topics, and integrates it into the recommendation framework to improve recommendation performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] FIG1 is a schematic flow chart of the method of the present invention;
[0060] FIG2 is a flow chart of an embodiment of the present invention;
[0061] FIG3 is a schematic diagram of a dynamic routing method according to an embodiment of the present invention;
[0062] FIG4 is a diagram of a balanced or unbalanced path of an SGCN in an embodiment of the present invention. DETAILED DESCRIPTION
[0063] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0064] This embodiment first defines a social network:
[0065] Definition 1: Social network graph. A social network graph is a graph structure consisting of social connections between people or organizations. In a social network graph, nodes represent people or organizations, and edges represent the social connections between them.
[0066] Definition 2: Balance Theory. In the triangular order, the balance theory can be described as the following four rules: "the friend of my friend is a friend", "the enemy of my enemy is a friend", "the enemy of my friend is an enemy", and "the friend of my enemy is an enemy".
[0067] Definition 3: User set U. The set of users in the recommendation system.
[0068] Definition 4: Item Set I. The set of items in the recommendation system.
[0069] Definition 5: Rating matrix R. A description of user-item interactions in a recommendation system.
[0070] Definition 6: User's friend set N t (u). The set of friends of user u under topic t.
[0071] Definition 7: Adjacency matrix A. The adjacency matrix of users in social networks, a ij =1 means that user i trusts user j in the social network, that is, user j is a friend of user i.
[0072] Definition 8: User embedding V. A low-dimensional vector representation of user features.
[0073] Definition 9: Item embedding E. A low-dimensional vector representation of item features.
[0074] As shown in FIG1 , this embodiment provides a social recommendation method based on cross-topic comparison, and its process architecture is shown in FIG2 , including the following steps:
[0075] Step 1) Obtain the user-item interaction graph in the recommendation system.
[0076] Step 2) Item representation learning is performed based on the user-item interaction graph, and the items are clustered and divided into topics.
[0077] Step 21) A biased random walk method is used to sample the node sequence of the user-item interaction graph. After obtaining the sample sequence, the Skip-gram model and negative sampling method are used to learn the item representation in the view and train the item embedding.
[0078] The Skip-gram model aims to maximize the average logarithmic probability of the sequence to obtain node representation:
[0079] Among them, c is the context window of the sequence, T is the sequence length, i trepresents the tth item in the sequence, the most important p(i k+j |i t ) is expressed as follows using the softmax function:
[0080] Among them, e i and e′ i is the vector representation of the input and output of the item node, and N is the total number of items;
[0081] Since the time complexity of calculating the denominator of the above formula is high, the negative sampling method is used to approximately maximize the logarithmic probability of the softmax function, and the above formula is expressed as:
[0082] Among them, k is the negative sample obtained by the negative sampling method. Here, the negative sample can be obtained from the negative sample set when the item view is constructed; σ is the sigmoid function;
[0083] The item embedding is trained based on the Skip-gram model.
[0084] Step 22) Cluster the trained item embeddings to obtain the corresponding user interest topics and the initial embeddings of users within each topic.
[0085] Specifically, we design two layers of capsules, as shown in Figure 3. The first layer of capsules is the item embedding of the user behavior sequence, where e i Represents the embedding of the i-th item that the user has interacted with. The first layer of capsules obtains new user behavior instances e through different linear mapping matrices. ik , the second layer capsule I k It can be regarded as a user interest capsule. The dynamic routing method uses the first layer capsule and the initial routing logic to calculate the value of the second layer capsule, and then dynamically updates the routing logic based on the correlation between the first layer capsule and the second layer capsule, and completes the extraction of user multiple interests through continuous iteration. First, the first layer capsule e i The purpose of linear transformation is to observe the object i from different angles and obtain the observation vector e ik Calculated as:
[0086] e ik =W k e i
[0087] Where W k ∈R d×d is the interest sharing transformation matrix, each interest capsule k uses a different transformation matrix W k In order to reduce the complexity of the model and make the user's multiple initial interests different from each other, W in this embodiment k Normal distribution A random matrix drawn from .
[0088] For each iteration, the interest capsule I k is calculated as the weighted sum of all observation vectors:
[0089] In order to make the length of the capsule's output vector represent the probability of the entity represented by the capsule in the current input, the interest capsule I k Use the squash function to compress:
[0090] In the above two formulas, c ik is the observation vector e ik With interest capsule S k The coupling coefficient, using softmax and routing logic b ik To calculate the coupling coefficient c ik :
[0091] where b ik It is the dynamic routing logic, whose value is the compressed interest capsule S k With the prediction vector e ik The inner product of is dynamically derived:
[0092] b ik =S k T e ik
[0093] The dynamic routing method first places the routing logic b ik Initialized to 0, then the coupling coefficient c is calculated according to the routing logic ik In order to ensure that the initial interests are different, a linear transformation is performed on the first layer of capsules, and then the interest capsules are calculated iteratively. The dynamic routing process proposed in this paper converges well after three iterations, and the user’s embedded interest under a topic is finally expressed as v uk =S k .
[0094] In another embodiment, in addition to the dynamic routing method mentioned above, the trained item embeddings may be clustered using methods such as K-Means++ and Gaussian mixture model (GMM).
[0095] Step 3) Construct topic-based social relationships by comparing across topics:
[0096] Step 31) Construct a user's behavioral social matrix under different topics.
[0097] The social relationships of users are divided into two categories: the original social network Gs and behavioral social networks G b , the adjacency matrix of the original social network is represented by A s It indicates that user behavior social network refers to an implicit social network in which there is no social relationship between users but they have historical behaviors on the same item. and negative behavior social network graph The adjacency matrix of the positive behavior social network graph is The adjacency matrix of the negative behavior social network graph is Then its calculation method under topic t is as follows:
[0098] in, are the positive behavior social matrix and the negative behavior social matrix under topic t, respectively. The positive rating matrix and negative rating matrix of users under topic t are respectively, where if the user's rating r>3 under the topic t, then his rating is considered positive, otherwise it is considered negative. The original social network is considered to be a positive social relationship and integrated into the positive behavior social network, where the positive social relationship adjacency matrix under topic t is Negative social relationship adjacency matrix under topic t
[0099] Step 32) Use the InfoNCE method to construct the objective function of cross-topic comparative learning.
[0100] First, determine the positive neighbor embeddings of user u under topic t. The neighbor embeddings are expressed as:
[0101] in, and are the positive neighbors and positive neighbor embeddings of user u under topic t, respectively. is the adjacency matrix The row vector centered at user u, The number of neighbor connections of user u under topic t is measured; in this way, the positive neighbor embeddings of users under different topics are obtained.
[0102] Given a user u and topic t, the objective function obtained by using infoNCE is:
[0103] Among them, v ut is the user interest of user u under topic t, t′ is other topics, and τ is the hyperparameter of the objective function, which is used to control the model's discrimination of negative samples;
[0104] Determine the objective function of cross-topic comparative learning based on the user's objective function under the topic:
[0105] Where m is the number of users and K is the number of topics.
[0106] Step 4) SGCN-based information propagation within the topic:
[0107] Step 41) Calculate the user sets of balanced paths and unbalanced paths from the user's perspective.
[0108] in, represents the active friends of user i under topic t when the path length is l+1, represents the negative neighbors of user i under topic t when the path length is l+1, and u represents the user.
[0109] The balanced / unbalanced path of user u based on the equilibrium theory is shown in Figure 4.
[0110] Step 42) Using the balance theory, balanced or unbalanced user embedding is obtained through information aggregation.
[0111] in, and represents the positive and negative embeddings of user u under topic t, and are parameters that need to be trained. It can be understood that at each level of information aggregation under a topic, the positive embedding is composed of the user's positive interests in the previous level, the positive embedding of the positive neighbors, and the negative embedding of the negative neighbors;
[0112] Specifically, when l = 1, a user’s positive embedding is aggregated only by the embeddings of its positive neighbors, while a user’s negative embedding is aggregated only by the embeddings of its negative neighbors:
[0113] After obtaining the positive and negative embeddings of users under different topics, we first use a neural network to aggregate the positive and negative embeddings of users within the topic to obtain the user embedding within the topic:
[0114] Here, MLP stands for Multi-Layer Perceptron.
[0115] Step 43) Aggregate user interests under each topic through the attention mechanism:
[0116] Among them, v uis the complete user embedding, K is the number of topics, and v ut is the user interest of user u under topic t, α t is the attention coefficient of topic t:
[0117] Among them, a and W T are parameters that need to be trained. The user embeddings of different topics are coherently aggregated through the attention mechanism to obtain the complete user interest embedding.
[0118] Step 5) Self-supervision method based on extended equilibrium theory:
[0119] Step 51) Following the extended structural balance theory, the objective function of the self-supervised task is constructed under different topics.
[0120] Following the extended structural balance theory, we design an objective function for the self-supervised task to correctly aggregate positive and negative social embeddings and mine the semantic information therein. Within a topic t, the objective function of the self-supervised task is:
[0121] in, and represents the positive and negative neighbors of the user in topic t, v ut is the interest embedding of user u under topic t, is the similarity measurement function.
[0122] Step 52) Bayesian personalized ranking loss is used in the recommendation task, and the objective function of cross-topic contrastive learning and the objective function of the self-supervised task based on balance theory are combined to determine the total loss function of the recommendation system.
[0123] The Bayesian Personalized Ranking (BPR) loss is expressed as:
[0124] Where Φ represents the parameter of CTCL, is the predicted score of user u for item i, σ is the sigmoid function, λ r is the regularization parameter.
[0125] After setting the objective function of the main recommendation task, cross-topic contrastive learning and intra-topic balance theory are integrated into the recommendation framework as auxiliary tasks, and the total loss function of the recommendation system is obtained as follows:
[0126] Among them, λ c and λ b To control the hyperparameters of the auxiliary task effect, is the objective function of the self-supervised task, is the objective function of cross-topic contrastive learning. Based on cross-topic contrastive learning and intra-topic balance theory, we mine the rich information in heterogeneous networks to achieve better recommendation performance.
[0127] Step 53) The recommendation system is trained based on the total loss function to obtain recommendation results that take user differences into consideration.
[0128] In summary, cross-topic comparisons explore user interests across different topics. Using balance theory, a fundamental social theory in symbolic networks, to construct auxiliary self-supervisory signals, we fully exploit the rich information within heterogeneous graphs and thereby mine the semantic information of positive and negative links within symbolic networks. Specifically, according to the extended structural balance theory, within the same topic, users' interests should be more similar to those of friends with positive links and less similar to those with negative links. Constructing self-supervisory signals based on balance theory across different topics and integrating them as auxiliary tasks into the recommendation framework has achieved promising results.
[0129] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.
Claims
1. A social recommendation method based on cross-topic contrastive learning, characterized in that: The following steps are involved: Step 1) Obtain the user-item interaction graph in the recommendation system; Step 2) Learn item representation based on the user-item interaction graph, cluster items, and divide them into topics; Step 3) Construct social relationships based on themes by comparing across themes: Step 31) constructing a user's behavior social matrix under different topics; Step 32) Using the InfoNCE method to construct the objective function of cross-topic comparative learning; Step 4) Information propagation based on SGCN within the topic: Step 41) calculating the user sets of balanced paths and unbalanced paths from the user's perspective; Step 42) using the balance theory, obtaining balanced or unbalanced user embedding through information aggregation; Step 43) Aggregate user interests under each topic through the attention mechanism; Step 5) Self-supervision method based on extended equilibrium theory: Step 51) Following the extended structural balance theory, construct the objective function of the self-supervised task under different topics; Step 52) using Bayesian personalized ranking loss in the recommendation task, combining the objective function of cross-topic contrastive learning and the objective function of the self-supervised task based on balance theory, to determine the total loss function of the recommendation system; Step 53) Train the recommendation system based on the total loss function to obtain recommendation results that take user differences into consideration.
2. A social recommendation method based on cross-topic contrastive learning according to claim 1, characterized in that: The step 2) comprises the following steps: Step 21) A biased random walk method is used to sample the node sequence of the user-item interaction graph. After obtaining the sampled sequence, the Skip-gram model and negative sampling method are used to learn the item representation in the view, and the item embedding is obtained by training; Step 22) Cluster the trained item embeddings to obtain the corresponding user interest topics and the initial embeddings of users within each topic.
3. A social recommendation method based on cross-topic contrastive learning according to claim 2, characterized in that: The Skip-gram model and negative sampling method are used to learn item representation in the view, and the item embedding obtained by training is specifically: The Skip-gram model aims to maximize the average logarithmic probability of the sequence to obtain node representation: Among them, c is the context window of the sequence, T is the sequence length, i t represents the tth item in the sequence, the most important p(i k+j |i t ) is expressed using the softmax function: Among them, e i and e′ i is the vector representation of the input and output of the item node, and N is the total number of items; Since the time complexity of calculating the denominator of the above formula is high, the negative sampling method is used to approximate the logarithmic probability of maximizing the softmax function, and the above formula is expressed as: Among them, k is the negative sample obtained by the negative sampling method, and σ is the sigmoid function; The item embedding is trained based on the Skip-gram model.
4. The social recommendation method based on cross-topic contrastive learning according to claim 1, characterized in that: The step 31) is specifically as follows: The social relationships of users are divided into two categories: the original social network G s and behavioral social networks G b , the adjacency matrix of the original social network is represented by A s It means that user behavior social network refers to an implicit social network in which there is no social relationship between users but they have historically behaved towards the same item. and negative behavior social network graph The adjacency matrix of the positive behavior social network graph is The adjacency matrix of the negative behavior social network graph is Then its calculation method under topic t is as follows: in, They are respectively the positive behavior social matrix and the negative behavior social matrix under topic t, They are the user positive rating matrix and user negative rating matrix under topic t, respectively. The original social network is regarded as positive social relations and integrated into the positive behavior social network, where the positive social relationship adjacency matrix under topic t is Negative social relationship adjacency matrix under topic t 5. The social recommendation method based on cross-topic contrastive learning according to claim 1, characterized in that: The step 32) specifically comprises the following steps: Determine the positive neighbor embeddings of user u under topic t. The neighbor embeddings are expressed as: in, and are the positive neighbors and positive neighbor embeddings of user u under topic t, respectively. is the adjacency matrix The row vector centered at user u, It measures the number of neighbor connections of user u under topic t; Given a user u and a topic t, the objective function obtained by using infoNCE is: Among them, v ut is the user interest of user u under topic t, t′ is other topics, and τ is the hyperparameter of the objective function, which is used to control the model's discrimination of negative samples; Determine the objective function of cross-topic comparative learning based on the user's objective function under the topic: Among them, m is the number of users and K is the number of topics.
6. A social recommendation method based on cross-topic contrastive learning according to claim 1, characterized in that: The user set for calculating the balanced path and the unbalanced path from the user's perspective is defined as: in, represents the active friends of user i under topic t when the path length is l+1, represents the negative neighbors of user i under topic t when the path length is l+1, and u represents the user.
7. A social recommendation method based on cross-topic contrastive learning according to claim 6, characterized in that: The user embedding obtained by information aggregation to obtain balanced or unbalanced users is: in, and represents the positive and negative embeddings of user u under topic t, and are the parameters that need to be trained, namely: at each level of information aggregation under a topic, the positive embedding is composed of the user’s previous level of positive interests, the positive embeddings of the positive neighbors, and the negative embeddings of the negative neighbors; When l = 1, the user's positive embedding is aggregated only by the embeddings of its positive neighbors, while the user's negative embedding is aggregated only by the embeddings of its negative neighbors: After obtaining the positive and negative embeddings of users under different topics, the positive and negative embeddings of users are aggregated using a neural network within the topic to obtain the user embedding within the topic: Here, MLP stands for Multi-Layer Perceptron.
8. The social recommendation method based on cross-topic contrastive learning according to claim 1, characterized in that: The method of aggregating user interests under various topics through the attention mechanism specifically involves coherently aggregating user embeddings of different topics through the attention mechanism to obtain a complete user interest embedding: Among them, v u is the complete user embedding, K is the number of topics, and v ut is the user interest of user u under topic t, α t is the attention coefficient of topic t: Among them, a and W T are the parameters that need to be trained.
9. The social recommendation method based on cross-topic contrastive learning according to claim 1, characterized in that: Within a topic t, the objective function of the self-supervised task is: in, and represents the positive and negative neighbors of the user in topic t, v ut is the interest embedding of user u under topic t, is the similarity measurement function.
10. The social recommendation method based on cross-topic contrastive learning according to claim 1, characterized in that: The total loss function of the recommendation system is: Among them, λ c and λ b To control the hyperparameters of the auxiliary task effect, is the objective function of the self-supervised task, is the objective function of cross-topic contrastive learning, For the Bayesian personalized ranking loss: Where, Φ represents the parameter of CTCL, is the predicted score of user u for item i, σ is the sigmoid function, and λ r is the regularization parameter.
Citation Information
Patent Citations
Cross-domain social recommendation method based on self-supervised learning
CN114880583A
Fine-grained sentiment analysis method and device for catering industry comments
CN114969341A
Social recommendation method based on cross-topic comparative learning
CN116842277A
Cited By
User online behavior prediction method fusing social group information
CN119721396A
Multi-dimensional feature interaction influencer recommendation method based on account topic model
CN119807539A
A Multi-Dimensional Feature Interaction Influencer Recommendation Method Based on Account Topic Model
CN119807539B
Discrete dynamic graph neural network link prediction method and system based on mask mechanism
CN120258051A
A discrete dynamic graph neural network link prediction method and system based on mask mechanism
CN120258051B
