CN112000990A - Data processing method, device and equipment for privacy protection and machine learning system - Google Patents
Data processing method, device and equipment for privacy protection and machine learning system Download PDFInfo
- Publication number
- CN112000990A CN112000990A CN202011164969.4A CN202011164969A CN112000990A CN 112000990 A CN112000990 A CN 112000990A CN 202011164969 A CN202011164969 A CN 202011164969A CN 112000990 A CN112000990 A CN 112000990A
- Authority
- CN
- China
- Prior art keywords
- party
- participant
- activation function
- fragment
- result
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Medical Informatics (AREA)
- Databases & Information Systems (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Telephonic Communication Services (AREA)
- Storage Device Security (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The specification provides a data processing method, a data processing device, equipment and a machine learning system for privacy protection. In one method embodiment, when a data processing result of a nonlinear activation function used in a machine learning algorithm needs to be obtained in a multi-party participated data sharing application scene, a lossless expression of the nonlinear activation function can be used, and each subentry is calculated by utilizing multi-party safe calculation in a coordinated manner, so that the subentry can be prevented from being expanded into an approximate evaluation algorithm of a polynomial, the calculation complexity is reduced, and the efficiency of calculating the nonlinear activation function data by computer equipment is improved. Furthermore, the complexity and precision loss of approximate calculation of the nonlinear activation function such as Taylor expansion can be greatly reduced.
Description
Technical Field
The embodiment of the specification belongs to the technical field of privacy protection of cryptography, and particularly relates to a data processing method, a data processing device, data processing equipment and a machine learning system for privacy protection.
Background
The machine learning model may include an activation function. The activation function in some machine learning models is a transcendental function (e.g., Sigmoid function) that involves operations that typically include non-linear operations such as exponential operations, trigonometric function operations, and the like. When a computer processes the nonlinear activation function data, a taylor expansion calculation method is usually used for processing, the calculation data is exponential, and the calculation process is relatively complex.
In the current data sharing application scenario of multi-party participation, a plurality of parties are often required to cooperate together to establish or use a machine learning model together. When the private data of multiple participants need to use the operation result of the machine learning model, the multiple participants are usually required to participate in computation and interaction together, and each participant is ensured to output a private output result which is invisible to other participants. Data is a very important asset to the private data owner. The participants want to use the private data of each other together to obtain the operation result of the machine learning model, but do not want to provide the private data of each other to other participants so as to prevent the private data of the participants from being leaked.
Disclosure of Invention
The present specification aims to provide a data processing method, an apparatus, a device and a machine learning system for privacy protection, which can efficiently, safely and losslessly obtain a processing result of a nonlinear activation function operation in a machine learning algorithm on the basis of protecting respective data privacy in multiple ways.
The data processing method, the device, the equipment and the machine learning system for privacy protection provided by the embodiment of the specification are at least realized in the following modes:
a privacy-preserving data processing method, comprising:
determining a lossless expression of a nonlinear activation function used in a machine learning algorithm, the lossless expression comprising a first operational portion and a second operational portion of the nonlinear activation function;
a first participant and a second participant cooperatively calculate the first operation part based on multi-party security calculation, wherein the first participant obtains a first fragment of the first operation part, and the second participant obtains a second fragment of the first operation part;
the first participant determines a first fragment of the second operation part based on the first fragment, the second participant determines a second fragment of the second operation part based on the second fragment, and the first participant and the second participant perform multi-party safe calculation based on the first fragment of the second operation part and the second fragment of the second operation part to obtain an operation result of the second operation part;
the first participant performs the operation of the nonlinear activation function on the first fragment of the first operation part and the operation result of the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the second participant performs the operation of the nonlinear activation function on the second fragment of the first operation part and the operation result of the second operation part to obtain a second result fragment of the operation result of the nonlinear activation function.
A privacy-preserving data processing method, comprising:
a first participant calculates a first operation part of a lossless expression through cooperation with multi-party safety calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multi-party participating machine learning algorithm;
the first participant determines a first slice of a second operational portion of the nonlinear activation function based on the first slice;
and the first participant performs operation of the nonlinear activation function on the first segment of the first operation part and the operation result of the second operation part to obtain a first result segment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first segment of the second operation part and the remaining segments of the second operation part owned by the remaining participants.
A privacy-preserving data processing apparatus comprising:
the first operation module is used for cooperatively calculating a first operation part of a lossless expression through multiparty security calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multiparty machine learning algorithm;
the second operation module is used for determining a first fragment of a second operation part of the nonlinear activation function based on the first fragment, and the first participant performs multi-party safe calculation based on the first fragment of the second operation part and the remaining fragments of the second operation part owned by the remaining participants to obtain an operation result of the second operation part;
and the result fragment calculation module is used for performing operation of the nonlinear activation function on the operation result of the first fragment and the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first fragment of the second operation part and the remaining fragments of the second operation part owned by the remaining participants.
A privacy-preserving terminal device comprising: at least one processor and a memory for storing processor-executable instructions, which when executed by the processor perform the steps of any one of the method embodiments described herein.
A machine learning algorithm of the machine learning system comprises a nonlinear activation function, the nonlinear activation function obtains a result through multi-party security calculation of at least two parties, and a processor of any one of the at least two parties realizes the terminal device according to any one embodiment of the specification when executing executable instructions stored in a memory.
According to the data processing method, device, equipment and machine learning system for privacy protection, when a data processing result of a nonlinear activation function used in a machine learning algorithm needs to be obtained in a multi-party participatory data sharing application scene, original or properly changed lossless expressions of the nonlinear activation function can be used, and various sub-items are cooperatively calculated by utilizing multi-party safe calculation, so that the sub-items can be prevented from being expanded into a polynomial approximate evaluation algorithm, the calculation complexity is reduced, and the efficiency of calculating nonlinear activation function data by computer equipment is improved. In addition, compared with the polynomial calculation of taylor expansion, for example, each participant in the embodiment can calculate the result fragment of the operation result of the nonlinear activation function in a simpler manner, thereby greatly reducing the complexity and precision loss of approximate calculation of the nonlinear activation function such as taylor expansion. The method in the embodiment of the specification can realize efficient and lossless acquisition of one result fragment of the operation result of the nonlinear activation function of each participant based on privacy protection in data processing of multi-party participation. Furthermore, the method can efficiently and nondestructively acquire the operation result of the nonlinear activation function based on privacy protection, can improve the calculation speed of a computer and the precision of an output result, and can also integrally improve the data processing efficiency of machine learning based on privacy protection.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
FIG. 1 is a schematic flow chart diagram of an embodiment of a privacy preserving data processing method provided herein;
FIG. 2 is a schematic flow chart diagram of another embodiment of a data processing method that may be applied to privacy protection on the single participant side provided by the present specification;
FIG. 3 is a block diagram of a hardware architecture of a server device of a participant to which an embodiment of a privacy-preserving data processing method of the present invention is applied;
fig. 4 is a schematic block diagram of an embodiment of a data processing apparatus for privacy protection provided in this specification.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
As mentioned above, in the current data sharing application scenario involving multiple parties, shared data is usually provided by multiple parties, and the data is kept locally without aggregation of plaintext. In some machine learning data sharing application scenarios, a variety of activation functions, such as Sigmoid function, tanh function, etc., are required to be used in many machine learning algorithms, such as logistic regression, neural network, etc. For example, in a neural network, to avoid a purely linear combination, a non-linear activation function may be added after the output of each layer. The nonlinear activation function may include an activation function with a nonlinear relationship between input and output, such as a Sigmoid function, a tanh function, and the like. In a computing network, the activation function of a node defines the output of the node at a given input or set of inputs. The processing of the conventional nonlinear activation function (such as Sigmoid function) in a computer is complex, and the approximation value is usually obtained by a polynomial fitting method, so that the efficiency is low. And the hardware of the computer logic circuit is limited (such as root finding by using Newton iteration method), and the high power calculation of the polynomial (such as、Etc.) may result in a large loss of accuracy in the calculation results. A method of approximate computation of Sigmoid function of taylor expansion such as shown below:
The more terms the taylor expands, the higher the power of the argument, and the more significant the efficiency of the computer processing decreases. Conversely, if the number of terms of taylor expansion is small, the greater the accuracy loss, and the accuracy of the calculation result of the activation function deteriorates. In contrast, the present specification provides another more efficient data processing method for privacy protection, which can efficiently, safely and accurately obtain a processing result using a nonlinear activation function in a data sharing application scenario involving multiple parties, thereby improving the data processing efficiency of machine learning of a computer under privacy protection.
Privacy protection may be implemented in some embodiments of the present description in conjunction with secret sharing. Secret sharing is an important means for solving privacy leakage and realizing privacy protection in cryptography-based Multi-party security computing (MPC). Secret sharing currently commonly used secret sharing schemes include the threshold secret sharing concept proposed by Shamir and Blakley, the basic idea being to divide the shared secret s into multiple shards (shares) that are respectively handed to different parties for storage. Secrets can only be recovered if more than a threshold number of participants merge their shares. For example, it suffices that only a certain number or more of server federation can reconstruct the shared secret, and any server less than the certain data cannot obtain any information of the secret.
Secret sharing may be used in privacy protected multiparty security computing. In specific application, input data of each participant is respectively used as shards (shares) of data to be processed in joint calculation. Sharding local to a participant is its private data, which is generally unknown to other participants. In general multi-party security computation, each participant possesses respective private data, and can compute a result about a public function (such as a Sigmoid function) without leaking the respective private data. When the entire computation is completed, generally, only the computation result is known to the participant, and the participant usually does not know the data of other participants and the intermediate data of the computation process. The result after the computation is finished can still be dispersed in a secret sharing manner among all the participants. When the operation results of all the fragments are needed, the data of all the participants can be combined together to restore the real original data. Of course, the shards obtained by each participant in the secret sharing are typically not the same. Of course, the embodiments of this specification do not exclude other ways of multi-party security computation after the improvement or modification, transformation based on the multi-party security computation described above can be applied.
A specific implementation scenario of calculating the result of Sigmoid function based on two parties under privacy protection will be described below. Specifically, fig. 1 is a schematic flowchart of an embodiment of a data processing method for privacy protection provided in this specification. Although the present specification provides method operational steps or devices, system configurations, etc., as illustrated in the following examples or figures, more or less operational steps or modular units may be included in the methods or devices, as may be conventional or may be part of the inventive subject matter, based on conventional or non-inventive considerations. In the case of steps or structures which do not logically have the necessary cause and effect relationship, the execution sequence of the steps or the module structure of the apparatus is not limited to the execution sequence or structure shown in the embodiment or the drawings in this specification. When the apparatus, server, system or end product of the method or system architecture is applied in an actual device, server, system or end product, the method or module architecture according to the embodiment or the drawings may be executed sequentially or executed in parallel (for example, in an environment of parallel processors or multi-thread processing, or even in an environment of distributed processing, server clustering, or implementation in combination with cloud computing or block chain technology).
Of course, the following description of the embodiments does not limit other scalable solutions obtained based on the embodiments of the present disclosure. If the number of the participants can be three or more, the nonlinear activation function can also be other activation functions, such as tanh function, and the lossless expression is also limited to the expression provided by the embodiment of the present specification or the expression of the variation or the modification thereof. In the application scenario of the present embodiment, it is assumed that there are two parties a and bB. Wherein the first participant A owns the first sliceThe second participant B has a second slice. Party A and B protect their respective private dataAndon the basis of (1) calculatingThe output result may be that parties A and B respectively possessA portion of the results is calculated. Specifically, an embodiment of the method provided in this specification is shown in fig. 1, and may include:
s0: determining a lossless expression of a nonlinear activation function used in a machine learning algorithm, the lossless expression comprising a first operational portion and a second operational portion of the nonlinear activation function;
s2: a first participant and a second participant cooperatively calculate the first operation part based on multi-party security calculation, wherein the first participant obtains a first fragment of the first operation part, and the second participant obtains a second fragment of the first operation part;
s4: the first participant determines a first fragment of the second operation part based on the first fragment, the second participant determines a second fragment of the second operation part based on the second fragment, and the first participant and the second participant perform multi-party safe calculation based on the first fragment of the second operation part and the second fragment of the second operation part to obtain an operation result of the second operation part;
s6: the first participant performs the operation of the nonlinear activation function on the first fragment of the first operation part and the operation result of the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the second participant performs the operation of the nonlinear activation function on the second fragment of the first operation part and the operation result of the second operation part to obtain a second result fragment of the operation result of the nonlinear activation function.
It should be noted that the execution sequence of S2 and S4 is not limited to executing S4 after executing S2. In some embodiments, S4 may be performed first, and then S2 (shown by the dashed line in fig. 1) may be performed, or S2 and S4 may be performed simultaneously or part of the data processing process may be performed simultaneously (shown by the dashed line in fig. 1). The order in which some implementations perform the steps may be determined based on the sequential logical relationship of the data processing actions.
The lossless expression includes a first operation portion and a second operation portion that perform a nonlinear activation function operation. The operation of the nonlinear activation function may typically include four arithmetic operations. If the lossless expression can be a division, the first operation portion can be a molecular portion and the second operation portion can be a denominator portion. If the lossless expression is an addition, the first operation portion may be an addend (or referred to as a first addend) and the second portion may be an addend (or referred to as a second addend). Of course, the operations may also be correspondingly transformed into each other, e.g. a division operation may be transformed into a product of a dividend and an inverse divisor, i.e. a division operation may be transformed into a product of a dividend and an inverse divisorIs converted into。
Generally, a nonlinear activation function has a corresponding expression (analytic expression). In some embodiments of the present description, the nonlinear activation function may include a nonlinear activation function that can be expressed using a taylor expansion. When the actual computer performs calculation, some existing embodiment schemes can be used forThe nonlinear activation function is converted to a polynomial expression of taylor expansion. The method described in this specification can use another calculation processing mode for the nonlinear activation function that can be expressed by using the taylor expansion, and can determine the lossless expression of the nonlinear activation function based on the original expression, and then calculate each operation part of the operation in the lossless expression based on the multi-party secure calculation. The lossless expression may generally include a functional expression of the original nonlinear activation function, for example, the lossless expression of Sigmoid function may beThe lossless expression of the tanh function is alsoAnd the like. A nonlinear activation function is not limited to a lossless expression, and can also correspond to a plurality of lossless expressions. Through the calculation, each participant can acquire one result fragment of the operation result of the nonlinear activation function, so that the operation result of the nonlinear activation function can be efficiently and nondestructively acquired based on privacy protection, the calculation speed of a computer and the precision of an output result can be improved, and meanwhile, the data processing efficiency of machine learning based on privacy protection can be integrally improved. The lossless method described in the embodiments of the present specification can be understood as that the calculation result of the nonlinear activation function obtained by the calculation using the scheme of the present embodiment has a significantly reduced precision loss or a negligible precision loss compared to the taylor expansion calculation method.
In some implementation scenarios, some lossless expressions of the nonlinear activation function may contain only terms with arguments, no constant terms. While the lossless expressions in some implementation scenarios may contain constant terms. An expression such as Sigmoid may be expressed as:
in the above formula, the first and second carbon atoms are,is a term with an independent variable, 1 in the numerator or denominator: () 1 in the above is a constant term (the value of the constant term is 1) described in this embodiment. In the privacy-preserving multiparty secure computing embodiments provided by the present specification, constant terms in the lossless expression may be similarly privacy-preserved. In a specific implementation, a constant term may be transformed into a non-fixed value parameter, and may be used for a variable to represent the constant term, but the participators may not know the specific value of the variable. Thus, in another embodiment of the method provided herein, if the lossless expression contains a constant term, the constant term is transformed into a non-fixed value parameter;
correspondingly, the items containing the independent variables in the lossless expression are transformed correspondingly according to the transformation mode of transforming the constant items to the non-fixed value parameters, and the transformed lossless expression of the nonlinear activation function is determined.
For example, the constant term 1 in the above-mentioned Sigmoid expression is transformed intoThen it is equivalent to the molecule being enlargedAnd (4) doubling. Then, the terms of the argument are protectedCan also be enlargedAnd (4) doubling. Then, when the Sigmoid function contains constant term 1, its expression can be represented byIs converted into. Of course, the above conversion process may also include other intermediate conversion processes, such asIs converted into。
In the actual multiparty security computing process based on privacy protection, because the constant term is converted, each participant usually does not know the corresponding non-fixed value parameter after the constant term is convertedBecause each participant stores a constant term equivalent to the non-fixed value parameterOne of the sliced data of (1). In this way, the non-fixed value parameter can be obtained by each participant through privacy protection-based multiparty security calculationThe operation result of (1). In a specific embodiment provided by this specification, the transformation manner may include:
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
The method described in the above embodiment can be applied to a nonlinear activation function used in various machine learning models (algorithms). Especially for Sigmoid functions, compared with the conventional approximate calculation method adopting a taylor expansion, the embodiment of the specification creatively combines privacy protection, multi-party safe calculation and a lossless expression using functions, can calculate the function operation result more efficiently, and simultaneously realizes privacy protection. In addition, because a lossless expression of the nonlinear activation function is used, the precision loss can be greatly reduced, and the calculation precision of the Sigmoid function operation result under privacy protection is improved.
In the data sharing application scenario where two parties participate, the embodiments of the present specification are further described below with a Sigmoid function as a nonlinear activation function used by a machine learning model. The specific treatment process may include:
s00: the nonlinear activation function comprisesThe function, its lossless expression can be expressed as:
in this embodiment, the above formula is transformed, and the obtained lossless expression may be:
then correspondingly, have the first fragmentMay generate a random numberHaving a second sectionThe second party B generates a random numberWherein, in the step (A),,。
s02: the first participant A and the second participant B cooperatively calculate a first operation part based on the multi-party security calculation MPCThe first party A getsFirst segment of<>1, the second party B getsSecond section of<>2。
the first party A owns,And can be calculated locally. Second party A owns,And can be calculated locally. For theThe first party A can be calculated locallyAnd then cooperatively calculate with the second party B by using a secure calculation method (such as secret sharing). The result is that the first party a and the second party B respectively possessA portion of the results is calculated. E.g. first party a ownsOne piece of the calculation result<>1, the second party B ownsOne piece of the calculation result<>2. The multi-party safe computing cooperative computing mainly solves the cooperative computing problem of protecting privacy among a group of mutually untrusted participants in the field of cryptology research, can provide multi-party cooperative computing capability on the premise of not revealing original data for a data demand party, and provides results after data computing of all parties for the demand party.
Similarly, forThe second party B may first calculate itself locallyAnd then cooperatively computing with the first party A by using a secure computing technology (such as secret sharing). Similarly, after the calculation is completed, the first party A and the second party B respectively possessA portion of the results is calculated. E.g. first party a ownsOne piece of the calculation result<>1, the first party B ownsOne piece of the calculation result<>2。
At this point, the first party A owns<>1 and<>1, the second party B owns<>2 and<>2. further, the first party a may be to<>1 and<>1 are added and summed, this sum beingA slicing result of (1), is recorded as<>1. Likewise, the second party B will<>2 and<>2 are added and summed, the sum beingIs marked as another slicing result<>2。
S04: the first participant is based on a first slice of the first operational portion<>1 determining a first slice of the second arithmetic portion<>1, the second party being based on the first slice of the first arithmetic part<>2 second slice determining a second slice of the second arithmetic part<>2, the first party and the second party perform multi-party safe calculation based on the first fragment of the second operation part and the second fragment of the second operation part to obtain the operation result of the second operation part。
The first party a getsFirst segment of<>1, the second party B getsSecond section of<>2. The first participant A and the second participant B are recovered through MPC cooperative computing based on multi-party security computingThe operation result of (1). When the operation result of the second operation part is calculated, data transmission and interaction are required, and multi-party safe calculation can still be used.
First and second parties A and B use multiparty secure computing for collaborative computing. The first party A ownsA slice of<>1 andcan be calculated to obtain<>1+1. The first party being to compute locally<>1+1 asOne piece of the calculation result<>1. Likewise, the second party B can calculate<>2+2, obtainingTo another slice2. The first party A and the second party B are obtained by using the multi-party security computing collaborative computing recoveryThe operation result of (1).
First party A and second party B want to recoverThe first party A may be<>1 to the second party B. And the second party B may also be going to<>2 to the second party a. And then each participant is locally added and summed respectively. Of course, it may be that one of the participants needs to be recoveredThe result of the operation of, e.g. the first party A needsAs a result of the operations of (1), the slices can be divided<>1 slicing with a received second participant<>2 are added to obtainThe operation result of (1).
S06: first Party A computationAs aPart of the result (which may be referred to as the first result fragment) may be retained locally by the first participant a itself; likewise, the second party B calculatesAs a finalAnother part of the result, which may be referred to as a second result slice, may be kept locally by the second participant B itself.
And calculatingSimilarly, a first party A and a second party B want to recoverThe first party A may segment the first result into segmentsTo the second party B, which may also fragment the second resultAnd transmitting the data to a second participant A, and then locally adding and summing the data of all the participants respectively. Of course, it may be that one of the participants needs to be recoveredThe result of the operation of, e.g. the first party A needsThe first result may be slicedSecond result slicing with a received second participantAdd to obtainThe operation result of (1).
Thus, by the method described in the above embodiment, when acquiring the Sigmoid data processing result, the multi-party secure computation cooperative computation may be used, another processing scheme different from the approximate evaluation algorithm that expands the Sigmoid data processing result into a polynomial may be provided, and the efficiency of processing data by using the Sigmoid function is improved. Moreover, compared with polynomial calculation such as taylor expansion, each participant in this embodiment can calculate the slicing result in a simpler manner, which reduces the complexity and accuracy loss of approximate calculation Sigmoid such as taylor expansion, and even there may be no accuracy loss (the accuracy loss may be negligible) of calculating Sigmoid. The method in the embodiment of the specification can realize efficient and lossless acquisition of a result fragment of a Sigmoid operation result of each participant based on privacy protection in data processing of multi-party participation. Furthermore, the method can realize efficient and lossless acquisition of Sigmoid operation results based on privacy protection, can improve the calculation speed of a computer and the precision of output results, and can also improve the data processing efficiency of machine learning based on privacy protection of terminal equipment by using a Sigmoid function.
Of course, in other embodiments of the present disclosure, the nonlinear activation function may be other functions. Such as tanh function, the lossless expression of which may be. In other embodiments, the lossless expression of the tanh function may also be a transformed or transformed lossless expression, such as:
other specific implementation manners of the nonlinear activation function such as the tanh function can refer to the implementation manner of the sigmoid function, and specific implementation processes are not described in detail.
The above embodiments describe the processing procedure of two participants to obtain result fragmentation of Sigmoid operation result. In other implementations scenarios, the participants may not be limited to two, and there may be three, four, etc. multiple participants. Three, four, etc. multiple parties may also each obtain a result fragment based on the operation result of the non-linear activation function of privacy protection with reference to the foregoing two party embodiments. Therefore, based on the foregoing multiple method embodiments of participating in interactive processing, the present specification further provides another data processing method that can be applied to privacy protection on the side of a single participant, as shown in fig. 2, where the method may include:
s20: a first participant calculates a first operation part of a lossless expression through cooperation with multi-party safety calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multi-party participating machine learning algorithm;
s22: the first participant determines a first slice of a second operational portion of the nonlinear activation function based on the first slice;
s24: and the first participant performs operation of the nonlinear activation function on the first segment of the first operation part and the operation result of the second operation part to obtain a first result segment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first segment of the second operation part and the remaining segments of the second operation part owned by the remaining participants.
Similarly, as described with reference to the previous method embodiment, in another embodiment of the method, if the lossless expression contains a constant term, the constant term is transformed into a non-fixed value parameter;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
Also, while described with reference to the foregoing method embodiment, in another embodiment of the method,
the transformation mode comprises the following steps:
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
Also, in another embodiment of the method, described with reference to the previous method embodiment, the nonlinear activation function comprises a nonlinear activation function that can be expressed using a taylor expansion.
As described above, the data processing method for privacy protection provided in this specification may be applied to an application scenario in which a Sigmoid function is used as a nonlinear activation function used in a machine learning model, and may utilize multi-party secure computation for collaborative computation when obtaining a Sigmoid data processing result, reduce precision loss in approximate evaluation by expanding the Sigmoid function into a polynomial, and improve efficiency of data processing by using the Sigmoid function. Thus, in another embodiment of the method, the non-linear activation function comprisesA function, the lossless expression being:
then, have the first fragmentGenerates a first random numberWherein the first segmentThe sum of the shards with the remaining participants isFirst random numberThe sum of the random numbers of the remaining participants is;
The first party calculates the first operation part by cooperating with the multi-party security calculation of the rest partiesTo obtainFirst segment of<>1;
The first party calculates the second operation part by cooperating with the multi-party security calculation of the rest partiesTo obtainFirst segment of<>1;
Each participant may have a corresponding shardAnd random number,Is shown asThe number of the participating parties is increased,is shown asThe shards that are owned by an individual participant,the value may be [1,2 … ]],Is the number of participants, wherein,,。
a variety of representations may be included. For exampleValues can be taken as positive integers greater than 1,may represent points owned by the first participantThe sheet is a sheet of a plastic material,may represent a shard owned by a second party,shards owned by a third party may be represented, and so on. Alternatively A, B, C, etc. may be used to represent different parties, and so onMay represent a slice owned by the first party a,the shards owned by the second participant B may be represented, and so on. Of course, other embodiments may include other identification methods. For convenience of description, use is made ofThe identities of the parties involved are represented uniformly,the specific value is representative of the different parties. Such as sharding of the first party aShow thatIndicating that, correspondingly, the sharding of the second party B may beAnd so on. The participants may use a locally used pseudo-random number generator to generate random numbers.
Fragmentation may be used in this embodimentIs shown asShards of individual participants, corresponding, random numbersCan represent the firstRandom number of each participant. It is assumed that the sum of the pieces of all participants is the data to be processed in this embodiment that needs to be calculated using Sigmoid, i.e. the. Then, the first party calculates the first operation part by cooperating with the multiparty security calculation of the remaining partiesTo obtainFirst segment of<>1; the first party calculates the second operation part by cooperating with the multi-party security calculation of the rest partiesTo obtainFirst segment of<>1; first party computingTo obtainA first result slice of the operation result.
The above embodiments may be applied to privacy preserving Sigmoid computations of two or more participants. In the calculation process, a plurality of participants can participate in the calculation together, and in some embodiments, the calculation of a third party (such as an intermediate platform) can also be included. For example, the participants may be provided with respective private dataAnd random numberAnd sending the data to a semi-trusted third-party platform, and carrying out calculation and interaction by the third-party platform.
In the foregoing embodiment, for the single participant side, the single participant side can efficiently, safely and losslessly obtain the result fragmentation of the Sigmoid operation result on the basis of protecting the data privacy of the single participant side. For ease of description, the single participant-side embodiment may refer to the participant of the embodiment as a first participant and the remaining participants (e.g., a second participant, a third participant, etc.) with respect to other participants on the single participant side.
As described in the foregoing method implementation, in another embodiment, the first party calculates the first computation portion by cooperating with the MPC of the remaining parties for multi-party security computationTo obtainFirst segment of<>1, can include:
the first party being based on local computingCollaborative computing with remaining participants based on multi-party security computingTo obtainOne piece of the calculation result<>1;Is shown asThe number of the participating parties is increased,is shown asThe shards that are owned by an individual participant,has a value of [1,2 …],As to the number of the participating parties,;
the first party can calculate the cooperative calculation based on the multi-party safety calculation according to the first partyFurther calculate、Etc. calculatingCan obtainCorresponding remaining slice<>1、<>1, etc. Thus, a first participant acquires collaborative computing with a remaining participant through multi-party secure computingObtainedRemaining fragmentation of computed results<>1,Is shown asThe random number of the individual participating parties,;
In the above embodiment, the first party a ownsA slice of<>1 andcan be calculated from the slice of (1)<>1+1, can be used asOne piece of the calculation result<>1. Then can be used for computing cooperation with other participants based on multi-party security computing. Likewise, the remaining participants mayCalculated in a manner according to the first partyE.g. the second party B may calculate<>2+2, obtaining<>2. Thus, similarly, as described for the preceding method implementation, in another embodiment of the method, the first party computes the second computation portion in cooperation with the multi-party secure computation of the remaining partiesThe method comprises the following steps:
The first party obtaining local computations of the remaining parties by means of a multiparty security computationIs divided into remaining slices<>、<>、<>、<>;
In the data processing method for privacy protection provided in the embodiments of the present specification, when a data processing result of a nonlinear activation function used in a machine learning algorithm needs to be obtained in a data sharing application scenario in which multiple parties participate, an original or appropriately changed lossless expression may be used, and multiple parties may be used to perform secure computation to cooperatively compute each subentry, so that the subentry may be prevented from being expanded into an approximate evaluation algorithm of a polynomial, computation complexity is reduced, and efficiency of computing nonlinear activation function data by a computer device is improved. In addition, compared with the polynomial calculation of taylor expansion, for example, each participant in the embodiment can calculate the result fragment of the operation result of the nonlinear activation function in a simpler manner, thereby greatly reducing the complexity and precision loss of approximate calculation of the nonlinear activation function such as taylor expansion. The method in the embodiment of the specification can realize efficient and lossless acquisition of one result fragment of the operation result of the nonlinear activation function of each participant based on privacy protection in data processing of multi-party participation. Furthermore, the method can efficiently and nondestructively acquire the operation result of the nonlinear activation function based on privacy protection, can improve the calculation speed of a computer and the precision of an output result, and can also integrally improve the data processing efficiency of machine learning based on privacy protection.
In the present specification, each embodiment of the method is described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. Reference is made to the description of the method embodiments.
It is understood that all or part of the steps of the method described in the above embodiments may be executed on a computing device of a certain participant or performed by computing and communication among multiple participants, may be executed by a server of a third party, or may be executed by a third server and one or more participants together (e.g., a platform used by the participants together).
The method embodiments provided in the embodiments of the present specification may be executed in a handheld terminal, a computer terminal, a server cluster, a mobile terminal, a blockchain node, a distributed network, or a similar computing device. The apparatus may include a system (including a distributed system), software (applications), modules, components, servers, clients, etc. that employ embodiments of the present description in conjunction with any necessary hardware for implementation. Taking a server running on a server as an example, fig. 3 is a hardware structure block diagram of a server device of a participant to which an embodiment of a data processing method for privacy protection according to the present invention is applied. As shown in fig. 3, the server 10 may include one or more (only one shown) processors 100 (the processors 100 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 200 for storing data, and a transmission module 300 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 3 is merely an illustration and is not intended to limit the structure of the electronic device. For example, the server 10 may also include more or fewer components than shown in FIG. 3, and may also include other processing hardware, such as an internal bus, memory, database or multi-level cache, a display, or have other configurations than shown in FIG. 3, for example.
The memory 200 may be used to store software programs and modules of application software, and the processor 100 executes various functional applications and data processing by operating the software programs and modules stored in the memory 200. Memory 200 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 200 may further include memory located remotely from processor 100, which may be connected to server 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission module 300 is used for receiving or transmitting data via a network. Examples of such networks may include a blockchain private network of the server 10 or a network provided by the world wide web or a communications provider. In one example, the transmission module 300 includes a Network adapter (NIC) that can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission module 300 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Based on the above description of the embodiments of the data processing method for privacy protection, the present specification further provides a data processing apparatus for privacy protection. The device can be used in a data sharing application scene with multi-party participation. The apparatus may include systems (including distributed systems), software (applications), modules, components, servers, clients, etc. that use the methods described in the embodiments of the present specification in conjunction with any necessary apparatus to implement the hardware. Based on the same innovative conception, embodiments of the present specification provide an apparatus as described in the following embodiments. Since the implementation scheme of the apparatus for solving the problem is similar to that of the method, the specific implementation of the apparatus in the embodiment of the present specification may refer to the implementation of the foregoing method, and repeated details are not repeated. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Specifically, fig. 4 is a schematic block diagram of an embodiment of a data processing apparatus for privacy protection provided in this specification, and as shown in fig. 4, the apparatus may include:
a first operation module 40, configured to compute a first operation portion of a lossless expression in cooperation with multiparty security computation of remaining participants, to obtain a first segment of the first operation portion, where the lossless expression includes a lossless expression of a non-linear activation function used in a multiparty machine learning algorithm;
the second operation module 42 may determine a first fragment of a second operation portion of the nonlinear activation function based on the first fragment, and the first participant performs multi-party secure computation based on the first fragment of the second operation portion and remaining fragments of the second operation portion owned by remaining participants to obtain an operation result of the second operation portion;
the result fragment calculation module 44 may be configured to perform the operation of the nonlinear activation function on the operation result of the first fragment and the second operation portion to obtain a first result fragment of the operation result of the nonlinear activation function, where the operation result of the second operation portion is obtained by performing multi-party secure calculation recovery based on the first fragment of the second operation portion and remaining fragments of the second operation portion owned by remaining participants.
As also described above, the above device embodiment does not limit that the second operation module 42 is required to execute the related processing after the first operation module 40, and in other embodiments, the first operation module 40 and the second operation module 42 may be connected to the result slice calculation module 44 respectively, and transmit the result of their respective calculation outputs to the result slice calculation module 44 (as shown in the dotted line in fig. 4).
Based on the foregoing description of the method embodiment, in another embodiment of the apparatus, if the lossless expression contains a constant term, the constant term is transformed into a non-fixed value parameter;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
Based on the foregoing description of the method embodiment, in another embodiment of the apparatus, the transformation manner includes:
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
Based on the description of the foregoing method embodiment, in another embodiment of the apparatus, the nonlinear activation function comprises a nonlinear activation function that can be expressed using a taylor expansion.
In a further embodiment of the device, based on the description of the preceding method embodiment, the non-linear activation function comprisesA function, the lossless expression being:
the device further comprises: a shard storage module to store a first shard of a first participantAnd generating a first random numberWherein the first segmentThe sum of the shards with the remaining participants isFirst random numberThe sum of the random numbers of the remaining participants is;
The first operation module is used for cooperatively calculating a first operation part through multi-party security calculation with the rest participantsTo obtainFirst segment of<>1;
The second operation module is used for cooperatively calculating a second operation part through multi-party security calculation with the rest participantsTo obtainFirst segment of<>1;
The result slicing calculation module calculatesObtained byA first result slice of the operation result.
Based on the foregoing description of the method embodiment, in another embodiment of the apparatus, the first operation module calculates the first operation by cooperating with the multiparty security calculation of the remaining participantsTo obtainFirst segment of<>1, comprising:
based on local computingMulti-party based secure computing cooperation with remaining participantsSimultaneous calculationTo obtainOne piece of the calculation result<>1;Is shown asThe number of the participating parties is increased,is shown asThe shards that are owned by an individual participant,has a value of [1,2 …],As to the number of the participating parties,;
obtaining secure computations with remaining participants through multiple partiesObtainedRemaining fragmentation of computed results<>1,Is shown asThe random number of the individual participating parties,;
Based on the foregoing description of the method embodiment, in another embodiment of the apparatus, the second calculation module calculates the second calculation part in cooperation with the multiparty security calculation of the remaining participantsThe method comprises the following steps:
The first party obtaining local computations of the remaining parties by means of a multiparty security computationIs divided into remaining slices<>、<>、<>、<>;
It should be noted that the above-mentioned description of the apparatus according to the method embodiment may also include other implementation manners, and the specific implementation manner may refer to the description of the related method embodiment, which is not described in detail herein.
In the present specification, each embodiment of the apparatus is described in a progressive manner, and the same and similar parts among the embodiments are mutually referred to or described with reference to the corresponding method embodiment, and each embodiment focuses on the differences from the other embodiments. Reference is made to the description of the method embodiments. The specific details can be obtained according to the descriptions of the foregoing method embodiments, and all of them should fall within the scope of the implementation protected by this application, and no further description is given to implementation schemes of the embodiments one by one.
The data processing method or apparatus for privacy protection provided in the embodiment of the present specification may be implemented by a processor executing a corresponding program instruction in a computer, for example, implemented in a PC end using a C + + language of a Windows operating system, implemented based on a Linux system, or implemented in an intelligent terminal using Android and iOS system programming languages, or implemented in a server cluster, a cloud processing/cloud computing/cloud server, a block chain, and a processing logic based on quantum computing. Based on the description of the foregoing method embodiments, this specification further provides a device for privacy protection. The device may be a terminal device used by a participant in the embodiments of the present specification, or a terminal that is included in or mechanically or electrically connected to a device used by the participant. In one embodiment, the terminal device may include: at least one processor and a memory for storing processor-executable instructions, the instructions when executed by the processor implementing the steps of the method of any one of the present descriptions.
The privacy-preserving apparatus may comprise an apparatus employing any one of the method embodiments of the present description or comprising any one of the apparatus embodiments of the present description in combination with the necessary implementation hardware.
Storage media that store processor-executable instructions may include physical devices used to store information, typically digitized information and then stored using electrical, magnetic, or optical media. The storage medium may include: devices that store information using electrical energy, such as various types of memory, e.g., RAM, ROM, etc.; devices that store information using magnetic energy, such as hard disks, floppy disks, tapes, core memories, bubble memories, and usb disks; devices that store information optically, such as CDs or DVDs. Of course, there are other ways of storing media that can be read, such as quantum memory, graphene memory, and so forth.
In an application scenario of data sharing with multi-party participation, a plurality of parties usually correspond to a plurality of devices. Each device can implement the method described in the embodiments of the present specification, so that the entire data sharing system can implement efficient and lossless computation for protecting privacy, and perform secure computation of a nonlinear activation function in a machine learning model such as Sigmoid. Therefore, the present specification further provides a privacy-preserving machine learning system, where a machine learning algorithm of the machine learning system includes a non-linear activation function, the non-linear activation function obtains a result through multi-party security calculation of at least two parties, and a processor of any one of the at least two parties implements the steps of the method in the specification when executing executable instructions stored in a memory.
As mentioned above, for specific implementation of the embodiments of the privacy-preserving apparatus and the machine learning system, reference may be made to the description of the foregoing method embodiments. The description according to the method related embodiment may further include other embodiments, and the specific implementation may refer to the description of the corresponding method embodiment, which is not described in detail herein.
The foregoing description has been directed to specific embodiments of this disclosure. The embodiments described based on the above embodiments are extensible and still fall within the scope of implementations provided in the present specification. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
According to the data processing method, device, equipment and machine learning system for privacy protection, when a data processing result of a nonlinear activation function used in a machine learning algorithm needs to be obtained in a multi-party participatory data sharing application scene, original or appropriately changed lossless expressions can be used, multi-party safe calculation is utilized to cooperatively calculate each subentry, the subentry can be prevented from being expanded into an approximate evaluation algorithm of a polynomial, calculation complexity is reduced, and efficiency of calculating nonlinear activation function data processing by computer equipment is improved. In addition, compared with the polynomial calculation of taylor expansion, for example, each participant in the embodiment can calculate the result fragment of the operation result of the nonlinear activation function in a simpler manner, thereby greatly reducing the complexity and precision loss of approximate calculation of the nonlinear activation function such as taylor expansion. The method in the embodiment of the specification can realize efficient and lossless acquisition of one result fragment of the operation result of the nonlinear activation function of each participant based on privacy protection in data processing of multi-party participation. Furthermore, the method can efficiently and nondestructively acquire the operation result of the nonlinear activation function based on privacy protection, can improve the calculation speed of a computer and the precision of an output result, and can also integrally improve the data processing efficiency of machine learning based on privacy protection.
The embodiments of the present description are not necessarily limited toA Sigmoid function expression according to standard secret sharing or MPC processing methods, an industry communications standard, a standard programming language, a data storage rule, or as described in one or more embodiments of this specification. Certain industry standards, or implementations modified slightly from those described using custom modes or examples, may also achieve the same, equivalent, or similar, or other, contemplated implementations of the above-described examples. The embodiments using the modified or transformed data acquisition, storage, judgment, processing and the like can still fall within the scope of the alternative embodiments of the embodiments in this specification.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The server, the apparatus, and the module illustrated in the above embodiments may be implemented by a computer chip or an entity, or implemented by an article with certain functions. One typical implementation device is a server system. Of course, this application does not exclude that with future developments in computer technology, the computer implementing the functionality of the above described embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device or a combination of any of these devices.
Although one or more embodiments of the present description provide method operational steps as described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive approaches. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. For example, if the terms first, second, etc. are used to denote names, they do not denote any particular order.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, when implementing one or more of the present description, the functions of each module may be implemented in one or more software and/or hardware, or a module implementing the same function may be implemented by a combination of multiple sub-modules or sub-units, etc. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In the description of the specification, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is merely exemplary of one or more embodiments of the present disclosure and is not intended to limit the scope of one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present specification should be included in the scope of the claims.
Claims (21)
1. A privacy-preserving data processing method, comprising:
determining a lossless expression of a nonlinear activation function used in a machine learning algorithm, the lossless expression comprising a first operational portion and a second operational portion of the nonlinear activation function;
a first participant and a second participant cooperatively calculate the first operation part based on multi-party security calculation, wherein the first participant obtains a first fragment of the first operation part, and the second participant obtains a second fragment of the first operation part;
the first participant determines a first fragment of the second operation part based on the first fragment, the second participant determines a second fragment of the second operation part based on the second fragment, and the first participant and the second participant perform multi-party safe calculation based on the first fragment of the second operation part and the second fragment of the second operation part to obtain an operation result of the second operation part;
the first participant performs the operation of the nonlinear activation function on the first fragment of the first operation part and the operation result of the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the second participant performs the operation of the nonlinear activation function on the second fragment of the first operation part and the operation result of the second operation part to obtain a second result fragment of the operation result of the nonlinear activation function.
2. The method of claim 1, wherein if the lossless expression contains a constant term, transforming the constant term to a non-fixed value parameter;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
3. The method of claim 2, the transformation mode comprising:
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
4. The method of claim 1, the nonlinear activation function comprising a nonlinear activation function expressible using taylor expansion.
5. The method of claim 4, the nonlinear activation function comprisingA function, the lossless expression being:
then, have the first fragmentGenerates a first random numberHaving a second sectionThe second party of (2) generates a second random numberWherein, in the step (A),,;
the first party and the second party cooperatively calculate a first operation part based on multi-party security calculationThe first party getsFirst segment of<>1, the second party getsSecond section of<>2;
The first participant and the second participant cooperatively calculate a second operation part based on multi-party security calculation;
6. A privacy-preserving data processing method, comprising:
a first participant calculates a first operation part of a lossless expression through cooperation with multi-party safety calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multi-party participating machine learning algorithm;
the first participant determines a first slice of a second operational portion of the nonlinear activation function based on the first slice;
and the first participant performs operation of the nonlinear activation function on the first segment of the first operation part and the operation result of the second operation part to obtain a first result segment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first segment of the second operation part and the remaining segments of the second operation part owned by the remaining participants.
7. The method of claim 6, wherein if the lossless expression contains a constant term, transforming the constant term to a non-fixed value parameter;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
8. The method of claim 7, the transformation mode comprising:
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
9. The method of claim 6, the nonlinear activation function comprising a nonlinear activation function expressible using a Taylor expansion.
10. The method of claim 6, the non-linear activation function comprisingA function, the lossless expression being:
then, have the first fragmentGenerates a first random numberWherein the first segmentThe sum of the shards with the remaining participants isFirst random numberThe sum of the random numbers of the remaining participants is;
The first party calculates the first operation part by cooperating with the multi-party security calculation of the rest partiesTo obtainFirst segment of<>1;
The first party calculates the second operation part by cooperating with the multi-party security calculation of the rest partiesTo obtainFirst segment of<>1;
11. The method of claim 10, wherein the first party computes the first computation portion in cooperation with a multi-party secure computation of the remaining partiesTo obtainFirst segment of<>1, comprising:
the first party being based on local computingCollaborative computing with remaining participants based on multi-party security computingTo obtainOne piece of the calculation result<>1;Is shown asThe number of the participating parties is increased,is shown asThe shards that are owned by an individual participant,has a value of [1,2 …],As to the number of the participating parties,;
first participant acquisition and remaining participants collaborate with computation through multi-party secure computingObtainedRemaining fragmentation of computed results<>1,Is shown asThe random number of the individual participating parties,;
12. The method of claim 11, wherein the first party calculates the second calculation part by cooperating with the multiparty security calculation of the remaining partiesThe method comprises the following steps:
The first party passesMulti-party secure computation obtaining remaining participant local computationIs divided into remaining slices<>、<>、<>、<>;
13. A privacy-preserving data processing apparatus comprising:
the first operation module is used for cooperatively calculating a first operation part of a lossless expression through multiparty security calculation of the rest participants to obtain a first segment of the first operation part, wherein the lossless expression comprises a lossless expression of a nonlinear activation function used in a multiparty machine learning algorithm;
the second operation module is used for determining a first fragment of a second operation part of the nonlinear activation function based on the first fragment, and the first participant performs multi-party safe calculation based on the first fragment of the second operation part and the remaining fragments of the second operation part owned by the remaining participants to obtain an operation result of the second operation part;
and the result fragment calculation module is used for performing operation of the nonlinear activation function on the operation result of the first fragment and the second operation part to obtain a first result fragment of the operation result of the nonlinear activation function, and the operation result of the second operation part is obtained by performing multi-party safety calculation recovery on the basis of the first fragment of the second operation part and the remaining fragments of the second operation part owned by the remaining participants.
14. The apparatus of claim 13, transforming the constant term into a non-fixed value parameter if the lossless expression contains the constant term;
and the items containing independent variables in the lossless expression are transformed into the non-fixed value parameters according to the constant items, corresponding transformation is executed, and the transformation lossless expression of the nonlinear activation function is determined.
15. The apparatus of claim 14, the transformation comprising:
And taking a first random number acquired by a first participant as a first fragment of the non-fixed value parameter, and taking a second random number acquired by a second participant as a second fragment of the non-fixed value parameter.
16. The apparatus of claim 13, the nonlinear activation function comprising a nonlinear activation function expressible using taylor expansion.
17. The apparatus of claim 13, the nonlinear activation function comprisingA function, the lossless expression being:
the device further comprises: a shard storage module to store a first shard of a first participantAnd generating a first random numberWherein the first segmentThe sum of the shards with the remaining participants isFirst random numberThe sum of the random numbers of the remaining participants is;
The first operation module is used for cooperatively calculating a first operation part through multi-party security calculation with the rest participantsTo obtainFirst segment of<>1;
The second operation module is used for cooperatively calculating a second operation part through multi-party security calculation with the rest participantsTo obtainFirst segment of<>1;
18. The apparatus of claim 17, the first operations module to compute the first operation in cooperation with a multi-party secure computation of the remaining participantsTo obtainFirst segment of<>1, comprising:
based on local computingCollaborative computing with remaining participants based on multi-party security computingTo obtainOne piece of the calculation result<>1;Is shown asThe number of the participating parties is increased,is shown asThe shards that are owned by an individual participant,has a value of [1,2 …],As to the number of the participating parties,;
obtaining collaborative computation through multi-party security computation with remaining participantsObtainedRemaining fragmentation of computed results<>1,Is shown asThe random number of the individual participating parties,;
19. The apparatus of claim 18, wherein the second computing module is to compute the second computing portion in cooperation with a multi-party secure computation of the remaining participantsThe method comprises the following steps:
The first party obtaining local computations of the remaining parties by means of a multiparty security computationIs divided into remaining slices<>、<>、<>、<>;
20. A privacy preserving device comprising: at least one processor and a memory for storing processor-executable instructions, the processor implementing the steps of the method of any one of claims 6-12 when executing the instructions.
21. A privacy preserving machine learning system whose machine learning algorithm includes a non-linear activation function that results from multi-party secure computations by at least two parties, the processor of any one of the at least two parties implementing the steps of the method of any one of claims 6-12 when executing the executable instructions stored in the memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011164969.4A CN112000990B (en) | 2020-10-27 | 2020-10-27 | Data processing method, device and equipment for privacy protection and machine learning system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011164969.4A CN112000990B (en) | 2020-10-27 | 2020-10-27 | Data processing method, device and equipment for privacy protection and machine learning system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112000990A true CN112000990A (en) | 2020-11-27 |
CN112000990B CN112000990B (en) | 2021-02-05 |
Family
ID=73474432
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011164969.4A Active CN112000990B (en) | 2020-10-27 | 2020-10-27 | Data processing method, device and equipment for privacy protection and machine learning system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112000990B (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112686392A (en) * | 2020-12-30 | 2021-04-20 | 深圳大普微电子科技有限公司 | Integrated circuit-based activation function processing method, device, equipment and medium |
CN112818338A (en) * | 2021-01-22 | 2021-05-18 | 支付宝(杭州)信息技术有限公司 | Program running method and system |
CN112818337A (en) * | 2021-01-22 | 2021-05-18 | 支付宝(杭州)信息技术有限公司 | Program running method and system |
CN112926051A (en) * | 2021-03-25 | 2021-06-08 | 支付宝(杭州)信息技术有限公司 | Multi-party security computing method and device |
CN112966809A (en) * | 2021-02-02 | 2021-06-15 | 支付宝(杭州)信息技术有限公司 | Privacy protection-based two-party model prediction method, device and system |
CN114022093A (en) * | 2021-09-22 | 2022-02-08 | 医渡云(北京)技术有限公司 | Data collaborative computing method, device and equipment based on multi-party security |
WO2022126993A1 (en) * | 2020-12-18 | 2022-06-23 | 百度在线网络技术(北京)有限公司 | Multi-party security computing method and apparatus, electronic device and storage medium |
CN116070282A (en) * | 2023-04-04 | 2023-05-05 | 华控清交信息科技(北京)有限公司 | Data processing method and device in privacy calculation and electronic equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018174873A1 (en) * | 2017-03-22 | 2018-09-27 | Visa International Service Association | Privacy-preserving machine learning |
CN109919318A (en) * | 2018-12-14 | 2019-06-21 | 阿里巴巴集团控股有限公司 | Data processing method, device and equipment |
CN111143894A (en) * | 2019-12-24 | 2020-05-12 | 支付宝(杭州)信息技术有限公司 | Method and system for improving safe multi-party computing efficiency |
CN111539026A (en) * | 2020-06-19 | 2020-08-14 | 支付宝(杭州)信息技术有限公司 | Method and device for performing secure operation on private data |
-
2020
- 2020-10-27 CN CN202011164969.4A patent/CN112000990B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018174873A1 (en) * | 2017-03-22 | 2018-09-27 | Visa International Service Association | Privacy-preserving machine learning |
CN109919318A (en) * | 2018-12-14 | 2019-06-21 | 阿里巴巴集团控股有限公司 | Data processing method, device and equipment |
CN111143894A (en) * | 2019-12-24 | 2020-05-12 | 支付宝(杭州)信息技术有限公司 | Method and system for improving safe multi-party computing efficiency |
CN111539026A (en) * | 2020-06-19 | 2020-08-14 | 支付宝(杭州)信息技术有限公司 | Method and device for performing secure operation on private data |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022126993A1 (en) * | 2020-12-18 | 2022-06-23 | 百度在线网络技术(北京)有限公司 | Multi-party security computing method and apparatus, electronic device and storage medium |
CN112686392A (en) * | 2020-12-30 | 2021-04-20 | 深圳大普微电子科技有限公司 | Integrated circuit-based activation function processing method, device, equipment and medium |
CN112818338A (en) * | 2021-01-22 | 2021-05-18 | 支付宝(杭州)信息技术有限公司 | Program running method and system |
CN112818337A (en) * | 2021-01-22 | 2021-05-18 | 支付宝(杭州)信息技术有限公司 | Program running method and system |
CN112966809A (en) * | 2021-02-02 | 2021-06-15 | 支付宝(杭州)信息技术有限公司 | Privacy protection-based two-party model prediction method, device and system |
CN112926051A (en) * | 2021-03-25 | 2021-06-08 | 支付宝(杭州)信息技术有限公司 | Multi-party security computing method and device |
CN114022093A (en) * | 2021-09-22 | 2022-02-08 | 医渡云(北京)技术有限公司 | Data collaborative computing method, device and equipment based on multi-party security |
CN116070282A (en) * | 2023-04-04 | 2023-05-05 | 华控清交信息科技(北京)有限公司 | Data processing method and device in privacy calculation and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
CN112000990B (en) | 2021-02-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112000990B (en) | Data processing method, device and equipment for privacy protection and machine learning system | |
CN111783130B (en) | Data processing method and device for privacy protection and server | |
Cheon et al. | Ensemble method for privacy-preserving logistic regression based on homomorphic encryption | |
Pulido-Gaytan et al. | Privacy-preserving neural networks with homomorphic encryption: C hallenges and opportunities | |
Gao et al. | Privacy-preserving Naive Bayes classifiers secure against the substitution-then-comparison attack | |
Sathya et al. | A review of homomorphic encryption libraries for secure computation | |
Meftah et al. | Doren: toward efficient deep convolutional neural networks with fully homomorphic encryption | |
Frembs et al. | Contextuality as a resource for measurement-based quantum computation beyond qubits | |
CN111931241B (en) | Linear regression feature significance testing method and device based on privacy protection | |
Feng et al. | ZEN: An optimizing compiler for verifiable, zero-knowledge neural network inferences | |
CN109919318B (en) | Data processing method, device and equipment | |
CN110543901A (en) | image recognition method, device and equipment | |
US11164484B2 (en) | Secure computation system, secure computation device, secure computation method, and program | |
US11294633B2 (en) | Secure computation system, secure computation device, secure computation method, and program | |
Krips et al. | Hybrid model of fixed and floating point numbers in secure multiparty computations | |
WO2020071187A1 (en) | Hidden sigmoid function calculation system, hidden logistic regression calculation system, hidden sigmoid function calculation device, hidden logistic regression calculation device, hidden sigmoid function calculation method, hidden logistic regression calculation method, and program | |
RU2698764C2 (en) | Electronic computing device for performing concealed arithmetic operations | |
Block et al. | Secure computation with constant communication overhead using multiplication embeddings | |
CN115062342A (en) | Privacy calculation method and device, electronic equipment and readable storage medium | |
CN113780552B (en) | Safe multiparty computing method for bidirectional privacy protection | |
CN117792602A (en) | Private data processing method based on multiparty full homomorphic encryption | |
JPWO2019111319A1 (en) | Secret equal sign judgment system, secret equal sign judgment method and secret equal sign judgment program | |
Pulido-Gaytan et al. | Towards Understanding Efficient Privacy-Preserving Homomorphic Comparison | |
CN115134078B (en) | Secret sharing-based statistical method, device and storage medium | |
Li et al. | A CKKS-based privacy preserving extreme learning machine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |