A federated learning method and system based on purpose hiding

By adopting a purpose-based hidden federated learning method in federated learning, using secure sample alignment and screening protocols, building a shared federated model and sharing model parameters, the problem of security risks in data sharing in traditional PSI technology is solved, and high privacy and secure data sharing is achieved.

CN114491617BActive Publication Date: 2025-04-15YAMI TECH (GUANGZHOU) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111544694.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-16
Publication Date
2025-04-15
Estimated Expiration
2041-12-16

AI Technical Summary

Technical Problem

Traditional private collection interception (PSI) technology has security risks in the process of data sharing, which may disclose the public intersection data of both parties.

Method used

A federated learning method based on purpose is proposed. By building a federated learning system, a secure sample alignment protocol and a secure comparison size protocol are adopted to filter aligned data fragments, build a shared federated model, and share model parameters to complete data sharing.

Benefits of technology

It effectively solves the problem of privacy leakage during data sharing in federated learning, especially in the medical data sharing scenario, and realizes joint modeling with multiple needs and high privacy, ensuring data security and privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491617B_ABST
    Figure CN114491617B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of federated learning, and specifically relates to a federated learning method based on purpose hiding and a system thereof, the method comprising: a first federal agency and a second federal agency construct a federated learning system; the first federal agency and the second federal agency execute an improved sample alignment protocol on their respective data based on the constructed federated learning system to obtain aligned data fragments; the first federal agency uses a secure size comparison protocol to screen the aligned data fragments to obtain screened data alignment fragments; the first federal agency and the second federal agency construct a shared joint model based on the screened data alignment fragments; the first federal agency and the second federal agency share model parameters to complete data sharing; the present invention can solve the problem of purpose privacy leakage in federated learning business modeling by means of the indistinguishability of feature data and sample data, especially the difficulty of multi-demand, high-privacy joint modeling in the case of medical data sharing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of federated learning, and in particular relates to a purpose-hidden federated learning method and a system thereof. Background Art

[0002] In recent years, people have paid more and more attention to data security issues. On the one hand, in the era of digital economy, all walks of life in society have a need for cooperation in data sharing in order to fully tap the potential of data and release the value of data; but on the other hand, due to various problems, various data subjects have generated many "data islands" in many industries.

[0003] In medical scenarios, data also faces the need to be shared. On the one hand, a large amount of medical data is stored in medical institutions, and relevant scientific research institutions need medical data for scientific research support. At the same time, there is also a need for cooperation between medical institutions, such as remote diagnosis, auxiliary treatment and other scenarios.

[0004] Federated Learning (FL), as one of the privacy computing technologies, enables multiple parties to jointly train machine learning models through the "data does not move, the model moves" approach to achieve the purpose of data sharing. The entire process ensures that the original data does not leave the warehouse, thus ensuring data privacy and reducing security risks.

[0005] Sample alignment is usually implemented using the Private Set Intersection (PSI) technology. Specifically, both parties obtain the intersection of data held by both parties without leaking additional information. Traditional PSI schemes include technical schemes based on public key cryptography, obfuscated circuits, oblivious transmission, and homomorphic encryption. However, traditional PSI will leak the common intersection of both parties to each other, which poses a security risk in the process of sharing data. Summary of the invention

[0006] In order to solve the problems existing in the above-mentioned prior art, the present invention proposes a federated learning method based on purpose hiding, which includes: the first federal agency and the second federal agency construct a federated learning system; the first federal agency and the second federal agency execute a secure sample alignment protocol on their respective data based on the constructed federated learning system to obtain aligned data fragments; the first federal agency uses a secure size comparison protocol to screen the aligned data fragments to obtain screened aligned data fragments; the first federal agency and the second federal agency construct a shared joint model based on the screened aligned data fragments; the first federal agency and the second federal agency share model parameters to complete data sharing.

[0007] Preferably, constructing a federated learning system includes: the first federated institution initiates a data sharing request, and after receiving the data sharing request, the second federated institution responds to the request to obtain the federated learning system.

[0008] Preferably, the process of the federated institution performing a secure sample alignment protocol on the data includes: the data of the first federated institution and the data of the second federated institution split their respective data into secret fragments based on secret sharing, the first federated institution and the second federated institution randomly shuffle their respective secret fragments, and share the shuffled secret fragments; the shared secret fragments are aligned through identifier hash mapping to obtain aligned data fragments.

[0009] Preferably, the process of the first federated institution screening the aligned data fragments using a secure comparison size protocol includes:

[0010] Step 1: The aligned data fragment of the first federated institution is d1 = (x1, y1), and the aligned data fragment of the second federated institution is d2 = (x2, y2);

[0011] Step 2: Perform secret sharing on the aligned data fragments of the first federated institution and the second federated institution so that the data fragments satisfy d1 + d2 = u1 * u2; where u1 represents the data fragment that meets the conditions obtained by the first federated institution, and u2 represents the data fragment that meets the conditions obtained by the second federated institution;

[0012] Step 3: The first federated institution calculates the data size of u1 * u2, sets data retention conditions, and retains the data calculated by the first federated institution for d1 + d2 according to the set data retention conditions to obtain the screened aligned data fragments.

[0013] Furthermore, secret sharing includes additive secret sharing and multiplicative secret sharing.

[0014] Furthermore, the set data retention conditions include: calculating the value of u1 * u2, if u1 * u2 > 0, that is, d1 + d2 > 0, x1 + x2 - y1 - y2 > 0, then x > y, then retain the aligned data fragment for calculating the value of d1 + d2; if u1 * u2 < 0, that is, d1 + d2 < 0, x1 + x2 - y1 - y2 < 0, then x < y, then retain the aligned data fragment for calculating the value of d1 + d2; if u1 * u2 = 0, that is, d1 + d2 = 0, x1 + x2 - y1 - y2 = 0, then x = y, then retain the aligned data fragment for calculating the value of d1 + d2; otherwise, delete the aligned data fragment.

[0015] Preferably, the process of the first federal agency and the second federal agency building a shared joint model based on the screened data alignment fragments includes: initializing model parameters, the first federal agency calculates the initial model parameters with the aligned data fragments screened by the agency to obtain a first intermediate calculation result; the second federal agency calculates the initial model parameters with the aligned data fragments screened by the agency to obtain a second intermediate calculation result; data exchanges the first intermediate calculation result and the second intermediate calculation result; and updating the respective model parameters according to the exchanged intermediate calculation results to obtain a shared joint model.

[0016] A purpose-hidden federated learning system, the system comprising: a system building module, a data alignment module, a data screening module, a joint modeling module and a model sharing module;

[0017] The system building module is used to build a federated learning system for the first federal agency and the second federal agency;

[0018] The data alignment module matches the data of each federal agency according to the federated learning system constructed by the system establishment module to obtain aligned data fragments;

[0019] The data screening module screens the aligned data fragments using a safe size comparison protocol to obtain screened data aligned fragments;

[0020] The joint modeling module aligns the fragments to share a joint model based on the filtered data;

[0021] The model sharing module is used to share the parameters of the shared joint model to complete data sharing.

[0022] The present invention can solve the problem of privacy leakage in federated learning business modeling, especially the difficulty of joint modeling with multiple requirements and high privacy in the case of medical data sharing. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] This specification will be further described in the form of exemplary embodiments to better describe the technical solutions of the embodiments of the present application. These exemplary embodiments will be described in detail in the form of drawings. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 A block diagram of the federated learning structure is hidden for the medical scenario-oriented purpose of the present invention;

[0025] Figure 2 A schematic diagram of a hidden federated learning process for the medical scenario purpose of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] A purpose-hidden federated learning method, the method comprising: a first federal agency and a second federal agency construct a federated learning system; the first federal agency and the second federal agency execute a secure sample alignment protocol on their respective data based on the constructed federated learning system to obtain aligned data fragments; the first federal agency uses a secure size comparison protocol to screen the aligned data fragments to obtain screened aligned data fragments; the first federal agency and the second federal agency construct a shared joint model based on the screened aligned data fragments; the first federal agency and the second federal agency share model parameters to complete data sharing.

[0028] A typical application implementation process of a purpose-hidden federated learning method in medical scenarios includes: Figure 2 As shown, the method includes: the first medical institution and the second medical institution construct a federated learning system; the first medical institution and the second medical institution perform an improved sample alignment protocol on their respective data based on the constructed federated learning system to obtain aligned data fragments; the first medical institution uses a secure size comparison protocol to screen the aligned data fragments to obtain screened aligned data fragments; the first medical institution and the second medical institution construct a shared joint model based on the screened aligned data fragments; the first medical institution and the second medical institution share model parameters to complete the sharing of medical data.

[0029] A specific implementation of a purpose-hidden federated learning method, the method comprising:

[0030] S1: System establishment: The first medical institution seeks a potential second medical institution based on modeling requirements. The second medical institution responds to the request and then forms a federated learning system with the first medical institution.

[0031] S11, the first medical institution is the initiator of federated learning, that is, the party that initiates federated learning to achieve a certain purpose or effect. Specifically, it refers to the party that provides data labels in the federated learning system. In particular, in some embodiments, the first medical institution can be a hospital, a disease research institution, a drug research and development company, a medical insurance bureau, etc.

[0032] S12, the second medical institution is a participant in federated learning, that is, a party that participates in federated learning to achieve a certain purpose or effect. Specifically, it refers to the party that provides data features in the federated learning system. In particular, the second medical institution may be a hospital, a physical examination center, etc. in some embodiments.

[0033] S2: Data alignment: The first medical institution and the second medical institution execute the safety sample alignment protocol to complete the data alignment operation. The alignment result will be used as the input of the next module.

[0034] As an example, the following takes diabetes prediction in a medical scenario as an example. Hospital A is the first medical institution, and some relevant data features are shown in Table 1:

[0035]

[0036] A physical examination center is the second medical institution, and some relevant data characteristics are shown in Table 2:

[0037]

[0038] S21: Data alignment module, that is, through this module, the first medical institution inputs {u i ,x i}, the second medical institution inputs {u j ,x j}, then obtain the satisfaction u i =u j The corresponding characteristic data fragments, finally the first medical structure holds d i =(x i -y i )(x i -r i ,r j ), the second medical institution holds d j =(x j -y j )=(r i ,x j -r j ). Both parties obtain the matched feature data fragments, satisfying x i -r i +r i (mod 2 λ )=x i ,x j -r j +r j (mod 2 λ )=x j, that is, the characteristic data fragments of both parties can reconstruct the original data. Where λ is the security parameter, i indicates that the first medical institution holds the corresponding characteristic data, and j indicates that the second medical institution holds the corresponding characteristic data.

[0039] S22: The data alignment module outputs the matching data fragments. Moreover, based on the indistinguishable hard problem in cryptography, the original data cannot be distinguished from the data fragments, thus ensuring that the intersection data cannot be directly obtained in the data alignment protocol, ensuring the intersection privacy, that is, ensuring the intersection data privacy of the first medical institution and meeting the condition of purpose hiding.

[0040] S24: The data alignment module expands the feature dimension of the first medical institution, that is, from the original X1 - X4 to X1 - X8. Based on the expanded data, downstream computing tasks can be better performed, improving the computing effect.

[0041] S25: While the data alignment expands the feature dimension of the first medical institution, it satisfies the indistinguishability of the characteristic data, ensuring the purpose privacy of the first medical institution.

[0042] S3: Data screening: That is, based on the data fragments output by the data alignment module, the data screening is performed.

[0043] S31: In the data screening process, based on the secure comparison protocol, it is ensured that the screening conditions are not leaked during the data screening process.

[0044] S32: The data screening conditions should be input by the first medical institution. As an example, a certain hospital of the first medical institution wants to study the diabetes prevalence of people under 30 years old and needs to perform screening on the characteristic age to obtain the characteristic data of Age < 30. The data screening process will not expose the screening conditions.

[0045] S33: The secure comparison protocol is implemented based on the data fragments output by the data alignment module.

[0046] As an example, the first medical institution inputs the characteristic data fragment d1 = (x1, y1), and the second medical institution inputs the characteristic data fragment d2 = (x2, y2). After secret sharing, the characteristic data fragments satisfy d1 + d2 = u1 * u2. Then the first medical institution calculates: u1 * u2 > 0, that is, d1 + d2 > 0, x1 + x2 - y1 - y2 > 0, so x > y. u1 * u2 < 0, that is, d1 + d2 < 0, x1 + x2 - y1 - y2 < 0, so x < y. u1 * u2 = 0, that is, d1 + d2 = 0, x1 + x2 - y1 - y2 = 0, so x = y. That is, the purpose of secure comparison is achieved.

[0047] S34: The secret sharing includes additive secret sharing and multiplicative secret sharing.

[0048] S35: The secure comparison ensures the privacy of the screening conditions, that is, the privacy of the purpose of the first medical institution is ensured through the indistinguishability of the samples.

[0049] S36: Based on the safety comparison size protocol and the safety sample alignment protocol, the screened aligned samples are made indistinguishable, that is, the feature data is indistinguishable, the sample data is indistinguishable, and the purpose of the first medical institution is to be indistinguishable.

[0050] S4: Joint modeling: After the data screening module, the first medical institution and the second medical institution can obtain matching and satisfactory computing data. Based on the computing data, the downstream computing process can be executed. The downstream computing process is the process of multiple parties jointly calculating an agreed function. Including but not limited to secure multi-party statistics, multi-party federated learning, etc.

[0051] As an example, the joint modeling performs a two-party federated learning process, including but not limited to a secure logistic regression algorithm, a secure gradient boosting tree algorithm, and a secure deep neural network algorithm.

[0052] The process of the first federal agency and the second federal agency building a shared joint model based on the screened data alignment fragments includes: initializing model parameters, the first federal agency calculates the initial model parameters with the screened aligned data fragments of the agency to obtain a first intermediate calculation result; the second federal agency calculates the initial model parameters with the screened aligned data fragments of the agency to obtain a second intermediate calculation result; the first intermediate calculation result and the second intermediate calculation result are exchanged; the respective model parameters are updated according to the exchanged intermediate calculation results to obtain a shared joint model.

[0053] The specific construction process includes: the first federal agency calculates and exchanges the first intermediate calculation results The second federal agency calculates and exchanges the second intermediate result Where f represents the calculation method, represents the first intermediate calculation result, w1 and w2 both represent initial model parameters, x1 represents the aligned data fragments after screening by the first federation agency, and x2 represents the aligned data fragments after screening by the second federation agency. The formula for updating the model by the first federation agency is w1=w1-ηg1, and the formula for updating the model by the second federation agency is w2=w2-ηg2, where η represents the model learning parameter.

[0054] S5: Model sharing: After the joint modeling, each party holds a part of the joint model. For downstream tasks, both parties need to collaborate and jointly calculate to complete them.

[0055] A purpose-hidden federated learning system, such as Figure 1 As shown, the system includes: a system establishment module, a data alignment module, a data screening module, a joint modeling module and a model sharing module;

[0056] The system establishment module is used to construct a federated learning system for the first medical institution and the second medical institution;

[0057] The data alignment module matches the data of each medical institution according to the federated learning system constructed by the system establishment module to obtain aligned data fragments;

[0058] The data screening module screens the aligned data fragments using a safe size comparison protocol to obtain screened data aligned fragments;

[0059] The joint modeling module aligns the fragments to share a joint model based on the filtered data;

[0060] The model sharing module is used to share the parameters of the shared joint model to complete data sharing.

[0061] The specific implementation of the system is the same as the specific implementation of the method.

[0062] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A purpose-hidden federated learning method, characterized in that: Including: The first federal agency and the second federal agency construct a federated learning system; The first federal agency and the second federal agency perform a secure sample alignment protocol on their respective data based on the constructed federated learning system to obtain aligned data fragments; The first federal agency uses a secure comparison protocol to screen the aligned data fragments to obtain the screened aligned data fragments; The first federal agency and the second federal agency construct a shared joint model based on the screened aligned data fragments; The first federal agency and the second federal agency share model parameters to complete data sharing; The process of the federal agency performing a secure sample alignment protocol on the data includes: The data of the first federal agency and the data of the second federal agency use secret sharing to split their respective data into secret fragments. The first federal agency and the second federal agency randomly shuffle their respective secret fragments and share the shuffled secret fragments; The shared secret fragments are aligned through identifier hash mapping to obtain aligned data fragments; The process of the first federal agency using a secure comparison protocol to screen the aligned data fragments includes: Step 1: The aligned data fragment of the first federal agency is d1 = (x1, y1), and the aligned data fragment of the second federal agency is d2 = (x2, y2); Step 2: Perform secret sharing on the aligned data fragment of the first federal agency and the aligned data fragment of the second federal agency so that the data fragments satisfy d1 + d2 = u1 * u2; where u1 represents the data fragment that meets the conditions obtained by the first federal agency, and u2 represents the data fragment that meets the conditions obtained by the second federal agency; Step 3: The first federal agency calculates the data size of u1 * u2, sets a data retention condition, and retains the data of the first federal agency calculating d1 + d2 according to the set data retention condition to obtain the screened aligned data fragments.

2. A purpose-hidden federated learning method according to claim 1, characterized in that: Constructing a federated learning system includes: The first federal agency initiates a data sharing request, and after receiving the data sharing request, the second federal agency responds to the request to obtain a federated learning system.

3. The purpose-hidden federated learning method according to claim 1, characterized in that: Secret sharing includes additive secret sharing and multiplicative secret sharing.

4. The purpose-hidden federated learning method according to claim 1, characterized in that: The set data retention conditions include: Calculate the value of u1 * u2. If u1 * u2 > 0, that is, d1 + d2 > 0, x1 + x2 - y1 - y2 > 0, then x > y, then retain the aligned data fragment for calculating the value of d1 + d2; If u1 * u2 < 0, that is, d1 + d2 < 0, x1 + x2 - y1 - y2 < 0, then x < y, then retain the aligned data fragment for calculating the value of d1 + d2; If u1 * u2 = 0, that is, d1 + d2 = 0, x1 + x2 - y1 - y2 = 0, then x = y, then retain the aligned data fragment for calculating the value of d1 + d2; Otherwise, delete the aligned data fragment.

5. The purpose-hidden federated learning method according to claim 1, characterized in that: The process of the first federal agency and the second federal agency building a shared joint model based on the screened data alignment fragments includes: initializing model parameters, the first federal agency calculates the initial model parameters with the screened aligned data fragments of the agency to obtain a first intermediate calculation result; the second federal agency calculates the initial model parameters with the screened aligned data fragments of the agency to obtain a second intermediate calculation result; the first intermediate calculation result and the second intermediate calculation result are exchanged; the respective model parameters are updated according to the exchanged intermediate calculation results to obtain a shared joint model.

6. A purpose-hidden federated learning system, the system being used to execute the purpose-hidden federated learning method according to any one of claims 1 to 5, characterized in that: include: System establishment module, data alignment module, data screening module, joint modeling module and model sharing module; The system building module is used to build a federated learning system for the first federal agency and the second federal agency; The data alignment module matches the data of each federal agency according to the federated learning system constructed by the system establishment module to obtain aligned data fragments; The data screening module screens the aligned data fragments using a safe size comparison protocol to obtain screened data aligned fragments; The joint modeling module aligns the fragments to share a joint model based on the filtered data; The model sharing module is used to share the parameters of the shared joint model to complete data sharing.

Citation Information

Patent Citations

  • Private data processing method and device

    CN110955915A

  • Classification method, device and server

    CN111340112A