Longitudinal federal differential privacy matrix decomposition recommendation method based on item averaging
By adopting the longitudinal federated differential privacy matrix decomposition recommendation method based on item average in vertical federated learning, and using the noise and gradient perturbation algorithm, the problems of privacy leakage and general model effect in vertical federated learning are solved, and the security and safety of the recommended model are achieved. Usability balance and recommendation quality improvement.
Patent Information
- Application Number
- CN202410492608.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-23
- Publication Date
- 2024-09-27
AI Technical Summary
The loss function of differential privacy protection in vertical federated learning is consistent with that of horizontal federated learning, resulting in local information not being fully utilized, the model effect being average, and it being difficult to balance the security and usability of the recommended model when the server is untrustworthy.
The longitudinal federated differential privacy matrix decomposition recommendation method based on the project average is adopted. By calculating the project average vector locally and adding noise, combined with the gradient perturbation algorithm, the user and project latent factor matrices are updated to ensure differential privacy protection and improve the recommendation model. accuracy.
It effectively reduces the risk of privacy leakage, improves recommendation quality and accuracy, achieves a balance between security and usability when the server is untrustworthy, and enhances personalized recommendation capabilities.
Smart Images

Figure CN118708801A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer recommendation systems and information security, and relates to a vertical federated differential privacy matrix decomposition recommendation method based on project average. Background Art
[0002] Recommendation systems play an extremely important role and are widely used in today's digital age. They can help companies increase sales, user satisfaction and user retention, while also helping users save time and energy and improve the efficiency and accuracy of information acquisition. However, if this data is improperly collected, stored, used or disseminated, it may lead to the leakage of user privacy, causing potential risks and losses to users. In this context, recommendation systems need to consider user privacy security.
[0003] Differential privacy is a technology that protects privacy by adding noise to data. Even if an attacker knows the values of other data points, he cannot determine the true value of a given data point. This technology provides a mathematical proof method to detect and improve the strength of privacy protection. Federated learning is a technology for collaborative learning among multiple participants, which improves model training effects while protecting data privacy. Currently, mainstream federated learning is divided into horizontal federated learning and vertical federated learning. In the differential privacy protection of vertical federated learning, the loss function is consistent with that of horizontal federated learning, resulting in the failure to fully utilize local information and mediocre model effects. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a longitudinal federated differential privacy matrix decomposition recommendation method based on project average, so as to achieve a good balance between security and availability of the recommendation model when the server is untrustworthy.
[0005] In order to achieve the above object, the present invention provides the following technical solutions:
[0006] A vertical federated differential privacy matrix decomposition recommendation method based on project average includes the following steps:
[0007] S1: User rating matrix for items Among them represents the rating of user i on item j; the training process consists of the server and the participant k∈[1,p] respectively; and the rating matrix R is vertically split into R= in The size is n×m k The matrix contains the rating information of the kth participant [r ij ]; n represents the number of users, m represents the number of projects; the set of projects [m] is divided into (F1,…,F p ), each F kis a subset of the items owned by the kth participant, and |F k |=m k represents the number of items in this subset;
[0008] S2: Each participant randomly initializes the user latent factor gradient matrix locally Initialize the project latent factor gradient matrix in Representation Matrix The i-th row of represents the latent factor vector of the i-th user; represents the j-th row of the matrix V, representing the latent factor vector of the j-th item; f represents the dimension of the latent factor vector; where and Represent the project latent factor gradient matrix and user latent factor gradient matrix of the kth participant respectively;
[0009] S3: For all participants k∈[1,p]; participant k passes local And by adding Laplace noise, we get in represents the item average vector calculated locally by the kth participant and is noisy;
[0010] S4: For all participants k∈[1,p]; through local U from the server is obtained through the objective function l(U,V,B) and And through and Adding Gaussian noise to
[0011] S5: Local update at the kth participant and And all participants k∈[1,p] Send to server update U;
[0012] S6: repeat S4 and S5 for a total of T times;
[0013] S7: After T rounds of iterations, according to the formula Make predictions; and U from the server. When user i needs a recommendation, u i It will be multiplied by the server's V matrix and added with B to generate a predicted score, and the items corresponding to the TOP-N scores that user i has not rated will be recommended to user i.
[0014] Further, in step S3, solve The steps are as follows:
[0015] S31: For participant k∈[1,p], for its rating item j∈[1,m k ], sum the scores of the items with the index j, and get:
[0016]
[0017] S32: further summed up Adding Laplace noise gives It can be expressed as:
[0018]
[0019] Where Laplace(b) represents the Laplace distributed noise with the center at 0 and scale b, where b = Δf / ∈), where Δf = r max -r min .so, It is the sum after adding noise, which provides privacy protection.
[0020] Further, in step S4, solve as well as The steps are as follows:
[0021] S41: Determine the objective function L(U, V, B):
[0022]
[0023] Where O is the set of rated user-item pairs in R, M = |O| is the number of elements in O, and λ>0 is the regularization parameter;
[0024] S42: According to the stochastic gradient descent (SGD) method, for each participant k, the score matrix Each score r in ij Calculate the user gradient Project Gradient And the average gradient of the project These gradients are calculated as follows:
[0025]
[0026]
[0027]
[0028]
[0029] where e ijRepresents the error between the true value and the predicted value.
[0030] S43: Because it needs to be announced eventually And it is necessary to update the gradient of the user's latent factor matrix with other participants. Here, the gradient perturbation algorithm in DPSGD is used. In order to satisfy differential privacy, and Use gradient clipping and then use accumulation, as shown in the formula:
[0031]
[0032]
[0033] Where C is the clipping value of the gradient norm.
[0034] S44: In order to ensure differential privacy, and Add Gaussian noise. In order to ensure (∈,δ)-differential privacy after T rounds, we and Add Gaussian noise to each row in .
[0035] For the gradient matrix For each row i in , the process of adding Gaussian noise is described as follows:
[0036] in
[0037]
[0038] where I is the identity matrix.
[0039] Similarly, for the gradient matrix For each row j in , the process of adding Gaussian noise is described as follows:
[0040]
[0041]
[0042] Further, in step S5, the local update and And the steps for server update U are as follows:
[0043] S51: Due to Only update locally. The update process is as follows:
[0044]
[0045] Here, α is the learning rate.
[0046] In addition, for The update of only needs to be accumulated locally before updating, as shown in the formula:
[0047]
[0048]
[0049] S52: The update is performed after the gradient is aggregated on the server side through the update of U. The aggregation update process is as follows:
[0050]
[0051]
[0052] The beneficial effects of the present invention are as follows: the present invention addresses the privacy leakage problem in the differential privacy matrix decomposition recommendation method under vertical federated learning, and the problem of insufficient data utilization in the loss function. This paper uses the project average, that is, the project average is calculated locally by the participating party, and the loss function is modified to update the project average. In view of the low quality of recommendations, the accuracy of the prediction is improved by integrating the average project score into the prediction score calculation, and personalized predictions can also be provided. At the same time, Laplace noise is added to the average project score by using input perturbation, and Gaussian noise is added to the project / user latent factor matrix by using gradient perturbation, so as to ensure that suitable noise is selected to reduce the addition of noise, so as to improve the quality of recommendations.
[0053] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to make the purpose and technical solution of the present invention clearer, the present invention will be described in detail below in conjunction with the accompanying drawings.
[0055] in:
[0056] Figure 1 A case study of vertical federated learning data distribution;
[0057] Figure 2 This paper shows the framework for privacy protection in horizontal federated learning data distribution;
[0058] Figure 3 Schematic diagram for recommending items to user u
[0059] Figure 4Comparison results of the MAE index between the present invention and other methods under different privacy budgets
[0060] Figure 5 Comparison results of the RMSE index between the present invention and other methods under different privacy budgets DETAILED DESCRIPTION
[0061] The specific implementation manner and working principle of the present invention are further described in detail below with reference to the accompanying drawings.
[0062] VFL is suitable for cooperation between organizations with a common user base but different user behavior data, such as online platforms and retailers working together to develop recommendation systems. Take the matrix decomposition of the cooperation between online platforms and retailers as an example.
[0063] In this solution, in the VFL scenario, by introducing the project average into the vertical matrix decomposition, the data utilization and user personalization are improved. At the same time, this solution adds Laplace noise to the project average when the input is disturbed, and adds Gaussian noise to the gradient disturbance when the user / project latent factor matrix is disturbed, which also improves the prediction accuracy.
[0064] User rating matrix for items The participants k∈[1,p] consist of two parties; and the rating matrix R is vertically split into in The size is n×m k The matrix contains the rating information of the kth participant [r ij ]; n represents the number of users, m represents the number of projects; the set of projects [m] is divided into (F1,…,F p ), each F k is a subset of the items owned by the kth participant, and |F k |=m k represents the number of items in the subset. Specifically, for Figure 1 For example, there are two participants, namely client 1 and client 2. Therefore, n = 3, m = 6, p = 2, m1 = 2,
[0065] The project average-based vertical federated differential privacy matrix decomposition recommendation method of the present invention specifically includes the following steps:
[0066] Step 1: Each participant randomly initializes the user latent factor gradient matrix locally Initialize the project latent factor gradient matrix in Representation Matrix The i-th row of represents the latent factor vector of the i-th user; represents the j-th row of the matrix V, representing the latent factor vector of the j-th item; f represents the dimension of the latent factor vector; where and Represent the project latent factor gradient matrix and user latent factor gradient matrix of the kth participant respectively; specifically, for Figure 1 For example, if f=7, for client 1: For Client 2:
[0067] Step 2: For all participants k∈[1,p]; participant k uses local And by adding Laplace noise, we get in represents the item average vector calculated locally by the kth participant and is noised; specifically, for Figure 2 For client 1: For client 2: in and The updating process of is shown in S31 and S32;
[0068] Step 3: For all participants k∈[1,p], use the local U from the server is obtained through the objective function L(U,V,B) and Specifically, for Figure 2 For client 1: and For client 2: and in and The updating process of is shown in S41 and S42;
[0069] Step 4: For all participants k∈[1,p], and by and Adding Gaussian noise to Specifically, for Figure 2 For client 1: For client 2: in See S43 and S44 for the update process.
[0070] Step 5: Locally update the k∈[1,p]th participant and Specifically, for Figure 2For client 1: For client 2: in and The updating process of is shown in S51;
[0071] Step 6: All participants k∈[1,p] Send to the server to update U; specifically, for Figure 2 In terms of U∈R 3×7 ; For client 1: For client 2: The updating process of U is shown in S52;
[0072] Step 7. Repeat steps 3 to 6 for a total of T times;
[0073] Step 11: After T rounds of iterations, according to the formula Make predictions; and U from the server. When user i needs a recommendation, u i It will be multiplied by the server's V matrix and added with B to generate a predicted score, and the items corresponding to the TOP-N scores that user i has not rated will be recommended to user i; specifically, for Figure 2 In terms of Recommended process Figure 3 .
Claims
1. A matrix decomposition recommendation method based on project average vertical federated differential privacy, specifically including the following steps: S1: User rating matrix for items Among them represents the rating of item j by user i; The training process consists of two parties: the server and the participant k∈[1, p]; and the rating matrix R is vertically divided into in The size is n×m k The matrix contains the rating information of the kth participant [r ij ]; where n represents the number of users, m represents the number of projects; the set of projects [m] is divided into (F1, ..., F p ), each F k is a subset of the items owned by the kth participant, and |F k |=m k represents the number of items in this subset; S2: Each participant randomly initializes the user latent factor gradient matrix locally Initialize the project latent factor gradient matrix in Representation Matrix The i-th row of represents the latent factor vector of the i-th user; represents the j-th row of the matrix V, representing the latent factor vector of the j-th item; f represents the dimension of the latent factor vector; where and Represent the project latent factor gradient matrix and user latent factor gradient matrix of the kth participant respectively; S3: For all participants k∈[1,p]; participant k passes local And by adding Laplace noise, we get in represents the item average vector calculated locally by the kth participant and is noisy; S4: For all participants k∈[1,p]; through local U from the server is obtained through the objective function L(U, V, B) and And through and Adding Gaussian noise to S5: Local update at the k∈[1,p]th participant and And all participants k∈[1,p] Send to server update U; S6: repeat S4 and S5 for a total of T times; S7: After T rounds of iterations, according to the formula Make predictions; and U from the server. When user i needs a recommendation, u i It will be multiplied by the server's V matrix and added with B to generate a predicted score, and the items corresponding to the TOP-N scores that user i has not rated will be recommended to user i.
2. According to claim 1, a matrix decomposition recommendation method based on project average vertical federated differential privacy is characterized by: In step S3, the solution The specific steps include: S31: For participant k∈[1, p], for its rating item j∈[1, m k ], sum the scores of the items with the index j, and get: S32: Further summation results Adding Laplace noise gives It can be expressed as: Where Laplace(b) represents the Laplace distributed noise with the center at 0 and scale b, where b = Δf / ∈), where Δf = r max -r min .so, It is the sum after adding noise, which provides privacy protection.
3. According to claim 1, a matrix decomposition recommendation method based on project average vertical federated differential privacy is characterized by: In step S4, through the objective function L(U, V, B), we get and And through and Adding Gaussian noise to The specific steps include: S41: Determine the objective function L(U, V, B): where O is the set of rated user-item pairs in R, M = |O| is the number of elements in O, and λ>0 is the regularization parameter; S42: According to the stochastic gradient descent (SGD) method, for each participant k, the score matrix Each score r in ij Calculate the user gradient Project Gradient And the average gradient of the project These gradients are calculated as follows: where e ij Represents the error between the true value and the predicted value. S43: Because it needs to be announced eventually And it is necessary to update the gradient of the user's latent factor matrix with other participants. Here, the gradient perturbation algorithm in DPSGD is used. In order to satisfy differential privacy, and Use gradient clipping and then use accumulation, as shown in the formula: Where C is the clipping value of the gradient norm. S44: In order to ensure differential privacy, and Add Gaussian noise. In order to ensure (∈, δ)-differential privacy after T rounds, we and Add Gaussian noise to each row in . For the gradient matrix For each row i in , the process of adding Gaussian noise is described as follows: among them i ~N(0,σ 2 C 2 I) where is the identity matrix. Similarly, for the gradient matrix For each row j in , the process of adding Gaussian noise is described as follows: Further, in step S5, the local update and And the steps for server update U are as follows: S51: Due to Only update locally. The update process is as follows: Here, α is the learning rate. In addition, for The update of only needs to be accumulated locally before updating, as shown in the formula:
4. According to claim 1, a matrix decomposition recommendation method based on project average vertical federated differential privacy is characterized by: In step S5, the local update and And server update U. The specific steps include: S51: Due to Only update locally. The update process is as follows: Here, α is the learning rate. In addition, for The update of only needs to be accumulated locally before updating, as shown in the formula: S52: The update is performed after the gradient is aggregated on the server side through the update of U. The aggregation update process is as follows:
5. According to claim 1, a matrix decomposition recommendation method based on project average vertical federated differential privacy is characterized by: In step S7, according to the formula Make predictions; and U from the server. When user i needs a recommendation, u i It will be multiplied by the server's V matrix and added with B to generate a predicted score, and the items corresponding to the TOP-N scores that user i has not rated will be recommended to user i.
