Learning model parameter updating method and electronic device for vertical federated learning
By publishing learning tasks and determining learning modes in the blockchain, the problem of low adaptability of vertical federated learning scenarios is solved, federated learning is achieved when there are many overlaps of users, data privacy is enhanced and data island problem is solved .
Patent Information
- Application Number
- CN202011301700.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-19
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2040-11-19
AI Technical Summary
The existing federated learning solutions based on blockchain are suitable for horizontal federated learning, and it is difficult to adapt to complex scenarios in vertical federated learning, and lack effective solutions.
The learning task is published in the blockchain. After the node completes the consensus, the initiator obtains the participant information and determines the learning mode, and updates the learning mode parameters through distributed learning, integrated learning or mixed mode, which is suitable for vertical federated learning scenarios.
This improves the scenario adaptability of vertical federated learning, realizes federated learning in situations where users overlap more, enhances data privacy and solves data island problems.
Smart Images

Figure CN112328617B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of federated learning, and in particular to a method and electronic device for updating learning mode parameters of vertical federated learning. Background Art
[0002] With the development of artificial intelligence technology, people have proposed the concept of "federated learning" to solve the problem of data silos. Both parties in federated learning can perform model training to obtain model parameters without providing their own data, and can avoid the problem of data privacy leakage.
[0003] Among them, vertical federated learning is to extract some users and user data with the same users but different user data features from the members when the data features of the members overlap less but the users overlap more, and conduct joint training of the machine learning model framework. For example, there are two members A and B in the same region, where member A is a bank and member B is an e-commerce platform. Members A and B have many common users in the same region, but A and B have different businesses and the recorded user data features are different. In particular, the user data features recorded by A and B may be complementary. In such a scenario, vertical federated learning can be used to help A and B build a joint machine learning prediction model to help A and B provide better services to their customers.
[0004] In related technologies, federated learning can be implemented based on a blockchain platform, with blockchain acting as a trusted third party to coordinate data exchange, processing, and transmission for multiple members of federated learning. However, the federated learning framework in related technologies is still limited to horizontal federated learning and can only be used in scenarios with more overlap in data features and less overlap in users. It cannot handle more complex scenarios in vertical federated learning.
[0005] At present, the method for updating learning model parameters based on blockchain in related technologies is only applicable to horizontal federated learning. No effective solution has been proposed for the problem of low adaptability to complex scenarios in vertical federated learning. Summary of the invention
[0006] The embodiments of the present application provide a method for updating learning mode parameters of vertical federated learning, an electronic device, and a storage medium, so as to at least solve the problem that the federated learning scheme based on blockchain in the related art has low adaptability to complex scenarios in vertical federated learning.
[0007] In a first aspect, an embodiment of the present application provides a method for updating learning mode parameters of vertical federated learning, including:
[0008] The initiator publishes the learning task in the blockchain, and the nodes in the blockchain reach a consensus on the learning task;
[0009] The initiator obtains the participants corresponding to the learning task, and uploads the information of the participants to the blockchain, and the nodes in the blockchain reach a consensus on the information of the participants;
[0010] The initiator and the participant determine a learning model, and the initiator uploads the learning model to the chain;
[0011] After the nodes in the blockchain reach a consensus on the learning mode, the blockchain returns a training start signal to the initiator and the participants.
[0012] In some embodiments, when the initiator has a general model corresponding to the learning task and only needs the data features of the participants, the learning mode includes:
[0013] The initiator splits the learning task into multiple parallel distributed learning tasks, and distributes the distributed learning tasks to different participants for execution according to the data characteristics of the participants.
[0014] In some embodiments, when the initiator has a general model corresponding to the learning task and needs the sub-model and data of the participant, the learning mode includes:
[0015] The local training result of each member party is used as hidden information, wherein the member parties include the initiator and the participant;
[0016] Each member party performs machine learning training again on all the hidden information to obtain the parameters of the overall model.
[0017] In some embodiments, when the initiator has a general model corresponding to the learning task and needs the data features and sub-models of the participants, the learning mode includes:
[0018] The initiator splits the learning task into multiple parallel distributed learning tasks, and assigns the distributed learning tasks to different participants for execution according to the data characteristics of the participants, thereby obtaining an initial learning model;
[0019] The initiator uses the initial learning model as a sub-model of the initiator, and obtains a local training result according to the sub-model;
[0020] The local training results of each member party are used as hidden information, and each member party performs machine learning training again on all the hidden information to obtain the parameters of the overall model, wherein the member parties include the initiator and the participant.
[0021] In some embodiments, when the initiator does not have a general model corresponding to the learning task, the learning mode further includes:
[0022] Each member party inputs the training result into the benchmark model locally for fusion to obtain the degree of fusion, wherein the member party includes the initiator and the participant;
[0023] When the fusion degree is greater than or equal to the fusion threshold, each of the member parties inputs the training results of all the member parties into the upper-level training model for training.
[0024] In some embodiments, the initiator obtains the participant corresponding to the learning task, including at least one of the following:
[0025] The initiator obtains the participants according to the task requirements in the task information;
[0026] The initiator obtains application information and takes the applicant corresponding to the application information as the participant.
[0027] In some embodiments, the initiator obtains application information, and takes the applicant corresponding to the application information as the participant, which includes:
[0028] The initiator cleans and reviews the data and data features of the participants, and removes the participants whose data and / or data features are inconsistent with the task requirements.
[0029] In some embodiments, the initiator obtains application information, and after taking the applicant corresponding to the application information as the participant, the following further comprises:
[0030] The initiator and the participants encrypt their respective data, and the initiator removes the participants whose encrypted data are inconsistent with the task requirements.
[0031] In a second aspect, an embodiment of the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the method for updating learning mode parameters of vertical federated learning as described in the first aspect above is implemented.
[0032] In a third aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, which, when executed by a processor, implements the learning mode parameter updating method of vertical federated learning as described in the first aspect above.
[0033] Compared with the related art, the learning mode parameter updating method for vertical federated learning provided in the embodiment of the present application is that the initiator publishes the learning task in the blockchain, the nodes in the blockchain reach a consensus on the learning task, the initiator obtains the participant corresponding to the learning task, and uploads the information of the participant to the chain, the nodes in the blockchain reach a consensus on the task information of the learning task and the information of the participant, the initiator and the participant determine the learning mode, the initiator uploads the learning mode to the chain, and after the nodes in the blockchain reach a consensus on the learning mode, the blockchain returns a training start signal to the initiator and the participant, which solves the problem that the learning mode parameter updating method based on blockchain is only applicable to horizontal federated learning, and has low adaptability to complex scenarios in vertical federated learning, and provides an implementation solution for vertical federated learning, thereby improving the scenario adaptability of vertical federated learning.
[0034] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0036] Figure 1 It is a schematic diagram of an application environment of a learning mode parameter updating method of vertical federated learning according to an embodiment of the present application;
[0037] Figure 2 is a flowchart of a method for updating learning mode parameters of vertical federated learning according to an embodiment of the present application;
[0038] Figure 3 is a schematic diagram of a distributed learning mode according to an embodiment of the present application;
[0039] Figure 4 is a schematic diagram of integrated learning according to an embodiment of the present application;
[0040] Figure 5 is a flow chart of a method for determining a learning mode according to an embodiment of the present application;
[0041] Figure 6 is a flow chart of a method for determining a learning mode according to a preferred embodiment of the present application;
[0042] Figure 7This is a hardware structure block diagram of a terminal of a learning mode parameter updating method for vertical federated learning according to an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means, and should not be understood as insufficient contents disclosed in the present application.
[0044] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0045] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to greater than or equal to two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The terms "first", "second", "third" and the like involved in the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects.
[0046] The learning mode parameter updating method of vertical federated learning provided in this application can be applied to Figure 1 In the application environment shown, Figure 1 is a schematic diagram of an application environment of a learning mode parameter updating method of vertical federated learning according to an embodiment of the present application, such as Figure 1 As shown. Data can be divided into user dimensions and feature dimensions. For example, when the data comes from a bank and an e-commerce platform respectively, the users of the bank and the e-commerce platform may overlap to a large extent, but the user data features obtained by the bank and the e-commerce platform will be different. For example, the bank can obtain data features such as the user's monthly income, family members, and age, and the e-commerce platform can obtain data features such as the user's commodity consumption. When the bank needs to analyze user data, it can publish the learning task of vertical federated learning in the blockchain as the initiator, and the e-commerce platform can join the learning task as a participant. The bank and the e-commerce platform jointly determine the learning mode of the learning task to conduct model training for the learning task.
[0047] This embodiment provides a method for updating learning mode parameters of vertical federated learning. Figure 2 is a flow chart of a method for updating learning mode parameters of vertical federated learning according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0048] In step S210, the initiator publishes the learning task in the blockchain, and the nodes in the blockchain reach a consensus on the learning task.
[0049] In this application, the initiator is the initiator of vertical federated learning. Any organization or platform with federated learning needs can act as an initiator to initiate a vertical federated learning task. The participants are participants who accept the invitation of the initiator or actively enter the vertical federated learning. In this embodiment, the initiator and the participants need to interact through the blockchain, so the initiator needs to publish the learning task to the blockchain.
[0050] The learning task is related to the actual needs of the initiator, which can be divided into two situations and a total of 7 scenarios. The first situation is that the initiator has a clear business scenario and the initiator has data related to the business scenario, including 4 scenarios, namely: Scenario 1. The initiator has a sub-model of its own data and a total model corresponding to the learning task, and other participants need to provide the corresponding data features in the total model; Scenario 2. The initiator has a sub-model of its own data and a total model corresponding to the learning task, and other participants need to provide the sub-model and data corresponding to the total model; Scenario 3. The initiator has a sub-model of its own data and a total model corresponding to the learning task, and other participants need to provide the corresponding data features, sub-models and data in the total model; Scenario 4. The initiator has a sub-model of its own data, but no total model, and has no clear data features and sub-model requirements for other participants. The second situation is that the initiator has a clear business scenario, but does not have the corresponding data, including 3 scenarios, namely: Scenario 5, the initiator has a total model, and has clear data feature requirements for all participants; Scenario 6, the initiator has a total model, and has clear sub-model and data requirements for all participants; Scenario 7, the initiator does not have a total model, and does not have clear data features and sub-model requirements for all participants. It should be noted that the data features in this application are the types of data, such as height, weight, and blood type, etc. The data is a specific value. For example, the height data is 160cm, the weight data is 50kg, and the blood type data is type A. The sub-model is the local model of the initiator and the local model of the participant. The total model is a learning model framework corresponding to the learning task. In the process of obtaining the total model, it is necessary to integrate the data, data features, and at least one of the sub-models of different members.
[0051] The initiator determines the learning task based on the above 7 scenarios. The learning task includes task type and task requirements. The task type is used to define whether the initiator has data, sub-models and / or total models. The task requirements are used to define the number of participants and whether the initiator has clear data, sub-models and / or data characteristics for the participants. Then the initiator publishes the learning task to the blockchain. The nodes in the blockchain are different institutions or platforms in the blockchain. Most of the nodes need to recognize the learning task in order to reach a consensus on the learning task in the blockchain and complete the publishing process of the learning task.
[0052] In step S220, the initiator obtains the participants corresponding to the learning task and uploads the information of the participants to the chain, and the nodes in the blockchain reach a consensus on the information of the participants.
[0053] The participants in this embodiment can be any institution or platform that has a common user with the initiator. The user can be from a node in the blockchain or an institution or platform outside the blockchain. The initiator can actively look for an institution or platform as a participant, and the institution or platform can also apply to be a participant in vertical federated learning. The number of participants is determined by the initiator according to the actual needs of the scenario.
[0054] After obtaining the participants, the information of the participants needs to be uploaded to the chain, where the information of the participants includes the identity information of the participants, such as the name of the institution and business license information of the participants, and also includes the data characteristics provided by the participants. After the information of the participants is uploaded to the chain, the initiator and the participants can determine the learning mode only when the nodes in the blockchain reach a consensus on the information of the participants.
[0055] In step S230, the initiator and the participants determine the learning mode, and the initiator uploads the learning mode to the chain.
[0056] Among them, the task information includes the task type and task requirements of the learning task, and the task type and task requirements correspond to the specific scenarios of the participants. In this embodiment, the overall model of the initiator is a simple machine learning model architecture, and the learning mode needs to determine the implementation method of the upper-level training model of the overall model, for example, whether the training tasks of the upper-level training model need to be split, how to determine the input, how to merge the sub-models of different participants, etc. After the initiator and the participants jointly determine the learning mode, the determined learning mode needs to be put on the chain for consensus.
[0057] Step S240: After the nodes in the blockchain reach consensus on the learning mode, the blockchain returns a training start signal to the initiator and participants.
[0058] After the nodes in the blockchain reach consensus on the learning model, the initiator and participants can train the overall model according to the determined learning model.
[0059] Through the above steps S210 to S240, after publishing the learning task to the blockchain, the initiator interacts with the participants to jointly determine the learning mode and reach a consensus in the blockchain to complete the establishment of the learning task, so that members can conduct federated learning when there is a large amount of user overlap. The data is encrypted based on the blockchain, which improves the privacy of the data and solves the problem of data islands. Furthermore, with respect to the method for updating learning mode parameters based on the blockchain in the related technology, this embodiment also provides an implementation solution for the problem of low adaptability to complex scenarios in vertical federated learning, thereby improving the scenario adaptability of vertical federated learning.
[0060] In the case where the initiator has the overall model, the initiator determines the learning mode, as follows:
[0061] In some embodiments, the initiator has a total model corresponding to the learning task, and only needs the data features of the participants. In this case, the learning mode can be a distributed learning mode, wherein the distributed learning mode is a method in which the initiator and the participants each complete part of the task in the total learning task, specifically: the initiator splits the learning task into multiple parallel distributed learning tasks, and distributes the distributed learning tasks to different participants for execution according to the data features of the participants. In this embodiment, the data features of the participants required by the initiator are additional data features that the initiator does not have. For example, when a bank is the initiator, it can only obtain the user's income. When the participants include hospitals, the bank can obtain the height or blood type of the same user through the hospital to complete the model training. In the case where the initiator only needs additional data features, the learning task can be regarded as a distributed learning task, and the centralized learning task can be randomly split into multiple parallel distributed learning tasks and handed over to different participants for execution. Figure 3 is a schematic diagram of a distributed learning mode according to an embodiment of the present application, such as Figure 3 As shown in the figure, the initiator and the participants are regarded as members in the vertical federated learning. A, B and C are all members. The input layer is the distributed learning task completed locally by each member. The results of the distributed learning task are input into the overall model for training. The final training result is obtained in the output layer, y GThat is the output result. It should be noted that the distributed learning task is handed over to the participant to whom the data belongs. Each participant accepts part of the learning task and performs training. The training results of all participants together form a complete upper-level training model, complete the training of the overall model, and improve the speed of overall model training. The method of determining the learning mode in this embodiment is applicable to scenarios 1 and 5.
[0062] In some embodiments, when the initiator has a total model corresponding to the learning task and needs the sub-models and data of the participants, the learning mode is an integrated learning mode, where the integrated learning mode is a method of forming a prediction model based on the results of multiple machine learning. In this embodiment, the initiator and the participants are regarded as members in vertical federated learning, and the local training results of each member are used as hidden information. Each member will perform machine learning training on all hidden information again to obtain the parameters of the total model. In this embodiment, the initiator determines to train the total model in the learning mode of integrated learning. Figure 4 is a schematic diagram of integrated learning according to an embodiment of the present application, such as Figure 4 As shown, if the initiator needs the sub-model and data of the participants, it is necessary to merge the sub-models and data. In the integrated learning mode, each member has its own sub-model. A, B and C are all members. Each member first trains the sub-model locally. The input layer of the sub-model is the local data of each member. After the local data is processed by the hidden layer of the sub-model, the sub-model of each member will output hidden information. Each member uses the hidden information of all members as the input of the hidden layer of the total model, trains the total model locally, and obtains the final training result in the final output layer. Specifically, the training of the total model can be achieved through a classifier or a neural network model. In this embodiment, since the initiator has the total model, the hidden information and the upper neural network required to be output by each participant are predetermined, and the problem of heterogeneous data failing to execute the model will not be caused. The method of determining the learning mode in this embodiment is applicable to scenarios 2 and 6.
[0063] In some of the embodiments, the initiator has an overall model corresponding to the learning task and needs the data features and sub-models of the participants. The initiator trains the overall model by using a hybrid mode of distributed learning and ensemble learning. For example, the initiator fuses the sub-models of each participant with its own sub-model through distributed learning to obtain an initial learning model, and then the initiator fuses the initial learning model with the sub-models of each participant through ensemble learning. Figure 5 is a flow chart of a method for determining a learning mode according to an embodiment of the present application, such as Figure 5 As shown, the method comprises the following steps:
[0064] In step S510, the initiator splits the learning task into multiple parallel distributed learning tasks, and assigns the distributed learning tasks to different participants for execution according to the data characteristics of the participants, thereby obtaining an initial learning model.
[0065] In step S520, the initiator uses the initial learning model as a sub-model of the initiator, and obtains a local training result according to the sub-model.
[0066] Step S530: the local training results of each member are used as hidden information, and each member performs machine learning training on all hidden information again to obtain the parameters of the overall model, wherein the member parties include the initiator and the participants.
[0067] Through the above steps S510 to S530, when the initiator needs additional data features and sub-models at the same time, the training accuracy of the total model can be improved by integrating the sub-models and data features of each participant in the final total model obtained by using distributed learning and ensemble learning. The learning mode determination method in this embodiment is applicable to scenario 3.
[0068] When the initiator does not have the overall model, the learning mode determination process is as follows.
[0069] In some of the embodiments, when the initiator does not have an overall model corresponding to the learning task, the learning mode is a fixed benchmark mode. In the fixed benchmark mode, the initiator and the participating parties all serve as members of vertical federated learning. Each member inputs the training results into the benchmark model locally for fusion to obtain the degree of fusion, wherein the training results are the training results of all members. When the degree of fusion is greater than or equal to the fusion threshold, each member inputs the training results of all members into the upper-level training model for training. The fusion threshold is used to characterize the consistency of the data features or sub-models of each member. The higher the consistency, the better the training effect of the final overall model. The fusion threshold can be set by the initiator based on experience, and the upper-level training model can be selected according to the needs of the initiator, such as a multilayer perceptron (MLP) or a linear regression (LR). The fixed benchmark mode in this embodiment does not require discussion between the initiator and the participants. When all member parties provide data features, the data features of all member parties can be input into the MLP for prediction to obtain the final result. When all member parties provide sub-models, after predicting the local training results, each member party can input the prediction results into the upper-level model, such as LR for training to obtain the final result. Optionally, each member party can also use the prediction results as the input of the new MLP for learning to obtain the final prediction result.
[0070] In this embodiment, when the data features of each member party or the degree of integration of the sub-models is high, the local training results of each member party can be input into a predetermined upper-level training model for training to obtain the final prediction result, thereby providing a method for updating the learning mode parameters of vertical federated learning when the initiator does not have an overall model. The method in this embodiment is applicable to scenarios 4 and 7.
[0071] In some embodiments, when the initiator does not have a master model, the learning mode is a negotiation mode. Specifically, after the initiator confirms all the participants, since the initiator does not have a master model, the initiator and the participants can discuss until a generally accepted master model is reached. After obtaining the master model, the learning mode will also be converted into a distributed learning mode and / or an integrated learning mode.
[0072] The above embodiments are methods for determining learning modes in different situations.
[0073] In some embodiments, the initiator obtains the participants corresponding to the learning task, including: the initiator actively searches for and obtains the participants according to the task requirements in the task information, or other institutions or platforms actively apply to the initiator to become participants of the learning task after obtaining the task information of the learning task. After receiving the application, the initiator can obtain the application information and use the applicant corresponding to the application information as a participant, wherein the participant is not limited to the nodes in the blockchain. In this embodiment, a variety of methods for obtaining participants are provided, which expands the selection range of participants, can provide more data for the training of the overall model, and finally improve the accuracy of the overall model.
[0074] Furthermore, the participants and applicants actively acquired by the initiator are not the final participants of the learning task, but are regarded as preliminary participants. The initiator needs to review these preliminary participants.
[0075] In some embodiments, the initiator may audit the participants in such a way that the initiator cleans and audits the data and data features of the participants, and removes the participants whose data and / or data features are inconsistent with the task requirements. For example, if the initiator requires data with a height greater than 160 cm, and the data feature provided by the participant is weight, then the data feature does not meet the task requirements and the participant will be removed, or if the height provided by the participant is less than 160 cm, the participant will also be removed. Optionally, the initiator may also audit the amount of data of the participant, and if the amount of data of the participant is small, the participant does not meet the requirements.
[0076] The audit method can also be that the initiator and the participants encrypt their respective data, that is, the initiator only encrypts the data belonging to itself, and the participants also only encrypt the data belonging to themselves, and then the initiator removes the participants whose encrypted data is inconsistent with the task requirements. The data in this embodiment is diverse. When the initiator is a financial enterprise, the data may include the user's deposits, bank statements, personal information, etc. When the participant is a hospital, the data may be the user's blood type, height, etc. In this embodiment, the initiator and all the participants perform encrypted text alignment to determine a common intersection of data. For example, the initiator and the participants have a common user group, and each has its own users. After the user's data is encrypted, the encrypted data is judged. If there are too few common users, it is considered that the participant's data does not meet the task requirements and the participant is removed.
[0077] The initiator reviews the participants and can screen out the participants who meet the requirements as the final participants. The participants who better meet the requirements can conduct model training together to improve the accuracy of the overall model.
[0078] Through screening, the initiator selects the final participants and records the participants' information on the chain. Then the initiator and the participants jointly determine the final learning model, and the initiator records the learning model on the chain.
[0079] The following describes and illustrates the embodiments of the present application through preferred embodiments. For example, in a stock price prediction scenario, institution A has a set of data features and uses a gated recurrent unit (GRU) model to predict stock prices. However, at this time, A is not satisfied with the training effect of its own sub-model and data, so it initiates a vertical federated learning task on the blockchain platform. Figure 6 is a flow chart of a method for determining a learning mode according to a preferred embodiment of the present application. Figure 6 As shown, the method comprises the following steps:
[0080] In step S610, Party A, as the initiator, determines a vertical federated learning task of stock value estimation and defines the task type and task requirements, including the number of participants as N, the required scenario as the stock price prediction scenario, the feature data related to the corresponding stock, and the learning task record is uploaded to the chain.
[0081] Step S620: The nodes in the blockchain reach a consensus on the learning task and confirm that the task information of the learning task is uploaded to the chain.
[0082] Step S630: After the task information is uploaded to the chain, the task is completed and released. Party A looks for preparatory participants to join its vertical federated learning task according to its own needs. At the same time, institutions that have a cooperative relationship with Party A can also actively apply to join the learning task as preparatory participants according to the specific needs of the task. Different institutions have different data characteristics.
[0083] Step S640, after receiving the information of the preliminary participants, Party A reviews and screens the preliminary participants. The review method can be that Party A cleans the data and data features of the cooperative institutions, and can also perform encrypted text alignment for Party A and all preliminary participants to determine a common data intersection.
[0084] In step S650, Party A completes the screening of the potential participants, determines the participants of the final learning task, and records the information of the participants on the chain.
[0085] Step S660: The nodes in the blockchain reach a consensus on the information of the participants and confirm that all the information of the participants and the task information are uploaded to the chain together.
[0086] In step S670, according to the task type of the learning task, Party A and the participating parties discuss and determine the final learning mode, that is, the upper-layer training model, such as the GRU model, and the initiator records it on the chain.
[0087] Step S680: The nodes in the blockchain reach a consensus on the learning mode and confirm that the learning mode information is uploaded to the chain.
[0088] Step S690: After consensus is reached, the blockchain returns a signal to Party A and all participants that training has started.
[0089] Through the above steps S610 to S690, this embodiment provides a method for updating the learning mode parameters of vertical federated learning, and performs privacy encryption on data based on blockchain. The initiator and the participants protect the original data and some intermediate data that are easy to leak information from each other, while solving the problem of data non-circulation and coping well with the situation of data islands. Furthermore, it also solves the problem of low adaptability to complex scenarios in vertical federated learning.
[0090] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0091] The method embodiments provided in this application can be executed in a terminal, a computer or a similar computing device. Taking running on a terminal as an example, Figure 7 This is a hardware structure block diagram of a terminal of a method for updating learning mode parameters of vertical federated learning in an embodiment of the present application. Figure 7 As shown, the terminal 70 may include one or more ( Figure 7 Only one is shown in the figure) a processor 702 (the processor 702 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 704 for storing data. Optionally, the terminal may also include a transmission device 706 and an input / output device 708 for communication functions. It can be understood by those skilled in the art that Figure 7 The structure shown is for illustration only and does not limit the structure of the above terminal. Figure 7 More or fewer components as shown, or with Figure 7 Different configurations shown.
[0092] The memory 704 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the detection method of the newly appeared entity in the embodiment of the present application. The processor 702 executes various functional applications and data processing by running the computer program stored in the memory 704, that is, to implement the above method. The memory 704 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 704 may further include a memory remotely arranged relative to the processor 702, and these remote memories may be connected to the terminal 70 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0093] The transmission device 706 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by the communication provider of the terminal 70. In one example, the transmission device 706 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 706 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0094] This embodiment further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0095] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0096] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0097] S1, the initiator publishes the learning task in the blockchain, and the nodes in the blockchain reach consensus on the learning task;
[0098] S2, the initiator obtains the participants corresponding to the learning task and uploads the information of the participants to the chain, and the nodes in the blockchain reach a consensus on the information of the participants;
[0099] S3, the initiator and participants determine the learning mode based on the task information of the learning task and upload the learning mode to the chain;
[0100] S4: After the nodes in the blockchain reach consensus on the learning model, the blockchain returns a training start signal to the initiator and participants.
[0101] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0102] In addition, in combination with the learning mode parameter updating method of vertical federated learning in the above embodiment, the embodiment of the present application can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by the processor, any of the learning mode parameter updating methods of vertical federated learning in the above embodiment is implemented.
[0103] Those skilled in the art should understand that the various technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the various technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0104] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A learning model parameter updating method for vertical federated learning, characterized in that: include: The initiator publishes the learning task in the blockchain, and the nodes in the blockchain reach a consensus on the learning task; The initiator obtains the participants corresponding to the learning task, and uploads the information of the participants to the blockchain, and the nodes in the blockchain reach a consensus on the information of the participants; The initiator and the participant determine a learning model, and the initiator uploads the learning model to the chain; After the nodes in the blockchain reach a consensus on the learning mode, the blockchain returns a training start signal to the initiator and the participant; The learning task includes a task type and a task requirement, wherein the task type is used to define whether the initiator has data, sub-models and / or overall models, and the task requirement is used to define the number of the participants and whether the initiator has clear requirements for the data, sub-models and / or data features of the participants; In the case that the initiator does not have a general model corresponding to the learning task, the learning mode further includes: Each member party inputs the training result into the benchmark model locally for fusion to obtain the degree of fusion, wherein the member party includes the initiator and the participant; When the fusion degree is greater than or equal to the fusion threshold, each of the member parties inputs the training results of all the member parties into the upper-level training model for training; The initiator obtaining the participant corresponding to the learning task includes: the initiator obtaining application information and taking the applicant corresponding to the application information as the participant; The initiator obtains the application information, and takes the applicant corresponding to the application information as the participant, which includes: The initiator cleans and reviews the data and data features of the participants, and removes the participants whose data and / or data features are inconsistent with the task requirements; The fusion degree threshold is used to characterize the consistency of data features of each member party or sub-model.
2. The learning mode parameter updating method of vertical federated learning according to claim 1 is characterized in that: In the case where the initiator has a general model corresponding to the learning task and only needs the data features of the participants, the learning mode includes: The initiator splits the learning task into multiple parallel distributed learning tasks, and distributes the distributed learning tasks to different participants for execution according to the data characteristics of the participants.
3. The learning mode parameter updating method of vertical federated learning according to claim 1 is characterized in that: In the case where the initiator has a general model corresponding to the learning task and needs the sub-model and data of the participant, the learning mode includes: The local training result of each member party is used as hidden information, wherein the member parties include the initiator and the participant; Each member party performs machine learning training again on all the hidden information to obtain the parameters of the overall model.
4. The learning mode parameter updating method of vertical federated learning according to claim 1 is characterized in that: In the case where the initiator has a general model corresponding to the learning task and needs the data features and sub-models of the participants, the learning mode includes: The initiator splits the learning task into multiple parallel distributed learning tasks, and assigns the distributed learning tasks to different participants for execution according to the data characteristics of the participants, thereby obtaining an initial learning model; The initiator uses the initial learning model as a sub-model of the initiator, and obtains a local training result according to the sub-model; The local training results of each member party are used as hidden information, and each member party performs machine learning training again on all the hidden information to obtain the parameters of the overall model, wherein the member parties include the initiator and the participant.
5. The learning mode parameter updating method of vertical federated learning according to claim 1, characterized in that: The initiator obtaining the participants corresponding to the learning task further includes: The initiator obtains the participants according to the task requirements in the task information.
6. The learning mode parameter updating method of vertical federated learning according to claim 1, characterized in that: After the initiator obtains the application information and takes the applicant corresponding to the application information as the participant, the following further includes: The initiator and the participants encrypt their respective data, and the initiator removes the participants whose encrypted data are inconsistent with the task requirements.
7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the learning mode parameter updating method for vertical federated learning according to any one of claims 1 to 6.
8. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the learning mode parameter updating method of vertical federated learning according to any one of claims 1 to 6 when running.
Citation Information
Patent Citations
Model joint training method and device for protecting privacyPrivacy protection model joint training method and device
CN111340242A
Medical data security sharing method based on block chain and federated learning
CN111698322A