Federal learning method

By performing clustering and diffusion model processing on client sample data to generate sample data distribution, the problems of heterogeneous data distribution and high communication costs in federated learning are solved, achieving efficient and secure model training and communication, and improving the model's generalization performance and privacy protection.

CN121745340APending Publication Date: 2026-03-27WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing federated learning technologies face bottlenecks in dealing with heterogeneous data distribution, high communication costs, and privacy protection, making it difficult to achieve efficient and secure model training and communication in multi-party data sharing.

Method used

By clustering client sample data into multiple clusters, and generating sample data distribution based on forward and backward diffusion of the diffusion model, a data distribution-level communication mechanism is realized. The client only uploads the sample data distribution rather than the original data, and the server generates and distributes the global sample data distribution.

Benefits of technology

It significantly improves communication efficiency, reduces communication volume, enhances the generalization performance and fairness of the model, ensures data privacy, and achieves stable model convergence in heterogeneous data environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745340A_ABST
    Figure CN121745340A_ABST
Patent Text Reader

Abstract

The invention discloses a federated learning method, a federated learning system and a medium, relates to the technical field of federated learning, and is used for improving convergence efficiency of model training and communication efficiency among multi-terminal equipment. The method comprises the following steps: clustering sample data by a client, and dividing the sample data into a plurality of clusters; the sample data is private sample data of the client; obtaining a plurality of sample data distributions corresponding to the sample data based on the plurality of clusters; the multiple pieces of sample data are distributed and uploaded to a server; the client receives global sample data distribution sent by the server; the global sample data distribution is obtained based on a plurality of sample data distributions of each client; the client generates synthetic sample data based on the global sample data distribution; and performing model training according to the synthetic sample data and the sample data to obtain a global model. By means of the method, only one-time communication is needed between the client and the server, and the convergence efficiency of model training and the communication efficiency among the multi-terminal devices are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of federated learning technology, and more particularly to a federated learning methodology. Background Technology

[0002] In practical applications of artificial intelligence and deep learning models, federated learning has become an important technical approach to solving the problem of centralized data sharing among multiple parties. Its core idea is that data holders, such as hospitals, banks, and mobile devices, can collaboratively build a global model through local training and parameter aggregation without uploading the original data. However, existing federated learning technologies still face technical bottlenecks in real-world scenarios.

[0003] Data heterogeneity leads to decreased model performance. Data from different clients often comes from diverse sources and has significantly different distributions, such as differences in case types within medical institutions or differences in behavioral characteristics among mobile users. This "entanglement" of data distributions can cause inconsistent update directions in local models, making it difficult for the global model to converge or leading to performance degradation.

[0004] High communication costs and low training efficiency are problems. Traditional federated averaging (FedAvg) or its improved algorithms require multiple rounds of communication to converge, typically hundreds of rounds. Each round requires uploading complete model parameters or gradients, resulting in high communication costs and time overhead. In large-scale heterogeneous networks, communication efficiency has become a core bottleneck restricting the application of federated learning.

[0005] Deployment is limited in high-privacy scenarios such as healthcare and finance. Due to frequent communication, high risk of privacy leakage, and high algorithm complexity, existing federated learning solutions face difficulties in being widely adopted in fields with strict privacy requirements, such as multi-hospital joint diagnosis and cross-bank risk control modeling, lacking efficient, secure, and theoretically explainable solutions.

[0006] Therefore, how to provide a federated learning method to improve the convergence efficiency of model training and the communication efficiency between multiple devices is an urgent technical problem to be solved. Summary of the Invention

[0007] This application provides a federated learning method, system, and medium for improving the convergence efficiency of model training and the communication efficiency between multiple devices.

[0008] In a first aspect, this application provides a federated learning method applied to a system having multiple clients and servers, the method comprising: The client clusters the sample data, dividing it into multiple clusters; the sample data is private to the client; based on the multiple clusters, multiple sample data distributions corresponding to the sample data are obtained; and the multiple sample data distributions are uploaded to the server. The client receives the global sample data distribution sent by the server; the global sample data distribution is obtained based on multiple sample data distributions from each client. The client generates synthetic sample data based on the global sample data distribution; and performs model training based on the synthetic sample data and the sample data to obtain a global model.

[0009] Through the above process, the client clusters its private sample data, dividing it into multiple clusters; based on these clusters, it obtains multiple sample data distributions corresponding to the sample data; and uploads these distributions to the server. This achieves the learning of the distribution characteristics of multiple sample data while ensuring sample data privacy, and completes interaction with the server in a single communication, significantly improving communication efficiency. The client receives a global sample data distribution from the server, derived from the distributions of multiple sample data from each client. Based on this global distribution, it can securely and comprehensively generate synthetic sample data; and train the model using the synthetic and sample data to obtain a global model. This allows the client to retrain the model using the statistical features of multiple data sources without sharing the original sample data, improving the model's generalization performance and fairness, and increasing its convergence efficiency.

[0010] Optionally, obtaining the multiple sample data distributions corresponding to the sample data based on the multiple clusters includes: For any one of the multiple clusters, the client obtains the sample data distribution corresponding to the cluster based on forward diffusion of the diffusion model; Based on the global sample data distribution, synthetic sample data is generated, including: The client processes the global sample data distribution through back diffusion of the diffusion model to obtain synthetic sample data.

[0011] Through the above process, for any cluster, the client obtains the sample data distribution corresponding to the cluster through forward diffusion based on the diffusion model, and processes the global sample data distribution through backward diffusion of the diffusion model to obtain synthetic sample data. A data distribution-level communication and reconstruction mechanism based on the diffusion model is proposed. Each client transmits sample data distributions corresponding to multiple clusters, enabling the server to obtain the sample data distribution characteristics of multiple clients and obtain the global sample data distribution, which is then sent to the clients. The client processes the global sample data distribution to obtain synthetic sample data from multiple clients, fundamentally breaking through the constraints of traditional federated learning in terms of communication efficiency, model performance, and privacy protection.

[0012] Optionally, the client obtains the sample data distribution corresponding to the cluster based on forward diffusion of the diffusion model, including: The client uses forward diffusion based on a diffusion model and text inversion technology to obtain the sample data distribution corresponding to the cluster through learnable embedding vectors and fixed text encoding.

[0013] Based on the forward extension of the diffusion model, this paper employs text inversion technology to obtain the sample data distribution corresponding to clusters through learnable embedding vectors and fixed text encoding. This allows clients to retrain the model using statistical features from multiple sources without sharing the original data, thereby improving the model's generalization performance and fairness. This lays the technical foundation for the shift from "model parameter transmission" to "distributed semantic collaboration," providing a new paradigm for efficient, secure, and scalable federated learning.

[0014] Optionally, before uploading the plurality of sample data distributions to the server, the method further includes: The sample data distribution is cropped and / or Gaussian noise is added to any of the multiple sample data distributions to obtain the processed sample data distribution. The step of uploading the multiple sample data to the server includes: The processed sample data is then distributed and uploaded to the server.

[0015] By performing the above cropping process and / or adding Gaussian noise perturbation, a privacy-processed sample data distribution is obtained. The processed sample data distributions are then uploaded to the server, so that the server or other clients cannot reconstruct the original sample data based on the sample data distribution, thereby further improving the security of the sample data of each client.

[0016] Optionally, before the client clusters the sample data and divides the sample data into multiple clusters, the method further includes: The client inputs sample data into a pre-trained encoder to obtain the latent spatial information of the sample data; The client performs clustering on the sample data, dividing the sample data into multiple clusters, including: The client performs clustering on the latent spatial information of the sample data, dividing the latent spatial information of the sample data into multiple clusters.

[0017] Through the above process, the distributed decoupling mechanism of this application can effectively alleviate the performance degradation problem caused by heterogeneous data in terms of model performance and robustness. By clustering and decomposing the underlying spatial information of local sample data, a set including multiple sample data distributions is obtained. The algorithm can capture complementary information between clients, enabling the global model to converge stably in heterogeneous data environments.

[0018] Optionally, the global sample data distribution includes a shared sample data distribution and an orthogonal sample data distribution; the shared sample data distribution is obtained based on similar sample data distributions, while the orthogonal sample data distribution does not have similar sample data distributions.

[0019] Therefore, each client can learn the data distribution characteristics of each client based on the received global sample data distribution. For similar sample data distributions, it only needs to learn the characteristics of the shared sample data distribution. While ensuring the comprehensiveness of the global sample data distribution characteristics, the amount of global sample data distribution is reduced, which further improves the data distribution transmission efficiency and the model training efficiency of each client.

[0020] Secondly, this application provides another federated learning method, applied to a system with multiple clients and servers, the method comprising: The server receives multiple sample data distributions sent by each client; the multiple sample data distributions of any client are obtained from sample data in multiple clusters of the client, wherein the multiple clusters are obtained by the client by clustering private sample data; The server obtains a global sample data distribution based on the multiple sample data distributions of each client; and sends the global sample data distribution to each client.

[0021] Optionally, obtaining the global sample data distribution based on the multiple sample data distributions of each client includes: The server determines similar sample data distribution groups and orthogonal sample data distributions that do not have similar sample data distributions based on the similarity between the multiple sample data distributions sent by each client. For each group of similar sample data distributions, at least one shared sample data distribution is determined; the shared sample data distribution characterizes the distribution of each sample data in the group of similar sample data distributions. The shared sample data distribution and the orthogonal sample data distribution are used as the global sample data distribution.

[0022] Optionally, determining the similar sample data distribution group based on the similarity between the distributions of multiple sample data sent by each client includes: For the plurality of sample data distributions, the server determines at least two sample data distributions whose distance between them meets a preset condition as similar sample data distribution pairs; The similar sample data distribution pairs are allocated with minimum cost to obtain at least one similar sample data distribution group.

[0023] Optionally, for each group of similar sample data distributions, at least one shared sample data distribution is determined, including: For any group of similar sample data distributions, based on the amount of data in each sample data distribution in the group, at least one sample data distribution whose data amount satisfies a preset condition is determined as a shared sample data distribution.

[0024] Thirdly, this application provides a federated learning system, which includes multiple clients and servers; The client is used to cluster the sample data, dividing the sample data into multiple clusters; the sample data is private to the client; based on the multiple clusters, multiple sample data distributions corresponding to the sample data are obtained; and the multiple sample data distributions are uploaded to the server. Receive the global sample data distribution sent by the server; the global sample data distribution is obtained based on multiple sample data distributions from each client; Based on the global sample data distribution, synthetic sample data is generated; model training is performed based on the synthetic sample data and the sample data to obtain a global model.

[0025] Optionally, the client is specifically used to obtain the sample data distribution corresponding to any one of the plurality of clusters based on forward diffusion of the diffusion model; and to process the global sample data distribution through backward diffusion of the diffusion model to obtain synthetic sample data.

[0026] Optionally, the client is specifically used for forward diffusion based on a diffusion model, employing text inversion technology to obtain the sample data distribution corresponding to the cluster through learnable embedding vectors and fixed text encoding.

[0027] Optionally, the client is specifically used to perform cropping processing on any of the multiple sample data distributions, and / or to add Gaussian noise perturbation processing to obtain a processed sample data distribution; and to upload the processed multiple sample data distributions to the server.

[0028] Optionally, the client is specifically used to input sample data into a pre-trained encoder to obtain the latent spatial information of the sample data; and to cluster the latent spatial information of the sample data into multiple clusters.

[0029] Optionally, the global sample data distribution includes a shared sample data distribution and an orthogonal sample data distribution; the shared sample data distribution is obtained based on similar sample data distributions, while the orthogonal sample data distribution does not have similar sample data distributions.

[0030] Optionally, the server is configured to receive multiple sample data distributions sent by each client; the multiple sample data distributions of any client are obtained from sample data in multiple clusters of the client, wherein the multiple clusters are obtained by the client clustering private sample data; a global sample data distribution is obtained based on the multiple sample data distributions of each client; and the global sample data distribution is sent to each client.

[0031] Optionally, the server is specifically configured to determine similar sample data distribution groups and orthogonal sample data distributions that do not have similar sample data distributions based on the similarity between multiple sample data distributions sent by each client; for each similar sample data distribution group, determine at least one shared sample data distribution; the shared sample data distribution represents each sample data distribution in the similar sample data distribution group; and use the shared sample data distribution and the orthogonal sample data distribution as the global sample data distribution.

[0032] Optionally, the server is specifically configured to, for the plurality of sample data distributions, determine at least two sample data distributions whose distance between them satisfies a preset condition as similar sample data distribution pairs; and perform minimum cost allocation on the similar sample data distribution pairs to obtain at least one similar sample data distribution group.

[0033] Optionally, the server is specifically configured to, for any sample data distribution group, determine at least one sample data distribution whose data volume satisfies a preset condition as a shared sample data distribution based on the data volume of each sample data distribution in the sample data distribution group.

[0034] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in any of the first aspects.

[0035] Fifthly, this application provides a computer program product comprising: computer program code, which, when executed on a computer, causes the computer to perform the steps of any of the methods described in the first aspect.

[0036] These or other implementations of this application will become clearer and easier to understand in the following description of the embodiments. Attached Figure Description

[0037] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0038] Figure 1 A schematic diagram of a federated learning process is provided for some embodiments of this application; Figure 2 A schematic diagram of the client-side federated learning process provided for some embodiments of this application; Figure 3 A schematic diagram of a server-side federated learning process provided for some embodiments of this application; Figure 4 A schematic diagram of another client-side federated learning process provided for some embodiments of this application; Figure 5 Another schematic diagram of a federated learning process is provided for some embodiments of this application; Figure 6 This is a schematic diagram of the structure of a federated learning system provided for some embodiments of this application. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this application clearer, a further detailed description of this application will be provided below with reference to the accompanying drawings. Obviously, the embodiments described in this application are merely some embodiments, not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0040] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0041] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0042] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0043] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0044] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0045] To alleviate the communication and heterogeneity problems in federated learning, academia and industry have proposed various improvement methods, which can be mainly divided into the following categories: Multi-round communication methods based on parameter aggregation are exemplified by the FedAvg algorithm, which significantly reduces the cost per communication by averaging the model after performing multiple rounds of local training on each client. However, when there are significant differences in the distribution of client data, the model gradient directions are highly inconsistent, and FedAvg and its variants struggle to achieve convergence guarantees, still requiring hundreds of rounds of communication to reach acceptable accuracy. Furthermore, these methods transmit a huge number of parameters, demanding high network bandwidth and making them difficult to deploy in cross-regional or mobile environments.

[0046] Optimization schemes based on communication compression and client selection. To reduce communication overhead, some studies have proposed techniques such as parameter quantization, sparsity, and periodic aggregation. For example, FedPAQ reduces the synchronization frequency through periodic quantization aggregation and uses compressed sensing theory to select key gradients for transmission. These methods can improve communication efficiency to some extent, but due to the lack of modeling for differences in client data distribution, their model accuracy still decreases significantly under Non-IID conditions.

[0047] Personalized optimization methods based on constraint regularization. Some studies mitigate model discrepancies between clients by introducing regularization terms into the local loss function. For example, FedProx adds a global model constraint term to the local objective function to suppress divergence; SCAFFOLD uses control variables to correct the local update direction. However, these methods require frequent synchronization of control variables or global parameters, resulting in a relatively large number of communication rounds and limited overall convergence speed.

[0048] One-shot knowledge transfer (FL) methods based on knowledge distillation. To further reduce the number of communication rounds, some methods attempt to achieve single-round or few-round aggregation through knowledge distillation. Among them, FedKT leverages public data for cross-client knowledge transfer, while DENSE and FedLMG achieve data-free knowledge transfer through generative models (such as GANs or diffusion models). However, in non-independent and identically distributed environments, teacher models often exhibit strong biases, and student models struggle to capture minority class information, leading to a significant decrease in global model accuracy. Furthermore, the public data assumption is difficult to uphold in privacy-sensitive scenarios.

[0049] Distribution estimation and reconstruction methods based on generative models. With the development of generative models, researchers have begun to attempt to directly transmit data distributions rather than model parameters. Traditional methods include Gaussian Mixture Models (GMM), Principal Component Analysis (PCA), and sparse dictionary learning; in recent years, Generative Adversarial Networks (GANs) and diffusion models have been used to learn complex data distributions. However, existing work is mostly conducted in centralized environments, lacking distribution coordination and privacy protection mechanisms within a federated learning framework.

[0050] In summary, existing technologies have significant shortcomings in balancing data distribution heterogeneity, communication overhead, and privacy protection, and there is still a lack of a unified solution that can simultaneously achieve high communication efficiency, high model accuracy, and strong privacy protection.

[0051] In view of the problems existing in the background technology, this application provides a federated learning method, system and medium to improve the convergence efficiency of model training and the communication efficiency between multiple devices.

[0052] The following is a detailed description of the proposed solution in conjunction with the accompanying drawings.

[0053] Figure 1 This is a schematic diagram of a federated learning process provided for some embodiments of this application. For example... Figure 1 As shown, the specific steps include: S101: The client clusters the sample data, dividing the sample data into multiple clusters; the sample data is private sample data of the client; multiple sample data distributions corresponding to the sample data are obtained based on the multiple clusters; the multiple sample data distributions are uploaded to the server.

[0054] The method in this application embodiment is applied to a system with multiple clients and servers. For example, the client can be a mobile phone, PC, or other device.

[0055] Because data from different clients often comes from diverse sources and has significantly different distributions—for example, differences in case types within medical institutions or differences in behavioral characteristics among mobile users—this "entanglement" of data distribution can lead to inconsistent update directions for local models, causing the global model to struggle to converge or experience performance degradation.

[0056] To address the issue of model performance degradation caused by heterogeneous data distribution on the client side and to improve data security, in this embodiment of the application, any client can perform distributed decoupling of its local private sample data.

[0057] For example, Figure 2 This is a schematic diagram of the client-side federated learning process provided for some embodiments of this application. For example... Figure 2 As shown, the client performs data distribution decoupling of privacy data locally, completes the extraction of privacy data and its distribution, and uploads the distribution. That is, it extracts the sample data distribution of locally stored private sample data and uploads multiple sample data distributions to the server.

[0058] Optionally, the client can cluster its local private sample data, dividing it into multiple clusters. For each cluster, the client obtains the sample data distribution corresponding to that cluster's sample data and uploads these distributions to the server.

[0059] For example, sample data may include various types of data such as user consumption behavior data, image pixel feature data, and signal data collected by sensors. Clustering algorithms, such as K-Means and DBSCAN, are used to group this sample data, grouping samples with similar features into one category; each category is called a "cluster." The final result is that the originally chaotic sample data is divided into multiple clusters, with very similar data features within each cluster, but significant differences in features between clusters.

[0060] Optionally, the client can perform K-means clustering on its local private sample data, dividing the samples into... Cluster For each cluster, optionally, the client can use a pre-trained latent space diffusion model to learn the data distribution embedding, and use the data distribution embedding as the sample data distribution for each cluster, thereby obtaining a candidate set of basic distributions including multiple sample data distributions. Through this process, each client obtains several independent sub-distributions, completing the "data distribution decoupling" stage. It should be noted that the above is only one method for clustering and obtaining sample data distributions provided by an embodiment of this application. Other methods for clustering and obtaining sample data distributions can also be used, and this application does not limit them.

[0061] Through the above process, the client can effectively identify "complementary" or "independent" sample data distributions and upload multiple sample data distributions to the server, protecting the privacy of local private sample data. Furthermore, uploading multiple sample data distributions at once improves the generalization ability of the global model and communication efficiency.

[0062] Federated learning methods in related technologies generally use parameters or gradients as transmission objects, resulting in frequent communication, huge bandwidth consumption, and difficulty in convergence under highly heterogeneous data distribution. This application introduces the concept of "data distribution decoupling" into the federated learning framework for the first time and proposes a communication mechanism based on the data distribution level, fundamentally breaking through the constraints of communication efficiency, model performance, and privacy protection in traditional federated learning.

[0063] S102: The client receives the global sample data distribution sent by the server; the global sample data distribution is obtained based on multiple sample data distributions of each client.

[0064] To improve model convergence and communication efficiency, the client can receive the global sample data distribution sent by the server, thereby obtaining the sample data distributions of multiple other clients for subsequent model training.

[0065] Optionally, this global sample data distribution can be obtained by the server based on multiple sample data distributions from each client. For example, such as... Figure 2 As shown, the server receives multiple sample data distributions sent by each client, performs active data distribution alignment, and obtains a global sample data distribution corresponding to the multiple sample data distributions. For example, the global sample data distribution can be obtained by concatenating multiple sample data distributions. The distribution is then distributed, meaning the server sends the global sample data distribution to each client.

[0066] This application remodels the data relationships between multiple clients from the perspective of sample data distribution. It decomposes the complex global data distribution into several basic distribution units, namely multiple sample data distributions, and realizes a structured sample data distribution representation through clustering and distribution embedding learning. This enables the server to complete global modeling with only one aggregation of sample data distributions, which significantly improves communication efficiency and training stability.

[0067] S103: The client generates synthetic sample data based on the global sample data distribution; and performs model training based on the synthetic sample data and the sample data to obtain a global model.

[0068] Based on the global sample data distribution, the client can reverse-generate synthetic sample data, and then train the model using the synthetic sample data and local private sample data to obtain the global model.

[0069] In one possible implementation, such as Figure 2 As shown, the client generates data based on the global data distribution issued by the server, that is, it generates synthetic sample data based on the global sample data distribution, and uses the generated data together with local private privacy data for local training.

[0070] In one possible implementation, the client can utilize a locally trained diffusion model, inputting global sample data distribution into the diffusion model to obtain synthetic sample data. This synthetic sample data is then merged with locally trained private sample data, performing a localization process for model training.

[0071] Optionally, the client can use the following formula to synthesize the sample data. With local private data Merge and perform a local optimization:

[0072] By training local downstream task models This minimizes the loss value of downstream tasks, resulting in a better sample data set. Among these, Input the sample data. Labels for the sample data. For model parameters, For the sample data of the kth client, This refers to the generated synthetic sample data.

[0073] Once all clients have completed their training independently, they will obtain the global model without any further communication.

[0074] Compared to existing federated learning methods, this application offers significant advantages in communication efficiency, model performance, privacy protection, and theoretical interpretability. Firstly, regarding communication efficiency, this application introduces a sample data distribution to replace traditional model gradient or parameter transmission, completely eliminating the reliance on multiple rounds of communication and achieving true "one-time communication" federated learning. Each client only needs to upload a small amount of sample data distribution to complete global aggregation, with communication volume only one-thousandth to one-ten-thousandth of that of traditional methods. Theoretically, this application establishes a mathematical definition and convergence theorem for the entanglement coefficient ξ, proving that when the data distributions of each client satisfy the approximate decoupling condition, a single round of interaction can achieve optimal performance equivalent to centralized training with high probability, thus achieving a balance between efficiency and accuracy.

[0075] Through the above process, the client clusters its private sample data, dividing it into multiple clusters; based on these clusters, it obtains multiple sample data distributions corresponding to the sample data; and uploads these distributions to the server. This achieves the learning of the distribution characteristics of multiple sample data while ensuring sample data privacy, and completes interaction with the server in a single communication, significantly improving communication efficiency. The client receives a global sample data distribution from the server, derived from the distributions of multiple sample data from each client. Based on this global distribution, it can securely and comprehensively generate synthetic sample data; and train the model using the synthetic and sample data to obtain a global model. This allows the client to retrain the model using the statistical features of multiple data sources without sharing the original sample data, improving the model's generalization performance and fairness, and increasing its convergence efficiency.

[0076] Optionally, before the client clusters the sample data and divides the sample data into multiple clusters, the method further includes: The client inputs sample data into a pre-trained encoder to obtain the latent spatial information of the sample data; The client performs clustering on the sample data, dividing the sample data into multiple clusters, including: The client performs clustering on the latent spatial information of the sample data, dividing the latent spatial information of the sample data into multiple clusters.

[0077] To learn the feature information of various types of sample data and accurately obtain the sample data distribution for each type, thereby improving model training efficiency and accuracy, optionally, the client can input the sample data into a pre-trained encoder before clustering to obtain the latent spatial information of the sample data. Optionally, the latent spatial information represents the feature information of the sample data.

[0078] For example, in one possible implementation, each client k will store its locally private sample data. Input to a pre-trained autoencoder. In this process, the latent spatial information of the sample data is obtained:

[0079] Where z represents the sample data. The representation in the latent space is the latent space information, where i is the cluster to which the sample data belongs.

[0080] Optionally, a fixed pre-trained encoder CLIP can be used, which does not require parameter tuning, further improving the efficiency of the client in obtaining the sample data distribution of local private sample data.

[0081] To accurately cluster the client's local private sample data, the client can optionally cluster the latent spatial information of the sample data, thereby accurately dividing the latent spatial information of the sample data into multiple clusters.

[0082] In one possible implementation, the latent space is represented... Perform K-means clustering to divide the samples into Cluster The candidate set of the fundamental distribution of the sample data, i.e., the set of sample data distributions, can be represented as: ,in For the first Cluster centers. The overall approach minimizes the distance from the latent spatial information of each sample data point to each cluster center.

[0083] Through this process, each client can obtain several independent sub-distributions, completing the "data distribution decoupling" stage.

[0084] Through the above process, the distributed decoupling mechanism of this application can effectively alleviate the performance degradation problem caused by heterogeneous data in terms of model performance and robustness. By clustering and decomposing the underlying spatial information of local sample data, a set including multiple sample data distributions is obtained. The algorithm can capture complementary information between clients, enabling the global model to converge stably in heterogeneous data environments.

[0085] Optionally, obtaining the multiple sample data distributions corresponding to the sample data based on the multiple clusters includes: For any one of the multiple clusters, the client obtains the sample data distribution corresponding to the cluster based on forward diffusion of the diffusion model.

[0086] In order to accurately obtain the sample data distribution of the client's local private sample data, in one possible implementation, the client can perform forward diffusion based on a diffusion model on any one of the multiple clusters obtained by clustering the sample data to obtain the sample data distribution corresponding to that cluster.

[0087] For example, forward diffusion based on a diffusion model can be a process of gradually adding noise. That is, for each cluster of sample data, small random noise is added step by step in a regular manner. Through the forward diffusion process, the original data distribution pattern of this cluster can be inferred.

[0088] Because the forward process of the diffusion model is designed based on probability distribution, the distribution of sample data in the feature space of this cluster can be calculated by recording the changes in sample data at each step during the gradual addition of noise. This distribution could be Gaussian, uniform, or other complex distributions, thus obtaining the sample data distribution of each cluster.

[0089] By adding noise, the characteristic distribution pattern of the cluster can be deduced, thereby obtaining the sample data distribution of the cluster.

[0090] Optionally, utilizing distributed embeddings as the probabilistic description of the underlying distribution, i.e., the sample data distribution, not only provides a clear mathematical explanation for the algorithm but also offers good visualization and controllability, making the model behavior more transparent. At the implementation level, the algorithm in this application is compatible with mainstream deep learning frameworks and can be directly deployed on GPU clusters or cloud-edge collaborative architectures, making it suitable for industry applications in healthcare, finance, and manufacturing that require high privacy and efficient collaboration. It achieves a balance and breakthrough in efficiency, privacy, and performance, providing a new technical direction and theoretical foundation for the next-generation architecture of federated learning.

[0091] Optionally, based on the global sample data distribution, synthetic sample data is generated, including: The client processes the global sample data distribution through back diffusion of the diffusion model to obtain synthetic sample data.

[0092] To ensure the security of private sample data on each client, and to enable any client to obtain the sample data distribution characteristics of multiple clients, the client can use a diffusion model to perform back diffusion, process the global sample data distribution, and obtain synthetic sample data.

[0093] In one possible implementation, the server distributes a unified global sample data distribution v to all clients, ensuring that the synthetic sample data generated by all clients conforms to the characteristics of the global sample data. This avoids bias in the synthetic samples caused by insufficient data volume or biased distribution from individual clients. Each client can then utilize a locally pre-trained diffusion model to perform back-diffusion to generate a synthetic sample set that includes the synthetic sample data.

[0094] Optionally, the client inputs "global sample data distribution v", and through the "stepwise denoising" process of backdiffusion, a synthetic sample dataset with the same features as the real samples is generated. This makes up for the insufficient amount of local real samples and protects data privacy. That is, each client does not need to upload real sample data, but can use the generated synthetic sample data for model training.

[0095] For example, synthetic sample data can be generated using the following formula:

[0096] in, For the j-th synthetic sample data generated, G is the decoder of the diffusion model, i.e. the back diffusion generation function of the diffusion model; The random noise input can be regarded as the "seed" for the diffusion model to generate samples, and is the key to generating diverse samples. Indicates noise It follows a standard normal distribution; This represents a normal distribution with a mean of 0 and a covariance of the identity matrix I. The semicolon represents the conditional input parameter for the generation function. It is the core parameter that controls the features of the synthesized samples and determines what kind of samples are generated. These are typically local parameters or local distribution features of the local model, such as the cluster distribution of the client itself, or the parameters trained on the model. Global sample data distribution for server distribution The first in The class distribution corresponds to the distribution pattern of a certain class of samples at the global level, ensuring that the synthesized samples conform to the global characteristics.

[0097] Optionally, for any cluster, the client obtains the sample data distribution corresponding to the cluster through forward diffusion based on the diffusion model, and processes the global sample data distribution through backward diffusion of the diffusion model to obtain synthetic sample data. This proposes a data distribution-level communication and reconstruction mechanism based on the diffusion model. Each client transmits sample data distributions corresponding to multiple clusters, enabling the server to obtain the sample data distribution characteristics of multiple clients and obtain the global sample data distribution, which is then sent to the clients. The client processes the global sample data distribution to obtain synthetic sample data from multiple clients, fundamentally breaking through the constraints of traditional federated learning in terms of communication efficiency, model performance, and privacy protection.

[0098] Optionally, the client obtains the sample data distribution corresponding to the cluster based on forward diffusion of the diffusion model, including: The client uses forward diffusion based on a diffusion model and text inversion technology to obtain the sample data distribution corresponding to the cluster through learnable embedding vectors and fixed text encoding.

[0099] To obtain a more accurate and reasonable distribution of sample data, the client can optionally use forward diffusion based on a diffusion model to gradually and systematically add noise to samples in any cluster obtained from clustering, such as "user behavior data clusters of a certain type of product" or "feature clusters of a certain type of image," transitioning from the original sample state to a completely random noise state. The core purpose of this process is to capture the distribution change pattern of samples in the feature space, but simple forward diffusion only focuses on data features and lacks semantic constraints. Then, text inversion technology is used to bind the "features of the data cluster" and the "text describing this cluster," establishing a mapping relationship between the two. Learnable embedding vectors and fixed text encoding are the two key inputs to text inversion technology; these two are concatenated and participate in the distribution calculation of forward diffusion. The fixed text encoding refers to the text describing the semantics of the cluster, represented by a fixed vector generated by a pre-trained text encoder (such as a CLIP encoder). This vector is a "general semantic feature" that will not change during training, ensuring the stability of the text description. The learnable embedding vector is a vector that can be adjusted through training. Because fixed text encoding may not accurately match the detailed features of data clusters (for example, "red sneakers" may have different shoe styles and materials), this learnable vector will be continuously optimized during training to supplement the shortcomings of fixed encoding, making the binding between text semantics and data cluster features more accurate. Ultimately, the distribution of sample data corresponding to the cluster is obtained.

[0100] For example, for each distribution cluster The client uses a pre-trained diffusion model to learn the distribution embedding of the latent spatial information of the sample data. This refers to the sample data distribution corresponding to each distribution cluster. A text inversion technique is used to transform a learnable embedding vector... With fixed text encoding In combination, minimizing the noise prediction error, i.e., minimizing the distance between the original sample data and the data generated by the diffusion model, optimizes the distribution embedding. For example, the distribution of sample data can be represented by the following formula:

[0101] in, For the spread model noise prediction network, z represents the latent spatial information of the sample data. Let be the noise injection intensity in step t. It is Gaussian noise. For generation conditions, such as For text encoding conditions, It is a learnable embedding vector.

[0102] The client performs forward diffusion for a specific data cluster to capture changes in data distribution. Then, it introduces text inversion technology, using "fixed text encoding (general semantics) and learnable embedding vectors (detailed features)" to constrain the forward diffusion process, ultimately obtaining the cluster sample data distribution with clear text semantic labels.

[0103] The above scheme addresses the problems of data distribution entanglement, multiple communication rounds, and high privacy risks in existing federated learning. For the first time, it proposes to use a diffusion model combined with a clustering mechanism to decouple and reconstruct the client data distribution, thereby achieving optimal global model performance with only one communication round, both theoretically and experimentally.

[0104] Furthermore, the distributed reconstruction process in this application is based on a unified generative model for synthetic sample expansion, enabling clients to retrain using the statistical features of multi-party data without sharing the original data, thereby improving the model's generalization performance and fairness. Compared to existing "one-time communication" methods that rely on public data or knowledge distillation, this invention does not require public auxiliary data, avoiding external data bias problems, while achieving a significant balance between privacy protection and model performance. In summary, the FedDistr method proposed in this application has achieved substantial breakthroughs in communication complexity, theoretical interpretability, and privacy protection strength, laying the technical foundation for the shift from "model parameter transmission" to "distributed semantic collaboration," and providing a new paradigm for efficient, secure, and scalable federated learning.

[0105] Optionally, before uploading the plurality of sample data distributions to the server, the method further includes: The sample data distribution is cropped and / or Gaussian noise is added to any of the multiple sample data distributions to obtain the processed sample data distribution. The step of uploading the multiple sample data to the server includes: The processed sample data is then distributed and uploaded to the server.

[0106] In related technologies, it is difficult to balance privacy protection and efficiency of client-side sample data. For example, existing privacy protection mechanisms, such as differential privacy and homomorphic encryption, while preventing data leakage to some extent, often lead to decreased model accuracy or additional computational burden. Furthermore, when transmitting model gradients or features, some original data information may still be leaked through gradient inversion attacks. Deployment is limited in high-privacy scenarios such as healthcare and finance. Due to frequent communication, high risk of privacy leakage, and high algorithm complexity, existing federated learning schemes face difficulties in being widely adopted in privacy-critical domains, such as multi-hospital collaborative diagnosis and cross-bank risk control modeling, lacking efficient, secure, and theoretically interpretable solutions.

[0107] To prevent privacy leaks and enhance the security of local sample data on each client, the client can perform privacy-preserving processing on any of the multiple sample data distributions, such as cropping and / or adding Gaussian noise perturbation, to obtain a processed sample data distribution, and then upload the processed multiple sample data distributions to the server.

[0108] Optionally, the client can use the following formula to define the distribution of the sample data, i.e., the distribution embedding. After cropping and applying Gaussian noise perturbation, the processed sample data distribution is obtained:

[0109] in, It is the sample data distribution (distribution embedding) of the latent spatial information of the i-th cluster of sample data from the k-th client. It is the distribution of sample data after cropping and adding noise. These are the parameters that control the cutting process. It is a parameter for controlling noise intensity.

[0110] This privacy mechanism can be viewed as an approximation of differential privacy (DP).

[0111] By performing the above cropping process and / or adding Gaussian noise perturbation, a privacy-processed sample data distribution is obtained. The processed sample data distributions are then uploaded to the server, so that the server or other clients cannot reconstruct the original sample data based on the sample data distribution, thereby further improving the security of the sample data of each client.

[0112] Unlike federated learning methods such as FedAvg, FedProx, or MOON that rely on multi-round model synchronization, this application utilizes a latent space diffusion model to parameterize the local data distribution of each client and obtains low-dimensional distribution embedding vectors through text inversion. These embeddings are uploaded to the server after norm clipping and Gaussian noise perturbation, ensuring that the communication content no longer contains invertible sample or gradient information, thus achieving privacy and security while maintaining efficient communication.

[0113] Regarding privacy protection, this invention only uploads the perturbed sample data distribution, without involving any original sample data, gradients, or invertible feature information. By introducing norm pruning and Gaussian noise during the upload phase, this application naturally satisfies differential privacy constraints, preventing potential gradient inversion and membership inference attacks. Furthermore, because the transmitted data is structured and low-dimensional, attackers find it difficult to reconstruct the original distribution or sample features, thus enhancing the system's resistance to inference from a mechanistic perspective. Compared to highly complex schemes such as homomorphic encryption and multi-party secure computation, the privacy protection mechanism of this application is lightweight, scalable, and adds almost no computational burden, balancing security and practicality.

[0114] Optionally, the global sample data distribution includes a shared sample data distribution and an orthogonal sample data distribution; the shared sample data distribution is obtained based on similar sample data distributions, while the orthogonal sample data distribution does not have similar sample data distributions.

[0115] To improve the communication efficiency and model training efficiency of each client, the global sample data distribution in this application includes a shared sample data distribution and an orthogonal sample data distribution. The shared sample data distribution is based on similar sample data distributions, while the orthogonal sample data distribution does not have similar sample data distributions.

[0116] Optionally, the server can automatically align multiple sample data distributions uploaded by multiple clients, identify similar sample data distributions, select the sample distribution with the largest data volume as the shared sample data distribution for multiple similar sample distributions, obtain orthogonal sample data distributions based on dissimilar sample data distributions, and concatenate the orthogonal sample data distributions and the shared sample data distributions to obtain the global sample data distribution.

[0117] Therefore, each client can learn the data distribution characteristics of each client based on the received global sample data distribution. For similar sample data distributions, it only needs to learn the characteristics of the shared sample data distribution. While ensuring the comprehensiveness of the global sample data distribution characteristics, the amount of global sample data distribution is reduced, which further improves the data distribution transmission efficiency and the model training efficiency of each client.

[0118] Based on the same technical concept, embodiments of this application provide another federated learning method, which is applied to a system with multiple clients and servers. Figure 3 This diagram illustrates a server-side federated learning process for some embodiments of this application. Figure 3 As shown, the method includes the following steps: S301: The server receives multiple sample data distributions sent by each client; the multiple sample data distributions of any client are obtained from sample data in multiple clusters of the client, wherein the multiple clusters are obtained by the client by clustering private sample data; S302: The server obtains a global sample data distribution based on the multiple sample data distributions of each client; and sends the global sample data distribution to each client.

[0119] Optionally, obtaining the global sample data distribution based on the multiple sample data distributions of each client includes: The server determines similar sample data distribution groups and orthogonal sample data distributions that do not have similar sample data distributions based on the similarity between the multiple sample data distributions sent by each client. For each group of similar sample data distributions, at least one shared sample data distribution is determined; the shared sample data distribution characterizes the distribution of each sample data in the group of similar sample data distributions. The shared sample data distribution and the orthogonal sample data distribution are used as the global sample data distribution.

[0120] To improve the communication efficiency and model training efficiency of each client, optionally, the server can determine similar sample data distribution groups and orthogonal sample data distributions that do not have similar sample data distributions based on the similarity between the multiple sample data distributions received from each client.

[0121] For example, similar sample data distributions can form parallel sets: this means that multiple data distributions within them have similar data structures, i.e., multiple clients share similar data structures. Orthogonal sample data distributions can form orthogonal sets: this means that each data distribution within them is completely independent.

[0122] To improve the communication efficiency and model training efficiency of each client, optionally, any sample data distribution in the parallel distribution set can be determined as the shared sample data distribution, and then the shared sample data distribution can be concatenated with the orthogonal sample data distribution to obtain the global sample data distribution.

[0123] The server automatically determines the parallel or orthogonal relationships between different client distributions based on embedded geometric relationships, and performs active distribution alignment through an optimal matching algorithm (Kuhn–Munkres algorithm) to achieve global aggregation at the distribution level. This mechanism enables the algorithm of this application to converge to the optimal solution of centralized training in a single round of communication, the sufficient condition of which is constrained by the "entanglement coefficient" ξ derived in this invention.

[0124] Meanwhile, the server-side proactive distribution alignment strategy can automatically identify the parallel and orthogonal relationships between different clients, ensuring the independence and consistency of different distributions during model aggregation, thereby significantly improving the accuracy of the global model in tasks such as classification and recognition.

[0125] Optionally, determining the similar sample data distribution group based on the similarity between the distributions of multiple sample data sent by each client includes: For the plurality of sample data distributions, the server determines at least two sample data distributions whose distance between them meets a preset condition as similar sample data distribution pairs; The similar sample data distribution pairs are allocated with minimum cost to obtain at least one similar sample data distribution group.

[0126] To accurately determine the similarity between multiple sample data distributions, optionally, the server can identify at least two sample data distributions whose distance between them meets a preset condition as similar sample data distribution pairs; then, the similar sample data distribution pairs are allocated with minimum cost to obtain at least one group of similar sample data distributions.

[0127] In one possible implementation, the server collects a set of distribution embeddings of multiple sample data distributions from all clients. And by calculating the distance matrix Identify similar distributions between different clients. For example, two sample data distributions whose distance matrices satisfy a threshold are identified as similar sample data distribution pairs.

[0128] Alternatively, the matching process of the sample data distribution groups can be formalized as a bipartite graph optimal matching problem, and the Kuhn–Munkres (KM) algorithm can be used for minimum cost allocation.

[0129] in, This represents the matching relationship. Minimum cost represents the minimum distance after matching, which represents the optimal match, thus obtaining a group of similar sample data distributions from multiple sample data distributions.

[0130] Optionally, for each group of similar sample data distributions, at least one shared sample data distribution is determined, including: For any group of similar sample data distributions, based on the amount of data in each sample data distribution in the group, at least one sample data distribution whose amount of data satisfies a preset condition is determined as a shared sample data distribution.

[0131] To improve communication efficiency and model training efficiency among clients, optionally, the server selects the sample data distribution with the largest sample size from each group of similar sample data distributions as the shared sample data distribution. The union of all orthogonal sample data distributions is To form an aggregated distributed parameter set .

[0132] This aggregation operation requires only one communication to obtain the global sample data distribution.

[0133] Therefore, each client can learn the data distribution characteristics of each client based on the received global sample data distribution. For similar sample data distributions, it only needs to learn the characteristics of the shared sample data distribution. While ensuring the comprehensiveness of the global sample data distribution characteristics, the amount of global sample data distribution is reduced, which further improves the data distribution transmission efficiency and the model training efficiency of each client.

[0134] The above describes various implementation methods of federated learning. The following two specific examples illustrate the entire process of the data collection methods described above.

[0135] Figure 4 This is a schematic diagram of another client-side federated learning process provided for some embodiments of this application. For example... Figure 4 As shown, the process includes the following steps: The client targets multiple sample data locally, such as Figure 4 Image data is encoded using a pre-trained encoder, such as the CLIP model, to obtain latent spatial information of the sample data. This latent spatial information is then clustered into multiple clusters, resulting in multiple image subclasses. A multi-layer cross-attention extraction is performed using a denoising network (U-Net), employing forward diffusion based on a diffusion model and text inversion techniques. Through learnable embedding vectors and fixed text encoding, the sample data distribution corresponding to each cluster is obtained. This sample data distribution is then uploaded to a server.

[0136] Figure 5 This is a schematic diagram of another federated learning process provided for some embodiments of this application. For example... Figure 5 As shown, the process mainly consists of the following steps. Figure 5As illustrated, the FedDistr system mainly consists of the following four phases (Phase A–D), and its operational logic is as follows: Phase A: Client-Side Distribution Disentangling.

[0137] For example, the client clusters the sample data, dividing the sample data into multiple clusters.

[0138] Phase B: Distributed Embedding Learning and Private Upload.

[0139] For example, the client obtains multiple sample data distributions corresponding to the sample data based on multiple clusters; and uploads the multiple sample data distributions to the server.

[0140] Phase C: Server-Side Active Distribution Alignment.

[0141] For example, the server receives multiple sample data distributions sent by each client; the multiple sample data distributions of any client are obtained from sample data in multiple clusters of the client, where multiple clusters are obtained by the client clustering private sample data; the server obtains the global sample data distribution based on the multiple sample data distributions of each client; and sends the global sample data distribution to each client.

[0142] Phase D: Client-Side One-Shot Synthesis & Local Training.

[0143] For example, the client generates synthetic sample data based on the global sample data distribution; and trains the model based on the synthetic sample data and the sample data to obtain the global model.

[0144] In view of this, embodiments of this application provide a federated learning method that helps improve the convergence efficiency of model training and the communication efficiency between multiple devices. The method provided in this application can be applied to high-privacy scenarios such as healthcare and finance. It requires only one communication between the client and server, and the communication content is the distribution of sample data, without involving the user privacy corresponding to the sample data. This solves the problems of frequent communication, high risk of privacy leakage, and high algorithm complexity. It can be flexibly used in fields with strict privacy requirements, such as multi-hospital joint diagnosis and cross-bank risk control modeling. It provides an efficient, secure, and theoretically interpretable federated learning scheme, improving user privacy security, communication efficiency between multiple devices, and model training efficiency. This method and the following federated learning systems are based on the same technical concept. Since the principles of the methods and systems in solving problems are similar, the implementation of the systems and methods can be referred to each other, and repeated details will not be repeated.

[0145] Based on the same technical concept, this application provides a federated learning system. For example, Figure 6 This is a schematic diagram of the structure of a federated learning system provided for some embodiments of this application. For example... Figure 6 As shown, the system includes multiple clients and servers.

[0146] The client is used to cluster the sample data, dividing the sample data into multiple clusters; the sample data is private to the client; based on the multiple clusters, multiple sample data distributions corresponding to the sample data are obtained; and the multiple sample data distributions are uploaded to the server. Receive the global sample data distribution sent by the server; the global sample data distribution is obtained based on multiple sample data distributions from each client; Based on the global sample data distribution, synthetic sample data is generated; model training is performed based on the synthetic sample data and the sample data to obtain a global model.

[0147] Optionally, the client is specifically used to obtain the sample data distribution corresponding to any one of the plurality of clusters based on forward diffusion of the diffusion model; and to process the global sample data distribution through backward diffusion of the diffusion model to obtain synthetic sample data.

[0148] Optionally, the client is specifically used for forward diffusion based on a diffusion model, employing text inversion technology to obtain the sample data distribution corresponding to the cluster through learnable embedding vectors and fixed text encoding.

[0149] Optionally, the client is specifically used to perform cropping processing on any of the multiple sample data distributions, and / or to add Gaussian noise perturbation processing to obtain a processed sample data distribution; and to upload the processed multiple sample data distributions to the server.

[0150] Optionally, the client is specifically used to input sample data into a pre-trained encoder to obtain the latent spatial information of the sample data; and to cluster the latent spatial information of the sample data into multiple clusters.

[0151] Optionally, the global sample data distribution includes a shared sample data distribution and an orthogonal sample data distribution; the shared sample data distribution is obtained based on similar sample data distributions, while the orthogonal sample data distribution does not have similar sample data distributions.

[0152] Optionally, the server is configured to receive multiple sample data distributions sent by each client; the multiple sample data distributions of any client are obtained from sample data in multiple clusters of the client, wherein the multiple clusters are obtained by the client clustering private sample data; a global sample data distribution is obtained based on the multiple sample data distributions of each client; and the global sample data distribution is sent to each client.

[0153] Optionally, the server is specifically configured to determine similar sample data distribution groups and orthogonal sample data distributions that do not have similar sample data distributions based on the similarity between multiple sample data distributions sent by each client; for each similar sample data distribution group, determine at least one shared sample data distribution; the shared sample data distribution represents each sample data distribution in the similar sample data distribution group; and use the shared sample data distribution and the orthogonal sample data distribution as the global sample data distribution.

[0154] Optionally, the server is specifically configured to, for the plurality of sample data distributions, determine at least two sample data distributions whose distance between them satisfies a preset condition as similar sample data distribution pairs; and perform minimum cost allocation on the similar sample data distribution pairs to obtain at least one similar sample data distribution group.

[0155] Optionally, the server is specifically configured to, for any group of similar sample data distributions, determine at least one sample data distribution whose data volume satisfies a preset condition as a shared sample data distribution based on the data volume of each sample data distribution in the group of similar sample data distributions.

[0156] Based on the same concept, this application also provides a computer-readable storage medium storing a computer program executable by a processor, which, when run on the processor, causes the processor to execute the steps included in any of the data acquisition methods described in the above embodiments.

[0157] The aforementioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in an electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), optical storage such as CDs, DVDs, BDs, HVDs, etc., and semiconductor storage such as ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs), etc.

[0158] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to perform the steps of any of the data acquisition methods described above. Since the principle by which the above computer program product solves the problem is similar to that of the above data acquisition method, the implementation of the above computer program product can be referred to the implementation of the method, and repeated details will not be described again.

[0159] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0160] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0161] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0162] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0163] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A federated learning method, characterized in that, The method is applied to a system having multiple clients and servers, and the method includes: The client clusters the sample data, dividing it into multiple clusters; the sample data is private to the client; based on the multiple clusters, multiple sample data distributions corresponding to the sample data are obtained; and the multiple sample data distributions are uploaded to the server. The client receives the global sample data distribution sent by the server; the global sample data distribution is obtained based on multiple sample data distributions from each client. The client generates synthetic sample data based on the global sample data distribution; and performs model training based on the synthetic sample data and the sample data to obtain a global model.

2. The method according to claim 1, characterized in that, The process of obtaining the distribution of multiple sample data corresponding to the sample data based on the multiple clusters includes: For any one of the multiple clusters, the client obtains the sample data distribution corresponding to the cluster based on forward diffusion of the diffusion model; Based on the global sample data distribution, synthetic sample data is generated, including: The client processes the global sample data distribution through back diffusion of the diffusion model to obtain synthetic sample data.

3. The method according to claim 2, characterized in that, The client obtains the sample data distribution corresponding to the cluster based on forward diffusion of the diffusion model, including: The client uses forward diffusion based on a diffusion model and text inversion technology to obtain the sample data distribution corresponding to the cluster through learnable embedding vectors and fixed text encoding.

4. The method according to any one of claims 1 to 3, characterized in that, Before uploading the plurality of sample data to the server, the method further includes: The sample data distribution is cropped and / or Gaussian noise is added to any of the multiple sample data distributions to obtain the processed sample data distribution. The step of uploading the multiple sample data to the server includes: The processed sample data is then distributed and uploaded to the server.

5. The method according to any one of claims 1 to 3, characterized in that, Before the client performs clustering on the sample data and divides the sample data into multiple clusters, the method further includes: The client inputs sample data into a pre-trained encoder to obtain the latent spatial information of the sample data; The client performs clustering on the sample data, dividing the sample data into multiple clusters, including: The client performs clustering on the latent spatial information of the sample data, dividing the latent spatial information of the sample data into multiple clusters.

6. The method according to any one of claims 1 to 3, characterized in that, The global sample data distribution includes a shared sample data distribution and an orthogonal sample data distribution; the shared sample data distribution is obtained based on similar sample data distributions, while the orthogonal sample data distribution does not have similar sample data distributions.

7. A federated learning method, characterized in that, The method is applied to a system having multiple clients and servers, and the method includes: The server receives multiple sample data distributions sent by each client; the multiple sample data distributions of any client are obtained from sample data in multiple clusters of the client, wherein the multiple clusters are obtained by the client by clustering private sample data; The server obtains a global sample data distribution based on the multiple sample data distributions of each client; and sends the global sample data distribution to each client.

8. The method according to claim 7, characterized in that, The step of obtaining the global sample data distribution based on the multiple sample data distributions of each client includes: The server determines similar sample data distribution groups and orthogonal sample data distributions that do not have similar sample data distributions based on the similarity between the multiple sample data distributions sent by each client. For each group of similar sample data distributions, at least one shared sample data distribution is determined; the shared sample data distribution characterizes the distribution of each sample data in the group of similar sample data distributions. The shared sample data distribution and the orthogonal sample data distribution are used as the global sample data distribution.

9. The method according to claim 8, characterized in that, The step of determining similar sample data distribution groups based on the similarity between the distributions of multiple sample data sent by each client includes: For the plurality of sample data distributions, the server determines at least two sample data distributions whose distance between them meets a preset condition as similar sample data distribution pairs; The similar sample data distribution pairs are allocated with minimum cost to obtain at least one similar sample data distribution group.

10. The method according to claim 8, characterized in that, For each group of similar sample data distributions, identify at least one shared sample data distribution, including: For any group of similar sample data distributions, based on the amount of data in each sample data distribution in the group, at least one sample data distribution whose amount of data satisfies a preset condition is determined as a shared sample data distribution.