WO2021115480A1 - 联邦学习方法、装置、设备和存储介质 - Google Patents

联邦学习方法、装置、设备和存储介质 Download PDF

Info

Publication number
WO2021115480A1
WO2021115480A1 PCT/CN2020/136112 CN2020136112W WO2021115480A1 WO 2021115480 A1 WO2021115480 A1 WO 2021115480A1 CN 2020136112 W CN2020136112 W CN 2020136112W WO 2021115480 A1 WO2021115480 A1 WO 2021115480A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
federated learning
model
model training
configuration information
Prior art date
Application number
PCT/CN2020/136112
Other languages
English (en)
French (fr)
Inventor
周学立
朱恩东
张茜
凌海挺
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021115480A1 publication Critical patent/WO2021115480A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of machine learning technology, in particular to a federated learning method, device, equipment and storage medium.
  • Federated learning is also known as federated machine learning, joint learning, and federated learning.
  • Federal machine learning is a machine learning framework that can effectively help multiple institutions to perform data usage and machine learning modeling under the requirements of user privacy protection, data security, and government regulations.
  • a federated learning method, device, computer equipment, and storage medium are provided.
  • One method of federated learning includes:
  • the task configuration information is obtained by summarizing the task configuration data received by the client;
  • the task configuration data is the user's target federation Data entered in the learning task;
  • the trained federated learning model is used for the corresponding client to perform business processing on the received user data.
  • a federal learning device includes:
  • the obtaining module is used to obtain task configuration information of at least two clients participating in the target federated learning task; the task configuration information is obtained by summarizing the task configuration data received by the client; the task configuration data is the user Data entered for the target federated learning task;
  • An initialization module configured to initialize the model training configuration information in the target federated learning task according to the task configuration information
  • the execution module is used to execute the model training operation of the target federated learning task based on the initialized model training configuration information
  • the update module is used to send the model update parameters generated during the execution of the model training operation to the corresponding client, so that the client can update the local federated learning model to obtain the training corresponding to each client
  • the federated learning model; the trained federated learning model is used for the corresponding client to perform business processing on the received user data.
  • a computer device including a memory and one or more processors, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
  • the task configuration information is obtained by summarizing the task configuration data received by the client;
  • the task configuration data is the user's target federation Data entered in the learning task;
  • the trained federated learning model is used for the corresponding client to perform business processing on the received user data.
  • One or more computer-readable storage media storing computer-readable instructions.
  • the one or more processors perform the following steps:
  • the task configuration information is obtained by summarizing the task configuration data received by the client;
  • the task configuration data is the user's target federation Data entered in the learning task;
  • the trained federated learning model is used for the corresponding client to perform business processing on the received user data.
  • the above-mentioned federated learning method, device, computer equipment and storage medium obtain task configuration information of at least two clients participating in the target federated learning task; wherein, the task configuration information is summarized based on the task configuration data received by the client Obtained; task configuration data is the data entered by the user for the target federated learning task; and according to the task configuration information, the model training configuration information in the target federated learning task is initialized; finally, the target is executed based on the initialized model training configuration information
  • the model training operation of the federated learning task, and the model update parameters generated when the model training operation is performed are sent to the corresponding client, so that the client can update the local federated learning model according to the model update parameters, and then Obtain a trained federated learning model for the corresponding client to perform business processing on the received user data; in this way, it is possible to automatically complete the model in the target federated learning task based on the task configuration data pre-entered by multiple users
  • the training configuration information is initialized and set for subsequent feder
  • Fig. 1 is an application environment diagram of a federated learning method according to one or more embodiments
  • Figure 2 is a schematic flowchart of a federated learning method according to one or more embodiments
  • Figure 3 is a schematic diagram of a flow of federated learning in another embodiment
  • Figure 4 is a schematic flowchart of a federated learning method in another embodiment
  • Figure 5 is a block diagram of a federated learning device according to one or more embodiments.
  • Figure 6 is a block diagram of a computer device according to one or more embodiments.
  • a federated learning method provided in this application can be applied to the application environment as shown in FIG. 1.
  • the client 110 communicates with the server 120 through the network.
  • the server 120 obtains the task configuration information of at least two clients 110 participating in the target federated learning task; the task configuration information is created by at least two clients based on the target federated learning task; the server 120 responds to the task configuration information according to the task configuration information.
  • the model training configuration information in the target federated learning task is initialized; the server 120 performs the model training operation of the target federated learning task based on the initialized model training configuration information; finally, the server 120 updates the model generated during the model training operation
  • the parameters are sent to the corresponding client 110 so that the client 110 updates the local federated learning model to obtain the trained federated learning model corresponding to each client 110; the trained federated learning model is used for the corresponding client 110 to pair
  • the received user data is processed for business.
  • the client 110 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, and portable wearable devices.
  • the server 120 can be implemented by an independent server or a server cluster composed of multiple servers. .
  • a federated learning method is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
  • Step S202 Obtain task configuration information of at least two clients participating in the target federated learning task.
  • the task configuration information is obtained by summarizing the task configuration data received by the client.
  • the task configuration data is the data entered by the user for the target federated learning task.
  • the client needs to create corresponding task configuration information based on the target federated learning task.
  • the client can determine and create the task configuration information of the target federated learning task by responding to the user's federated learning setting operation; the task configuration information of the target federated learning task includes but is not limited to: task type, engine Framework, automatic tuning algorithm, early termination algorithm, feature engineering information and methods, and data preprocessing methods.
  • the client After the client determines the task configuration information corresponding to the target federated learning task, the client sends the task configuration information to the server so that the server can obtain the task configuration information of at least two clients participating in the target federated learning task. Since the task configuration information does not involve data security and privacy issues, the client can send the task configuration information to the server without encryption.
  • Step S204 initialize the model training configuration information in the target federated learning task.
  • the model training configuration information may refer to the configuration information used when training the machine learning model of the target federated learning task.
  • the server can initialize the model training configuration information in the target federated learning task according to the received task configuration information.
  • the server determines the target task type, target engine framework, target automatic parameter adjustment algorithm, target early termination algorithm, target feature engineering, target data preprocessing plan, and target waiting for the target federated learning task.
  • the configuration information such as the training model is used to initialize the model training configuration information in the target federated learning task and complete the deployment arrangement of the entire training task queue.
  • Step S206 based on the initialized model training configuration information, execute the model training operation of the target federated learning task.
  • the trained federated learning model is used for the corresponding client to perform business processing on the received user data.
  • the trained federated learning model can be applied to business systems such as advertising recommendation systems, video recommendation systems, and user credit prediction systems.
  • the trained federated learning model is a cooperative training model obtained by federated learning between the server and the client.
  • the server uses automatic machine learning (auto-ML) to perform the model training operation of the target federated learning task based on the initialized model training configuration information.
  • auto-ML automatic machine learning
  • the server can schedule each client to perform automatic data preprocessing and automatic feature engineering on the user data stored locally on the client according to the initialized model training configuration information, to obtain processed data samples. Then, based on the processed data samples, each client and server cooperate with each other to perform federated learning training for the model to be trained.
  • the automatic machine learning engine when the automatic machine learning engine obtains the task configuration information, the automatic machine learning engine selects the training framework needed for the target federated learning task, the model to be trained, the model screening evaluation method, and the parameter model group information. Then, the automatic machine learning engine performs data preprocessing and feature engineering according to the selected training framework and the attributes of the model to be trained. According to the framework configuration, the automatic machine learning engine starts the training framework engine to train the data, and evaluates the results in the middle or end of training. The output evaluation information and model information are sorted and summarized, and fed back to the global automatic machine learning engine, so as to implement the model training operation of the target federated learning task.
  • Step S208 Send the model update parameters generated when the model training operation is performed to the corresponding client, so that the client updates the local federated learning model to obtain the trained federation corresponding to each client Learning model.
  • each client and server cooperate in the process of federated learning training for the model to be trained, each client can interact in an encrypted form based on the public key pre-distributed by the server to calculate the intermediate result of the gradient.
  • each client performs calculations based on the above-mentioned intermediate results, and summarizes the calculation results to the server.
  • the server calculates the total gradient value that is the model update parameter by summarizing the above calculation results, and finally sends the calculated model update parameter to the corresponding client, so that each client can update the parameters according to the model and update the local federated learning The model parameters of the model.
  • the task configuration information of at least two clients participating in the target federated learning task is obtained; wherein, the task configuration information is obtained based on the task configuration data received by the client; the task configuration data is user-specific The data entered by the target federated learning task; and according to the task configuration information, the model training configuration information in the target federated learning task is initialized; finally, based on the initialized model training configuration information, the model training operation of the target federated learning task is performed, and The model update parameters generated during the model training operation are sent to the corresponding client, so that the client can update the local federated learning model according to the model update parameters, and then obtain the corresponding client pair
  • the federated learning model after the training of the received user data for business processing; in this way, based on the task configuration data pre-entered by multiple users, the initialization of the model training configuration information in the target federated learning task is automatically completed for subsequent follow-up.
  • Performing federated machine learning eliminates the need for multiple users to perform a series of tedious debugging and setting work for each link in the federated learning task, reducing the dependence on users' professional knowledge and modeling experience in the process of performing federated learning tasks, and improving federated learning Ease of use.
  • obtaining task configuration information of at least two clients participating in the target federated learning task includes: receiving task configuration analysis results sent by at least two clients; the task configuration analysis result is the task entered by the client to the user
  • the configuration data is obtained by analyzing the configuration data; the task configuration data is determined by the user based on the target federated learning task; the configuration analysis results of multiple tasks are summarized to obtain the task configuration information.
  • the process of the server acquiring task configuration information of at least two clients participating in the target federated learning task specifically includes: after the user enters the task configuration data through the client, the client parses the task configuration data, Obtain the task configuration analysis result; then, the client sends the task configuration analysis result to the server by means of federated learning communication.
  • the server receives the task configuration analysis results sent by at least two clients, it summarizes the multiple task configuration analysis results to obtain task configuration information.
  • the user completes the Json configuration file that meets the task and deploys the configuration file to the specified path on the client.
  • the configuration file includes parameters such as frame (frame information), model_type (model type information), eval_mode (evaluation mode information), and params (model tuning information).
  • the client parses the task.
  • the content of the analysis includes but is not limited to: the type of the task to be started, the engine framework that needs to be used, the automatic parameter adjustment algorithm that needs to be used, the early termination algorithm that needs to be used, whether feature engineering and methods are required, etc. Wait.
  • the above analysis results are generated and stored locally in each client, and the data branch is communicated to the server for communication and summary.
  • the summarized task configuration analysis results are stored on the server, and the server completes the deployment of the entire task queue and stores it in the task.
  • the tasks of the queue will be screened or added based on existing environmental information (such as computing resource conditions, pre-training results, etc.), and the subordinate links will be performed one by one in the existing queue of the multi-party federated learning cluster.
  • the technical solution of this embodiment by receiving the analysis results obtained by analyzing the task configuration data entered by the user by each client and summarizing it, accurately determines the task configuration information for the target federated learning task, thereby facilitating subsequent participation in each federated learning
  • the end allocates the corresponding computing tasks, so as to implement the model training operation of executing the target federated learning task, and then obtain the trained federated learning model corresponding to each client.
  • the model training operation of the target federated learning task is performed based on the initialized model training configuration information to obtain the trained federated learning model, including: determining the model training for model training in the initialized model training configuration information Feature engineering information of the operation; according to the feature engineering information, perform feature processing on the user data samples stored locally in each client to obtain model training data samples; based on the model training data samples, perform the model training operation of the target federated learning task to obtain training Later federated learning model.
  • the feature engineering information may be information corresponding to the target feature engineering used in the process of performing the model training operation.
  • the user when the user enters the task configuration data for the target federated learning task through the client, the user can determine the user data stored locally in the client for the target federated learning task from multiple candidate feature projects. The target feature engineering of the sample, and then the task configuration information is obtained.
  • the server when the server initializes the model training configuration information in the target federated learning task according to the task configuration information, the server can set the feature engineering information in the model training configuration information to be consistent with the target feature engineering pre-entered by the user Feature engineering information.
  • the server can determine the characteristic engineering information for the model training operation in the initialized model training configuration information;
  • the server according to the feature engineering information, dispatches each client to perform feature processing on the user data samples stored locally in each client to obtain model training data samples.
  • the user data samples are subjected to operations such as feature encoding, discretization, regularization, and crossover between different features.
  • the intersection matching mainly involves ID consistency processing, RSA encryption calculation, communication transmission and other links.
  • the model training operation of the target federated learning task is executed, and the trained federated learning model is obtained.
  • the characteristic engineering information for the model training operation is determined in the initialized model training configuration information, and then based on the characteristic engineering information, each client is scheduled to pair
  • the user data samples stored locally are subjected to corresponding feature processing, thereby obtaining model training data samples suitable for federated learning, which improves the training efficiency in the federated learning process.
  • the method before the step of determining the characteristic engineering information for the model training operation according to the initialized model training configuration information, the method further includes: determining the data for the model training operation in the initialized model training configuration information Preprocessing configuration information; according to the data preprocessing configuration information, perform data preprocessing on the original user data stored locally in each client to obtain user data samples.
  • the server determines the data preset for the model training operation in the initialized model training configuration information Process the configuration information; then, the server dispatches each client to perform data preprocessing on the original user data stored locally in each client according to the data preprocessing configuration information, to obtain user data samples.
  • the original user data can be processed with missing values, outliers, character strings, etc., to obtain user data samples for subsequent feature engineering.
  • the data preprocessing configuration information for the model training operation is determined according to the initialized model training configuration information, and then based on the data preprocessing configuration Information, each client is scheduled to perform corresponding data preprocessing on the original user data stored locally, so as to obtain user data samples that are convenient for subsequent feature engineering processing.
  • the target federated learning task has multiple sub-model training tasks.
  • the model training operation of the target federated learning task is performed to obtain the trained federated learning model, including: obtaining a task processing queue; The processing queue is used to characterize the execution sequence of multiple sub-model training tasks; according to the task processing queue, multiple sub-model training tasks are executed to perform federated learning training on the federated learning model in the target federated learning task based on the model training data sample, and obtain each The model update parameters corresponding to the client; wherein, the federated learning model is selected based on the model training configuration information after initialization.
  • the target federation learning task has multiple sub-model training tasks.
  • the execution decoupling between the training tasks of each sub-model does not affect each other.
  • the process includes: After the automatic machine learning engine of the server is started, it obtains multiple sub-components for characterization.
  • the manifestation of the task is federated learning, that is, the training data samples of the machine learning model are distributed in different clients, and the data security is not visible.
  • Each client performs an encrypted transmission operation on the intermediate result, and at the same time, each client calculates the above-mentioned intermediate result separately, and summarizes the calculation result to the server.
  • the server calculates the total gradient value that is the model update parameter by summarizing the above calculation results, and finally sends the calculated model update parameter to the corresponding client, so that each client can update the parameters according to the model and update the local federated learning
  • the model parameters of the model can then realize the federated learning training of the federated learning model in cooperation to complete the target federated learning task.
  • the relevant models and data corresponding to each client can not be exported locally.
  • the computing task is managed and scheduled through the global management on the server side.
  • the target federated learning task has a plurality of sub-model training tasks.
  • the model training operation of the target federated learning task is executed efficiently.
  • the execution of multiple sub-model training tasks according to the task processing queue includes: after each sub-training task is executed, the processing results returned by the multiple sub-training tasks are combined to obtain the task processing result corresponding to the target federated learning task ; According to the task processing results, judge whether the trained federated learning model meets the preset training termination conditions; if not, adjust the initialized model training configuration information based on the model performance test results of the trained federated learning model; based on adjustments After the model training configuration information, execute the next round of model training operation of the target federated learning task.
  • the training termination conditions include conditions such as when the model generation result of the trained federated learning model has reached the target demand, and the improvement of the trained federated learning model has converged.
  • the server executes multiple sub-model training tasks according to the task processing queue, which specifically includes: when the server finishes executing each sub-training task, the server combines the processing results returned by multiple sub-training tasks to obtain the target The task processing result corresponding to the federated learning task; according to the task processing result, judge whether the trained federated learning model meets the preset training termination condition; if not, adjust the model performance test result of the trained federated learning model after initialization The training configuration information of the model.
  • the server can test the model performance of the trained federated learning model, and then obtain the model performance test results of the trained federated learning model (wherein, the model performance test results include but are not limited to: loss (model loss) ,Model evaluation index AUC (area under the curve), accuracy rate KS index, etc.);
  • the server reads the initialized model training configuration information based on the model performance test results, for example, adjusts the model network of the federated learning model Structure, model training method, used loss function, data preprocessing method, target feature engineering, etc.
  • the server processes the summarized task information and selects the corresponding method according to the task requirements at the beginning of the task. Specifically, if the grid search method is selected, select a task from the task queue to continue. If the algorithm selected is Bayesian, NAS, etc., the algorithm selects the next task and continues to run. Finally, based on the adjusted model training configuration information, perform the next round of model training operations of the target federated learning task.
  • the automatic machine learning engine on the server will parse the training evaluation information to determine whether to stop early or select the next round of task configuration information, or generate the next round of task configuration information through an algorithm, and repeat the execution The above-mentioned model training operation. More specifically, after completing the execution of each sub-training task, each task calculation unit in the server calculates the processing result corresponding to each sub-training task, and each calculation unit aggregates and transmits the task result to the master of the server; in the master pair of the server Store the required information, and transmit the task parameter information and task processing results to the assistant of the server; the assistant of the server calculates and obtains the corresponding information of the next task link that is required to adjust the initialized model training configuration information (for example, whether to continue training Search, training task parameters, etc.), and transmit the adjusted model training configuration information to the server-side Master; the server-side Master will process the adjusted model training configuration information and transfer it into the task processing queue.
  • the initialized model training configuration information for example, whether to continue training Search, training task parameters, etc.
  • the task parameter corresponding to the task is communicated to the computing unit corresponding to the multi-party client and the task is executed. After performing the task, continue to repeat the tasks in this link until the task is completed or terminated early.
  • a series of training record information generated during the model training operation of executing the target federated learning task can also be visually displayed.
  • the server after the server obtains the task processing result corresponding to the target federated learning task, it can also display the task processing result and the model evaluation result safely.
  • the displayed information includes but is not limited to: training task name, specific content of the training task, start time, current subtask links, historical subtask completion status, completion results, and automatic learning routes, etc.
  • the server may not provide a Label provider to data supporters other than the Label provider.
  • FIG. 3 provides a schematic diagram of a process of federated learning.
  • the technical solution of this embodiment obtains the task processing result corresponding to the target federated learning task by combining the processing results returned by multiple sub-training tasks, and realizes the evaluation of the confederate learning training effect based on the task processing result, and judges the federated learning after training Whether the model meets the preset training termination condition, and then the training task of the federated learning model is terminated in time; when the trained federated learning model does not meet the preset training termination condition, it is based on the model performance test result of the trained federated learning model , Adjust the initialized model training configuration information; based on the adjusted model training configuration information, execute the next round of model training operations of the target federated learning task, and then realize the continuous adjustment of the training strategy of the target federated learning task to achieve efficient federation Learn.
  • the above method further includes: receiving sample distribution difference information sent by at least two clients; determining the overall sample variation value for the target federated learning task based on the sample distribution difference information; when the overall sample variation value When it is greater than the preset change threshold, the federated learning model in the target federated learning task is regenerated; based on the newly-added data sample set, federated learning training is performed on the regenerated federated learning model to obtain the trained federated learning model.
  • the sample distribution difference information is obtained according to the distribution difference between the historical data sample set and the newly added data sample set when the corresponding client receives the newly added data sample set.
  • the client when the client receives the new data sample set test, the client extracts the historical data sample set base from the historical retention information; then, the client starts the corresponding calculation logic to calculate the relevant data of the new data sample set test, And complete the calculation of the distribution difference between the historical data sample set and the newly added data sample set, and obtain the sample distribution difference information PSI.
  • the sample distribution difference information PSI can be expressed as:
  • i represents the i-th value segment of each feature
  • P represents the proportion of the number.
  • the PSI corresponding to each feature can be considered comprehensively, the number of unstable features, and the mean value of the overall PSI can be used as sample distribution difference information, and then used to determine whether to layer the basis.
  • each client After each client calculates the sample distribution difference information PSI, each client summarizes the results to the server through the form of federated communication; the server calculates the corresponding index based on the sample distribution difference information PSI; for example, calculates the overall sample change value.
  • the server can determine the internal sample stability value A of each client based on the sample distribution difference information PSI, determine the overall number of affected factors B and the overall affected factor C based on global data information; and finally , The server can determine the overall sample change value by calculation methods such as weighted summation or weighted average according to the value of sample stability, the number of overall affected factors, and the proportion of overall affected factors.
  • the server determines that the overall sample change value is greater than the preset change threshold, it is determined that the sample has a large discrepancy, and the server regenerates the federated learning model in the target federated learning task; based on the newly-added data sample set, the regenerated The federated learning model performs federated learning training to realize the training logic of restarting automatic machine learning (auto-ML), and then obtain the trained federated learning model.
  • auto-ML restarting automatic machine learning
  • the technical solution of this embodiment realizes calculation and monitoring of the distribution of the local sample data of the client by receiving the sample distribution difference information sent by at least two clients. If the calculated overall sample change value is greater than the preset change threshold, the model group to be trained is regenerated, and the optimal model learning is re-established based on the newly added data sample set to ensure the long-term stability of the model business effect .
  • a federated learning method is provided. Taking the method applied to the server in FIG. 1 as an example, the method includes the following steps: step S410, receiving at least two of the The task configuration analysis result sent by the client; the task configuration analysis result is the result obtained by the client analyzing the task configuration data entered by the user. Step S420: Summarize multiple analysis results of the task configuration to obtain task configuration information. Step S430, according to the task configuration information, initialize the model training configuration information in the target federated learning task.
  • Step S440 perform the model training operation of the target federated learning task based on the initialized model training configuration information; step S450, send the model update parameters generated during the execution of the model training operation to the corresponding client to Make the client update the local federated learning model to obtain the trained federated learning model corresponding to each client; the trained federated learning model is used for the user data received by the corresponding client pair Perform business processing.
  • step S450 send the model update parameters generated during the execution of the model training operation to the corresponding client to Make the client update the local federated learning model to obtain the trained federated learning model corresponding to each client; the trained federated learning model is used for the user data received by the corresponding client pair Perform business processing.
  • a federated learning device including:
  • the obtaining module 510 is configured to obtain task configuration information of at least two clients participating in the target federated learning task; the task configuration information is obtained by summarizing the task configuration data received by the client; the task configuration data is Data entered by the user for the target federated learning task;
  • the initialization module 520 is configured to initialize the model training configuration information in the target federated learning task according to the task configuration information;
  • the execution module 530 is configured to execute the model training operation of the target federated learning task based on the initialized model training configuration information
  • the update module 540 is configured to send the model update parameters generated during the execution of the model training operation to the corresponding client, so that the client updates the local federated learning model to obtain the training corresponding to each client
  • the later federated learning model; the trained federated learning model is used for the corresponding client to perform business processing on the received user data.
  • the obtaining module 510 is specifically configured to receive task configuration analysis results sent by at least two of the clients; the task configuration analysis result is the task configuration entered by the user by the client A result obtained by analyzing the data; and summarizing a plurality of the task configuration analysis results to obtain the task configuration information.
  • the execution module 530 is specifically configured to determine feature engineering information for the model training operation in the initialized model training configuration information; according to the feature engineering information, the Perform feature processing on the local user data samples of each client to obtain model training data samples; and based on the model training data samples, execute the model training operation of the target federated learning task to obtain the trained federated learning model .
  • the execution module 530 is specifically configured to determine data preprocessing configuration information for the model training operation in the initialized model training configuration information; and according to the data preprocessing configuration Information, data preprocessing is performed on the original user data stored locally in each client to obtain the user data sample.
  • the target federated learning task has multiple sub-model training tasks
  • the execution module 530 is specifically configured to obtain a task processing queue; the task processing queue is used to represent multiple sub-model training tasks And execute a plurality of the sub-model training tasks according to the task processing queue to perform federated learning training on the federated learning model in the target federated learning task based on the model training data sample to obtain each The model update parameter corresponding to the client; wherein, the federated learning model is selected based on the initialized model training configuration information.
  • the execution module 530 is specifically configured to combine the processing results returned by multiple sub-training tasks after completing the execution of each of the sub-training tasks to obtain the task corresponding to the target federated learning task Processing result; according to the task processing result, determine whether the trained federated learning model meets the preset training termination condition; if not, adjust the model based on the model performance test result of the trained federated learning model Initialized model training configuration information; and based on the adjusted model training configuration information, execute the next round of model training operation of the target federated learning task.
  • the federated learning device further includes: a receiving module configured to receive sample distribution difference information sent by at least two of the clients; the sample distribution difference information is the corresponding client When a new data sample set is received, it is obtained based on the distribution difference between the historical data sample set and the new data sample set; the monitoring module is used to determine the target federated learning task based on the sample distribution difference information The overall sample change value; a generation module for regenerating the federated learning model in the target federated learning task when the overall sample change value is greater than a preset change threshold; and an update module for regenerating the federated learning model in the target federated learning task; The data sample set is increased, and federated learning training is performed on the regenerated federated learning model to obtain the trained federated learning model.
  • Each module in the above-mentioned federated learning device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 6.
  • the computer equipment includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile or volatile storage medium and internal memory.
  • the non-volatile or volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile or volatile storage medium.
  • the database of the computer equipment is used to store federated learning data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to implement a federated learning method.
  • FIG. 6 is only a block diagram of part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer readable instructions.
  • the one or more processors execute the following steps:
  • the task configuration information is obtained by summarizing the task configuration data received by the client;
  • the task configuration data is the user's target federation Data entered in the learning task;
  • the trained federated learning model is used for the corresponding client to perform business processing on the received user data.
  • One or more computer-readable storage media storing computer-readable instructions.
  • the computer-readable storage media may be non-volatile or volatile.
  • the task configuration information is obtained based on the task configuration data received by the client; the task configuration data is the user's target federation Data entered in the learning task;
  • the trained federated learning model is used for the corresponding client to perform business processing on the received user data.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical storage.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Artificial Intelligence (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种联邦学习方法,涉及人工智能领域,包括:获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作,将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型。还涉及机器学习领域。

Description

联邦学习方法、装置、设备和存储介质
本申请要求于2020年06月30日提交中国专利局,申请号为2020106136778,申请名称为“联邦学习方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及机器学习技术领域,特别是涉及一种联邦学习方法、装置、设备和存储介质。
背景技术
联邦学习又名联邦机器学习,联合学习,联盟学习。联邦机器学习是一个机器学习框架,能有效帮助多个机构在满足用户隐私保护、数据安全和政府法规的要求下,进行数据使用和机器学习建模。
然而,发明人意识到,传统技术在进行联邦学习时,往往需要用户针对联邦学习任务进行一系列繁琐地调试工作,例如,手动调节待训练模型的模型参数、手动进行特征工程等工作,对用户的专业知识和建模经验都有着较高的要求,易用性较差。
发明内容
根据本申请公开的各种实施例,提供一种联邦学习方法、装置、计算机设备和存储介质。
一种联邦学习方法包括:
获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
一种联邦学习装置包括:
获取模块,用于获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述 任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
初始化模块,用于根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
执行模块,用于基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
更新模块,用于将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
一个或多个存储有计算机可读指令的计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
上述一种联邦学习方法、装置、计算机设备和存储介质,通过获取参与目标联邦学习任务的至少两个客户端的任务配置信息;其中,该任务配置信息为基于客户端接收到的任务配置数据进行汇总得到的;任务配置数据为用户针对目标联邦学习任务录入的数据;并根据任务配置信息,对目标联邦学习任务中的模型训练配置信息进行初始化;最后,基于初始化后的模型训练配置信息,执行目标联邦学习任务的模型训练操作,并将在执行模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户可以根据该模型更新参数本地的联邦学习模型进行更新,进而得到用于供对应的客户端对接收到的用户数据进行业务处理的训练后的联邦学习模型;如此,实现了基于多方用户预先录入的任务配置数据,自动化地完成对目标联邦学习任务中的模型训练配置信息进行初始化设置进而供后续进行联邦机器学习,无需多方用户对联邦学习任务中的各个环节进行一系列繁琐地调试和设置工作,减少了在执行联邦学习任务过程中对用户的专业知识和建模经验依赖,提高了联邦学习的易用性。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中一种联邦学习方法的应用环境图;
图2为根据一个或多个实施例中一种联邦学习方法的流程示意图;
图3为另一个实施例中一种联邦学习的流程示意图;
图4为另一个实施例中一种联邦学习方法的流程示意图;
图5为根据一个或多个实施例中一种联邦学习装置的框图;
图6为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的一种联邦学习方法,可以应用于如图1所示的应用环境中。其中,客户端110通过网络与服务端120进行通信。其中,服务端120获取参与目标联邦学习任务的至少两个客户端110的任务配置信息;任务配置信息为至少两个客户端基于目标联邦学习任务创建得到的;服务端120根据任务配置信息,对目标联邦学习任务中的模型训练配置 信息进行初始化;服务端120基于初始化后的模型训练配置信息,执行目标联邦学习任务的模型训练操作;最后,服务端120将执行模型训练操作时生成的模型更新参数发送至对应的客户端110,以使客户端110更新本地的联邦学习模型,得到各个客户端110对应的训练后的联邦学习模型;训练后的联邦学习模型用于供对应的客户端110对接收到的用户数据进行业务处理。实际应用中,客户端110可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务端120可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在其中一个实施例中,如图2所示,提供了一种联邦学习方法,以该方法应用于图1中的服务端为例进行说明,包括以下步骤:
步骤S202,获取参与目标联邦学习任务的至少两个客户端的任务配置信息。
其中,任务配置信息为基于客户端接收到的任务配置数据进行汇总得到的。
其中,任务配置数据为用户针对目标联邦学习任务录入的数据。
具体实现中,客户端需要基于目标联邦学习任务创建对应的任务配置信息。具体来说,客户端可以通过响应用户的联邦学习设置操作,对目标联邦学习任务的任务配置信息进行确定并进行创建;其中,目标联邦学习任务的任务配置信息包括但不限于:任务类型、引擎框架、自动调参算法、提前终止算法、特征工程信息及方法和数据预处理方法等信息。
当客户端确定目标联邦学习任务对应的任务配置信息后,客户端将任务配置信息发送至服务端,以使服务端获取参与目标联邦学习任务的至少两个客户端的任务配置信息。由于任务配置信息不涉及数据安全隐私问题,因此,客户端可以不经加密地向服务端发送该任务配置信息。
步骤S204,根据任务配置信息,对目标联邦学习任务中的模型训练配置信息进行初始化。
其中,模型训练配置信息可以是指在对目标联邦学习任务的机器学习模型进行训练时采用的配置信息。
具体实现中,当服务端接收到任务配置信息后,服务端可以根据接收到的任务配置信息,对目标联邦学习任务中的模型训练配置信息进行初始化设置。
具体来说,服务端根据该任务配置信息,确定针对目标联邦学习任务的目标任务类型、目标引擎框架、目标自动调参算法、目标提前终止算法、目标特征工程、目标数据预处理方案和目标待训练模型等配置信息,以对目标联邦学习任务中的模型训练配置信息进行初始化设置,并完成整个训练任务队列的部署安排。
步骤S206,基于初始化后的模型训练配置信息,执行目标联邦学习任务的模型训练操作。
其中,训练后的联邦学习模型用于供对应的客户端对接收到的用户数据进行业务处理。实际应用中,训练后的联邦学习模型可以应用于广告推荐系统、视频推荐系统、用户信用预测系统等业务系统中。
其中,训练后的联邦学习模型为服务端和客户端进行联邦学习得到的合作训练模型。
当服务端完成对目标联邦学习任务中的模型训练配置信息进行初始化设置后,服务端基于初始化后的模型训练配置信息,利用自动机器学习(auto-ML)执行目标联邦学习任务的模型训练操作。具体来说,服务端可以根据初始化后的模型训练配置信息,调度各个客户端对储存在客户端本地的用户数据进行自动数据预处理和自动特征工程,得到处理后的数据样本。然后,在基于处理后的数据样本,各个客户端和服务端相互合作对待训练的模型进行联邦学习训练。
例如,自动机器学习引擎当获取到任务配置信息后,自动机器学习引擎选定本次目标联邦学习任务需要使用的训练框架、准备使用的待训练模型、模型筛选评估方式和参数模型组等信息。然后,自动机器学习引擎根据选定的训练框架和待训练模型的属性,进行数据预处理工作和特征工程工作。自动机器学习引擎根据框架配置,启动训练框架引擎对数据进行训练,并在训练的中期或者结束的位置对结果进行评估。对输出的评估信息和模型信息进行整理汇总,反馈给全局的自动机器学习引擎,从而实现执行目标联邦学习任务的模型训练操作。
步骤S208,将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型。
具体实现中,各个客户端和服务端在合作对待训练的模型进行联邦学习训练的过程中,各个客户端可以将基于服务端预先分发的公钥以加密形式交互用于计算梯度的中间结果。同时,各个客户端分别基于对上述的中间结果进行计算,并把计算结果汇总给服务端。服务端通过汇总上述的计算结果,计算出总梯度值即模型更新参数,最后将计算得到的模型更新参数发送至对应的客户端,以使各个客户端根据该模型更新参数,更新本地的联邦学习模型的模型参数。
上述联邦学习方法中,通过获取参与目标联邦学习任务的至少两个客户端的任务配置信息;其中,该任务配置信息为基于客户端接收到的任务配置数据进行汇总得到的;任务配置数据为用户针对目标联邦学习任务录入的数据;并根据任务配置信息,对目标联邦学习任务中的模型训练配置信息进行初始化;最后,基于初始化后的模型训练配置信息,执行目标联邦学习任务的模型训练操作,并将在执行模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户可以根据该模型更新参数本地的联邦学习模型进行更新,进而得到用于供对应的客户端对接收到的用户数据进行业务处理的训练后的联邦学习模型;如此,实现了基于多方用户预先录入的任务配置数据,自动化地完成对目标联邦学习任务中的模型训练配置信息进行初始化设置进而供后续进行联邦机器学习,无需多方用户对联邦学习任务中的各个环节进行一系列繁琐地调试和设置工作,减少了在执行联邦学习任务过程中对用户的专业知识和建模经验依赖,提高了联邦学习的易用性。
在其中一个实施例中,获取参与目标联邦学习任务的至少两个客户端的任务配置信息,包括:接收至少两个客户端发送的任务配置解析结果;任务配置解析结果为客户端对用户录入的任务配置数据进行解析得到的;任务配置数据为用户基于目标联邦学习任务确定的;汇总多个任务配置解析结果,得到任务配置信息。
具体实现中,服务端在获取参与目标联邦学习任务的至少两个客户端的任务配置信息的过程中,具体包括:当用户通过客户端录入的任务配置数据后,客户端对任务配置数据进行解析,得到任务配置解析结果;然后,客户端通过联邦学习通信的方式将任务配置解析结果发送至服务端。当服务端接收到至少两个客户端发送的任务配置解析结果时,汇总多个任务配置解析结果,得到任务配置信息。
举例来说,用户完成符合任务的Json配置文件填写,并将配置文件部署到客户端指定路径下。其中,配置文件包括frame(框架信息)、model_type(模型类型信息)、eval_mode(评估模式信息)和params(模型调参信息)等参数。
然后,客户端对任务进行解析,解析内容包括但不限于:启动任务的类型、需要使用的引擎框架、需要使用的自动调参算法、需要使用的提前终止算法、是否需要进行特征工程及方法等等。以上解析结果发生并存储于各个客户端本地,并由数据支向服务端进行通信汇总,汇总得到的任务配置解析结果存储于服务端,并由服务端完成整个任务队列的部署安排,储存在任务队列的任务,会依据现有环境信息(例如计算资源情况、前期训练结果等),进行筛选或者增加,并在多方联邦学习的集群的现有队列中进行下属环节的逐个作业。
本实施例的技术方案,通过接收各个客户端对用户录入的任务配置数据进行解析得到的解析结果并进行汇总,准确地确定针对目标联邦学习任务的任务配置信息,进而便于后续为各个联邦学习参与端分配对应的计算任务,从而实现执行目标联邦学习任务的模型训练操作,进而得到与各个客户端对应的训练后的联邦学习模型。
在其中一个实施例中,基于初始化后的模型训练配置信息,执行目标联邦学习任务的模型训练操作,得到训练后的联邦学习模型,包括:在初始化后的模型训练配置信息中,确定针对模型训练操作的特征工程信息;根据特征工程信息,对储存于各个客户端本地的用户数据样本进行特征处理,得到模型训练数据样本;基于模型训练数据样本,执行目标联邦学习任务的模型训练操作,得到训练后的联邦学习模型。
其中,特征工程信息可以是在执行模型训练操作过程中所采用的目标特征工程对应的信息。
具体实现中,在用户通过客户端录入针对目标联邦学习任务的任务配置数据的过程中,用户可以针对该目标联邦学习任务,在多个候选特征工程中确定适合于客户端本地所储存的用户数据样本的目标特征工程,进而得到任务配置信息。如此,在服务端根据该任务配置信息,对目标联邦学习任务中的模型训练配置信息进行初始化时,服务端可以将模 型训练配置信息中的特征工程信息设置为与用户预先录入的目标特征工程一致的特征工程信息。
然后,服务端在基于初始化后的模型训练配置信息,执行目标联邦学习任务的模型训练操作的过程中,服务端可以在初始化后的模型训练配置信息中,确定针对模型训练操作的特征工程信息;服务端根据特征工程信息,通过调度各个客户端对储存于各个客户端本地的用户数据样本进行特征处理,得到模型训练数据样本。具体地,用户数据样本进行特征的编码,离散,正则化,不同特征之间的交叉等操作。同时,在进行特征处理的过程中,还可以对多个客户端本地的用户数据样本进行交集匹配。其中,交集匹配主要涉及ID的一致性处理,RSA加密计算,通信传输等环节。
最后,基于模型训练数据样本,执行目标联邦学习任务的模型训练操作,得到训练后的联邦学习模型。
本实施例的技术方案,在进行联邦学习的模型训练操作之前,通过在初始化后的模型训练配置信息中,确定针对模型训练操作的特征工程信息,进而基于该特征工程信息,调度各个客户端对储存于本地的用户数据样本进行相应的特征处理,从而得到适用于联邦学习的模型训练数据样本,提高了联邦学习过程中的训练效率。
在其中一个实施例中,在根据初始化后的模型训练配置信息,确定针对模型训练操作的特征工程信息的步骤之前,还包括:在初始化后的模型训练配置信息中,确定针对模型训练操作的数据预处理配置信息;根据数据预处理配置信息,对储存于各个客户端本地的原始用户数据进行数据预处理,得到用户数据样本。
具体实现中,在根据初始化后的模型训练配置信息,确定针对模型训练操作的特征工程信息的步骤之前,还包括:服务端在初始化后的模型训练配置信息中,确定针对模型训练操作的数据预处理配置信息;然后,服务端根据数据预处理配置信息,调度各个客户端对储存于各个客户端本地的原始用户数据进行数据预处理,得到用户数据样本。具体来说,可以对原始用户数据进行缺失值、异常值、字符串处理等等,进而得到用于供后续进行特征工程的用户数据样本。
本实施例的技术方案,在对储存于本地的用户数据样本进行特征工程之前,通过根据初始化后的模型训练配置信息,确定针对模型训练操作的数据预处理配置信息,进而基于该数据预处理配置信息,调度各个客户端对储存于本地的原始用户数据进行相应的数据预处理,从而得到便于后续进行特征工程处理的用户数据样本。
在其中一个实施例中,目标联邦学习任务具有多个子模型训练任务,基于模型训练数据样本,执行目标联邦学习任务的模型训练操作,得到训练后的联邦学习模型,包括:获取任务处理队列;任务处理队列用于表征多个子模型训练任务的执行顺序;根据任务处理队列,执行多个子模型训练任务,以基于模型训练数据样本,对目标联邦学习任务中的联 邦学习模型进行联邦学习训练,得到各个所述客户端对应的模型更新参数;其中,联邦学习模型为基于初始化后的模型训练配置信息选择得到的。
其中,目标联邦学习任务具有多个子模型训练任务。同时,各个子模型训练任务之间的执行解耦互不影响。
具体实现中,在基于模型训练数据样本,执行目标联邦学习任务的模型训练操作,得到训练后的联邦学习模型的过程中,具体包括:服务端的自动机器学习引擎启动后,获取用于表征多个子模型训练任务的执行顺序的任务处理队列;然后,根据任务处理队列,执行多个子模型训练任务;具体来说,服务端向各个客户端请求获取计算资源执行子模型训练任务;其中,子模型训练任务的表现形式为联邦学习,即机器学习的模型训练数据样本分布在不同的客户端中,数据安全不可见。各个客户端通过对中间结果的加密传输运算,同时,各个客户端分别基于对上述的中间结果进行计算,并把计算结果汇总给服务端。服务端通过汇总上述的计算结果,计算出总梯度值即模型更新参数,最后将计算得到的模型更新参数发送至对应的客户端,以使各个客户端根据该模型更新参数,更新本地的联邦学习模型的模型参数,进而实现合作完成目标联邦学习任务中的联邦学习模型的联邦学习训练,同时各个客户端对应的相关模型和数据不出客户端本地。计算任务通过处在服务端的全局进行管理调度。
本实施例的技术方案,目标联邦学习任务具有多个子模型训练任务,通过根据任务处理队列有序地对各个子模型训练任务进行调度和执行,从而高效地执行目标联邦学习任务的模型训练操作,完成目标联邦学习任务中的联邦学习模型进行联邦学习训练,得到各个参与方合作训练得到的训练后的联邦学习模型。
在其中一个实施例中,根据任务处理队列,执行多个子模型训练任务,包括:当完成执行各个子训练任务后,组合多个子训练任务返回的处理结果,得到目标联邦学习任务对应的任务处理结果;根据任务处理结果,判断训练后的联邦学习模型是否满足预设的训练终止条件;若否,则基于训练后的联邦学习模型的模型性能测试结果,调整初始化后的模型训练配置信息;基于调整后的模型训练配置信息,执行目标联邦学习任务的下一轮模型训练操作。
其中,训练终止条件包括当训练后的联邦学习模型的模型生成结果已经达到了目标需求、训练后的联邦学习模型的提升情况收敛等条件。
具体实现中,在服务端根据任务处理队列,执行多个子模型训练任务的过程中,具体包括:当服务端完成执行各个子训练任务后,服务端组合多个子训练任务返回的处理结果,得到目标联邦学习任务对应的任务处理结果;根据任务处理结果,判断训练后的联邦学习模型是否满足预设的训练终止条件;若否,则基于训练后的联邦学习模型的模型性能测试结果,调整初始化后的模型训练配置信息。具体来说,服务端可以对训练后的联邦学习模型的模型性能进行测试,进而获取训练后的联邦学习模型的模型性能测试结果(其中,模 型性能测试结果包括但不限于:loss(模型损失),模型评估指标AUC(area under the curve),准确率KS指标等);最后,服务端在基于该模型性能测试结果,重新调整初始化后的模型训练配置信息,例如,调整联邦学习模型的模型网络结构、模型训练方法、采用的损失函数、数据预处理方法、目标特征工程等。当然,服务端对汇总的任务信息进行处理,根据任务开始时的任务要求选择对应的方法。具体地,如果选择的是网格搜索法,则从任务队列中选择一则任务继续即可。如果选择的是贝叶斯、NAS等算法,则进行算法选择下一则任务并继续运行。最后,基于调整后的模型训练配置信息,执行目标联邦学习任务的下一轮模型训练操作。
举例来说,服务端的自动机器学习引擎会对训练的评估信息进行解析,判断是否要进行提前停止或者选择下一轮的任务配置信息,或者通过算法生成下一轮的任务配置信息,并重复执行上述的模型训练操作。更具体地,当完成执行各个子训练任务后,服务端中的各任务计算单元计算出各个子训练任务对应的处理结果,各计算单元将任务结果汇总传输至服务端的master;服务端的master对内存储需要的信息,并将任务参数信息及其任务处理结果传输至服务端的assistant;服务端的assistant计算并得到相应需要的下一步任务环节信息即调整初始化后的模型训练配置信息(例如,是否继续训练搜索,训练的任务参数等等),并将调整后的模型训练配置信息传输给服务端的Master;服务端的Master将调整后的模型训练配置信息进行处理,传输进入任务处理队列之中,当某一任务在任务处理队列中被执行时,则会把该任务对应的任务参数通信传输给多方客户端对应的计算单元之内并执行任务。执行任务后继续重复本环节任务,直到任务完成或者提前终止。
另外,还可以将执行所述目标联邦学习任务的模型训练操作过程中的产生的一系列训练记录信息进行可视化展示。
举例来说,服务端在得到目标联邦学习任务对应的任务处理结果后,还可以对任务处理结果和模型评估结果并进行安全展示。其中,展示信息包括但不限于:训练任务名称,训练任务具体内容,开始时间,目前子任务环节,历史子任务完成情况,完成结果,以及自动学习线路等等。
同时,考虑到Label(标签)提供方的数据安全性,服务端可以不对除Label(标签)提供方以外的数据支持方提供Label(标签)提供方。
为了便于本领域技术人员的理解,图3提供了一种联邦学习的流程示意图。
本实施例的技术方案,通过组合多个子训练任务返回的处理结果,得到目标联邦学习任务对应的任务处理结果,并基于该任务处理结果实现对邦联学习训练效果进行评估,判断训练后的联邦学习模型是否满足预设的训练终止条件,进而及时结束联邦学习模型的训练任务;当训练后的联邦学习模型不满足预设的训练终止条件时,则基于训练后的联邦学习模型的模型性能测试结果,调整初始化后的模型训练配置信息;基于调整后的模型训练配置信息,执行目标联邦学习任务的下一轮模型训练操作,进而实现不断地调整目标联邦学习任务的训练策略,实现高效地进行联邦学习。
在其中一个实施例中,上述的方法还包括:接收至少两个客户端各自发送的样本分布差异信息;基于样本分布差异信息,确定针对目标联邦学习任务的整体样本变动值;当整体样本变动值大于预设的变动阈值时,重新生成目标联邦学习任务中的联邦学习模型;基于新增数据样本集合,对重新生成的联邦学习模型进行联邦学习训练,得到训练后的联邦学习模型。
其中,样本分布差异信息为对应的客户端在接收到新增数据样本集合时,根据历史数据样本集合和新增数据样本集合之间的分布差异得到的。
举例来说,当客户端接收到新增数据样本集合test时,客户端从历史保留信息中提取历史数据样本集合base;然后,客户端启动相应计算逻辑计算新增数据样本集合test的相关数据,并完成计算历史数据样本集合和新增数据样本集合之间的分布差异,得到样本分布差异信息PSI。其中,样本分布差异信息PSI可以表示为:
其中,i表示每个特征的第i个取值分段,P表示数量占比。其中,当特征具有多个时,可以综合考虑每一个特征对应的PSI,考虑不稳定的特征数,和整体PSI的均值作为样本分布差异信息,进而用于判定是否分层的依据。
当各个客户端计算得到样本分布差异信息PSI后,各个客户端通过联邦通信形式向服务端汇总结果;服务端基于样本分布差异信息PSI计算相应指标;例如计算出整体样本变动值。具体地,服务端可以基于样本分布差异信息PSI,确定各个客户端内部的样本稳定程度值A、基于全局的数据信息判定整体受影响的因子个数B以及整体受影响的因子占比C;最后,服务端可以根据样本稳定程度值、整体受影响的因子个数、整体受影响的因子占比进行加权求和或者加权平均等计算方式,确定整体样本变动值。
当服务端确定整体样本变动值大于预设的变动阈值时,则判定样本出现较大出入,服务端则重新生成目标联邦学习任务中的联邦学习模型;基于新增数据样本集合,对重新生成的联邦学习模型进行联邦学习训练,以实现重启自动机器学习(auto-ML)的训练逻辑,进而得到训练后的联邦学习模型。
本实施例的技术方案,通过接收至少两个客户端各自发送的样本分布差异信息,实现对客户端本地的样本数据的分布情况进行计算和监控。若计算得到的整体样本变动值大于预设的变动阈值时,则对待训练的模型组进行重新的生成,并再基于新增数据样本集合重新的最优模型学习,以保证模型业务效果的长期稳定。
在其中一个实施例中,如图4所示,提供了一种联邦学习方法,以该方法应用于图1中的服务端为例进行说明,包括以下步骤:步骤S410,接收至少两个所述客户端发送的任务配置解析结果;所述任务配置解析结果为所述客户端对所述用户录入的任务配置数据进行解析得到的结果。步骤S420,汇总多个所述任务配置解析结果,得到任务配置信息。步骤S430,根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进 行初始化。步骤S440,基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;步骤S450,将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。上述步骤的具体限定可以参见上文对一种联邦学习方法的具体限定。
应该理解的是,虽然图2和图4的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2和图4中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。
在其中一个实施例中,如图5所示,提供了一种联邦学习装置,包括:
获取模块510,用于获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
初始化模块520,用于根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
执行模块530,用于基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
更新模块540,用于将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
在其中一个实施例中,所述获取模块510,具体用于接收至少两个所述客户端发送的任务配置解析结果;所述任务配置解析结果为所述客户端对所述用户录入的任务配置数据进行解析得到的结果;及汇总多个所述任务配置解析结果,得到所述任务配置信息。
在其中一个实施例中,所述执行模块530,具体用于在所述初始化后的模型训练配置信息中,确定针对所述模型训练操作的特征工程信息;根据所述特征工程信息,对储存于各个所述客户端本地的用户数据样本进行特征处理,得到模型训练数据样本;及基于所述模型训练数据样本,执行所述目标联邦学习任务的模型训练操作,得到所述训练后的联邦学习模型。
在其中一个实施例中,所述执行模块530,具体用于在所述初始化后的模型训练配置信息中,确定针对所述模型训练操作的数据预处理配置信息;及根据所述数据预处理配置信息,对储存于各个所述客户端本地的原始用户数据进行数据预处理,得到所述用户数据样本。
在其中一个实施例中,所述目标联邦学习任务具有多个子模型训练任务,所述执行模块530,具体用于获取任务处理队列;所述任务处理队列用于表征多个所述子模型训练任务的执行顺序;及根据所述任务处理队列,执行多个所述子模型训练任务,以基于所述模型训练数据样本,对所述目标联邦学习任务中的联邦学习模型进行联邦学习训练,得到各个所述客户端对应的模型更新参数;其中,所述联邦学习模型为基于所述初始化后的模型训练配置信息选择得到的。
在其中一个实施例中,所述执行模块530,具体用于当完成执行各个所述子训练任务后,组合多个所述子训练任务返回的处理结果,得到所述目标联邦学习任务对应的任务处理结果;根据所述任务处理结果,判断所述训练后的联邦学习模型是否满足预设的训练终止条件;若否,则基于所述训练后的联邦学习模型的模型性能测试结果,调整所述初始化后的模型训练配置信息;及基于调整后的模型训练配置信息,执行所述目标联邦学习任务的下一轮模型训练操作。
在其中一个实施例中,所述联邦学习装置,还包括:接收模块,用于接收至少两个所述客户端各自发送的样本分布差异信息;所述样本分布差异信息为对应的所述客户端在接收到新增数据样本集合时,根据历史数据样本集合和新增数据样本集合之间的分布差异得到的;监控模块,用于基于所述样本分布差异信息,确定针对所述目标联邦学习任务的整体样本变动值;生成模块,用于当所述整体样本变动值大于预设的变动阈值时,重新生成所述目标联邦学习任务中的联邦学习模型;及更新模块,用于基于所述新增数据样本集合,对重新生成的联邦学习模型进行联邦学习训练,得到所述训练后的联邦学习模型。
关于联邦学习装置的具体限定可以参见上文中对于联邦学习方法的限定,在此不再赘述。上述联邦学习装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性或易失性存储介质、内存储器。该非易失性或易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性或易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储联邦学习数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以 实现一种联邦学习方法。
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
一个或多个存储有计算机可读指令的计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存 储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (22)

  1. 一种联邦学习方法,包括:
    获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
    根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
    基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
    将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
  2. 根据权利要求1所述的方法,其中,所述获取参与目标联邦学习任务的至少两个客户端的任务配置信息,包括:
    接收至少两个所述客户端发送的任务配置解析结果;所述任务配置解析结果为所述客户端对所述用户录入的任务配置数据进行解析得到的结果;及
    汇总多个所述任务配置解析结果,得到所述任务配置信息。
  3. 根据权利要求1所述的方法,其中,所述基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作,包括:
    在所述初始化后的模型训练配置信息中,确定针对所述模型训练操作的特征工程信息;
    根据所述特征工程信息,对储存于各个所述客户端本地的用户数据样本进行特征处理,得到模型训练数据样本;及
    基于所述模型训练数据样本,执行所述目标联邦学习任务的模型训练操作。
  4. 根据权利要求3所述的方法,其中,在所述根据所述初始化后的模型训练配置信息,确定针对所述模型训练操作的特征工程信息的步骤之前,所述方法还包括:
    在所述初始化后的模型训练配置信息中,确定针对所述模型训练操作的数据预处理配置信息;及
    根据所述数据预处理配置信息,对储存于各个所述客户端本地的原始用户数据进行数据预处理,得到所述用户数据样本。
  5. 根据权利要求1所述的方法,其中,所述目标联邦学习任务具有多个子模型训练任务,所述基于所述模型训练数据样本,执行所述目标联邦学习任务的模型训练操作,包括:
    获取任务处理队列;所述任务处理队列用于表征多个所述子模型训练任务的执行顺序;及
    根据所述任务处理队列,执行多个所述子模型训练任务,以基于所述模型训练数据样 本,对所述目标联邦学习任务中的联邦学习模型进行联邦学习训练,得到各个所述客户端对应的模型更新参数;其中,所述联邦学习模型为基于所述初始化后的模型训练配置信息选择得到的。
  6. 根据权利要求5所述的方法,其中,所述根据所述任务处理队列,执行多个所述子模型训练任务,包括:
    当完成执行各个所述子训练任务后,组合多个所述子训练任务返回的处理结果,得到所述目标联邦学习任务对应的任务处理结果;
    根据所述任务处理结果,判断所述训练后的联邦学习模型是否满足预设的训练终止条件;
    若否,则基于所述训练后的联邦学习模型的模型性能测试结果,调整所述初始化后的模型训练配置信息;及
    基于调整后的模型训练配置信息,执行所述目标联邦学习任务的下一轮模型训练操作。
  7. 根据权利要求1所述的方法,其中,所述方法还包括:
    接收至少两个所述客户端各自发送的样本分布差异信息;所述样本分布差异信息为对应的所述客户端在接收到新增数据样本集合时,根据历史数据样本集合和新增数据样本集合之间的分布差异得到的;
    基于所述样本分布差异信息,确定针对所述目标联邦学习任务的整体样本变动值;
    当所述整体样本变动值大于预设的变动阈值时,重新生成所述目标联邦学习任务中的联邦学习模型;及
    基于所述新增数据样本集合,对重新生成的联邦学习模型进行联邦学习训练,得到所述训练后的联邦学习模型。
  8. 一种联邦学习装置,包括:
    获取模块,用于获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
    初始化模块,用于根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
    执行模块,用于基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
    更新模块,用于将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
  9. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机 可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
    根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
    基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
    将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
  10. 根据权利要求9所述的计算机设备,其中,所述获取参与目标联邦学习任务的至少两个客户端的任务配置信息,所述处理器执行所述计算机可读指令时还执行以下步骤:
    接收至少两个所述客户端发送的任务配置解析结果;所述任务配置解析结果为所述客户端对所述用户录入的任务配置数据进行解析得到的结果;及
    汇总多个所述任务配置解析结果,得到所述任务配置信息。
  11. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    在所述初始化后的模型训练配置信息中,确定针对所述模型训练操作的特征工程信息;
    根据所述特征工程信息,对储存于各个所述客户端本地的用户数据样本进行特征处理,得到模型训练数据样本;及
    基于所述模型训练数据样本,执行所述目标联邦学习任务的模型训练操作。
  12. 根据权利要求11所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    在所述初始化后的模型训练配置信息中,确定针对所述模型训练操作的数据预处理配置信息;及
    根据所述数据预处理配置信息,对储存于各个所述客户端本地的原始用户数据进行数据预处理,得到所述用户数据样本。
  13. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取任务处理队列;所述任务处理队列用于表征多个所述子模型训练任务的执行顺序;及
    根据所述任务处理队列,执行多个所述子模型训练任务,以基于所述模型训练数据样本,对所述目标联邦学习任务中的联邦学习模型进行联邦学习训练,得到各个所述客户端 对应的模型更新参数;其中,所述联邦学习模型为基于所述初始化后的模型训练配置信息选择得到的。
  14. 根据权利要求13所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    当完成执行各个所述子训练任务后,组合多个所述子训练任务返回的处理结果,得到所述目标联邦学习任务对应的任务处理结果;
    根据所述任务处理结果,判断所述训练后的联邦学习模型是否满足预设的训练终止条件;
    若否,则基于所述训练后的联邦学习模型的模型性能测试结果,调整所述初始化后的模型训练配置信息;及
    基于调整后的模型训练配置信息,执行所述目标联邦学习任务的下一轮模型训练操作。
  15. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:
    接收至少两个所述客户端各自发送的样本分布差异信息;所述样本分布差异信息为对应的所述客户端在接收到新增数据样本集合时,根据历史数据样本集合和新增数据样本集合之间的分布差异得到的;
    基于所述样本分布差异信息,确定针对所述目标联邦学习任务的整体样本变动值;
    当所述整体样本变动值大于预设的变动阈值时,重新生成所述目标联邦学习任务中的联邦学习模型;及
    基于所述新增数据样本集合,对重新生成的联邦学习模型进行联邦学习训练,得到所述训练后的联邦学习模型。
  16. 一个或多个存储有计算机可读指令的计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取参与目标联邦学习任务的至少两个客户端的任务配置信息;所述任务配置信息为基于所述客户端接收到的任务配置数据进行汇总得到的;所述任务配置数据为用户针对所述目标联邦学习任务录入的数据;
    根据所述任务配置信息,对所述目标联邦学习任务中的模型训练配置信息进行初始化;
    基于初始化后的模型训练配置信息,执行所述目标联邦学习任务的模型训练操作;及
    将执行所述模型训练操作时生成的模型更新参数发送至对应的所述客户端,以使所述客户端更新本地的联邦学习模型,得到各个所述客户端对应的训练后的联邦学习模型;所述训练后的联邦学习模型用于供对应的所述客户端对接收到的用户数据进行业务处理。
  17. 根据权利要求16所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    接收至少两个所述客户端发送的任务配置解析结果;所述任务配置解析结果为所述客户端对所述用户录入的任务配置数据进行解析得到的结果;及
    汇总多个所述任务配置解析结果,得到所述任务配置信息。
  18. 根据权利要求16所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    在所述初始化后的模型训练配置信息中,确定针对所述模型训练操作的特征工程信息;
    根据所述特征工程信息,对储存于各个所述客户端本地的用户数据样本进行特征处理,得到模型训练数据样本;及
    基于所述模型训练数据样本,执行所述目标联邦学习任务的模型训练操作。
  19. 根据权利要求18所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    在所述初始化后的模型训练配置信息中,确定针对所述模型训练操作的数据预处理配置信息;及
    根据所述数据预处理配置信息,对储存于各个所述客户端本地的原始用户数据进行数据预处理,得到所述用户数据样本。
  20. 根据权利要求16所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    获取任务处理队列;所述任务处理队列用于表征多个所述子模型训练任务的执行顺序;及
    根据所述任务处理队列,执行多个所述子模型训练任务,以基于所述模型训练数据样本,对所述目标联邦学习任务中的联邦学习模型进行联邦学习训练,得到各个所述客户端对应的模型更新参数;其中,所述联邦学习模型为基于所述初始化后的模型训练配置信息选择得到的。
  21. 根据权利要求20所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    当完成执行各个所述子训练任务后,组合多个所述子训练任务返回的处理结果,得到所述目标联邦学习任务对应的任务处理结果;
    根据所述任务处理结果,判断所述训练后的联邦学习模型是否满足预设的训练终止条件;
    若否,则基于所述训练后的联邦学习模型的模型性能测试结果,调整所述初始化后的模型训练配置信息;及
    基于调整后的模型训练配置信息,执行所述目标联邦学习任务的下一轮模型训练操作。
  22. 根据权利要求16所述的存储介质,其中,所述计算机可读指令被所述处理器执 行时还执行以下步骤:
    接收至少两个所述客户端各自发送的样本分布差异信息;所述样本分布差异信息为对应的所述客户端在接收到新增数据样本集合时,根据历史数据样本集合和新增数据样本集合之间的分布差异得到的;
    基于所述样本分布差异信息,确定针对所述目标联邦学习任务的整体样本变动值;
    当所述整体样本变动值大于预设的变动阈值时,重新生成所述目标联邦学习任务中的联邦学习模型;及
    基于所述新增数据样本集合,对重新生成的联邦学习模型进行联邦学习训练,得到所述训练后的联邦学习模型。
PCT/CN2020/136112 2020-06-30 2020-12-14 联邦学习方法、装置、设备和存储介质 WO2021115480A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010613677.8 2020-06-30
CN202010613677.8A CN111768008B (zh) 2020-06-30 2020-06-30 联邦学习方法、装置、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2021115480A1 true WO2021115480A1 (zh) 2021-06-17

Family

ID=72723151

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/136112 WO2021115480A1 (zh) 2020-06-30 2020-12-14 联邦学习方法、装置、设备和存储介质

Country Status (2)

Country Link
CN (1) CN111768008B (zh)
WO (1) WO2021115480A1 (zh)

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113409134A (zh) * 2021-06-30 2021-09-17 中国工商银行股份有限公司 基于联邦学习的企业融资授信方法及装置
CN113487351A (zh) * 2021-07-05 2021-10-08 哈尔滨工业大学(深圳) 隐私保护广告点击率预测方法、装置、服务器及存储介质
CN113657525A (zh) * 2021-08-23 2021-11-16 同盾科技有限公司 基于KMeans的跨特征联邦聚类方法及相关设备
CN113705634A (zh) * 2021-08-11 2021-11-26 西安交通大学 一种基于分层自适应的联邦学习方法、装置、设备及介质
CN113723619A (zh) * 2021-08-31 2021-11-30 南京大学 一种基于训练阶段感知策略的联邦学习训练方法
CN113781397A (zh) * 2021-08-11 2021-12-10 中国科学院信息工程研究所 基于联邦学习的医疗影像病灶检测建模方法、装置及系统
CN113836809A (zh) * 2021-09-26 2021-12-24 上海万向区块链股份公司 基于区块链和联邦学习的跨行业数据联合建模方法及系统
CN113887740A (zh) * 2021-10-21 2022-01-04 支付宝(杭州)信息技术有限公司 联合更新模型的方法、装置及系统
CN114065864A (zh) * 2021-11-19 2022-02-18 北京百度网讯科技有限公司 联邦学习方法、联邦学习装置、电子设备以及存储介质
CN114219098A (zh) * 2021-12-03 2022-03-22 华融融通(北京)科技有限公司 一种基于参数服务器的联邦学习系统
CN114302422A (zh) * 2021-11-29 2022-04-08 北京邮电大学 利用学习模型进行业务处理的方法以及装置
CN114745253A (zh) * 2022-05-06 2022-07-12 中电信数智科技有限公司 基于Transformer和联邦学习的流量预警方法
CN114785731A (zh) * 2022-04-25 2022-07-22 中国电信股份有限公司 模型确定系统及方法、计算机可存储介质
CN114866599A (zh) * 2022-04-29 2022-08-05 济南中科泛在智能计算研究院 基于最优联邦方选择的联邦学习方法、设备及系统
CN115021883A (zh) * 2022-07-13 2022-09-06 北京物资学院 无线蜂窝系统中应用联邦学习的信令机制
CN115496204A (zh) * 2022-10-09 2022-12-20 南京邮电大学 一种跨域异质场景下的面向联邦学习的评测方法及装置
CN115577797A (zh) * 2022-10-18 2023-01-06 东南大学 一种基于本地噪声感知的联邦学习优化方法及系统
CN115775010A (zh) * 2022-11-23 2023-03-10 国网江苏省电力有限公司信息通信分公司 基于横向联邦学习的电力数据共享方法
CN115860116A (zh) * 2022-12-02 2023-03-28 广州图灵科技有限公司 一种基于生成模型和深度迁移学习的联邦学习方法
CN116361398A (zh) * 2023-02-21 2023-06-30 北京大数据先进技术研究院 一种用户信用评估方法、联邦学习系统、装置和设备
CN116541712A (zh) * 2023-06-26 2023-08-04 杭州金智塔科技有限公司 基于非独立同分布数据的联邦建模方法及系统
CN117010484A (zh) * 2023-10-07 2023-11-07 之江实验室 基于注意力机制的个性化联邦学习泛化方法、设备、应用
CN117196069A (zh) * 2023-11-07 2023-12-08 中电科大数据研究院有限公司 联邦学习方法
CN117539449A (zh) * 2024-01-09 2024-02-09 清华大学 一种高效灵活的协作学习框架及方法
WO2024032214A1 (zh) * 2022-08-11 2024-02-15 华为技术有限公司 一种推理方法及相关装置

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768008B (zh) * 2020-06-30 2023-06-16 平安科技(深圳)有限公司 联邦学习方法、装置、设备和存储介质
CN114372586A (zh) * 2020-10-14 2022-04-19 新智数字科技有限公司 基于联合学习的物联网数据服务方法、装置、设备和介质
CN112256874B (zh) * 2020-10-21 2023-08-08 平安科技(深圳)有限公司 模型训练方法、文本分类方法、装置、计算机设备和介质
CN112286967A (zh) * 2020-10-23 2021-01-29 上海淇玥信息技术有限公司 一种基于联系人执行业务任务的方法、装置和电子设备
CN112270597A (zh) * 2020-11-10 2021-01-26 恒安嘉新(北京)科技股份公司 业务处理、信用评价模型训练方法、装置、设备及介质
CN112381000A (zh) * 2020-11-16 2021-02-19 深圳前海微众银行股份有限公司 基于联邦学习的人脸识别方法、装置、设备及存储介质
CN112434818B (zh) * 2020-11-19 2023-09-26 脸萌有限公司 模型构建方法、装置、介质及电子设备
CN112686369B (zh) * 2020-12-10 2024-02-27 广州广电运通金融电子股份有限公司 中心方选择方法、存储介质和系统
CN112598127B (zh) * 2020-12-16 2023-07-25 百度在线网络技术(北京)有限公司 联邦学习模型训练方法和装置、电子设备、介质和产品
CN112598139B (zh) * 2020-12-22 2023-08-18 百度在线网络技术(北京)有限公司 类别编码方法、装置、设备、存储介质及程序产品
CN112671613B (zh) * 2020-12-28 2022-08-23 深圳市彬讯科技有限公司 联邦学习集群监控方法、装置、设备及介质
CN112785144A (zh) * 2021-01-18 2021-05-11 深圳前海微众银行股份有限公司 基于联邦学习的模型构建方法、设备及存储介质
CN112560105B (zh) * 2021-02-19 2021-09-07 支付宝(杭州)信息技术有限公司 保护多方数据隐私的联合建模方法及装置
CN113222169B (zh) * 2021-03-18 2023-06-23 中国地质大学(北京) 结合大数据分析反馈的联邦机器组合服务方法与系统
CN113807535B (zh) * 2021-04-01 2023-11-03 京东科技控股股份有限公司 联邦学习模型的训练方法、装置、电子设备和存储介质
CN113807538B (zh) * 2021-04-09 2024-02-06 京东科技控股股份有限公司 联邦学习方法、装置、电子设备及存储介质
CN113221470A (zh) * 2021-06-10 2021-08-06 南方电网科学研究院有限责任公司 一种用于电网边缘计算系统的联邦学习方法及其相关装置
CN113378994B (zh) * 2021-07-09 2022-09-02 浙江大学 一种图像识别方法、装置、设备及计算机可读存储介质
CN113378993B (zh) * 2021-07-09 2023-01-10 深圳前海微众银行股份有限公司 基于人工智能的分类方法、装置、设备及存储介质
CN113762526B (zh) * 2021-09-07 2024-02-09 京东科技信息技术有限公司 联邦学习的方法及分层网络系统、存储介质、电子设备
CN116432013A (zh) * 2021-12-30 2023-07-14 维沃移动通信有限公司 模型训练方法、装置及通信设备
CN114866545B (zh) * 2022-04-19 2023-04-25 郑州大学 一种基于空中计算的半异步分层联邦学习方法及系统
CN117033994A (zh) * 2022-04-29 2023-11-10 维沃移动通信有限公司 模型信息获取方法、发送方法、装置、节点和储存介质
CN115907003A (zh) * 2022-12-07 2023-04-04 中国人民解放军国防科技大学 基于度量学习的联邦学习恶意模型更新的检测方法及系统
CN116050548B (zh) * 2023-03-27 2023-07-04 深圳前海环融联易信息科技服务有限公司 一种联邦学习方法、装置及电子设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107644255A (zh) * 2016-07-21 2018-01-30 深圳光启合众科技有限公司 一种人工智能设备的数据处理方法、装置及系统
CN109144729A (zh) * 2018-08-27 2019-01-04 联想(北京)有限公司 分布式系统的数据处理方法和分布式系统
CN110428058A (zh) * 2019-08-08 2019-11-08 深圳前海微众银行股份有限公司 联邦学习模型训练方法、装置、终端设备及存储介质
CN111768008A (zh) * 2020-06-30 2020-10-13 平安科技(深圳)有限公司 联邦学习方法、装置、设备和存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10270599B2 (en) * 2017-04-27 2019-04-23 Factom, Inc. Data reproducibility using blockchains
CN107273872B (zh) * 2017-07-13 2020-05-05 北京大学深圳研究生院 用于图像或视频中行人重识别的深度判别网络模型方法
CN109886417B (zh) * 2019-03-01 2024-05-03 深圳前海微众银行股份有限公司 基于联邦学习的模型参数训练方法、装置、设备及介质
CN110263921B (zh) * 2019-06-28 2021-06-04 深圳前海微众银行股份有限公司 一种联邦学习模型的训练方法及装置
CN110399742B (zh) * 2019-07-29 2020-12-18 深圳前海微众银行股份有限公司 一种联邦迁移学习模型的训练、预测方法及装置
CN110797124B (zh) * 2019-10-30 2024-04-12 腾讯科技(深圳)有限公司 一种模型多端协同训练方法、医疗风险预测方法和装置
CN111291897A (zh) * 2020-02-10 2020-06-16 深圳前海微众银行股份有限公司 基于半监督的横向联邦学习优化方法、设备及存储介质
CN111310047B (zh) * 2020-02-20 2021-04-23 深圳前海微众银行股份有限公司 基于fm模型的信息推荐方法、装置、设备及存储介质

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107644255A (zh) * 2016-07-21 2018-01-30 深圳光启合众科技有限公司 一种人工智能设备的数据处理方法、装置及系统
CN109144729A (zh) * 2018-08-27 2019-01-04 联想(北京)有限公司 分布式系统的数据处理方法和分布式系统
CN110428058A (zh) * 2019-08-08 2019-11-08 深圳前海微众银行股份有限公司 联邦学习模型训练方法、装置、终端设备及存储介质
CN111768008A (zh) * 2020-06-30 2020-10-13 平安科技(深圳)有限公司 联邦学习方法、装置、设备和存储介质

Cited By (40)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113409134A (zh) * 2021-06-30 2021-09-17 中国工商银行股份有限公司 基于联邦学习的企业融资授信方法及装置
CN113487351A (zh) * 2021-07-05 2021-10-08 哈尔滨工业大学(深圳) 隐私保护广告点击率预测方法、装置、服务器及存储介质
CN113705634A (zh) * 2021-08-11 2021-11-26 西安交通大学 一种基于分层自适应的联邦学习方法、装置、设备及介质
CN113781397A (zh) * 2021-08-11 2021-12-10 中国科学院信息工程研究所 基于联邦学习的医疗影像病灶检测建模方法、装置及系统
CN113781397B (zh) * 2021-08-11 2023-11-21 中国科学院信息工程研究所 基于联邦学习的医疗影像病灶检测建模方法、装置及系统
CN113705634B (zh) * 2021-08-11 2024-05-10 西安交通大学 一种基于分层自适应的联邦学习方法、装置、设备及介质
CN113657525A (zh) * 2021-08-23 2021-11-16 同盾科技有限公司 基于KMeans的跨特征联邦聚类方法及相关设备
CN113657525B (zh) * 2021-08-23 2024-04-26 同盾科技有限公司 基于KMeans的跨特征联邦聚类方法及相关设备
CN113723619A (zh) * 2021-08-31 2021-11-30 南京大学 一种基于训练阶段感知策略的联邦学习训练方法
CN113836809A (zh) * 2021-09-26 2021-12-24 上海万向区块链股份公司 基于区块链和联邦学习的跨行业数据联合建模方法及系统
CN113836809B (zh) * 2021-09-26 2023-12-01 上海万向区块链股份公司 基于区块链和联邦学习的跨行业数据联合建模方法及系统
CN113887740A (zh) * 2021-10-21 2022-01-04 支付宝(杭州)信息技术有限公司 联合更新模型的方法、装置及系统
CN114065864A (zh) * 2021-11-19 2022-02-18 北京百度网讯科技有限公司 联邦学习方法、联邦学习装置、电子设备以及存储介质
CN114065864B (zh) * 2021-11-19 2023-08-11 北京百度网讯科技有限公司 联邦学习方法、联邦学习装置、电子设备以及存储介质
CN114302422A (zh) * 2021-11-29 2022-04-08 北京邮电大学 利用学习模型进行业务处理的方法以及装置
CN114219098A (zh) * 2021-12-03 2022-03-22 华融融通(北京)科技有限公司 一种基于参数服务器的联邦学习系统
CN114785731A (zh) * 2022-04-25 2022-07-22 中国电信股份有限公司 模型确定系统及方法、计算机可存储介质
CN114866599A (zh) * 2022-04-29 2022-08-05 济南中科泛在智能计算研究院 基于最优联邦方选择的联邦学习方法、设备及系统
CN114866599B (zh) * 2022-04-29 2024-03-29 济南中科泛在智能计算研究院 基于最优联邦方选择的联邦学习方法、设备及系统
CN114745253A (zh) * 2022-05-06 2022-07-12 中电信数智科技有限公司 基于Transformer和联邦学习的流量预警方法
CN115021883B (zh) * 2022-07-13 2022-12-27 北京物资学院 无线蜂窝系统中应用联邦学习的信令机制
CN115021883A (zh) * 2022-07-13 2022-09-06 北京物资学院 无线蜂窝系统中应用联邦学习的信令机制
WO2024032214A1 (zh) * 2022-08-11 2024-02-15 华为技术有限公司 一种推理方法及相关装置
CN115496204A (zh) * 2022-10-09 2022-12-20 南京邮电大学 一种跨域异质场景下的面向联邦学习的评测方法及装置
CN115496204B (zh) * 2022-10-09 2024-02-02 南京邮电大学 一种跨域异质场景下的面向联邦学习的评测方法及装置
CN115577797A (zh) * 2022-10-18 2023-01-06 东南大学 一种基于本地噪声感知的联邦学习优化方法及系统
CN115577797B (zh) * 2022-10-18 2023-09-26 东南大学 一种基于本地噪声感知的联邦学习优化方法及系统
CN115775010A (zh) * 2022-11-23 2023-03-10 国网江苏省电力有限公司信息通信分公司 基于横向联邦学习的电力数据共享方法
CN115775010B (zh) * 2022-11-23 2024-03-19 国网江苏省电力有限公司信息通信分公司 基于横向联邦学习的电力数据共享方法
CN115860116A (zh) * 2022-12-02 2023-03-28 广州图灵科技有限公司 一种基于生成模型和深度迁移学习的联邦学习方法
CN116361398A (zh) * 2023-02-21 2023-06-30 北京大数据先进技术研究院 一种用户信用评估方法、联邦学习系统、装置和设备
CN116361398B (zh) * 2023-02-21 2023-12-26 北京大数据先进技术研究院 一种用户信用评估方法、联邦学习系统、装置和设备
CN116541712B (zh) * 2023-06-26 2023-12-26 杭州金智塔科技有限公司 基于非独立同分布数据的联邦建模方法及系统
CN116541712A (zh) * 2023-06-26 2023-08-04 杭州金智塔科技有限公司 基于非独立同分布数据的联邦建模方法及系统
CN117010484B (zh) * 2023-10-07 2024-01-26 之江实验室 基于注意力机制的个性化联邦学习泛化方法、设备、应用
CN117010484A (zh) * 2023-10-07 2023-11-07 之江实验室 基于注意力机制的个性化联邦学习泛化方法、设备、应用
CN117196069B (zh) * 2023-11-07 2024-01-30 中电科大数据研究院有限公司 联邦学习方法
CN117196069A (zh) * 2023-11-07 2023-12-08 中电科大数据研究院有限公司 联邦学习方法
CN117539449A (zh) * 2024-01-09 2024-02-09 清华大学 一种高效灵活的协作学习框架及方法
CN117539449B (zh) * 2024-01-09 2024-03-29 清华大学 一种高效灵活的协作学习框架及方法

Also Published As

Publication number Publication date
CN111768008B (zh) 2023-06-16
CN111768008A (zh) 2020-10-13

Similar Documents

Publication Publication Date Title
WO2021115480A1 (zh) 联邦学习方法、装置、设备和存储介质
CN110084377B (zh) 用于构建决策树的方法和装置
Guo et al. Promptfl: Let federated participants cooperatively learn prompts instead of models-federated learning in age of foundation model
CN112712182B (zh) 一种基于联邦学习的模型训练方法、装置及存储介质
CN109918184A (zh) 图片处理系统、方法及相关装置和设备
US20240135191A1 (en) Method, apparatus, and system for generating neural network model, device, medium, and program product
CN113065843B (zh) 一种模型处理方法、装置、电子设备和存储介质
CN111126621B (zh) 在线模型训练方法及装置
EP3707612B1 (en) Duplicative data detection
US11616741B2 (en) Systems and methods for a two-tier machine learning model for generating conversational responses
US20200251006A1 (en) Dynamic evaluation of event participants using a smart context-based quiz system
WO2022267085A1 (zh) 基于人工智能的数据中心数据管理方法及系统
CN115587633A (zh) 一种基于参数分层的个性化联邦学习方法
CN116957109A (zh) 基于联邦学习的模型构建方法、装置、设备及介质
CN116384504A (zh) 联邦迁移学习系统
WO2023169167A1 (zh) 模型训练方法、装置、设备及存储介质
CN107688582B (zh) 资源推荐模型的获取方法及装置
CN115910062A (zh) 音频识别方法、装置、设备及存储介质
US20220107817A1 (en) Dynamic System Parameter for Robotics Automation
CN115001692A (zh) 模型更新方法及装置、计算机可读存储介质和电子设备
CN114862098A (zh) 资源分配方法以及装置
CN114580517A (zh) 一种图像识别模型的确定方法及装置
CN111915102A (zh) 一种基于负载预测的工作平台工作量预测方法及系统
CN111208980B (zh) 一种数据分析处理方法和系统
CN117519996B (zh) 一种数据处理方法、装置、设备以及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20899997

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20899997

Country of ref document: EP

Kind code of ref document: A1