Privacy protection recommendation method based on graph federal learning

By combining graph federated learning and self-supervised learning, the challenges of high-order interactive information modeling and privacy protection in federated recommendation systems are solved, and efficient privacy protection and recommendation performance improvement are achieved, which is suitable for strict data privacy protection scenarios.

CN120764633APending Publication Date: 2025-10-10DALIAN MARITIME UNIVERSITY

Patent Information

Application Number
CN202510911401.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

Existing federated recommendation systems face challenges in modeling high-order interactive information, handling uneven data distribution, and balancing security and performance. In particular, they find it difficult to meet strict data privacy protection requirements.

Method used

A graph-based federated learning method is used to build a user-item interaction graph locally, combine self-supervised learning and privacy protection technology to perform high-order interaction modeling, and perform gradient clipping and noise injection on the client and server sides to optimize model parameters and achieve secure model training and recommendation.

Benefits of technology

Effectively protect user privacy, improve the prediction accuracy and generalization ability of the recommendation system, alleviate the problem of uneven data distribution, and ensure a balance between recommendation performance and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120764633A_ABST
    Figure CN120764633A_ABST
Patent Text Reader

Abstract

The invention discloses a privacy protection recommendation method based on graph federal learning, and belongs to the technical field of intelligent recommendation. The method mainly comprises the following steps: a client receives an initial weight, and constructs an initial user-article interaction graph based on user local data; modeling interaction between nodes on the initial user-article interaction graph based on the graph neural network and the initial weight; training the local user-article interaction model based on user local data; the server side aggregates the article embedding matrix gradient uploaded by each client side; the server side clusters the updated article embedding matrix to generate a sampling article set; and the client performs multi-task joint training based on self-supervised learning on the local user-article interaction model based on the user local interaction subgraph, and performs article recommendation based on the trained local user-article interaction model. The problem of unbalanced data distribution can be relieved, and meanwhile the risk of user privacy disclosure is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent recommendation technology, and in particular to a privacy-preserving recommendation method based on graph federated learning. Background Art

[0002] The core goal of recommendation systems is to provide users with personalized recommendations by analyzing their behavioral data and preferences. However, traditional recommendation systems typically rely on centralized data storage and model training. With the introduction of data privacy regulations such as the General Data Protection Regulation (GDPR) and increasing user demand for privacy protection, traditional recommendation systems are facing severe challenges.

[0003] Federated learning, a new distributed machine learning technology, effectively protects user privacy by training models on local user data and uploading only model parameters or gradients, rather than the user's original data. The introduction of federated learning technology provides a new solution for the development of recommendation systems, namely federated recommendation systems. However, existing federated recommendation methods still face numerous challenges, such as modeling high-level interaction information, handling uneven data distribution, and balancing security and performance. Summary of the Invention

[0004] In light of the shortcomings of existing technologies, this paper provides a privacy-preserving recommendation method based on graph federated learning. This method efficiently models high-level interactions between users and items, alleviating the problem of uneven data distribution while also integrating privacy-preserving techniques to improve security and performance.

[0005] The technical means adopted in the present invention are as follows.

[0006] A privacy-preserving recommendation method based on graph federated learning is applied to a federated recommendation system, wherein the federated recommendation system includes a server and several clients; the method includes the following steps: randomly selected clients respectively receive model parameter information of an initial global user-item interaction model broadcast by the server, wherein the model parameter information includes an item embedding matrix and weight parameters of a learnable graph neural network, wherein the weight parameters of the learnable graph neural network include user weight parameters and item weight parameters; the client constructs a local user-item interaction graph based on user local interaction data, wherein the local user-item interaction graph uses users and items as nodes and interaction scores between users and items as edges; initializes a local user embedding matrix; the client updates the model parameter information of the local user-item interaction model based on the model parameter information of the global user-item interaction model, and trains the local user-item interaction model based on the local user-item interaction graph, optimizes the local weight parameters, the local user embedding matrix and the local item embedding matrix of the local user-item interaction model through the BPR loss function, and gradient descents the local weight parameters of the local user-item interaction model. The server uploads the gradient of the local weight parameter and the local item embedding matrix to the server. Before uploading the gradient of the item embedding matrix to the server, the client also clips the gradient of the item embedding matrix and adds a random noise vector to the clipped gradient of the item embedding matrix. The server aggregates the gradient of the local weight parameter and the gradient of the local item embedding matrix uploaded by each client, and updates the item embedding matrix based on the aggregated gradient of the item embedding matrix. The server performs K-means clustering on the updated item embedding matrix, and probabilistically samples the items in each cluster based on the distance from the cluster center, thereby generating a sampled item set. The client receives the sampled item set sent by the server and expands the local user-item interaction graph based on the items in the sampled item set. The client performs multi-task joint training based on self-supervised learning on the local user-item interaction model based on the expanded user-item interaction graph. The multi-task joint training includes: constructing a contrastive loss function, reducing the output distance between the current local model and the global model, and increasing the output distance between the current local model and the previous global model; and recommending items based on the trained local user-item interaction model.

[0007] Furthermore, the user embedding matrix and the item embedding matrix are calculated as follows:

[0008]

[0009] in, is the u-th row of the user embedding matrix P, representing the embedding vector of user u, is the i-th row of the item embedding matrix Q, representing the i-th row of the item embedding matrix Q, representing the node degree of a user, representing the node degree of an item, representing the learnable weight parameter of user u for the local user-item interaction model, representing the learnable weight parameter of item i for the local user-item interaction model, representing the set of items that interact with user u, representing the set of users that interact with item i.

[0010] Further, the BPR loss function is:

[0011] wherein, representing the interaction score of user u and item i predicted based on the user-item interaction model, representing the interaction score of user u and item j predicted by the user-item interaction model, representing the weight parameter of the learnable graph neural network, (u, i) represents a positive example generated from real interaction data, a non-interaction item j is randomly selected as a negative example, and R represents real interaction data.

[0012] Further, the server receives the local item embedding matrix gradient and the local weight parameter gradient uploaded by each client, and aggregates according to the following formula:

[0013]

[0014]

[0015] wherein, the aggregation function is the average of all client gradients, , representing the aggregated item embedding matrix gradient and model weight parameter gradient, representing the item embedding matrix gradient uploaded by client c, representing the model weight parameter gradient uploaded by client c, and C represents the number of clients uploading the item embedding matrix gradient and the model weight parameter gradient.

[0016] The server updates the item embedding matrix and the weight parameter of the global user-item interaction model by the following formula using the aggregated gradient:

[0017]

[0018] wherein, denotes a learning rate, denotes an item embedding matrix of the global user-item interaction model in the current t-th round of training, denotes a weight parameter of the global user-item interaction model in the current t-th round of training, used to guide the client in the next round of training.

[0019] The server distributes the updated item embedding matrix and weight parameter of the global user-item interaction model in the t-th round of training to the client as the initialization parameter of the next round of training.

[0020] Further, the client performs multi-task joint training of the local user-item interaction model based on self-supervised learning based on the expanded user-item interaction graph, including: The client receives the aggregated item embedding matrix and weight parameter of the global user-item interaction model from the server, and updates the model weight information of the local user-item interaction model.

[0021] The client trains the updated local user-item interaction model based on the expanded user-item interaction graph, and constructs a training loss function, the goal of the training loss function being to reduce the distance between the output of the current local user-item interaction model and the output of the global user-item interaction model, and to increase the distance between the output of the current local user-item interaction model and the output of the global user-item interaction model in the last round, the training loss function being:

[0022] wherein, is a contrastive loss, calculated according to the following formula:

[0023] wherein, denotes the output of the global user-item interaction model in the current t-th round of training, denotes the output of the local user-item interaction model in the current t-th round of training, denotes the output of the global user-item interaction model in the t-1-th round of training, denotes a similarity function, denotes a scaling parameter for controlling the similarity.

[0024] Further, before uploading the item embedding matrix gradient to the server side, the client also performs clipping processing on the item embedding matrix gradient, and adds a random noise vector to the clipped item embedding matrix gradient to realize secure gradient updating.

[0025] Compared with the prior art, the present application has the following advantages.

[0026] Since the user's original data is always retained locally, this application, combined with the federated learning framework, meets strict data privacy protection requirements (such as the General Data Protection Regulation (GDPR)) and is suitable for privacy-sensitive scenarios.

[0027] This application overcomes the limitation of existing federated recommendation systems in obtaining global interaction information under decentralized conditions through high-order interaction modeling, and significantly improves the prediction accuracy of the recommendation system.

[0028] This application uses a model comparison optimization method to make the performance of the local model close to the capabilities of the global model, further alleviating the recommendation bias caused by non-independent and identically distributed (Non-IID) data.

[0029] This application uses adaptive gradient clipping and noise injection methods to minimize the impact of introducing privacy mechanisms on model performance while ensuring user privacy protection, ensuring a balance between recommendation performance and security.

[0030] In summary, this paper innovatively combines high-order interaction modeling, self-supervised learning, and privacy-preserving technologies to propose a high-performance, privacy-safe federated recommendation method. Compared to existing technologies, this paper not only effectively improves the prediction accuracy and generalization capabilities of recommendation systems, but also achieves higher security in terms of privacy protection, providing a new solution for the development of federated recommendation technology. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0032] Figure 1 This is the overall model architecture of a privacy-preserving recommendation method based on graph federated learning in an embodiment of the present invention.

[0033] Figure 2 This is a model diagram of a federated graph recommendation model based on high-order interactive relationships in an embodiment of the present invention.

[0034] Figure 3 This is a parameter exchange sequence diagram between the server and the client in an embodiment of the present invention.

[0035] Figure 4 This is a diagram of a multi-task joint learning framework based on self-supervised learning in an embodiment of the present invention. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0037] like Figure 1 As shown, the embodiment of the present application provides a privacy protection recommendation method based on graph federated learning, such as Figure 2 The figure shows a federated graph recommendation model system based on high-order interactive relationships constructed in an embodiment of the present application. The system architecture includes a server and several clients, which are connected to the server. By combining graph structure information with a federated learning framework, high-order interactive information between users and items is captured while protecting user privacy. Specifically, the method of the present application mainly includes the following steps.

[0038] (1) Initialize the model parameter information of the global user-item interaction model on the server side { , },in is the item embedding matrix, M is the number of items, D is the dimension of the embedding vector in the matrix, The model parameter information is broadcast to c randomly selected clients. As a preferred implementation of this application, GNN is used as the graph neural network in this embodiment. The learnable weight parameters of GNN are represented by the graph convolution layer weight matrix W, which specifically includes the user weight parameters and item weight parameters .

[0039] (2) Constructing the initial user-item interaction graph: On the client (such as the user’s device), based on the user’s local data (such as click, browse, purchase records, etc.) to build a user-item interaction graph G, where users and items As nodes, interaction scores between users and items as edges; the user embedding matrix is ​​represented as , N is the number of users. The user embedding matrix is ​​initialized by each client and saved locally.

[0040] (3) Client uses graph neural network model Model the interaction between nodes in the local user-item interaction graph G and calculate the interaction score between user u and item i. In each layer, by aggregating users The neighbor nodes of item i (such as items that users have interacted with) and the neighbor nodes of item i (such as users related to items) are used to generate a new embedding matrix representation. The elements in the user embedding matrix are and item embedding matrix elements The calculation formula is as follows.

[0041]

[0042]

[0043] in, Represents the embedding vector of user u, which is the u-th row of the user embedding matrix P, Represents the embedding vector of a single item i, which is the i-th row of the item embedding matrix Q, Represents the node degree of the user, represents the node degree of the item, represents the learnable weight parameter of user u in the local user-item interaction model, represents the learnable weight parameter of item i in the local user-item interaction model, represents the set of items that user u interacts with, Represents the set of users who interact with item i. (4) The client uses local data and adopts the BPR loss function to train the model. The loss function is defined as follows.

[0044]

[0045] in, represents the predicted interaction score between user u and item i, and , Represents the predicted interaction score between user u and item j, Represents the weight parameters of the learnable graph neural network, (u,i) represents the positive examples generated from the real interaction data {R}, and randomly selects the non-interacted item j as the negative example. The gradient of the model parameters and the user-item embedding matrix is ​​calculated through the loss function, and the gradient of the item embedding matrix generated by client c is and the gradient of the model parameters It is further uploaded to the server for aggregation, and the user's own features are saved locally.

[0046] (5) The server receives item gradients uploaded by multiple clients and the gradient of the model parameters , and aggregated according to the following formula.

[0047]

[0048] Specifically, the aggregation function is the average of all client gradients.

[0049]

[0050]

[0051] in, 、 represents the aggregated item embedding matrix gradient and model weight parameter gradient, represents the gradient of the item embedding matrix uploaded by client c, represents the model weight parameter gradient uploaded by client c, and C represents the number of clients that upload item embedding matrix gradients and model weight parameter gradients.

[0052] The server uses the aggregated gradients to update the item embedding matrix and global model weights of the global user-item interaction model.

[0053]

[0054]

[0055] in, represents the learning rate, represents the item embedding matrix of the global user-item interaction model trained in the current tth round, Represents the weight parameters of the global user-item interaction model in the current t-th round of training, which is used to guide the client's next round of training.

[0056] The server distributes the updated item embedding matrix and weight parameters of the global user-item interaction model in round t to the client as the initialization parameters for the next round of training.

[0057] (6) The server uses the K-means algorithm to cluster all item embedding matrices and find the global cluster center. Each item's embedding matrix is ​​assigned to a specific cluster based on its distance from the cluster center. Items in the same cluster are considered to have similar features. For example, a cluster may correspond to a specific category of goods (such as "electronics" or "clothing").

[0058] (7) Within each cluster, items are sampled with a preset probability. The sampling results are used to capture the diversity within the cluster while reducing the communication overhead. The closer the item is to the cluster center, the higher the sampling probability.

[0059] (8) The server sends the sampled item set S to the client. The sampled items contain feature information of other clients, helping the client to indirectly obtain high-order interaction relationships.

[0060] (9) The client receives the sampled item set sent by the server and adds these items to the user's local user-item interaction graph. The local user-item interaction graph can be expanded to include high-order neighbors (i.e., items with which users interact indirectly, such as items purchased by the user's friends or similar items liked by other users) to enhance the user's high-order interaction modeling capabilities.

[0061] Based on the expanded user interaction graph, the client uses a graph neural network to update the local user matrix and item embedding matrix; calculates the user's interaction score for the candidate items based on the updated user embedding matrix P and item embedding matrix Q, and selects the k items with the highest scores as the recommendation results.

[0062] The order of parameter exchange between the server and the client is as follows Figure 3 shown.

[0063] In order to enhance the collaborative learning ability between the local model and the global model, as a preferred embodiment of the present application, this embodiment adopts a method combining self-supervised learning with multi-task joint learning to train the model, and its framework diagram is as follows: Figure 4 shown.

[0064] First, a lightweight optimization objective is introduced in the local training stage to reduce the distance between the representations learned by the local model and the global model.

[0065] Secondly, the client receives the global model weights from the server and updates the local model weights, expressing the output of the global user-item interaction model trained in the current round t as , after the local user-item interaction model is trained, the local model output is expressed as , the output of the global user-item interaction model at the last round t-1 is expressed as The loss function aims to reduce the distance between the current local model and the global model, and increase the distance between the current local model and the global model of the previous round. The model comparison loss is defined as follows.

[0066]

[0067] in, represents the similarity function, Represents the scaling parameter that controls the similarity.

[0068] Ultimately, the loss function of the local model is composed of the BPR loss and model contrast loss in supervised learning. The final loss function is defined as follows.

[0069] .

[0070] To address the issue of potential exposure of user privacy during gradient upload, this embodiment proposes adaptive gradient clipping based on differential privacy as a preferred embodiment of the present application. During each round of training, the local gradient vector is clipped and a random noise vector is added to it to achieve privacy protection. Specifically, assuming that in the tth round of training, the item gradient of client c is represented as , follow the norm Clipping is performed to limit the gradient size to no more than a certain threshold .

[0071]

[0072] The clipped gradient Add Laplacian noise vector Get the final privacy gradient.

[0073]

[0074] in is a parameter used to control the noise level.

[0075] This application proposes to clip the local gradient vector during each round of training and add a random noise vector to it to achieve privacy protection.

[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A privacy-preserving recommendation method based on graph federated learning, characterized in that: Applied to a federated recommendation system, the federated recommendation system includes a server and several clients; the method includes the following steps: The randomly selected clients each receive model parameter information of the initial global user-item interaction model broadcast by the server. The model parameter information includes the item embedding matrix and the weight parameters of the learnable graph neural network. The weight parameters of the learnable graph neural network include user weight parameters and item weight parameters. The client constructs a local user-item interaction graph based on the user's local interaction data, wherein the local user-item interaction graph uses users and items as nodes and interaction scores between users and items as edges; and initializes a local user embedding matrix; The client updates the model parameter information of the local user-item interaction model based on the model parameter information of the global user-item interaction model, trains the local user-item interaction model based on the local user-item interaction graph, optimizes the local weight parameters, local user embedding matrix, and local item embedding matrix of the local user-item interaction model through the BPR loss function, and uploads the gradients of the local weight parameters of the local user-item interaction model and the gradients of the local item embedding matrix to the server. Before uploading the item embedding matrix gradient to the server, the client also clips the item embedding matrix gradient and adds a random noise vector to the clipped item embedding matrix gradient; The server aggregates the gradients of the local weight parameters and the local item embedding matrix uploaded by each client, and updates the item embedding matrix based on the aggregated item embedding matrix gradients; The server performs K-means clustering on the updated item embedding matrix, and probabilistically samples items in each cluster based on their distance from the cluster center, thereby generating a set of sampled items; The client receives the sampled item set sent by the server, and expands a local user-item interaction graph based on the items in the sampled item set; The client performs multi-task joint training based on self-supervised learning on the local user-item interaction model based on the expanded user-item interaction graph. The multi-task joint training includes: constructing a contrast loss function to reduce the output distance between the current local model and the global model, and to increase the output distance between the current local model and the previous global model; and performing item recommendations based on the trained local user-item interaction model.

2. A privacy-preserving recommendation method based on graph federated learning according to claim 1, characterized in that: The calculation method of the user embedding matrix and the item embedding matrix is: in, is the u-th row of the user embedding matrix P, representing the embedding vector of user u, is the i-th row of the item embedding matrix Q, represents the i-th row of the item embedding matrix Q, Represents the node degree of the user, represents the node degree of the item, represents the learnable weight parameter of user u in the local user-item interaction model, represents the learnable weight parameter of item i in the local user-item interaction model, represents the set of items that user u interacts with, Represents the set of users who interact with item i.

3. A privacy-preserving recommendation method based on graph federated learning according to claim 1, characterized in that: The BPR loss function is: in, represents the interaction score between user u and item i predicted by the user-item interaction model, represents the interaction score between user u and item j predicted by the user-item interaction model, represents the weight parameters of the learnable graph neural network, (u,i) represents the positive examples generated from the real interaction data, the non-interacted item j is randomly selected as the negative example, and R represents the real interaction data.

4. A privacy-preserving recommendation method based on graph federated learning according to claim 3, characterized in that: The server receives the local object embedding matrix gradients and local weight parameter gradients uploaded by each client and aggregates them according to the following formula: Among them, the aggregation function is the average of all client gradients, , represents the aggregated item embedding matrix gradient and model weight parameter gradient, represents the gradient of the item embedding matrix uploaded by client c, represents the model weight parameter gradient uploaded by client c, and C represents the number of clients that uploaded the item embedding matrix gradient and model weight parameter gradient; The server uses the aggregated gradients to update the item embedding matrix and weight parameters of the global user-item interaction model using the following formula: in, represents the learning rate, represents the item embedding matrix of the global user-item interaction model trained in the current tth round, Represents the weight parameters of the global user-item interaction model in the current t-th round of training, which is used to guide the client's next round of training; The server distributes the updated item embedding matrix and weight parameters of the global user-item interaction model in round t to the client as the initialization parameters for the next round of training.

5. A privacy-preserving recommendation method based on graph federated learning according to claim 4, characterized in that: The client performs multi-task joint training based on self-supervised learning on the local user-item interaction model based on the expanded user-item interaction graph, including: The client receives the aggregated item embedding matrix and weight parameters of the global user-item interaction model from the server and updates the model weight information of the local user-item interaction model. The client trains the updated local user-item interaction model based on the expanded user-item interaction graph and constructs a training loss function. The goal of the training loss function is to reduce the distance between the current local user-item interaction model output and the global user-item interaction model output, and to increase the distance between the current local user-item interaction model output and the previous round of global user-item interaction model output. The training loss function is: in, is the contrast loss, calculated according to the following formula: in, represents the global user-item interaction model output of the current t-th round of training, represents the output of the local user-item interaction model trained in the current t-th round, represents the global user-item interaction model output at t-1, represents the similarity function, Represents the scaling parameter that controls the similarity.

Citation Information

Patent Citations

  • Social collaborative filtering recommendation method based on federal learning

    CN114510652A

  • Recommendation method and system based on federal map neural network

    CN118503550A

Cited By

  • Disturbance-based graph federated learning privacy protection method, system and equipment

    CN121543126A

  • A privacy-preserving method, system, and device for perturbation-based graph federated learning

    CN121543126B