A personalized social recommendation method based on federated matrix factorization
By using the federated matrix factorization method and combining user behavior and social relationships, the recommendation model is optimized, solving the problem of neglecting social information in traditional recommendation systems and achieving more accurate and efficient personalized recommendations.
Patent Information
- Application Number
- CN202210795895.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-07
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-07-07
AI Technical Summary
Traditional recommendation systems ignore users' social information, resulting in unreliable recommendations and failing to meet users' privacy protection needs.
A personalized social recommendation method based on federated matrix factorization is adopted. By obtaining the client's initial prediction model and user behavior features, a client prediction model is constructed. The model gradient aggregation and Bayesian inference are performed on the server side. Combined with social network relationships, the prediction model is optimized to achieve user recommendation.
While protecting user privacy, it improves the accuracy and efficiency of recommendations, solves the problem of ignoring social information in traditional recommendation systems, and enhances user satisfaction with recommendations.
Smart Images

Figure CN115374953B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of recommendation system, and particularly relates to a personalized social recommendation method based on federated matrix factorization. BACKGROUND
[0002] In recent years, with the vigorous development of information technology and the Internet, people gradually enter the information overload era from the information shortage era. In this era, both information consumers and information producers encounter great challenges. As an information consumer, it is very difficult to find the information of interest from a large amount of information. As an information producer, it is undoubtedly a problem worth studying to find the content of interest of people from a large amount of information and recommend it to users. For example, how does a movie website use the viewing record information of users to filter the movies that users like from hundreds of thousands of movies and recommend them to users; how does an e-commerce website find the most satisfactory goods for users from hundreds of thousands of goods according to the purchase record information of users and recommend them, so as to prevent users from losing in the large space of goods information. The design and implementation of the recommendation system to some extent solve the recommendation problems encountered in the information era
[0003] The recommendation system has become more and more mature today. Users rely on the recommendation system to alleviate the problem of information overload and explore the things of interest from the vast goods (such as movies, music, news or restaurants). The recommendation system refers to a system that recommends goods or services of interest to users according to the interest characteristics and behaviors of users. The input of the system is the preferences (such as ratings of goods) and behaviors of users, and a mathematical model of the preferences of users is established through a related algorithm (such as collaborative filtering), and finally the prediction result (goods or services that users are most interested in) is output.
[0004] The traditional recommendation system only considers the subjective attributes such as the preferences and behaviors of users, and ignores the objective attribute of the social information of users. In fact, users always seek recommendations of movies, music or books from their trusted friends, and the tastes and characters of users are easily influenced by their friends. Therefore, the result obtained by purely mining the user-goods rating matrix of the recommendation system in the traditional recommendation system is somewhat unrealistic. Secondly, in the network environment of the recommendation system, users increasingly strongly realize that their data needs to be kept secret, and the traditional recommendation system cannot meet the privacy protection demand of user information. SUMMARY
[0005] In order to solve the above problems in the prior art, the present application provides a personalized social recommendation method based on federated matrix factorization. The technical problem to be solved by the present application is realized through the following technical scheme:
[0006] The application provides a personalized social recommendation method based on federated matrix decomposition, which is applied to a client, and the method comprises the following steps:
[0007] Step 1: obtaining an initial prediction model of the client, extracting a model gradient set of the initial prediction model according to the initial prediction model and user behavior characteristics of the client, and sending the model gradient set to a server end;
[0008] Step 2: obtaining a conditional distribution of the product features of the client according to the received updated gradient set, wherein the updated gradient set is obtained by processing the model gradient set by the server end;
[0009] Step 3: obtaining a conditional distribution of the social relationship features of the client;
[0010] Step 4: constructing a prediction model of the client according to the conditional distribution of the product features of the client and the conditional distribution of the social relationship features of the client, and determining a target function of the model;
[0011] Step 5: optimizing the prediction model of the client by using the target function, and realizing user recommendation by using the optimized prediction model of the client.
[0012] In an embodiment of the application, the user behavior characteristics of the client include user information, product information and rating information of the user on the product.
[0013] In an embodiment of the application, the server end processes the model gradient set to obtain the updated gradient, which comprises the following steps:
[0014] The server end aggregates and averages the received model gradient sets corresponding to a plurality of clients according to a federated learning mode to obtain the updated gradient set,
[0015] The aggregation and averaging process is as follows:
[0016]
[0017] wherein w k is the model gradient set of the kth client, w is the updated gradient set, t is the iteration number, K is the number of clients, N is the number of samples of all clients, and N k is the number of samples of the kth client.
[0018] In an embodiment of the application, the conditional distribution of the product features of the client is constructed according to the received updated gradient set, which comprises the following steps:
[0019] Step 2.1: updating the initial product features by using a random gradient descent algorithm with momentum according to the updated gradient set to obtain the product features of the client,
[0020] wherein the updating process is as follows:
[0021] v←αv0+w;
[0022] V←V0-lv;
[0023] wherein v0 is the momentum corresponding to the initial product feature, v is the momentum corresponding to the updated client product feature, a is the momentum parameter, V0 is the initial product feature, l is the learning rate, and V is the client product feature;
[0024] Step 2.2: Construct a User-Item matrix decomposition model according to the client user behavior feature and the client product feature, and obtain the conditional distribution on the rating as:
[0025]
[0026] wherein R is the rating dataset, U is the client user behavior feature, V is the client product feature, denotes the variance on the rating dataset, U i is the latent feature vector of user i, V j is the latent feature vector of product j, m is the number of users of the client, n is the number of products of the client, r ij is the rating of user i to product j, is the probability density function of the Gaussian distribution with mean μ and variance σ 2 R ij is the first indicator function, g(·) is the logistic function, g(x) = 1 / (1+exp(-x));
[0027] Step 2.3: According to the conditional distribution on the rating, add a zero-mean spherical Gaussian prior to the client user behavior feature and the client product feature, denoted as:
[0028]
[0029]
[0030] wherein denotes the variance on the client user behavior feature, denotes the variance on the client product feature, and I denotes a diagonal matrix;
[0031] Step 2.4: According to the client user behavior feature and the client product feature after adding the zero-mean spherical Gaussian prior, obtain the conditional distribution of the client product feature through Bayesian inference, denoted as:
[0032]
[0033] wherein Z represents a factor feature matrix.
[0034] In an embodiment of the present application, the step 3 comprises:
[0035] Step 3.1: constructing a directed social network graph according to the client user behavior features and the client item features Defining a social network graph The social network matrix of the social network graph is C = {c ik}, wherein, is a vertex set, denoted as V = {v represents all users in a social network, ε is an edge set, representing the relationship between users, the social network matrix C is a non-symmetric matrix of m x m dimensions, c ik is a vertex v i and the weight on the edge between vertex v k .
[0036] Step 3.2: decomposing the social network matrix to obtain the conditional distribution on the social network relationship as:
[0037]
[0038]
[0039] wherein Z is a factor feature matrix, I C ik is a second indicator function, represents the modified c ik , Z k represents the kth factor latent feature vector, d + (v i ) represents the out-degree of node v i , d - (v k ) represents the in-degree of node v k , represents the variance on the social network matrix;
[0040] Step 3.3: according to the conditional distribution on the social network relationship, adding a zero-mean spherical Gaussian prior to the client user behavior features and the factor feature matrix, denoted as:
[0041]
[0042]
[0043] wherein, represents the variance on the factor feature matrix;
[0044] Step 3.4: According to the client user behavior feature and factor feature matrix after adding the zero-mean spherical Gaussian prior, the conditional distribution of the client social relationship feature is obtained through Bayesian inference, which is expressed as:
[0045]
[0046] In an embodiment of the present application, the step 4 comprises:
[0047] The conditional distribution of the client commodity feature and the conditional distribution of the client social relationship feature are fused into a feature representation, and the client prediction model is obtained, and the posterior probability of the social recommendation of the client prediction model is expressed as:
[0048]
[0049] Wherein, is a constant independent of the parameters;
[0050] The objective function of the client prediction model is:
[0051]
[0052] Wherein, is defined as the Frobenius norm.
[0053] In an embodiment of the present application, the step 5 comprises:
[0054] Step 5.1: Adjust the parameters of the client prediction model in the gradient descent manner, so that the value of the objective function reaches the local minimum, wherein the parameters of the client prediction model include the client user behavior feature, the client commodity feature and the factor feature matrix;
[0055] Step 5.2: According to the parameter set corresponding to the local minimum value of the objective function, the client prediction model is optimized, and the optimized client prediction model is used to realize user recommendation.
[0056] Compared with the prior art, the present application has the following advantages:
[0057] The personalized social recommendation method based on federated matrix decomposition coordinates multiple clients to jointly train the client prediction model, sends the model gradient to the server side, while the data of the client is retained locally, averages the model gradient on the server side, the server sends the result to each client for training the local model, and an effective machine learning model is constructed under the premise of protecting user privacy, which improves the recommendation efficiency while maintaining the accuracy of the recommendation.
[0058] The above description is only a summary of the technical solutions of the present application. In order to enable a clearer understanding of the technical means of the present application, the above and other purposes, characteristics and advantages of the present application can be more apparent and easy to understand, the following preferred embodiments are described in detail below, and the accompanying drawings are described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS
[0059] Figure 1 is a flowchart of a personalized social recommendation method based on federated matrix decomposition provided by an embodiment of the present application;
[0060] Figure 2 is a simulation experiment comparison diagram of the method of the present application and a non-federated method;
[0061] Figure 3 is a simulation experiment comparison diagram of the method of the present application and a non-social method. DETAILED DESCRIPTION
[0062] In order to further illustrate the technical means and effects adopted by the present application to achieve the predetermined purpose, the following describes in detail a personalized social recommendation method based on federated matrix decomposition according to the present application, in combination with the accompanying drawings and specific embodiments.
[0063] The foregoing and other technical contents, characteristics and effects of the present application can be clearly presented in the following detailed description of specific embodiments in combination with the accompanying drawings. Through the description of the specific embodiments, the technical means and effects adopted by the present application to achieve the predetermined purpose can be more deeply and specifically understood. However, the accompanying drawings are provided for reference and illustration only, and are not used to limit the technical solutions of the present application.
[0064] Embodiment One
[0065] Please refer to Figure 1 , Figure 1 is a flowchart of a personalized social recommendation method based on federated matrix decomposition provided by an embodiment of the present application. The personalized social recommendation method based on federated matrix decomposition of the present embodiment is applied to a client. The method comprises:
[0066] Step 1: Obtain an initial prediction model of the client. According to the initial prediction model and the user behavior characteristics of the client, a model gradient set of the initial prediction model is extracted and sent to the server side.
[0067] In the present embodiment, one server side corresponds to multiple clients, and each client includes multiple users. The user behavior characteristics of the client include user information (which can be the number of the user), product information (which can be the number of the product), and rating information of the user on the product (which can be the score of the user's preference for the product).
[0068] Optionally, the gradient of the initial prediction model of the client is extracted from the client user behavior features and the initial prediction model of the client by using a probability matrix decomposition algorithm, and the plurality of clients sends the gradient set of the corresponding initial prediction model to the server.
[0069] In this embodiment, the initial prediction model of the client is randomly generated.
[0070] Step 2: Obtain the conditional distribution of the client commodity features according to the received updated gradient set, wherein the updated gradient set is obtained by the server processing the model gradient set;
[0071] In this embodiment, the server aggregates and averages the received model gradient set corresponding to the plurality of clients according to the federated learning mode to obtain the updated gradient set,
[0072] The aggregation and averaging process is as follows:
[0073]
[0074] wherein w k is the model gradient set of the kth client, w is the updated gradient set, t is the iteration number, K is the number of clients, N is the number of samples of all clients, and N k is the number of samples of the kth client.
[0075] In this embodiment, after the server processes the model gradient set to obtain the updated gradient set, the server sends the updated gradient set to each client, and the client performs the local updating process according to the received updated gradient set.
[0076] It should be noted that in the training process of federated learning, the user original data of the client is always kept in the client (locally), and the server and the user update the model and the parameters by sharing encrypted or privacy-free intermediate parameters. In this embodiment, the federated learning mode is used to aggregate and average the model gradient set on the server, thereby protecting the user privacy information.
[0077] In this embodiment, the construction of the conditional distribution of the client commodity features includes representing the observed rating upper potential user and commodity features as the conditional distribution, adding zero-mean spherical Gaussian priors to the client user behavior features and the client commodity features, and obtaining the final conditional distribution through Bayesian inference.
[0078] Specifically, the following steps are included:
[0079] Step 2.1: updating the initial item features according to the updated gradient set by using the stochastic gradient descent algorithm with momentum to obtain the client item features,
[0080] wherein the updating process is as follows:
[0081] v <- a v0 + w (2) ;
[0082] V <- V0 - Iv (3) ;
[0083] wherein v0 is the momentum corresponding to the initial item features, v is the momentum corresponding to the updated client item features, a is the momentum parameter, V0 is the initial item features, l is the learning rate, and V is the client item features.
[0084] In this embodiment, the initial item features are randomly generated.
[0085] Step 2.2: constructing a User-Item matrix decomposition model according to the client user behavior features and the client item features to obtain the conditional distribution on the ratings as:
[0086]
[0087] wherein R is the rating data set, in this embodiment, the R rating data set is obtained according to the rating information of the users on the items in the client user behavior features; U is the client user behavior features, V is the client item features, wherein U e R l×m , V e R l×n , and l represents the feature dimension; represents the variance on the rating data set, U i is the latent feature vector of the user i, V j is the latent feature vector of the item j, m is the number of users of the client, n is the number of items of the client, r ij is the rating of the user i on the item j, is the probability density function of the Gaussian distribution with the mean of m and the variance of s 2 , I R ij is the first indicator function, in this embodiment, if the user i has rated the item j, I R ij is equal to 1, otherwise, it is 0; g(·) is the logistic function, g(x) = 1 / (1+exp(-x)), in this embodiment, the logistic function can limit the range of to [0, 1].
[0088] Step 2.3: according to the conditional distribution on the ratings, adding a zero-mean spherical Gaussian prior to the client user behavior features and the client item features, which is expressed as:
[0089]
[0090]
[0091] wherein, denotes the variance on the client user behavior feature, denotes the variance on the client item feature, and I denotes a diagonal matrix.
[0092] Step 2.4: According to the client user behavior feature and the client item feature after adding the zero-mean spherical Gaussian prior, the conditional distribution of the client item feature is obtained through Bayesian inference, denoted as:
[0093]
[0094] wherein, Z denotes a factor feature matrix.
[0095] Step 3: Obtain the conditional distribution of the client social relationship feature;
[0096] Specifically, it includes:
[0097] Step 3.1: According to the client user behavior feature and the client item feature, a directed social network graph is constructed The social network graph is defined as The social network matrix of the social network graph is C={c ik}, wherein, is a vertex set, denoted as denotes all users in a social network, and ε is an edge set, denoting the relationship between users. The social network matrix C is a non-symmetric matrix of m x m dimensions, and c ik is the weight on the edge between vertex v i and vertex v k , which represents the degree to which user i trusts or knows user k in the social network;
[0098] In the social network graph of the embodiment, for a pair of vertices v i and v k , c ik ∈(0, 1], because in a social network, especially in a trust-based social network, user i trusting k does not necessarily require user k trusting i, therefore, the social network matrix C is a non-symmetric matrix.
[0099] Step 3.2: Decompose the social network matrix to obtain the conditional distribution on the social network relationship as:
[0100]
[0101]
[0102] where Z is the factor feature matrix, I C ik is the second indicator function, in this embodiment, if user i trusts or knows user k, then I C ik is equal to 1, otherwise, 0; denotes the modified c ik , Z k denotes the kth factor latent feature vector, d + (v i ) denotes the out-degree of node v i , d - (v k ) denotes the in-degree of node v k , denotes the variance on the social network matrix;
[0103] In this embodiment, the social network matrix is decomposed based on analyzing the social network to propose a high-quality l-dimensional feature representation of users, where U ∈ R l×m , Z ∈ R l×n . The logistic function can limit the range of to [0, 1].
[0104] It should be noted that in the online social network, the value of c ik is explicitly expressed by user i to user k, because it contains noise and ignores the graph feature information of the social network, it cannot accurately describe the relationship between users, in this embodiment, c * ik is used instead of c ik .
[0105] Step 3.3: According to the conditional distribution on the social network relationship, add a zero-mean spherical Gaussian prior to the client user behavior feature and factor feature matrix, denoted as:
[0106]
[0107]
[0108] where, denotes the variance on the factor feature matrix;
[0109] Step 3.4: According to the client user behavior feature and factor feature matrix after adding the zero-mean spherical Gaussian prior, obtain the conditional distribution of the client social relationship feature through Bayesian inference, denoted as:
[0110]
[0111] In the embodiment, the social relationship features corresponding to the local client are acquired, so as to enhance the user representation of the client and alleviate the cold start problem.
[0112] Step 4: constructing a client prediction model according to the conditional distribution of the client commodity features and the conditional distribution of the client social relationship features, and determining a target function of the model;
[0113] Specifically, step 4 includes:
[0114] The conditional distribution of the client commodity features and the conditional distribution of the client social relationship features are fused into one feature representation, and a client prediction model is obtained. The posterior probability of the social recommendation of the client prediction model is represented as:
[0115]
[0116] wherein, is a constant independent of the parameters. is a constant independent of the parameters.
[0117] The target function of the client prediction model is:
[0118]
[0119] wherein, is defined as the Frobenius norm. is defined as the Frobenius norm.
[0120] Since the social information of the user reflects the influence of friends on the selection of some goods or services to some extent. For example, when the user requests a friend to recommend a movie or a restaurant, he actually requests a verbal social recommendation. According to this idea, the social information of the user is added to the recommendation method in the embodiment, so that the information of the user is more perfect, the sparsity of the data is solved, the prediction accuracy of the algorithm is improved, and the user is more satisfied with the recommended goods.
[0121] Step 5: optimizing the client prediction model by using the target function, and realizing user recommendation by using the optimized client prediction model.
[0122] In the case of keeping the observation noise variance and the prior variance unchanged, maximizing the posterior probability (log-posterior) on the three latent features (U, V and Z) is equivalent to minimizing the sum-of-squared-errors target function with a quadratic regularization term in the above formula (14).
[0123] Specifically, step 5 includes:
[0124] Step 5.1: Adjust the parameters of the client prediction model in a gradient descent manner to make the objective function value reach a local minimum, wherein the parameters of the client prediction model include the client user behavior feature, the client commodity feature and the factor feature matrix;
[0125] Optionally, the model parameters are updated by introducing a random gradient descent algorithm with momentum.
[0126] In this embodiment, due to the characteristics of the user data distribution, the dependence between clients is higher, and the model needs to be more finely designed. Introducing a random gradient descent algorithm with momentum to update the model parameters can further improve the accuracy of the recommendation system.
[0127] Step 5.2: According to the parameter set corresponding to the local minimum of the objective function, the client prediction model is optimized, and the user recommendation is realized by using the optimized client prediction model.
[0128] It should be noted that further processing of the parameters of the client prediction model can obtain an optimized model. The processing rules are determined by those skilled in the art according to business needs, which are not limited in this embodiment. Optionally, the SGD processing rule is adopted, and the optimal parameter set can be obtained through SGD, and the client prediction model is optimized by using the optimal parameter set.
[0129] In this embodiment, the gradient descent is performed on U i , V j and Z k to obtain the local minimum of the objective function, and the specific process is as follows:
[0130]
[0131]
[0132]
[0133] Wherein g'(·) is the derivative of the logistic function, g'(x)=exp(x) / (1+exp(x)) 2 .
[0134] Further, it is worth noting that after obtaining the optimized client prediction model, the effect of the optimized client prediction model can be verified by registering the local client prediction model and the user behavior feature.
[0135] This embodiment of the personalized social recommendation method based on federated matrix factorization enables multiple clients to jointly train a global model in large-scale client applications. Clients send their model gradients to a central server, while simultaneously retaining their data locally. The server performs gradient averaging and sends the results to each client to train their local model, thus constructing an effective machine learning model while protecting user privacy. Furthermore, based on the results returned by the server, the client executes a driving stochastic gradient descent algorithm to update parameters, preventing information redundancy, improving iteration speed, accelerating convergence, avoiding excessive computational burden, and helping to find the minimum loss value, thereby optimizing the model and improving its accuracy.
[0136] Example 2
[0137] This embodiment uses simulation experiments to specifically illustrate the effectiveness of the personalized social recommendation method based on federated matrix factorization in Embodiment 1.
[0138] 1. Simulation conditions.
[0139] The simulation platform in this embodiment uses an Intel(R) Core(TM) CPU i7-8750H 2.20GHz, 32GB of memory, a PC running Windows 10, and Python as the programming language.
[0140] 2. Simulation content and result analysis.
[0141] In the following, `center_loss` represents a personalized social recommendation algorithm based on matrix factorization, which does not consider federated learning; `client_loss` and `client_loss_social` represent personalized social recommendation methods based on federated matrix factorization; and `client_loss_nosocial` represents a personalized recommendation algorithm based on federated matrix factorization, which does not consider user social information. The parameter settings are the same for all of them.
[0142] like Figure 2 The simulation experiment comparison diagram shown is between the method of the present invention and the non-federated method (federated learning is not considered in this recommended method). Two clients participating in the federated training were selected. The experimental results show that the method of the present invention can obtain more accurate and higher quality results, demonstrating the effectiveness of the present invention.
[0143] like Figure 3The simulation experiment comparison chart of the method of the application and the social method (the recommended method does not consider the user social information), from the experimental results, the recommended method of the application adding social relationship can obtain better simulation results compared with the recommended method without adding social relationship, which shows that the method of the application relieves the cold start problem to a certain extent.
[0144] It should be noted that, in this text, relational terms such as first and second are used merely to distinguish one entity or action from another, without necessarily requiring or implying that there is any such actual relationship or order between or among the entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises... a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.
[0145] The above is a further detailed description of the application in combination with specific preferred embodiments, and the specific implementation of the application cannot be limited to these descriptions. For ordinary skilled persons in the art to which the application belongs, without departing from the concept of the application, a number of simple deductions or substitutions can be made, which should be regarded as falling within the protection scope of the application.
Claims
1. A personalized social recommendation method based on federated matrix factorization, applied to a client-side application, characterized in that, The method includes: Step 1: Obtain the initial prediction model of the client, and extract the model gradient set of the initial prediction model based on the initial prediction model and the client user behavior characteristics, and send it to the server. Step 2: Based on the received updated gradient set, obtain the conditional distribution of client product features, wherein the updated gradient set is obtained by the server-side processing of the model gradient set; including: Step 2.1: Based on the updated gradient set, update the initial product features using the stochastic gradient descent algorithm with momentum to obtain the client-side product features. The update process is as follows: ; ; in, The momentum corresponding to the initial product characteristics. The momentum corresponding to the updated client-side product features. For momentum parameters, As initial product characteristics, For learning rate, Features of the client-side products; Step 2.2: Construct a User-Item matrix factorization model based on the client user behavior characteristics and the client product characteristics to obtain the conditional distribution of ratings: ; in, For the rating dataset, For client user behavior characteristics, For client-side product characteristics, This represents the variance on the rating dataset. Let i be the latent feature vector of user i. Let be the latent feature vector of product j, m be the number of client users, n be the number of products on the client, and r be the number of latent feature vectors of product j. ij For user i, rate product j. The mean is The sum and variance are The probability density function of the Gaussian distribution, I R ij For the first indicator function, For the logistic function, ; Step 2.3: Based on the conditional distribution of the ratings, add a zero-mean spherical Gaussian prior to the client user behavior features and client product features, expressed as: ; ; in, This represents the variance in client-side user behavior characteristics. This represents the variance of product characteristics on the client side. Represents a diagonal matrix; Step 2.4: Based on the client user behavior features and client product features after adding a zero-mean spherical Gaussian prior, obtain the conditional distribution of the client product features through Bayesian inference, represented as: ; in, Represents the factor characteristic matrix; Step 3: Obtain the conditional distribution of client social relationship features; Step 4: Based on the conditional distribution of the client's product features and the conditional distribution of the client's social relationship features, construct a client prediction model and determine the objective function of the model; Step 5: Optimize the client prediction model using the objective function, and use the optimized client prediction model to implement user recommendations.
2. The personalized social recommendation method based on federated matrix factorization according to claim 1, characterized in that, The client user behavior characteristics include user information, product information, and user ratings of products.
3. The personalized social recommendation method based on federated matrix factorization according to claim 2, characterized in that, The server processes the model gradient set to obtain the updated gradient, including: The server performs aggregated averaging on the model gradient sets corresponding to multiple clients received according to the federated learning model to obtain the updated gradient set. The polymerization averaging process is as follows: ; in, For the first A set of model gradients for each client. To update the gradient set, t For the number of iterations, For the number of clients, N The number of samples for all clients. For the first k Number of samples per client.
4. The personalized social recommendation method based on federated matrix factorization according to claim 1, characterized in that, Step 3 includes: Step 3.1: Construct a directed social network graph based on the client user behavior characteristics and the client product characteristics. Define a social network graph The social network matrix is ,in, Let be the vertex set, denoted as This represents all users in a social network. Let C be the set of edges, representing the relationships between users, and let C be the social network matrix. An asymmetric matrix of dimension 1 For vertex v i and vertex v k The weight of the edge; Step 3.2: Decompose the social network matrix to obtain the conditional distribution of social network relationships: ; ; in, Let I be the factor characteristic matrix. C ik For the second indicator function, Indicates the revised version , Let d represent the latent eigenvector of the k-th factor. + (v i ) represents node v i out-degree, d - (v k ) represents node v k in-degree, Represents the variance on the social network matrix; Step 3.3: Based on the conditional distribution of the social network relationships, add a zero-mean spherical Gaussian prior to the client user behavior features and factor feature matrices, represented as: ; ; in, Represents the variance on the factor characteristic matrix; Step 3.4: Based on the client user behavior features and factor feature matrix after adding the zero-mean spherical Gaussian prior, obtain the conditional distribution of the client's social relationship features through Bayesian inference, represented as: 。 5. The personalized social recommendation method based on federated matrix factorization according to claim 4, characterized in that, Step 4 includes: The conditional distributions of the client's product features and the client's social relationship features are fused into a single feature representation to obtain the client prediction model. The posterior probability of social recommendation in this client prediction model is expressed as follows: ; in, It is a constant that does not depend on parameters; The objective function of the client prediction model is: ; in, , , , , Defined as the Frobenius norm.
6. The personalized social recommendation method based on federated matrix factorization according to claim 5, characterized in that, Step 5 includes: Step 5.1: Adjust the parameters of the client prediction model according to gradient descent so that the objective function value reaches a local minimum, wherein the parameters of the client prediction model include client user behavior features, client product features, and factor feature matrix; Step 5.2: Optimize the client prediction model based on the parameter set corresponding to the local minimum of the objective function, and use the optimized client prediction model to implement user recommendations.
Citation Information
Patent Citations
Personalized recommendation method integrating social influence and project association
CN111400612A
Social collaborative filtering recommendation method based on federal learning
CN114510652A