Dispersion type machine learning model training method and system therefor

JP2025043376AActive Publication Date: 2025-03-31QUAN CHENG LABORATORY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024116686
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-18
Filing Date
2024-07-22
Publication Date
2025-03-31
Estimated Expiration
2044-07-22

Smart Images

  • Figure 2025043376000001_ABST
    Figure 2025043376000001_ABST
Patent Text Reader

Abstract

To provide a dispersion type machine learning model training method and a system therefor which realize the privacy protection of high-level confidential data.SOLUTION: A method groups participants. Reconstruction participants receive a global model Mglobal distributed from a block chain, and transmit the same to general participants in the group. The general participants execute the training of a local model with the global model as an initial model, divide the local model into shares and distribute the same within the group. In this way, each general participant receives the model shear of the other general participants in the group, compacts the same, and transmits a compacted result to the reconstruction participants. The reconstruction participants reconstruct the compacted result in the group, and upload the obtained group model to the block chain. The block chain compacts the group model again, distributes the current round of the global model to the reconstruction participants, and uses the same as the initial model for training the next round.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the technical field of blockchain, and in particular to a method and system for training a distributed machine learning model. [Background technology]

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Machine learning is a discipline that integrates multidisciplinary knowledge such as statistics, probability theory, and computer science to achieve some specific tasks through automatic learning and experience improvement of computer systems. Machine learning models learn rules and modes from a large amount of training data, and finally obtain prediction and decision-making capabilities for new data. Machine learning is a typical data-driven task, and the final performance of the model is closely related to the quantity and quality of the training data. Traditional machine learning solutions usually require trainers to collect a large amount of data for model training, and these data often contain confidential information of each data provider, and the centralized storage of data from multiple parties brings about the risk of privacy leakage of confidential data.

[0004] Related researchers have conducted a series of in-depth studies on the above problems, working to enable each participant to participate in data analysis and modeling tasks under the premise of protecting data privacy. McMahan et al. first proposed a federated learning framework to enable multiple parties to jointly train machine learning models together. During training, each participant does not need to send private raw data to the server, and training of the machine learning model can be realized only by parameter exchange. Each client participating in the training task trains a local model based on local data, and the central server is responsible for weighting the local model, thereby obtaining a global model. After multiple iterative training, a model close to the result of centralized machine learning can finally be obtained.

[0005] Although the above method effectively reduces the risk of privacy leakage caused by data collection in traditional training methods, it still has some shortcomings.

[0006] 1. The training process of federated learning requires the participation of a center server that is responsible for receiving and aggregating each parameter and distributing the global model, making the center server essential in the entire architecture. Therefore, traditional solutions face the risk of a single point of failure and the misconduct of the center server. If the center server fails or distorts the global model in some way through misconduct, unexpected losses will occur.

[0007] 2. Federated learning uses parameter exchange to jointly train models and ensures that each participant has local raw training data. However, related research has shown that malicious participants can infer some confidential information from the plaintext model through side-channel attacks and other means, so this solution still faces the risk of privacy leakage of confidential data. Summary of the Invention

[0008] To solve the above problems, the present invention provides a method and system for training a distributed machine learning model, which is based on secret sharing and smart contract technologies, ensures that each participant's confidential data is local, and achieves a higher level of confidential data privacy protection through the associated operation of model aggregation, and is applicable to scenarios in which multiple participants cooperate to jointly train machine learning models.

[0009] To achieve the above objectives, the present invention adopts the following technical solutions:

[0010] In a first aspect, the present invention provides a method for producing a composition comprising: grouping all participants, each group including general participants and reconstruction participants; A reconstruction participant receives the distributed global model from the blockchain and transmits it to general participants in the group; A general participant trains a local model using the global model as an initial model, divides the trained local model into shares and distributes them within the group, so that each general participant receives the model shares of other general participants in the group, then aggregates them, and sends the aggregated results to the reconstruction participant; The present invention provides a method for training a distributed machine learning model, the method including the steps of: a reconstruction participant reconstructing the aggregation results in the group, and uploading the obtained group model to the blockchain, thereby causing the blockchain to aggregate the group models of each group again, and distributing the obtained global model of the current round to the reconstruction participants as an initial model for training in the next round.

[0011] In an optional embodiment, when distributing model shares within a group, each general participant receives only one of the model shares.

[0012] In an optional embodiment, the general participants divide the local model into shares according to a secret sharing distribution algorithm, and the number of divided shares is n-1, where n is the total number of the general participants.

[0013] In an optional embodiment, each public participant may aggregate the model shares of other public participants in the group and then calculate the group model share.

number

number

[0014] In an alternative embodiment, the group model is in the form of a clear text.

[0015] In a second aspect, the present invention is applied to a blockchain node, receiving a group model for each training group in the current round; aggregating group models for each training group; distributing the aggregated current round global model to the reconstruction participants and transmitting it through the reconstruction participants to general participants in the group; The group model is obtained by the reconstruction participant reconstructing the aggregated results within the group, and the aggregated results are obtained by general participants in the group training local models using the global model as the initial model, dividing the local models into shares and distributing them within the group, and each general participant receiving and aggregating the model shares of other general participants in the group.

[0016] In an optional embodiment, when a smart contract is deployed in the blockchain node and the number of received group models reaches a set threshold, the smart contract automatically invokes and aggregates the group models to obtain a global model of the current round, and uploads the global model of the current round to the blockchain node as the initial model for training in the next round.

[0017] In a third aspect, the present invention provides a method for producing ... composition comprising: a grouping module arranged to group all participants, each group including a general participant and a reconstruction participant; a receiving module arranged for the reconstruction participant to receive the distributed global model from the blockchain and transmit it to general participants in the group; A local training module in which general participants use the global model as an initial model to train a local model, and divide the trained local model into shares and distribute them within the group, so that each general participant receives the model shares of other general participants in the group, then aggregates them, and sends the aggregated results to the reconstruction participant; and a reconstruction module arranged so that the reconstruction participants reconstruct the aggregation results in their groups and upload the resulting group model to the blockchain, thereby causing the blockchain to re-aggregate the group models of each group and distribute the resulting global model of the current round to the reconstruction participants as the initial model for training in the next round.

[0018] In a fourth aspect, the present invention provides a method for producing ... composition comprising: a receiving module arranged to receive a group model for each training group in a current round; an aggregation module arranged to aggregate group models for each training group; a transmission module arranged to distribute the aggregated current round global model to the reconstruction participants and transmit it to general participants in the group through the reconstruction participants; The group model is obtained by a reconstruction participant reconstructing the aggregation results within the group, and the aggregation results are obtained by general participants in the group training local models using a global model as an initial model, dividing the local models into shares and distributing them within the group, and each general participant receiving and aggregating the model shares of other general participants in the group, and a blockchain node is provided.

[0019] In a fifth aspect, the present invention provides a method for implementing a blockchain technology comprising: The client is used for the steps of grouping all participants, each group including general participants and reconstruction participants, the steps of the reconstruction participants receiving the global model distributed from the blockchain and sending it to the general participants in the group, the steps of the general participants training a local model using the global model as an initial model, dividing the trained local model into shares and distributing it within the group, so that each general participant receives the model shares of other general participants in the group, then aggregates them, and sends the aggregated results to the reconstruction participants, and the steps of the reconstruction participants reconstructing the aggregated results within the group, and uploading the obtained group model to the blockchain; The blockchain nodes provide a distributed machine learning model training system that is used to re-aggregate the group models of each group and distribute the resulting global model of the current round to the reconstruction participants as the initial model for the next round of training.

[0020] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0021] The present invention realizes the training of distributed machine learning models based on secret sharing and smart contracts, ensures that the confidential data of each participant is local, and instead of the central server in the federated learning solution, introduces smart contract methods to realize related operations of model aggregation, thereby achieving a higher level of privacy protection for confidential data, and is applicable to scenarios in which multiple participants cooperate to jointly train machine learning models.

[0022] The present invention distributes model shares through a secret sharing method, so that no participant can obtain the plaintext model of any other single participant, and each participant does not need to disclose local training data. Joint training of machine learning models can be realized only through the method of intermediate parameter exchange, which effectively ensures the security of each participant's model data and the privacy protection of confidential information, and avoids problems such as degradation of model performance and excessive computational effort caused by protecting model parameters through technologies such as differential privacy and homomorphic encryption.

[0023] The present invention divides participants into multiple federated learning training groups, which can effectively reduce the number of share divisions and reduce the communication costs caused by information exchange between each participant; secondly, none of the participants' plaintext models are reconstructed throughout the entire process, only the group model or the global model is reconstructed, and effective protection against a single participant's model is realized.

[0024] The present invention introduces blockchain and smart contracts to replace the central server in traditional federated learning, realizes distributed machine learning model training, and effectively solves the problems of a single point of failure of servers caused by a centralized server and fraudulent behavior of malicious servers.

[0025] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

[0026] The drawings in the specification which form a part of the present invention are intended to provide a further understanding of the present invention, and the illustrative embodiments of the present invention and the description thereof are intended to interpret the present invention and are not intended to unduly limit the present invention. [Brief description of the drawings]

[0027] [Figure 1] 1 is a flowchart of a method for training a distributed machine learning model provided by Example 1 of the present invention; [Diagram 2] FIG. 2 is a schematic diagram of model share distribution within a group provided by Example 1 of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0028] In the following the invention will be further explained in connection with the figures and examples.

[0029] It should be noted that the following detailed description is all illustrative and is intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art.

[0030] It should be noted that the terms used herein are merely for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention. For example, unless the context clearly indicates otherwise, the singular forms used herein are intended to include the plural forms, and the terms "comprise" and "contain" and any variations thereof are intended to be non-exclusively inclusive, and for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to the steps or units explicitly listed, and may further include other steps or units that are not listed or are inherent to these processes, methods, products, or devices.

[0031] Where not inconsistent, embodiments of the invention and features in the embodiments may be combined with each other. EXAMPLES

[0032] This embodiment is applied to a client, grouping all participants, each group including general participants and reconstruction participants; A reconstruction participant receives the distributed global model from the blockchain and transmits it to general participants in the group; A general participant trains a local model using the global model as an initial model, divides the trained local model into shares and distributes them within the group, so that each general participant receives the model shares of other general participants in the group, then aggregates them, and sends the aggregated results to the reconstruction participant; We propose a method for training a distributed machine learning model, which includes the steps of: the reconstruction participants reconstructing the aggregation results within their groups and uploading the obtained group model to the blockchain, thereby causing the blockchain to re-aggregate the group models of each group; and distributing the obtained global model of the current round to the reconstruction participants as the initial model for the next round of training, until the global model converges.

[0033] The solution of this embodiment will be described in detail below with reference to FIG.

[0034] (1) Divide all participants into k different training groups, g, where each training group is indexed by g.

number

number

[0035] (2) General participants in each training group g

number

number

[0036] (3) After the training for one round is completed, the general participants in the training group

number

[0037] Specifically, as shown in Figure 2, the general participants in the training group

number

number

number

[0038] Secret Sharing (SS) is the division of a secret x into n secret shares such that fewer than t secret shares reveal no information about the secret x, and only a total of t secret shares can reconstruct the secret x, where t <= n.

[0039] In this embodiment, the solution used is an additive secret sharing algorithm with t=n, which consists of a sharing algorithm Share() and a reconstruction algorithm Reconstruct(), and both the secret space and the share space are in GF(2 L The Share() algorithm takes a secret x and a number of shares n as input, and splits the secret x into n shares. L ] to randomly select n-1 random numbers as n-1 secret shares, and the n-th secret share x n is shown as follows:

number

[0040] The Reconstruct() algorithm receives n secret shares to recover secret x.

number

[0041] In addition, secret sharing is additively homomorphic, and a sharing algorithm is applied to secrets x and y, Share(x,n) = {x1,x2,…,x n} and Share(y,n) = {y1,y2,…,y n}, then z i =(x i +y i ) mod 2 L and finally we can obtain the secret addition result z of the two.

number

[0042] (4) Each general participant

number

number

[0043] [Table 1]

[0044] (5) Each general participant

number

number

[0045] In this way, during the model training process, the model parameters of each general participant are all expressed in the form of shares, and the problem of privacy leakage caused by analyzing intermediate parameters is avoided.

[0046] (6) Reconstruction participants in each training group g

number

number

[0047] Blockchain is a distributed, immutable distributed ledger technology, essentially a data structure stored like a chain, with the goal of realizing secure, transparent, and verifiable transactions and information storage. The core philosophy of blockchain is to distribute and store transactions and data across multiple nodes on the network, rather than relying on a single institution or server for centralized storage. Each node maintains a complete ledger copy, harmonizes through a consensus algorithm, and verifies the validity of transactions. The basic unit of blockchain is the block, each block contains a set of transaction or data information and is linked to the previous block by a cryptographic hash function to form an immutable chain structure. Such a data structure significantly enhances the security of data, since any modification to the previous block invalidates the hash value of the subsequent block, revealing traces of tampering. Thus, blockchain has a high degree of immutability, ensuring the integrity and reliability of data.

[0048] A smart contract is a code segment that can be executed automatically, and realizes the function stipulated in traditional contracts: "When certain conditions are met, execute the corresponding strategy." Unlike other program codes, smart contracts can be executed according to the designer's intention, and there is no language uncertainty, which reduces the possibility of disputes. Once deployed, smart contracts cannot be changed, ensuring the immutability and security of the contract. When the pre-set conditions are met, the smart contract is automatically executed, and external nodes cannot intervene in its execution process. Such automatic execution characteristics give smart contracts a high degree of reliability and efficiency, and greatly reduces human errors and delays.

[0049] (7) The smart contract is the aggregated global model M of the current round. globalUpload it to the blockchain, and the blockchain will be the current round of global model M global The reconstruction participants were distributed as the initial model for the next round of training, and general participants were global Then, we continue the training task for the next round based on the,following,until the global model converges. EXAMPLES

[0050] This embodiment is applied to a blockchain node, receiving a group model for each training group in the current round; aggregating group models for each training group; distributing the aggregated current round global model to the reconstruction participants and transmitting it through the reconstruction participants to general participants in the group; The group model is obtained by a reconstruction participant reconstructing an aggregated result within the group, and the aggregated result is obtained by general participants in the group training local models using a global model as an initial model, dividing the local models into shares and distributing them within the group, and each general participant receiving and aggregating model shares from other general participants in the group.

[0051] In this embodiment, after the smart contract is deployed in the blockchain node and the number of received group models reaches a set threshold, the smart contract automatically calls and aggregates the group models to obtain a global model of the current round, and uploads the global model of the current round to the blockchain node as the initial model for training in the next round. EXAMPLES

[0052] In this embodiment, a grouping module arranged to group all participants, each group including a general participant and a reconstruction participant; a receiving module arranged for the reconstruction participant to receive the distributed global model from the blockchain and transmit it to general participants in the group; A local training module in which general participants use the global model as an initial model to train a local model, and divide the trained local model into shares and distribute them within the group, so that each general participant receives the model shares of other general participants in the group, then aggregates them, and sends the aggregated results to the reconstruction participant; and a reconstruction module arranged so that the reconstruction participants reconstruct the aggregation results in their groups and upload the resulting group model to the blockchain, thereby causing the blockchain to re-aggregate the group models of each group and distribute the resulting global model of the current round to the reconstruction participants as the initial model for training in the next round. EXAMPLES

[0053] In this embodiment, a receiving module arranged to receive a group model for each training group in a current round; an aggregation module arranged to aggregate group models for each training group; a transmission module arranged to distribute the aggregated current round global model to the reconstruction participants and transmit it to general participants in the group through the reconstruction participants; The group model is obtained by a reconstruction participant reconstructing the aggregation results within the group, and the aggregation results are obtained by general participants in the group training local models using a global model as an initial model, dividing the local models into shares and distributing them within the group, and each general participant receiving and aggregating the model shares of other general participants in the group, and a blockchain node is provided. EXAMPLES

[0054] The present embodiment includes a client and a blockchain node, The client is used for the steps of grouping all participants, each group including general participants and reconstruction participants, the steps of the reconstruction participants receiving the global model distributed from the blockchain and sending it to the general participants in the group, the steps of the general participants training a local model using the global model as an initial model, dividing the trained local model into shares and distributing it within the group, so that each general participant receives the model shares of other general participants in the group, then aggregates them, and sends the aggregated results to the reconstruction participants, and the steps of the reconstruction participants reconstructing the aggregated results within the group, and uploading the obtained group model to the blockchain; The blockchain nodes provide a distributed machine learning model training system that is used to re-aggregate the group models of each group and distribute the resulting global model of the current round to the reconstruction participants as the initial model for the next round of training.

[0055] It should be explained here that the above modules correspond to the steps described in Example 1, and the examples and application scenarios in which the above modules and corresponding steps are realized are the same, but are not limited to those disclosed in the above Example 1. It should be explained that the above modules can be implemented in a computer system as a part of the system, such as a set of computer-executable instructions.

[0056] Although the above describes specific embodiments of the present invention with reference to the drawings, this is not a limitation on the protection scope of the present invention, and it should be understood by those skilled in the art that various modifications or variations that can be made by those skilled in the art based on the technical solutions of the present invention without requiring creative efforts are still within the protection scope of the present invention.

Claims

1. Applies to clients, grouping all participants, each group including general participants and reconstruction participants; A reconstruction participant receives the distributed global model from the blockchain and transmits it to general participants in the group; A general participant trains a local model using the global model as an initial model, divides the trained local model into shares and distributes them within the group, so that each general participant receives the model shares of other general participants in the group, then aggregates them, and sends the aggregated results to the reconstruction participant; The reconstruction participants reconstruct the aggregation results in their groups, and upload the obtained group model to the blockchain, so that the blockchain re-aggregates the group models of each group, and distributes the obtained global model of the current round to the reconstruction participants as the initial model for training in the next round; Dividing the local model into shares means that general participants divide the local model into shares according to a secret sharing algorithm, where the number of divided shares is n-1, where n is the total number of general participants; After each of the General Participants has aggregated the Model Shares of the other General Participants in the Group, the Group Model Shares [0020] A method for training a distributed machine learning model, comprising: obtaining a training method for a distributed machine learning model, the training method being characterized in that:

2. 2. The method for training a distributed machine learning model according to claim 1, wherein when distributing model shares within a group, each general participant receives only one of the model shares.

3. The method of claim 1 , wherein the group model is in the form of plain text.

4. Applied to blockchain devices, receiving a group model for each training group in the current round; aggregating group models for each training group; distributing the aggregated current round global model to the reconstruction participants and transmitting it through the reconstruction participants to general participants in the group; The group model is obtained by a reconstruction participant reconstructing an aggregated result within the group, and the aggregated result is obtained by general participants in the group training local models using a global model as an initial model, dividing the local models into shares and distributing them within the group, and each general participant receiving model shares from other general participants in the group and aggregating them, Dividing the local model into shares means that general participants divide the local model into shares according to a secret sharing algorithm, where the number of divided shares is n-1, where n is the total number of general participants; After each of the General Participants has aggregated the Model Shares of the other General Participants in the Group, the Group Model Shares ##EQU00021## A method for training a distributed machine learning model, comprising: obtaining a training method for a distributed machine learning model, the training method being characterized in that:

5. The method for training a distributed machine learning model as described in claim 4, characterized in that when the smart contract is deployed on the blockchain device and the number of received group models reaches a set threshold, the smart contract automatically calls and aggregates the group models to obtain a global model of the current round, and uploads the global model of the current round to the blockchain device as the initial model for the next round of training.

6. a grouping module arranged to group all participants, each group including a general participant and a reconstruction participant; a receiving module arranged for the reconstruction participant to receive the distributed global model from the blockchain and transmit it to general participants in the group; A local training module in which general participants use the global model as an initial model to train a local model, and divide the trained local model into shares and distribute them within the group, so that each general participant receives the model shares of other general participants in the group, then aggregates them, and sends the aggregated results to the reconstruction participant; Dividing the local model into shares means that general participants divide the local model into shares according to a secret sharing algorithm, where the number of divided shares is n-1, where n is the total number of general participants; After each of the General Participants has aggregated the Model Shares of the other General Participants in the Group, the Group Model Shares [0022] where n is the total number of general participants, g is the group, and and a reconstruction module arranged so that the reconstruction participants reconstruct the aggregation results in the group and upload the obtained group model to the blockchain, thereby causing the blockchain to re-aggregate the group models of each group and distribute the obtained global model of the current round to the reconstruction participants as an initial model for training in the next round.

7. a receiving module arranged to receive a group model for each training group in a current round; an aggregation module arranged to aggregate group models for each training group; a transmission module arranged to distribute the aggregated current round global model to the reconstruction participants and transmit it to general participants in the group through the reconstruction participants; The group model is obtained by a reconstruction participant reconstructing an aggregated result within the group, and the aggregated result is obtained by general participants in the group training local models using a global model as an initial model, dividing the local models into shares and distributing them within the group, and each general participant receiving model shares from other general participants in the group and aggregating them, Dividing the local model into shares means that general participants divide the local model into shares according to a secret sharing algorithm, where the number of divided shares is n-1, where n is the total number of general participants; After each of the General Participants has aggregated the Model Shares of the other General Participants in the Group, the Group Model Shares [0023] In the above formula, n is the total number of general participants and g is the group.

8. Including clients and blockchain devices, The client is used for the steps of grouping all participants, each group including general participants and reconstruction participants, the steps of the reconstruction participants receiving the global model distributed from the blockchain and sending it to the general participants in the group, the steps of the general participants training a local model using the global model as an initial model, dividing the trained local model into shares and distributing it within the group, so that each general participant receives the model shares of other general participants in the group, then aggregates them, and sends the aggregated results to the reconstruction participants, and the steps of the reconstruction participants reconstructing the aggregated results within the group, and uploading the obtained group model to the blockchain; Dividing the local model into shares means that general participants divide the local model into shares according to a secret sharing algorithm, where the number of divided shares is n-1, where n is the total number of general participants; After each of the General Participants has aggregated the Model Shares of the other General Participants in the Group, the Group Model Shares ##EQU00024## where n is the total number of general participants, g is the group, The blockchain device is used to re-aggregate the group models of each group and distribute the resulting global model of the current round to the reconstruction participants as the initial model for the next round of training.