Sub-graph federated learning method based on supervised comparative learning and graph encoder
By employing supervised contrastive learning and subgraph federated learning methods based on graph encoders, the problem of global model performance limitations caused by data heterogeneity is solved, thereby improving the model's feature representation and classification efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-03-13
AI Technical Summary
Existing subgraph federated learning methods struggle to effectively enhance minority class feature representations and mine high-quality subgraph information when faced with data heterogeneity, resulting in limited global model performance.
We employ supervised contrastive learning and graph encoders to guide model updates by calculating global category reliability information, and use a graph generator to construct pseudographs for knowledge distillation to optimize the global model.
It effectively addresses data heterogeneity, enhances the model's feature representation capabilities, improves data identification and classification efficiency, and strengthens the global model's cross-subgraph generalization ability.
Smart Images

Figure CN121660031A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically to a subgraph federation learning method based on supervised contrastive learning and graph encoder. Background Technology
[0002] With the development of information technology, graph data (such as social networks, financial transaction networks, and medical infographics) is widely used in various fields. Graph neural networks (GNNs) have demonstrated outstanding performance in graph data analysis due to their ability to model graph structures and node features. However, in real-world scenarios, data is scattered across different institutions (such as branch offices of social media platforms in different regions or transaction systems of different banks). Each institution only holds a local subgraph of the global graph, and data privacy and security requirements are strict. Traditional centralized GNN training carries the risk of privacy leaks.
[0003] Subgraph federated learning, as a distributed machine learning paradigm, addresses privacy issues by sharing model parameters rather than raw data, but it faces the challenge of data heterogeneity: different client subgraphs have different data preferences (such as the differences in sample distribution and topology between the "popular music user subgraph" and the "unpopular instrument user subgraph" in social networks), which leads to the global model being biased towards the majority class samples, insufficient representation of minority class features, and poor generalization ability across subgraphs.
[0004] Existing methods include FedAvg, which aggregates the global model by averaging local parameters, ignoring data heterogeneity; FedPUB, which personalizes aggregation based on subgraph similarity; FedProto, which introduces prototype learning to regulate local training; and FedGTA, which improves aggregation through mixture moments, but none of these methods mine reliable local knowledge on the client side. FedTAD transfers local knowledge through pseudographs and knowledge distillation, but it cannot solve the problems of insufficient feature representation for minority class samples and high-quality subgraph information mining, thus limiting the performance of the global model. Therefore, there is an urgent need for a subgraph federated learning scheme that can strengthen minority class features and mine high-quality subgraph information. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes a subgraph federated learning method based on supervised contrastive learning and a graph encoder. The aim is to enhance the model's feature representation capabilities through supervised contrastive learning and to promote the construction of pseudographs by the server through the graph encoder to mine high-quality subgraph information and facilitate global model optimization, thereby overcoming the impact of data heterogeneity and improving data identification and classification efficiency.
[0006] The technical solution proposed in this invention is as follows:
[0007] A subgraph federation learning method based on supervised contrastive learning and graph encoder is characterized by the following steps:
[0008] Step 1: Clients participating in federated learning connect to the network and jointly establish a central server. The central server stores the parameters of the graph neural network model, the graph generator model, and the global graph neural network model.
[0009] Step 2: The client calculates local category reliability information based on the local graph data and uploads it to the server.
[0010] Step 3: The server receives the local category reliability information from the client, obtains the global category reliability information, and sends it to the client.
[0011] Step 4: The client downloads the current graph neural network model, global model parameters, and global category reliability information to build its own decoder model;
[0012] Step 5: The client uses a local graph neural network model as an encoder, performs data augmentation through feature masks, and strengthens the model's feature representation ability by using supervised contrastive learning, thereby improving the feature representation ability of minority class samples.
[0013] Step 6: The client uses global category reliability information as a guide to jointly decode the subgraph information containing high-quality category information and transmits its own model parameters to the server.
[0014] Step 7: The server aggregates the global model and constructs a pseudo-graph based on the received subgraph information with high-quality category information through the graph generator. The graph generator is optimized by using global category reliability information as a guide to minimize the cross-entropy loss of the local models from each client on the pseudo-graph and maximize the prediction gap between the global model and the local models from each client on the pseudo-graph.
[0015] Step 8: The server uses an optimized graph generator to construct a pseudo-graph. Using global category reliability information as guidance, the global model is optimized on the pseudo-graph by minimizing the prediction gap between the global model and the local models from each client through knowledge distillation. The optimized global model parameters are then broadcast to the clients.
[0016] Step 9: The client receives the new global model parameters and updates the local graph neural network model parameters, calculates the accuracy, and iteratively updates.
[0017] Step 10: Once the accuracy of all client models has reached the set requirements, perform detection and classification on the data, and output the classified samples.
[0018] According to a further improvement of the present invention, the graph generator model in step 1 is a private server-side model and does not participate in federated aggregation.
[0019] According to a further improvement of the present invention, step 2 specifically comprises:
[0020] S2.1, Obtain the topology vector: Based on the random walk transition matrix, extract the autoregressive probabilities of different hop counts of the marked nodes and concatenate them into a topology vector; wherein, the random walk transition matrix is obtained from the adjacency matrix and the degree matrix;
[0021] S2.2, Obtain the hybrid vector: Generate a topology-aware hybrid vector, which is to concatenate the original features of the node with the topology vector to obtain a hybrid vector that contains both feature and topology information;
[0022] S2.3, Calculate similarity: Calculate the mean similarity of a single labeled node to its neighbors, that is, for each labeled node, calculate the cosine similarity of its mixed vector with its neighbors, and take the average of all neighbor similarities;
[0023] S2.4, Calculate category reliability information: Summing to obtain category reliability information, that is, summing the average neighbor similarity of all labeled nodes under a certain category, the result is the knowledge reliability information of that category;
[0024] S2.5, Transmit local category reliability information to the server: The client uploads the local category reliability information of all its categories to the server.
[0025] According to a further improvement of the present invention, step 3 specifically comprises:
[0026] S3.1, Accumulation: For each category, the server accumulates the local reliability of all uploading clients;
[0027] S3.2 Calculate global category reliability information: Divide the category reliability information corresponding to each category of the client by the cumulative result. This ratio is the global category reliability information.
[0028] According to a further improvement of the present invention, the decoder in step 4 is a client-private model and does not participate in federated aggregation.
[0029] According to a further improvement of the present invention, step 5 specifically comprises:
[0030] S5.1, Feature Mask Data Enhancement: Randomly mask the original features of nodes to generate an enhanced feature mask map;
[0031] S5.2, Extracting Graph Vectors: Use a graph encoder to extract the node vectors of the original graph and the enhanced graph respectively;
[0032] S5.3, Construct positive and negative sample pairs: Based on the node label, set samples with the same label but not themselves as positive samples, and samples with different labels as negative samples;
[0033] S5.4, Calculate the contrast loss: Calculate the sample vector similarity based on cosine similarity, and calculate the average supervised contrast loss for all samples;
[0034] S5.5, Optimize Feature Representation: By minimizing the loss, the vectors of samples of the same class are made closer and those of different classes are made farther apart, thereby enhancing the model's feature discrimination ability and alleviating the problem of insufficient representation of minority class samples.
[0035] According to a further improvement of the present invention, step 6 specifically comprises:
[0036] S6.1 Decoder-assisted optimization of encoding: The encoder generates a low-dimensional encoding vector, and the decoder outputs a reconstructed vector. By minimizing the MSE loss between the original features and the reconstructed vector, the encoding vector retains high-quality category information while preventing privacy leakage.
[0037] S6.2, Initial screening of correctly predicted nodes: After each round of communication, nodes whose model prediction results are consistent with the true labels are selected;
[0038] S6.3, Determine the number of nodes to be screened based on global reliability information: Multiply the global category reliability information of each category by the number of successful predictions to calculate the number of nodes to be screened for each category;
[0039] S6.4, Select high-confidence node encoding: From each category, select the node encoding vector with the highest prediction confidence;
[0040] S6.5, Transmit Encoding to Server: Send the selected high-quality encoded vectors to the server.
[0041] According to a further improvement of the present invention, step 7 specifically comprises:
[0042] S7.1, Receiving Data and Aggregating the Initial Global Model: The server receives high-quality node encoding vectors and local model information transmitted by each client, and aggregates them based on the local model information to obtain new global model parameters;
[0043] S7.2, Graph Generator Mapping Encoded Vectors: The graph generator is trained to map the high-quality encoded vector matrix transmitted by the client to the original node feature dimension, providing a feature basis for constructing the pseudo-graph;
[0044] S7.3, k-nearest neighbors construct the adjacency matrix of the pseudograph: The k-nearest neighbor algorithm is used to calculate the association between the feature vectors after mapping, determine the connection relationship between nodes, generate the adjacency matrix of the pseudograph, and combine it with the mapped feature vectors to form a complete pseudograph;
[0045] S7.4, Global Category Reliability Weighted Loss Optimizer: Using global category reliability information as weight coefficients, it calculates and minimizes the cross-entropy loss of the local models from each client on the pseudo-graph, and calculates and maximizes the prediction gap between the global model and the local models from each client on the pseudo-graph, thereby optimizing the graph generator parameters. This forms adversarial training to ensure the similarity between the pseudo-graph and the real data, and to ensure that the global model has sufficient learning and optimization space on the pseudo-graph.
[0046] According to a further improvement of the present invention, step 8 specifically comprises:
[0047] S8.1 uses an optimized graph generator to construct a pseudograph: the server calls the optimized graph generator to generate a pseudograph;
[0048] S8.2, Data distillation on pseudographs to optimize the global model: Using global category reliability information as weight coefficients, the prediction difference between the global model and each client model on the pseudograph is measured. This difference is minimized through data distillation, which encourages the global model to fully absorb the reliable category knowledge of the clients and completes the optimization of the global model.
[0049] S8.3, Broadcasting Optimized Global Model Parameters: The server broadcasts the optimized global model parameters to all clients participating in training, providing a global parameter basis for the next round of local model updates for the clients.
[0050] According to a further improvement of the present invention, step 9 specifically comprises:
[0051] S9.1, Calculate accuracy: The client inputs the test data into the updated local graph neural network model to obtain the prediction results. By comparing the prediction results with the true labels, the accuracy of the global model is calculated and evaluated, and the model optimization effect is quantified.
[0052] S9.2, Iterative Training: The client continues training, looping through steps 5 to 8.
[0053] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0054] (1) This invention quantifies the data heterogeneity problem encountered in the subgraph federated learning scenario by calculating the reliability information of global category knowledge, thereby accurately guiding the model to update and optimize in a directional manner.
[0055] (2) This invention strengthens the model’s feature representation capability by introducing supervised contrastive learning, bringing semantically similar samples of the same category closer together and pushing different semantically different samples of different categories further apart, thereby optimizing the model’s feature representation capability and effectively addressing the problem that minority class samples are difficult to learn due to interference from majority class samples in subgraph federated learning.
[0056] (3) This invention effectively addresses the problem of mutual interference among models during model aggregation in the subgraph federated learning scenario, which leads to a decrease in the classification ability of the aggregated global model. By mining high-quality subgraph information and realizing the transfer of reliable category knowledge from the local to the global model through knowledge distillation, this invention effectively addresses the problem of mutual interference among models during the model aggregation process in the subgraph federated learning scenario. Attached Figure Description
[0057] Figure 1 is a flowchart of the federated learning process used in the subgraph federated learning method based on supervised contrastive learning and graph encoder of the present invention.
[0058] Figure 2 is a flowchart of the initialization module calculating global category reliability information in a subgraph federated learning method based on supervised contrastive learning and graph encoder according to the present invention.
[0059] Figure 3 is a functional framework diagram of the client in the subgraph federated learning method based on supervised contrastive learning and graph encoder of the present invention.
[0060] Figure 4 is a functional framework diagram of the server side in the subgraph federated learning method based on supervised contrastive learning and graph encoder of the present invention. Detailed Implementation
[0061] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] This invention is a subgraph federation learning method based on supervised contrastive learning and graph encoder; it is divided into an initialization module, a client-side function module, and a server-side function module.
[0063] (1) The initialization module is mainly used to calculate global category reliability information to quantify the data heterogeneity problem in subgraph federated learning, thereby providing guidance for global model optimization and client selection of high-quality encoding vectors.
[0064] (2) The client module uses supervised contrastive learning to enable the local model to learn discriminative category feature representations. While training the local model, the encoder and decoder jointly select encoding vectors with high-quality category information. After the local training rounds are completed, the model parameters and the selected encoding vectors are transmitted to the server.
[0065] (3) The server-side module aggregates the received parameters into the global model and constructs a pseudo-graph using the received encoded vectors. Guided by the global category reliability information, the graph generator is optimized to make the generated pseudo-graph more accurate; then the pseudo-graph is distilled, and the global category reliability information is used as a guide to optimize the global model; after the server-side training is completed, the global model parameters are sent to the client for a new round of iteration.
[0066] After each round of communication in federated learning, the client receives new global model parameters and updates its local graph neural network model parameters, calculates accuracy, and continues to iterate and update. When the accuracy of all client models reaches the set requirements, the data is detected and classified, and the classified samples are output.
[0067] The initialization module, client module, and server module of this invention will be described below:
[0068] 1. Initialize the module:
[0069] It is divided into obtaining global category reliability information and initializing client-server models.
[0070] (1) Obtaining global category reliability information:
[0071] First, the client concatenates the original feature vectors of the nodes. The structure vector obtained from the random walk matrix Obtain the topology-aware vector of the node By combining node features and topology, a more comprehensive reflection of the local structural information of nodes can be achieved. This is crucial for capturing the reliability of node category prediction, as node category prediction depends not only on its features but also on its position in the graph.
[0072] ;
[0073] ;
[0074] Secondly, the similarity of the topology-aware vectors of a node and its neighbors is calculated and summed according to category to obtain the similarity of each category. Category reliability information The data is then sent to the server. By quantifying the similarity between nodes and their neighbors, the reliability of each category in the local subgraph can be evaluated. This evaluation method helps identify which categories have stronger homogeneity in the local subgraph, thus enabling more reliable knowledge transfer.
[0075] Finally, the server normalizes the category reliability information of all clients for all categories by category to obtain global category reliability information. This quantifies each client. Data heterogeneity of the subgraph.
[0076] (2) Client-server model initialization
[0077] Clients participating in federated learning connect to the network and jointly establish a central server. The central server stores the graph neural network model, global graph neural network model parameters, and graph generators that do not participate in federated aggregation. Each client stores its local graph neural network model and decoders that do not participate in federated aggregation.
[0078] 2. Client-side functional modules:
[0079] It is divided into supervised contrastive learning and high-quality category information mining of client subgraphs.
[0080] (1) Supervised comparative learning:
[0081] Compared to unsupervised contrastive learning methods that only focus on the similarity between samples, supervised contrastive learning utilizes label information to bring semantically similar samples of the same category closer together and push samples of different categories with different semantics further apart; this is especially true in subgraph federated learning scenarios where the label distribution of heterogeneous subgraphs is inconsistent. Unsupervised contrastive learning tends to let the features of the majority class dominate the feature space, while the features of the minority class are masked or distorted. Supervised contrastive learning uses labels to clearly define positive and negative sample pairs, ensuring that even if there are few minority class samples, their positive sample pairs can be correctly constructed, and learning independent feature representations enhances discriminativity.
[0082] First, data augmentation is performed using feature masks, and mask probabilities are set. , divide node features into a certain proportion Random masking is used to generate a feature mask-enhanced view of the original subimage, as follows:
[0083] ;
[0084] Then, the client-side native model acts as an encoder to extract vector representations from the original view and the enhanced view. and The method is as follows:
[0085] ;
[0086] ;
[0087] Then, supervised contrast loss is used. To optimize and make similar samples more similar, the following methods can be used:
[0088] ;
[0089] ;
[0090] ;
[0091] (2) High-quality category information mining of client subgraphs
[0092] By mining high-quality category information from the client-side subgraph, reliable knowledge can be transferred from the client to the server, thus providing a foundation for the construction of the server-side pseudograph and promoting subsequent optimization of the global model on the pseudograph by the server.
[0093] First, the initial features and adjacency matrix are input into the encoder to obtain the encoded vector.
[0094] ;
[0095] Then, the encoded vector is input into the decoder to obtain the decoded vector, as follows:
[0096] ;
[0097] Then, use mean square error The difference between the initial features and the decoded vector is calculated. Reducing the loss difference forces the encoder to generate encoded vectors that contain as much of the original information as possible. The method is as follows:
[0098] ;
[0099] After each round of communication, each client performs node-level prediction. For each category... The client identifies the nodes that make the correct predictions and selects the one with the highest confidence level. 1 instance. Then the encoding vector matrix of these selected nodes. and the corresponding tag matrix Transmitted to the server. Guided by global category reliability information, the quality of filtered data is guaranteed. Client Category of The calculation is as follows:
[0100] ;
[0101] (3) Optimization of the final loss of the client training module: ;
[0102] in, Cross-entropy loss is used to optimize the classification performance of the client-side model.
[0103] 3. Server-side functional modules:
[0104] The process is divided into graph generator optimization and global model optimization. The goal of the graph generator is to maximize the difference in predictions between the client's local model and the global model on the pseudograph to provide the global model with a larger learning space. The goal of the global model is to minimize this difference. The two form adversarial training and promote each other.
[0105] (1) Graph generator optimization:
[0106] The server-side uses a fixed-train graph generator to map the received high-quality category information from various clients back to the original feature dimensions and then utilizes it. The nearest neighbor algorithm constructs an adjacency matrix to build a pseudograph. :
[0107] ;
[0108] ;
[0109] To ensure maximum similarity between the pseudo-graph and the real data, the client-side model's cross-entropy loss on the pseudo-graph is weighted by global category reliability information to obtain a semantic loss, which is used to optimize the graph generator.
[0110] ;
[0111] To enable the global model to absorb more reliable knowledge from the pseudograph, the pseudograph generated by the graph generator needs to have a larger learning space. We use KL divergence, a measure of the difference between the predictions of the local and global models on the pseudograph in knowledge distillation, as the divergence loss. We then use global category reliability information to weight and optimize the graph generator, thus ensuring that the global model has more learning space on the pseudograph.
[0112] ;
[0113] Final loss optimization for graph generator: ;
[0114] (2) Global model optimization:
[0115] After the graph generator is optimized, global category reliability information is used for weighting, and divergence loss is used to perform knowledge distillation on the pseudograph generated by the graph generator to optimize the global model.
[0116] .
[0117] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A subgraph federated learning method based on supervised contrastive learning and graph encoder, characterized in that, Includes the following steps: Step 1: Clients participating in federated learning connect to the network and jointly establish a central server. The central server stores the parameters of the graph neural network model, the graph generator model, and the global graph neural network model. Step 2: The client calculates local category reliability information based on the local graph data and uploads it to the server. Step 3: The server receives the local category reliability information from the client, obtains the global category reliability information, and sends it to the client. Step 4: The client downloads the current graph neural network model, global model parameters, and global category reliability information to build its own decoder model; Step 5: The client uses a local graph neural network model as an encoder, performs data augmentation through feature masks, and strengthens the model's feature representation ability by using supervised contrastive learning, thereby improving the feature representation ability of minority class samples. Step 6: The client uses global category reliability information as a guide to jointly decode the subgraph information containing high-quality category information and transmits its own model parameters to the server. Step 7: The server aggregates the global model and constructs a pseudo-graph based on the received subgraph information with high-quality category information through the graph generator. The graph generator is optimized by using global category reliability information as a guide to minimize the cross-entropy loss of the local models from each client on the pseudo-graph and maximize the prediction gap between the global model and the local models from each client on the pseudo-graph. Step 8: The server uses an optimized graph generator to construct a pseudo-graph. Using global category reliability information as guidance, the global model is optimized on the pseudo-graph by minimizing the prediction gap between the global model and the local models from each client through knowledge distillation. The optimized global model parameters are then broadcast to the clients. Step 9: The client receives the new global model parameters and updates the local graph neural network model parameters, calculates the accuracy, and iteratively updates. Step 10: Once the accuracy of all client models has reached the set requirements, perform detection and classification on the data, and output the classified samples.
2. The subgraph federation learning method based on supervised contrastive learning and graph encoder according to claim 1, characterized in that, The graph generator model in step 1 is a private server-side model and does not participate in federated aggregation.
3. The subgraph federated learning method based on supervised contrastive learning and graph encoder according to claim 1, characterized in that, Step 2 specifically involves: S2.1, Obtain the topology vector: Based on the random walk transition matrix, extract the autoregressive probabilities of different hop counts of the marked nodes and concatenate them into a topology vector; wherein, the random walk transition matrix is obtained from the adjacency matrix and the degree matrix; S2.2, Obtain the hybrid vector: Generate a topology-aware hybrid vector, which is to concatenate the original features of the node with the topology vector to obtain a hybrid vector that contains both feature and topology information; S2.3, Calculate similarity: Calculate the mean similarity of a single labeled node to its neighbors, that is, for each labeled node, calculate the cosine similarity of its mixed vector with its neighbors, and take the average of all neighbor similarities; S2.4, Calculate category reliability information: Summing to obtain category reliability information, that is, summing the average neighbor similarity of all labeled nodes under a certain category, the result is the knowledge reliability information of that category; S2.5, Transmit local category reliability information to the server: The client uploads the local category reliability information of all its categories to the server.
4. The subgraph federation learning method based on supervised contrastive learning and graph encoder according to claim 1, characterized in that, Step 3 specifically involves: S3.1, Accumulation: For each category, the server accumulates the local reliability of all uploading clients; S3.2 Calculate global category reliability information: Divide the category reliability information corresponding to each category of the client by the cumulative result. This ratio is the global category reliability information.
5. The subgraph federated learning method based on supervised contrastive learning and graph encoder according to claim 1, characterized in that, The decoder in step 4 is a client-private model and does not participate in federated aggregation.
6. The subgraph federated learning method based on supervised contrastive learning and graph encoder according to claim 1, characterized in that, Step 5 specifically involves: S5.1, Feature Mask Data Enhancement: Randomly mask the original features of nodes to generate an enhanced feature mask map; S5.2, Extracting Graph Vectors: Use a graph encoder to extract the node vectors of the original graph and the enhanced graph respectively; S5.3, Construct positive and negative sample pairs: Based on the node label, set samples with the same label but not themselves as positive samples, and samples with different labels as negative samples; S5.4, Calculate the contrast loss: Calculate the sample vector similarity based on cosine similarity, and calculate the average supervised contrast loss for all samples; S5.5, Optimize Feature Representation: By minimizing the loss, the vectors of samples of the same class are made closer and those of different classes are made farther apart, thereby enhancing the model's feature discrimination ability and alleviating the problem of insufficient representation of minority class samples.
7. The subgraph federated learning method based on supervised contrastive learning and graph encoder according to claim 1, characterized in that, Step 6 specifically involves: S6.1 Decoder-assisted optimization of encoding: The encoder generates a low-dimensional encoding vector, and the decoder outputs a reconstructed vector. By minimizing the MSE loss between the original features and the reconstructed vector, the encoding vector retains high-quality category information while preventing privacy leakage. S6.2, Initial screening of correctly predicted nodes: After each round of communication, nodes whose model prediction results are consistent with the true labels are selected; S6.3, Determine the number of nodes to be screened based on global reliability information: Multiply the global category reliability information of each category by the number of successful predictions to calculate the number of nodes to be screened for each category; S6.4, Select high-confidence node encoding: From each category, select the node encoding vector with the highest prediction confidence; S6.5, Transmit Encoding to Server: Send the selected high-quality encoded vectors to the server.
8. The subgraph federated learning method based on supervised contrastive learning and graph encoder according to claim 1, characterized in that, Step 7 specifically involves: S7.1, Receiving Data and Aggregating the Initial Global Model: The server receives high-quality node encoding vectors and local model information transmitted by each client, and aggregates them based on the local model information to obtain new global model parameters; S7.2, Graph Generator Mapping Encoded Vectors: Train the graph generator to map the high-quality encoded vector matrix transmitted by the client to the original node feature dimension, providing a feature basis for constructing the pseudo-graph; S7.3, k-nearest neighbors construct the adjacency matrix of the pseudograph: The k-nearest neighbor algorithm is used to calculate the association between the feature vectors after mapping, determine the connection relationship between nodes, generate the adjacency matrix of the pseudograph, and combine it with the mapped feature vectors to form a complete pseudograph; S7.4, Global Category Reliability Weighted Loss Optimizer: Using global category reliability information as weight coefficients, it calculates and minimizes the cross-entropy loss of the local models from each client on the pseudo-graph, and calculates and maximizes the prediction gap between the global model and the local models from each client on the pseudo-graph, thereby optimizing the graph generator parameters. This forms adversarial training to ensure the similarity between the pseudo-graph and the real data, and to ensure that the global model has sufficient learning and optimization space on the pseudo-graph.
9. A subgraph federated learning method based on supervised contrastive learning and graph encoder according to claim 1, characterized in that, Step 8 specifically involves: S8.1 uses an optimized graph generator to construct a pseudograph: the server calls the optimized graph generator to generate a pseudograph; S8.2, Data distillation on pseudographs to optimize the global model: Using global category reliability information as weight coefficients, the prediction difference between the global model and each client model on the pseudograph is measured. This difference is minimized through data distillation, which encourages the global model to fully absorb the reliable category knowledge of the clients and completes the optimization of the global model. S8.3, Broadcasting Optimized Global Model Parameters: The server broadcasts the optimized global model parameters to all clients participating in training, providing a global parameter basis for the next round of local model updates for the clients.
10. A subgraph federated learning method based on supervised contrastive learning and graph encoder according to claim 1, characterized in that, Step 9 specifically involves: S9.1, Calculate accuracy: The client inputs the test data into the updated local graph neural network model to obtain the prediction results. By comparing the prediction results with the true labels, the accuracy of the global model is calculated and evaluated, and the model optimization effect is quantified. S9.2, Iterative Training: The client continues training, looping through steps 5 to 8.