Federal learning and knowledge graph combined privacy protection recommendation method

By combining the privacy protection recommendation method of federated learning and knowledge graph, the limitations of traditional recommendation systems in integrating distributed computing resources and user privacy protection are solved, and efficient privacy protection and recommendation accuracy are achieved.

CN119416262AActive Publication Date: 2025-02-11LIAONING UNIVERSITY OF TECHNOLOGY

Patent Information

Application Number
CN202411625775.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-11
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

Traditional recommendation systems have limitations in integrating distributed computing resources and user privacy protection, and it is difficult to effectively solve the privacy issues and data sparseness of user-item interaction data.

Method used

Combining the recommended privacy protection method of federated learning and knowledge graph, data processing and model training are performed locally on the client, differential privacy edge disguise algorithm and induction order RDP privacy algorithm are used to add noise to the data, and model it on the server side. Aggregation and update of parameters.

Benefits of technology

It realizes more effective privacy protection, maintains high recommendation accuracy, reduces dependence on single client data, and achieves safe and efficient personalized recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119416262A_ABST
    Figure CN119416262A_ABST
Patent Text Reader

Abstract

The invention discloses a privacy protection recommendation method in combination with federated learning and a knowledge graph. The method comprises the steps that 1, a server initializes and distributes a federated learning global model; the client uses a differential privacy edge camouflage algorithm to increase the confusion degree of the original data; step 2, the client loads original data to the federated learning local model for training to obtain a declined federated learning local model gradient; step 3, the client uses an induction order RDP privacy algorithm to carry out gradient noise addition on the descending federal learning local model and uploads the model to the server; 4, the server receives the federated learning local model gradient after noise adding, and updates and evaluates a federated learning global model; repeating the step 2 to the step 4 until the model converges or reaches a preset number of iterations, and obtaining an optimized federated learning global model; and 5, inputting user data into the optimized federal learning global model, outputting an interest probability value, and judging the potential preference of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of recommendation systems, and in particular relates to a privacy-preserving recommendation method combining federated learning and knowledge graphs. Background Art

[0002] With the rapid development of the Internet, recommendation systems play an increasingly important role in e-commerce, social media, and content distribution platforms. Traditional recommendation techniques mainly use collaborative filtering (CF) methods, among which the SVD algorithm based on matrix decomposition is one of the classic CF recommendation algorithms. This algorithm predicts ratings by decomposing the user-item interaction matrix. Although it has achieved certain success, it usually encounters sparse user-item interactions and cold start problems.

[0003] With its rich entity attributes and relationship networks, knowledge graphs provide information resources for solving the cold start and data sparsity problems in recommendation systems; therefore, researchers have developed a variety of innovative recommendation methods based on knowledge graphs. For example, the PER algorithm builds meta-paths between users and items through heterogeneous graphs (KGs) based on a personalized attention mechanism; the CKE algorithm combines CF and other modalities of data to propose a collaborative embedding recommendation method based on knowledge graphs; RippleNet uses a memory network-like approach to simulate and utilize the ripple effect between users and items to propagate information on knowledge graphs; the KGCN method achieves more effective recommendations by merging knowledge graphs and collaborative filtering data.

[0004] In addition, with the implementation of strict data protection regulations such as the General Data Protection Regulation (GDPR), future online platforms may not be able to centrally store user-item interaction data to train models for recommendation. One way to solve the privacy issue of user-item interaction data is to store the original data locally on the user's device and train local models based on it. However, due to data dispersion and limited computing resources, it is difficult to train accurate models for recommendation in this case.

[0005] Federated Learning provides a new solution. FedMF is a recommendation algorithm based on matrix decomposition that protects privacy through encryption mechanisms; FedGNN is a recommendation algorithm based on graph neural network (GNN) that uses homomorphic encryption for aggregation and protects the original gradient through differential privacy and pseudo-labeling. Federated learning protects the privacy of user data by training the model locally on the user's device and only sharing the model parameters or gradients.

[0006] In summary, traditional knowledge graph recommendation systems have limitations in integrating distributed computing resources and protecting user privacy. Summary of the invention

[0007] The purpose of the present invention is to provide a privacy-preserving recommendation method that combines federated learning and knowledge graphs, which can more effectively protect privacy, maintain high recommendation accuracy, and achieve safe and efficient personalized recommendations.

[0008] The technical solution provided by the present invention is:

[0009] A privacy-preserving recommendation method combining federated learning and knowledge graph includes the following steps:

[0010] Step 1: The server initializes and distributes the federated learning global model, the parameters of the federated learning global model, the order of Ruili differential privacy, and the threshold of dynamic clipping; the client uses the differential privacy edge camouflage algorithm to increase the obfuscation of the original data;

[0011] Step 2: The client obtains the federated learning global model parameters from the server; constructs the client's federated learning local model using the federated learning global model parameters; loads the original data into the federated learning local model for training, and obtains a descending federated learning local model gradient after training;

[0012] Step 3: The client obtains the order of the Ruili differential privacy and the threshold of the dynamic clipping from the server, uses the induction order RDP privacy algorithm to add noise to the descending federated learning local model gradient, and uploads the noisy federated learning local model gradient to the server;

[0013] Step 4: The server receives the noisy federated learning local model gradient from each client, aggregates it using the federated averaging algorithm, updates and evaluates the federated learning global model; updates the federated learning global model parameters, the order of the Rayli differential privacy, and the threshold of the dynamic clipping through the federated learning global model gradient;

[0014] If the federated learning global model has not converged or has not reached the preset number of iterations, the updated parameters of the federated learning global model, the order of the Rayli differential privacy, and the threshold of the dynamic clipping are distributed to each of the clients, and steps 2 to 4 are repeated until the federated learning global model converges or reaches the preset number of iterations, thereby obtaining an optimized federated learning global model;

[0015] Step 5: Input the user data into the optimized federated learning global model, output the interest probability value, and determine the user's potential preferences based on the interest probability value.

[0016] Preferably, the method of increasing obfuscation of the original data using the differential privacy edge cloaking algorithm is: adding a specified proportion of pseudo-interaction items to the original data, calculating the noise intensity of the noise added by the Gaussian mechanism, and adding Gaussian noise to the interaction relationship between all users and items.

[0017] Preferably, the method of adding noise to the descending federated learning local model gradient using the induction order RDP privacy algorithm is: dynamically adjusting the order of the Ruili differential privacy, adjusting the noise level and using the dynamic clipping threshold to clip the descending federated learning local model gradient.

[0018] Preferably, the calculation formula of the federal averaging algorithm is:

[0019]

[0020] Among them, g n is the gradient of the local model of the federated learning described below; g n ' is the gradient of the federated learning local model after noise addition; N is the total number of the clients; n is the nth client, and g is the gradient of the federated learning global model.

[0021] Preferably, the calculation formula of the threshold value of dynamic clipping is:

[0022]

[0023] Wherein, clip is the threshold of the dynamic clipping; L2 norm of federated learning local model gradients dropped for all clients.

[0024] Preferably, the training process of the federated learning local model is: using an adaptive focused convolutional neural network to learn user embedding and knowledge graph embedding; the knowledge graph embedding includes an entity embedding matrix and a relationship embedding matrix; the user embedding includes a user embedding matrix and a user's domain representation embedding matrix.

[0025] Preferably, the adaptive focused convolutional neural network consists of a graph convolutional layer and a first attention mechanism; the graph convolutional layer consists of a graph neural network and a second attention mechanism; the second attention mechanism calculates the attention score between the user and the relationship; the first attention mechanism calculates the features of the entity and the adjacent items, obtains the attention weights of these features, and combines with the graph convolutional layer to dynamically adjust the weights of the aggregated adjacent items to obtain the domain representation of the user.

[0026] The beneficial effects of the present invention are:

[0027] The privacy-preserving recommendation method combining federated learning and knowledge graph provided by the present invention can more effectively protect privacy, maintain high recommendation accuracy, realize distributed training and parameter sharing of models, reduce dependence on single client data, and realize safe and efficient personalized recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is an overall flow chart of the privacy protection recommendation method combining federated learning and knowledge graph described in the present invention.

[0029] Figure 2 This is a diagram of the horizontal federated learning framework described in the present invention.

[0030] Figure 3 It is the message passing path of the adaptive focused convolutional neural network model described in the present invention.

[0031] Figure 4 It is the basic information and hyperparameter table of the dataset.

[0032] Figure 5 Set up the table for the experiment hyperparameters.

[0033] Figure 6 Result graph of Recall@K recommendation for the Last.FM dataset.

[0034] Figure 7 Result graph of Recall@K recommendation for Book-Crossing dataset.

[0035] Figure 8 This is the CRT prediction result table.

[0036] Fig. 9 Table 2 shows the impact of the attention mechanism on accuracy.

[0037] Fig.10 This is a graph showing the impact of the number of GCN layers on accuracy.

[0038] Fig.11 Graph showing the impact of local differential privacy noise intensity on accuracy.

[0039] Fig.12 This is the effect of pseudo interaction terms on accuracy.

[0040] Fig.13 This is a table showing the impact of the dynamic RDP order adjustment algorithm on model accuracy. DETAILED DESCRIPTION

[0041] The present invention is further described in detail below in conjunction with the accompanying drawings so that those skilled in the art can implement the invention with reference to the description.

[0042] like Figure 1As shown, the present invention provides a privacy protection recommendation method combining federated learning and knowledge graph, including: setting the neighbor sampling size to K, the embedding dimension to d, the receptive field depth to H, the learning rate to η, the total number of clients to N, the proportion of clients selected in each round to L, and the client local map to {G n |n=1,...,N}, the global model parameter is θ, the order of Rayleigh differential privacy is α, and the threshold of dynamic clipping is clip.

[0043] Step 1: The server initializes and distributes the federated learning global model, federated learning global model parameters, the order of Ruili differential privacy, and the threshold of dynamic clipping; when the model has not converged, N clients are randomly selected, and the clients use the differential privacy edge camouflage algorithm to perform privacy processing on the original data to increase the obfuscation degree.

[0044] Among them, the method of using the differential privacy edge cloaking algorithm to increase the obfuscation of the original data is: adding a specified proportion of pseudo-interaction items to the original data to interfere with the interaction of real users, increase the obfuscation of the data, and protect user data; calculating the noise intensity of the noise added by the Gaussian mechanism; and applying the Gaussian mechanism of differential privacy to the data, adding Gaussian noise to the interaction relationship between all users and projects, to prevent user data other than pseudo-interaction items from being stolen; the differential privacy edge cloaking algorithm increases the obfuscation of the data, thereby protecting user privacy and ensuring that user data is not leaked during client training.

[0045] In each round of training, the server randomly selects a subset N of clients with a ratio of L L Participate in training. The specific steps include: first calculate the number of clients selected in each round, the calculation formula is: NL = L * N, then randomly select NL clients from these N clients to form a subset N L This approach ensures that different types of data are included in each iteration, effectively alleviating the impact of client data heterogeneity and improving the generalization ability and training efficiency of the model.

[0046] Step 2: The client loads the privacy-processed original data and obtains the federated learning global model parameters from the server; uses the federated learning global model parameters to build the client's federated learning local model; loads the privacy-processed original data into the federated learning local model for training, and obtains a descending federated learning local model gradient after training.

[0047] Among them, the training process of the federated learning local model is to use an adaptive focused convolutional neural network to learn user embedding and knowledge graph embedding, and improve the model accuracy and stability by dynamically adjusting the weight of each neighbor during convolution.

[0048] Step 3: The client obtains the order of the Ruili differential privacy and the threshold of the dynamic clipping from the server, and uses the induction order RDP privacy algorithm to add noise to the descending federated learning local model gradient to prevent attackers from inferring the original data by analyzing the descending local model gradient, thereby enhancing the differential privacy effect and avoiding privacy risks in multiple rounds of iterations, and uploading the noisy federated learning local model gradient to the server.

[0049] Among them, the method of adding noise to the descending federated learning local model gradient using the induction order RDP privacy algorithm is: dynamically adjusting the order of the Ruili differential privacy, flexibly adjusting the noise level according to the model accuracy and privacy requirements, and using the dynamic clipping threshold to clip the descending federated learning local model gradient.

[0050] The specific process of the sensing order RDP privacy algorithm is as follows: the global model is evaluated to obtain the accuracy, and the order of Ruili differential privacy, that is, the RDP sensing order of the client, is dynamically adjusted according to the change in accuracy. If the rate of change of accuracy is less than 0.005, the order of Ruili differential privacy is reduced, and if the rate of change of accuracy is greater than 0.01, the order of Ruili differential privacy is increased; when the rate of change of accuracy is greater than 0.005 and less than 0.01, there is no need to adjust the order of Ruili differential privacy; the noise level is flexibly adjusted according to the model accuracy and privacy requirements; when dynamically adjusting the RDP sensing order of the client, the average value of the L2 norm of the local model gradients of all clients is used as the threshold of the dynamic clipping. The threshold of the dynamic clipping limits the descent of the local model gradient to prevent gradient explosion, while ensuring strong privacy protection while maximizing the accuracy and effectiveness of the model.

[0051] The calculation formula of the threshold of dynamic clipping is:

[0052]

[0053] Wherein, clip is the threshold of the dynamic clipping; L2 norm of federated learning local model gradients dropped for all clients.

[0054] Step 4: The server receives the noisy federated learning local model gradient from each client, aggregates it using a federated averaging algorithm, and updates and evaluates the federated learning global model; updates the federated learning global model parameters, the order of the Rayli differential privacy, and the threshold of the dynamic clipping through the federated learning global model gradient.

[0055] The server securely aggregates the received noisy federated learning local model gradients, calculates the global model gradient, and uses a federated average algorithm to average the noisy federated learning local model gradients of all clients. The calculation formula of the federated average algorithm is:

[0056]

[0057] Among them, g n is the gradient of the local model of the federated learning described below; g n ' is the noisy federated learning local model gradient; N is the total number of the clients; n is the nth client, and g is the federated learning global model gradient; the purpose of aggregating the noisy federated learning local model gradients of the clients is to improve the performance and stability of the federated learning global model; the server uses the aggregated federated learning global model gradients to update the federated learning global model parameters, and the federated learning global model parameter update formula is:

[0058] θ=θ-ηg;

[0059] By aggregating the noisy federated learning local model gradient updates of different clients, the model can better learn the features in different data distributions and improve generalization capabilities. This method disperses the computing load and improves training efficiency while protecting user data privacy, enhancing the model's robustness to abnormal or malicious updates, and accelerating the convergence of the federated learning global model. The server can continuously optimize the performance of the federated learning global model while ensuring user privacy.

[0060] If the federated learning global model has not converged or has not reached the preset number of iterations, the updated parameters of the federated learning global model, the order of the Rayli differential privacy and the threshold of the dynamic clipping are distributed to each of the clients, and steps 2 to 4 are repeated until the federated learning global model converges or reaches the preset number of iterations, thereby obtaining an optimized federated learning global model.

[0061] Step 5: Input the user data into the optimized federated learning global model, output the interest probability value, judge the user's potential preferences based on the interest probability value, predict the user's interest probability in uninteracted items, and return 1 or 0 to represent whether to interact based on the interest probability.

[0062] The user-item interaction bipartite graph is represented by G = (U, T, E), where U = {u1, u2, ..., u b} is the user set; T = {t1, t2, ..., t c} is the set of items; E is the edge set, which represents the interaction between users and items; the interaction matrix Y∈Rb×c represents the user-item interaction matrix consisting of b users and c items, R is the relationship, where y ut is the interaction status between user u and item t (1 indicates interaction, 0 indicates no interaction).

[0063] In the federated recommendation system, each user u i Client c i Access only the local interaction graph G i ; The local interaction graph G i is a subgraph of the global graph G; the local interaction graph G i Contains a specific user set U i With a specific set of items T i interaction records.

[0064] The knowledge graph accessed consists of triples (e h ,r,e t )|e h ,e t ∈E,r∈R, where e h and e t is an entity and r is a relationship.

[0065] The present invention provides a privacy-preserving recommendation method combining federated learning and knowledge graph, which trains a privacy-preserving generalized graph neural network (GNN) model through the local interaction graph and the knowledge graph to predict the probability of user u's interest in uninteracted item t. And according to the probability of interest Size returns 1 or 0 to indicate whether it is interactive.

[0066] The main purpose of the client design is to ensure that user information is not leaked, while training the local model and uploading the local model gradient to the server. The main task of the server is to randomly select clients for training tasks, aggregate the model gradients obtained from the training to form a global model, and distribute the gradients of the global model to each client for a new round of training; in addition, the server also needs to evaluate the model after aggregating it into a global model, and dynamically adjust the order of RDP according to the model evaluation results to deal with poor accuracy.

[0067] Knowledge graph is a graphical structure used to represent large-scale information from multiple fields, usually following the Resource Description Framework (RDF) standard. RDF describes the edges in the graph through triples, where nodes represent entities and edges represent relationships between entities. Knowledge graph is a heterogeneous network containing multiple types of nodes and relationships, with powerful representation capabilities. It can obtain multiple attributes of entities through different edges and discover high-level connections between entities through these relationships. Knowledge graph effectively processes, processes and integrates complex document data, transforms it into simple and clear "entity-relationship-entity" triples, aggregates a large amount of knowledge, and thus achieves rapid response and reasoning of knowledge. There are two ways to construct the knowledge graph: top-down and bottom-up. Top-down construction uses structured data sources such as encyclopedia websites to extract ontology and pattern information from high-quality data and add it to the knowledge base; bottom-up construction uses technical means to extract resource patterns from publicly collected data, select new patterns with higher confidence, and add them to the knowledge base after manual review. The concept of knowledge graph originated in the 1980s. It was originally used in expert systems in medical and social sciences, and later expanded to the fields of linguistics and logic. In 2012, Google introduced knowledge graphs into the search framework to improve query understanding and the user experience of search results. Knowledge graphs are widely used in search engines, recommendation systems, question-answering systems, and relationship detection. Common knowledge graphs include Freebase, DBpedia, YAGO, Satori, and CN-DBpedia, which provide rich information and relationship networks in different fields and languages.

[0068] Differential privacy algorithm: For a random algorithm M, let P m is the set of all values ​​that can be output by algorithm M; for any pair of adjacent data sets D and D′, P m For any subset S of , the definition formula of differential privacy (ε, δ) is:

[0069] Pr[M(D)∈S]≤e ε Pr[M(D′)∈S]+δ

[0070] Among them, if the algorithm M satisfies the definition formula of differential privacy (ε, δ), then the algorithm M satisfies differential privacy (ε, δ). ε is the privacy protection budget, which controls the privacy protection degree of the mechanism. The smaller ε is, the stronger the privacy protection is and the greater the noise is. δ is the allowed "failure probability", which should usually be very small (for example, 10 -5 or smaller);

[0071] From the definition formula of differential privacy (ε, δ), it can be concluded that when the parameter ε is smaller, the probability distribution of the query results returned by the differential privacy algorithm acting on a pair of adjacent data sets is more similar, the more difficult it is for an attacker to distinguish the pair of adjacent data sets, and the higher the degree of protection; in extreme cases, when ε = 0 and δ = 0, the attacker cannot distinguish the pair of adjacent data sets, and the degree of protection is the highest. Conversely, the larger the parameter ε is, the lower the degree of protection is.

[0072] The Rayleigh differential privacy algorithm is based on the definition of the Rayleigh divergence; for two adjacent data sets D and D′ (i.e., the two differ only in one record), the Rayleigh divergence D α The definition formula is:

[0073]

[0074] Where P and Q are the probability distributions of a randomized algorithm output under data sets D and D′, respectively, and α is the order of Rayleigh divergence;

[0075] The definition formula of Ruili differential privacy (α, ε) is:

[0076] D α (M(D)‖M(D′))≤ε

[0077] Given two adjacent data sets D and D′, and a randomized algorithm M, algorithm M satisfies Rayleigh differential privacy. The definition formula that satisfies the Rayleigh differential privacy (α, ε) for all output events S is said to satisfy Rayleigh differential privacy (α, ε).

[0078] The relationship between the order of Ruili differential privacy and privacy protection: Larger α: When α is larger, the privacy protection requirements of the RDP model are more stringent, resulting in larger added noise, which means that privacy protection is stronger, but the accuracy of the query results may be more affected; Smaller α: When α is smaller, the privacy protection requirements are weaker and the noise is smaller, thus providing more accurate query results.

[0079] Gaussian mechanism definition formula:

[0080]

[0081] Among them, f(D') is the query result after adding noise; f(D) is the original query result; Indicates that the mean is 0 and the variance is σ 2 Gaussian noise;

[0082] For a function f, the Gaussian mechanism implements differential privacy (ε, δ) by adding Gaussian noise to its output. If the output satisfies the formula, then the algorithm M satisfies differential privacy (ε, δ)

[0083] The formula for the scale of noise addition determined by the standard deviation σ of the Gaussian distribution is:

[0084]

[0085] Among them, Δ2f is the sensitivity of function f, that is, the responsiveness of the function to the change of a single data item in the input data set; in differential privacy, we usually focus on the output difference of function f between adjacent data sets (only one element is different).

[0086] Δ2f is usually defined as the maximum change in the output of function f between any two adjacent data sets D and D':

[0087]

[0088] For example, when calculating the mean of a data set, the sensitivity is the maximum effect that an element in the data set has on the mean.

[0089] The differential privacy edge camouflage algorithm is based on the differential privacy algorithm, and the induction order RDP privacy algorithm is based on the Ruili differential privacy algorithm.

[0090] Privacy analysis: The induction order RDP privacy algorithm satisfies the Rayleigh differential privacy definition by proving the theorem; Theorem: For any α>1 and ε, the dynamically adjusted order algorithm satisfies (α,ε)-RDP in each round of iteration. The proof process is as follows: RDP privacy definition in the initialization phase: Assume that in the initialization phase, the mechanism M already satisfies (α,ε)-RDP; Changes at the end of the induction order RDP privacy algorithm: When the accuracy of the global model changes within a certain range, the order α' is obtained by changing the original α, that is, α'=α*radio; where radio is a different value assigned by the server according to different evaluation results of the global model; Adjusted RDP privacy definition: The following formula can be obtained from the definition formula of Rayleigh divergence:

[0091]

[0092] For Rayleigh divergence, the expected value is only related to the difference in output distributions, and these distributions are determined by adjacent data sets and mechanisms, not by the order α. Since the distribution itself does not change, the expected value part does not change with α; the following formula is obtained:

[0093]

[0094] For α<α′, the new mechanism satisfies (α′,ε′)-RDP, as follows:

[0095]

[0096] For α′>α>1, since RDP is for all α>1, the mechanism still satisfies the RDP theorem for the new order α′;

[0097] The calculation formula of ε′ is:

[0098]

[0099] According to the nature of RDP, changing α will lead to a change in the privacy budget, but it will not violate the definition of RDP; Privacy definition during iteration: During each round of iteration, the privacy definition of the algorithm is maintained by the previous order α and the privacy budget ε. After adjusting the order, the new α′ and ε′ ensure that the algorithm satisfies the RDP theorem throughout the training process; Through the above analysis, it can be concluded that the algorithm of the inductive order RDP privacy algorithm satisfies (α, ε)-RDP in each round of iteration. This is because the process of adjusting the order does not violate the basic definition of RDP, and the adjusted mechanism still maintains the privacy definition at the new order. Therefore, the algorithm complies with RDP in each round of iteration.

[0100] like Figure 2 As shown in Figure 1, federated learning is a distributed machine learning method that aims to solve the problems of data privacy protection and data silos by training models collaboratively by multiple participants without sharing the original data. Each participant trains the model locally and only exchanges model parameters or intermediate results with the central server or other participants, rather than the original data, to achieve collaborative machine learning while protecting privacy.

[0101] According to the distribution of the feature space and sample space of the data sets of the participants, federated learning can be divided into the following types:

[0102] Horizontal federated learning: used for datasets with large feature overlap and small sample overlap; participants are usually mobile devices with small amounts of data; in this case, the risk of privacy leakage may increase due to the possible existence of curious servers or malicious participants.

[0103] Vertical federated learning: used for datasets with little feature overlap and a lot of sample overlap; the datasets of the participants are usually large and they are often independent organizations with strong computing power; despite the large datasets, the issue of privacy protection remains complex.

[0104] Federated transfer learning: used for datasets with less overlap in features and samples; the federated transfer learning can effectively solve the problems of small data size and sparse label features, thereby improving the accuracy of the model.

[0105] The privacy-preserving recommendation method combining federated learning and knowledge graph provided by the present invention is mainly implemented under the horizontal federated learning framework. The process of the horizontal federated learning includes the following steps:

[0106] Step 1: Local model construction: Participants build local models based on their own data sets;

[0107] Step 2: Encrypt model information: The participant encrypts the local model information (such as gradient) (such as using homomorphic encryption), and then sends the encrypted model information to the main server;

[0108] Step 3, Server aggregation: The main server performs security aggregation based on the model information of the participants. The security aggregation algorithm we use is the federated average algorithm;

[0109] Step 4: Information broadcast: The main server broadcasts the aggregated information to all participants;

[0110] Step 5: Local model update: The participants decrypt the aggregate information sent by the main server and update the local model accordingly;

[0111] Repeat the above steps until the preset stop condition is reached.

[0112] like Figure 3 As shown in the figure, the adaptive focusing convolutional neural network combines graph neural network and two attention mechanisms to improve the performance of the recommendation system; the adaptive focusing convolutional neural network model mainly includes: embedding initialization, graph convolution layer and attention mechanism.

[0113] The knowledge graph embedding in the adaptive focused convolutional neural network model includes an entity embedding matrix e e and the relation embedding matrix e r , the user embedding includes the user embedding matrix e u and the user's domain representation embedding matrix e v ; The above four embedding matrices are initialized randomly and using Xavier uniform distribution to ensure the diversity and stability of the initial parameters.

[0114] The adaptive focusing convolutional neural network is composed of a graph convolutional layer and a first attention mechanism; the graph convolutional layer is composed of a graph neural network and a second attention mechanism; the second attention mechanism is a dot product attention mechanism, which calculates the attention score between the user and the relationship; the first attention mechanism calculates the features of entities and adjacent items, obtains the attention weights of these features, and combines the graph convolutional layer to dynamically adjust the weights of aggregated adjacent items to make the aggregation more directional, and obtain the user's domain representation. The domain representation definition formula of user u is:

[0115]

[0116]

[0117] in, is the domain of user u; is the score between user u and relation r, which is calculated by normalizing user u and relation r using the dot product attention mechanism; relation r is the relationship between node v and neighbor e; a v,e is the attention weight, which is obtained by the importance of the relationship between node v and its neighbor e to user u; σ is the activation function (such as sigmoid); N (v) To select K neighbors from all neighbors of the current node v;

[0118] In order to avoid the computational pressure caused by too many neighbors of a node v, a hyperparameter K is defined as the neighbor sampling size. For each node v, only K neighbors are selected to represent S(v). At this time, the neighborhood of node v is The formula used to obtain the neighbor nodes of node v is:

[0119] S(v)={e∣e∈N(v)},|S(v)|=K

[0120] Adding the original embedding to the neighborhood enhances the richness and contextual information of the item representation:

[0121]

[0122] Among them, item is the current node;

[0123] Finally, the inner product of the user u and the item’s node v is used to represent the item with the sigmoid function for prediction, and the binary cross entropy (BCE) is used as the loss function to train the graph neural network model. The formula for binary cross entropy is:

[0124]

[0125] Among them, y i is the true label, which is the actual classification label of the sample; p i is the predicted probability of the model, which indicates the probability that the model believes that the sample belongs to the positive class.

[0126] like Figure 4-13As shown, the performance of the Federated Knowledge Graph Enhanced Attention Convolution (FedKGAC) model used in a privacy-preserving recommendation method that combines federated learning and knowledge graph provided by the present invention is evaluated through experiments on two actual datasets, with particular focus on the effectiveness of the adaptive focused convolution module, aiming to answer the following research questions: Performance comparative analysis: Evaluate the performance of FedKGAC and the existing most advanced knowledge-enhanced recommendation methods in terms of recommendation accuracy and efficiency; Component impact analysis: Analyze the impact of key components in FedKGAC (convolutional layer and adaptive focused convolution algorithm) on the overall performance of the model; Privacy protection evaluation: Strictly review the performance of FedKGAC in privacy protection to ensure that it can comply with the highest standards of privacy protection while providing personalized recommendations.

[0127] To verify the robustness of the algorithm under diverse conditions, we selected real datasets of different scales, densities, and fields for testing. The datasets used are as follows: Book-Crossing: This dataset originated from the Book-Crossing community in 2004 and contains ten-level ratings of books (0 to 10 points). In this dataset, a rating of 0 represents an implicit interaction between the user and the book; Last.FM: This dataset records the number of times an artist is listened to on the Last.FM music streaming platform, with the artist as an item and the number of times listened to as a rating.

[0128] like Figure 4 As shown in the above study, the HetRec 2011 version of the data was used, but these data sets cannot play a good role in FedKGAC. These data sets need to be processed as follows: Figure 4 Details of the processed dataset: irrelevant information was deleted, and only the interaction data between users and projects was retained; Microsoft Satori was used to construct a knowledge graph for triplets with a confidence level higher than 0.9; all artists listened to in Last.FM and all rated books in Book-Crossing were considered positive feedback, and vice versa, they were marked as negative feedback; finally, all data were shuffled and evenly distributed to each client to build the dataset required for federated learning.

[0129] FedKGAC is compared with the following baselines of graph enhancement methods: SVD: a classic CF algorithm based on matrix decomposition; PER: an algorithm based on personalized attention mechanism to build a meta-path between users and items through heterogeneous graph (KG); CKE: a collaborative embedding recommendation algorithm based on knowledge graph, combining data from collaborative filtering and other modalities; RippleNet: a memory network-like method that simulates and exploits the ripple effect between users and items to propagate information on the knowledge graph; KGCN: a knowledge graph-based method that achieves effective recommendation by merging knowledge graph and collaborative filtering data; FedMF: a recommendation algorithm based on matrix decomposition, protecting privacy through encryption mechanism; FedGNN: a recommendation algorithm based on graph neural network, using homomorphic encryption for aggregation, and protecting the original gradient through differential privacy and pseudo-annotation.

[0130] like Figure 5 As shown, the hyperparameters of the experiment are shown. The dataset is split into training, validation, and test sets in a ratio of 6:2:2; AUC and F1 scores are used as evaluation metrics for click-through rate (CTR) prediction.

[0131] For the Last.FM and Book-Crossing datasets, the SVD method is applied with dimensions (8,8) and learning rates (0.1,0.5); for LibFM, the dimension is (8,1); PER uses the user-item-attribute-item meta-path, with dimensions (64,128) and learning rates (0.1,0.5); the learning rate of KG in CKE is (0.1,0.1), while the dimension is (16,4) and the H value is (3,3); the dimension of RippleNet is (16,4), the H value is (3,3), the learning rate is (0.005,0.001), and the regularization parameter λ1 is (10 -5 ,10 -5 ), λ2 is (0.02, 0.01); other hyperparameters are the same as the original paper, and the federated learning settings are consistent with this paper.

[0132] like Figure 6-7As shown in Figure 2, the results of Recall@K recommendation of various baselines are compared. A comprehensive comparison is made based on the listed baseline models. Since the dataset only contains the knowledge graph (K) and the user-item interaction graph, the selected federated learning algorithm does not perform well. Based on these results, we draw the following conclusions: The comparison between matrix decomposition algorithm and graph neural network algorithm is represented by SVD, FedMF, KGCN and FedGNN. The experimental results show that the accuracy of graph neural network is better, which depends on the ability of graph neural network to capture user preferences and allow user or project embedding to be shared with adjacent nodes, which makes the accuracy of graph neural network higher than that of matrix decomposition; due to the complexity of graph data, PER and CKG algorithms need to set rules and predefined structures by themselves, instead of automatically learning and adjusting models through data-driven methods, resulting in no better effect in this experiment; KGCN achieves the best AUC among the top five centralized learning methods; the adaptive focused convolutional neural network (KGAC) described in the present invention performs better than KGCN; the accuracy of FedKGAC is slightly lower than that of KGAC, proving that the use of the privacy-preserving recommendation method combining federated learning and knowledge graph will lead to the loss of model training accuracy, but can effectively improve the privacy protection ability of the model in the recommendation system. For example, the Gaussian mechanism and pseudo-interaction terms perform well in privacy protection and can effectively prevent the leakage of user data; the Gaussian mechanism ensures that the output meets the differential privacy requirements by adding Gaussian noise to the data or model parameters; data disguise confuses the data by adding disguised edges and deleting real edges, further improving the effect of privacy protection; the Gaussian mechanism RDP adds Gaussian noise to the model gradient, which complies with the Ruili differential privacy framework and ensures privacy during the model training process.

[0133] Combining these privacy-preserving algorithms has obvious advantages in protecting user data privacy; compared with models without privacy protection, these algorithms significantly improve the privacy of user data and protect users from potential data leaks or attacks. Although the accuracy and performance of the model may decline after the introduction of privacy algorithms and federated learning, these algorithms provide an effective solution while ensuring the security of user data. The privacy-preserving recommendation method combining federated learning and knowledge graph described in the present invention performs best among the next three federated learning methods, with a certain gap from the designed KGAC, but the gap with KGCN is acceptable.

[0134] like Figure 8As shown in Figure 2, experimental results of CTR prediction, the experimental results consistently show that the proper use of additional side information can significantly improve the accuracy of the recommendation system. For example, KGCN and RippleNet outperform other centralized algorithms in terms of AUC and F1 indicators, while FEDKGAC, as a knowledge graph-based algorithm, performs best in federated learning; however, it should be noted that not all methods that utilize side information can provide satisfactory results, which applies to algorithms like PER and CKE, which have difficulties in effectively utilizing side information.

[0135] In order to further explore the impact of different components in the KGAC (Knowledge Graph Enhanced Collaborative Filtering) model on model accuracy, two experiments were conducted: one is to analyze the impact of the attention mechanism, and the other is to analyze the impact of the number of GCN (Graph Convolutional Network) layers. The experimental results are shown in Fig. 9 and Fig.10 In this paper, we aim to reveal the specific contributions of these components to the model performance.

[0136] like Fig. 9 As shown in Figure 2, the attention mechanism plays a vital role in the KGAC model. Specifically, it effectively aggregates neighbor information by calculating the relationship weight between the current node and its neighbor nodes. Fig. 9 The experimental results show that when the attention mechanism is removed from the model, the accuracy of the model decreases significantly. The results show that the attention mechanism significantly improves the performance of the model by accurately calculating and weighting the influence of neighboring nodes. Without this mechanism, the model cannot effectively integrate and utilize the information of neighboring nodes, resulting in a decrease in performance.

[0137] like Fig.10 As shown in the figure, the change of model accuracy under different numbers of GCN layers is shown. The choice of GCN layers has a direct impact on the performance of the model. As the number of GCN layers increases, the accuracy of the model gradually decreases. The emergence of this phenomenon may be related to the redundant data brought by the increase in the number of GCN layers. As the number of layers increases, the model may introduce more redundant information, resulting in confusion in feature representation, thereby affecting the accuracy of the model for recommendation tasks. Too many GCN layers not only increase the computational complexity, but may also cause the model to overfit during training or make it difficult to effectively learn important features.

[0138] In summary, the effectiveness of the attention mechanism and the reasonable configuration of the number of GCN layers have a significant impact on the accuracy of the KGAC model. The introduction of the attention mechanism can improve the model's sensitivity to node relationships, thereby improving accuracy; while the increase in the number of GCN layers may introduce redundant data, resulting in a decrease in model accuracy. Therefore, in model design, these factors need to be considered comprehensively to achieve the best performance.

[0139] like Fig.11 As shown, the impact of local differential privacy noise intensity on model accuracy is demonstrated. Protecting user privacy is a crucial consideration in modern data processing and machine learning tasks. In order to effectively protect the privacy of local customer data, we adopted the differential privacy edge camouflage algorithm in this study, which is a combination of local differential privacy (LDP) and pseudo-interaction terms. Their impact on accuracy is discussed separately. In order to further strengthen privacy protection during gradient upload, we introduced a dynamic RDP order adjustment mechanism to explore the impact of dynamic RDP order adjustment on model accuracy; experimental results show that with the increase of noise intensity, the accuracy of the model shows a significant downward trend, which shows that although the local differential privacy mechanism effectively protects user privacy, the noise it introduces also leads to a decline in model performance.

[0140] like Fig.12 As shown in Figure 2, the effect of the proportion of pseudo interaction terms on model accuracy is shown. Too high a proportion of pseudo interaction terms will lead to a decrease in model accuracy, while moderate pseudo interaction terms can balance privacy protection and model performance to a certain extent. The introduction of pseudo interaction terms also has a significant impact on model accuracy.

[0141] like Fig.13 As shown in the figure, the impact of the dynamic RDP order adjustment algorithm on model accuracy is demonstrated. By combining the dynamic adjustment of noise intensity with model accuracy, this technology not only significantly improves the prediction accuracy of the model, but also ensures the security of user privacy; this adjustment strategy effectively balances the relationship between model performance and privacy protection, and optimizes model accuracy without sacrificing user privacy.

[0142] In summary, the combination of local differential privacy and pseudo-interaction terms plays an important role in protecting user privacy, but it also affects the accuracy of the model. By reasonably adjusting the noise intensity, the proportion of pseudo-interaction terms, and applying dynamic RDP order adjustment, a balance can be achieved between protecting user privacy and maintaining model performance.

[0143] Through experiments on two real data sets, the privacy-preserving recommendation method combining federated learning and knowledge graph provided by the present invention shows significant improvements in privacy protection and recommendation performance. Experimental results show that compared with existing recommendation algorithms, the privacy-preserving recommendation method combining federated learning and knowledge graph can more effectively protect user data privacy while maintaining high recommendation accuracy. In the overall training process, considering the heterogeneity of client data, the algorithm realizes distributed training and parameter sharing of the model through the federated learning framework, reducing the dependence on single client data.

[0144] The present invention provides a privacy-preserving recommendation method combining federated learning and knowledge graph, aiming to solve challenges such as data privacy protection, data sparsity, cold start problem and computing resource limitation. It can more effectively protect privacy, maintain high recommendation accuracy, realize distributed training and parameter sharing of models, reduce dependence on single client data, and realize safe and efficient personalized recommendation. First, the client uses differential privacy edge camouflage algorithm on the original user data, and each client performs personalized learning of user embedding and knowledge graph embedding by using adaptive focused convolutional neural network. This design allows the on-device model to be personalized trained to better adapt to the data of different clients. According to the environment, the weight of each neighbor during convolution is dynamically adjusted to improve the accuracy and stability of the model; secondly, in order to enhance the obfuscation of the data and protect the privacy of user data, the client adds pseudo-interaction terms and Gaussian noise when loading data to ensure that a single record has little impact on the overall statistical results, thereby protecting user privacy; in addition, the algorithm adopts Ruili differential privacy technology, uses the inductive order RDP privacy algorithm when uploading gradients, and dynamically adjusts the privacy budget, that is, by dynamically adjusting the order of RDP, while ensuring data privacy, it pursues the optimal accuracy, balances privacy protection and computational efficiency, and enhances privacy protection during data upload, thereby achieving the best state of privacy protection and efficiency.

[0145] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and the implementation modes, and they can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.

Claims

1. A privacy-preserving recommendation method combining federated learning and knowledge graph, characterized in that: The steps include: Step 1: The server initializes and distributes the federated learning global model, the parameters of the federated learning global model, the order of Ruili differential privacy, and the threshold of dynamic clipping; the client uses the differential privacy edge camouflage algorithm to increase the obfuscation of the original data; Step 2: The client obtains the federated learning global model parameters from the server; constructs the client's federated learning local model using the federated learning global model parameters; loads the original data into the federated learning local model for training, and obtains a descending federated learning local model gradient after training; Step 3: The client obtains the order of the Ruili differential privacy and the threshold of the dynamic clipping from the server, uses the induction order RDP privacy algorithm to add noise to the descending federated learning local model gradient, and uploads the noisy federated learning local model gradient to the server; Step 4: The server receives the noisy federated learning local model gradient from each client, aggregates it using the federated averaging algorithm, updates and evaluates the federated learning global model; updates the federated learning global model parameters, the order of the Rayli differential privacy, and the threshold of the dynamic clipping through the federated learning global model gradient; If the federated learning global model has not converged or has not reached the preset number of iterations, the updated parameters of the federated learning global model, the order of the Rayli differential privacy, and the threshold of the dynamic clipping are distributed to each of the clients, and steps 2 to 4 are repeated until the federated learning global model converges or reaches the preset number of iterations, thereby obtaining an optimized federated learning global model; Step 5: Input the user data into the optimized federated learning global model, output the interest probability value, and determine the user's potential preferences based on the interest probability value.

2. The privacy-preserving recommendation method combining federated learning and knowledge graph according to claim 1, characterized in that: The method of using the differential privacy edge cloaking algorithm to increase the obfuscation degree of the original data is: adding a specified proportion of pseudo interaction items to the original data, calculating the noise intensity of the noise added by the Gaussian mechanism, and adding Gaussian noise to the interaction relationship between all users and items.

3. The privacy-preserving recommendation method combining federated learning and knowledge graph according to claim 1, characterized in that: The method of adding noise to the descending federated learning local model gradient using the induction order RDP privacy algorithm is: dynamically adjusting the order of the Ruili differential privacy, adjusting the noise level and using the dynamic clipping threshold to clip the descending federated learning local model gradient.

4. The privacy-preserving recommendation method combining federated learning and knowledge graph according to claim 1, characterized in that: The calculation formula of the federated average algorithm is: Among them, g n is the gradient of the local model of the federated learning described below; g n ' is the gradient of the federated learning local model after noise addition; N is the total number of the clients; n is the nth client, and g is the gradient of the federated learning global model.

5. The privacy-preserving recommendation method combining federated learning and knowledge graph according to claim 3, characterized in that: The calculation formula of the threshold of dynamic clipping is: Wherein, clip is the threshold of the dynamic clipping; L2 norm of federated learning local model gradients dropped for all clients.

6. The privacy-preserving recommendation method combining federated learning and knowledge graph according to claim 1, characterized in that: The training process of the federated learning local model is: using an adaptive focused convolutional neural network to learn user embedding and knowledge graph embedding; the knowledge graph embedding includes an entity embedding matrix and a relationship embedding matrix; the user embedding includes a user embedding matrix and a user's domain representation embedding matrix.

7. The privacy-preserving recommendation method combining federated learning and knowledge graph according to claim 6, characterized in that: The adaptive focusing convolutional neural network consists of a graph convolutional layer and a first attention mechanism; the graph convolutional layer consists of a graph neural network and a second attention mechanism; the second attention mechanism calculates the attention score between the user and the relationship; The first attention mechanism calculates the features of the entity and the adjacent items, obtains the attention weights of these features, and combines with the graph convolution layer to dynamically adjust the weights of the aggregated adjacent items to obtain the domain representation of the user.

Citation Information

Patent Citations

  • Federal recommendation method and device for improving privacy and robustness, equipment and storage medium

    CN115455471A

  • Longitudinal graph federal information recommendation method based on separation learning and related device

    CN115952550A

  • Federal learning data privacy security protection method and device and storage medium

    CN117313145A

  • Differential privacy gradient adaptive cutting method and device based on quantile

    CN117593599A

  • Federal learning method based on adaptive differential privacy

    CN117874829A

Cited By

  • Construction method of adaptive learning model

    CN119918623A

  • Federal learning method and system based on bidirectional feedback knowledge distillation and differential privacy

    CN119990373A

  • Real-time health risk prediction method and system based on dynamic knowledge graph

    CN120280136A

  • Reading recommendation method and system based on artificial intelligence

    CN120336622A

  • Multi-path data search fuzzy recommendation method

    CN120371900A