Exponential function implementation method for privacy protection neural network model

By splitting floating-point numbers into exponent and mantissa parts in the MPC environment and using addition secret sharing and multiplication triplet protocols to achieve approximate calculation of the exponential function, the problem of precision loss and computational complexity when converting floating-point numbers to fixed-point numbers in the MPC environment is solved, thus improving computational efficiency and security.

CN121786877APending Publication Date: 2026-04-03SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

In existing multi-party secure computation (MPC) environments, there is a loss of precision in the process of converting floating-point numbers to fixed-point numbers. The computation is complex and the communication overhead is large. Moreover, existing technologies are inefficient when implementing exponential functions.

Method used

In the MPC environment, floating-point numbers are split into exponent and mantissa parts, and represented in fragments among the participants through addition secret sharing. Local operations and secure communication are performed using the multiplication triplet protocol to complete the fast approximate calculation of the exponential function. A conversion mechanism between addition secret sharing and multiplication secret sharing is adopted to ensure security and efficiency.

Benefits of technology

Without revealing plaintext data, it significantly reduces the computational complexity and communication overhead of the exponential function, improves computational efficiency, and provides high-precision approximation results under a semi-honest secure model, making it suitable for the computation of privacy-preserving neural network models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786877A_ABST
    Figure CN121786877A_ABST
Patent Text Reader

Abstract

A method for achieving exponential function approximate calculation in an MPC environment comprises the steps that a floating-point number participating in neural network calculation in the MPC environment is divided into an exponent part and a mantissa part according to an IEEE-754 standard format, and fragmentation representation is conducted between participants in an addition secret sharing mode; after each participant locally executes exponentiation on the exponent part, an obtained result is safely converted from multiplication secret sharing to addition secret sharing, and furthermore, a multiplication triple protocol is utilized to execute safe multiplication on addition secret sharing of exponent exponentiation results and addition secret sharing of mantissa, so that the exponent exponentiation results are obtained. Therefore, the additive secret sharing representation of the corresponding floating-point number is obtained. According to the method, on the premise that the approximate precision of the exponential function is controllable, efficient calculation of the exponential function in the MPC environment is achieved, and an engineering implementation scheme considering precision and efficiency is provided for a privacy protection neural network reasoning or prediction task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a technology in the field of information security, specifically a method for implementing an exponential function in a privacy-preserving neural network model under a multi-party secure computation (MPC) environment. Background Technology

[0002] As an important technical approach to achieving privacy-preserving computation, MPC (Multi-Party Computation) represents the input of participating parties in a distributed manner through secret sharing or homomorphic encryption, making it impossible for any single participant to recover the original input, but allowing multiple parties to collaborate and complete the required computation within the encrypted domain. However, existing technologies suffer from precision loss when converting floating-point numbers to fixed-point numbers of corresponding precision; fixed-point numbers have a limited number of bits that can be represented, for example, a number represented by a 32-bit floating-point number requires 512 bits of fixed-point number; and using fixed-point number protocols for the same precision requires a larger bit width and higher communication overhead. Summary of the Invention

[0003] This invention addresses the floating-point exponentiation function under the existing MPC framework. To address the issues of complex computation, high communication overhead, and low efficiency, this paper proposes an exponential function implementation method for privacy-preserving neural network models. During protocol execution, each participant performs local computation and secure communication only based on its own secret fragment. This method enables fast approximate calculation of the exponential function using only addition and multiplication gates without leaking any plaintext data or intermediate results. For scenarios with higher security levels, a verified multiplication triple generation and consistency check mechanism can be adopted to prevent malicious participants from injecting faulty sharing, thus ensuring both efficiency and strong security, and making it suitable for typical semi-honest security models.

[0004] This invention is achieved through the following technical solution:

[0005] This invention relates to a method for implementing exponential functions in a privacy-preserving neural network model. In an MPC environment, the floating-point number participating in the neural network computation is split into an exponent part and a mantissa part according to the IEEE-754 standard format, and these parts are represented in fragments among the participants using an addition-secret sharing method. Each participant performs an exponentiation operation on the exponent part locally, securely converting the result from multiplication-secret sharing to addition-secret sharing. Furthermore, using a multiplication triplet protocol, a secure multiplication operation is performed between the addition-secret sharing of the exponentiation result and the addition-secret sharing of the mantissa, thereby obtaining the addition-secret sharing representation of the corresponding floating-point number.

[0006] Preferably, an approximate calculation of the exponential function is performed on the obtained floating-point number within the addition secret-sharing domain, and the calculation result is securely reinterpreted to obtain the corresponding floating-point secret-sharing result, which is then used as an intermediate result in the neural network model calculation process to participate in subsequent nonlinear operator calculations. Examples include Softmax operations in classification probability calculations, activation function calculations, or feature weight normalization operations, thereby supporting joint inference or prediction tasks in privacy-preserving scenarios.

[0007] The described neural network model is a type of model used for privacy-preserving joint inference or prediction. It can be used for machine learning tasks such as classification, regression, or probabilistic prediction, for example, in scenarios such as privacy-preserving authentication, risk assessment, or data analysis, to jointly model and infer feature data held by multiple parties. By embedding the approximate calculation of the exponential function into the overall calculation process of the above neural network model, this invention improves the computational efficiency and engineering feasibility of the exponential function in an MPC environment without disclosing the input data of each participant.

[0008] The multiplication slices are obtained as follows: During the protocol initialization phase, the input floating-point number to be calculated is... Decomposed into exponents according to IEEE-754 single-precision format and the last digit (The sign bit can be fixed at 0) After that, the participants share the secret through addition. and Each participant generates shards separately. Local holding and ,satisfy , Neither party can recover the plaintext value from a partial fragment. To ensure consistency and composability in subsequent calculations, bit width and precision parameters (e.g., ...) should be agreed upon and fixed at this stage. It also performs uniform quantization and alignment processing on the input in batches. This representation step only involves local mask generation and distribution of addition fragments, which does not introduce complex comparisons or multi-party multiplications, nor does it change the numerical semantics of the input. Therefore, it has extremely low overhead and is easy to interface with existing two-party semi-honest MPC protocols.

[0009] The aforementioned transformation of the result from multiplication secret sharing to addition secret sharing after performing the exponentiation operation specifically refers to: each participating party performing a secure exponentiation operation locally, and sharing the fragments of the addition secret. Mapped to the corresponding Sharing the secrets of multiplication that form exponent terms Then, the secrets of multiplication for the exponent part will be shared. A conversion protocol from multiplication secret sharing to addition secret sharing is adopted, and pre-distributed multiplication triples (BeaverTriples) are used to achieve secure transformation of the sharing type, resulting in addition secret sharing of exponents. After completing the two transformations mentioned above, the secret sharing of the exponent and mantissa is in additive form, preparing for subsequent product combinations. The entire process does not involve plaintext data reconstruction, relying solely on secure arithmetic protocols and verified sharing transformation mechanisms to ensure that data privacy and security are not compromised.

[0010] The aforementioned safe multiplication calculation refers to: in exponentiation... and the last digit After all the preparations are completed in the form of addition secret sharing, the floating-point reconstruction process is implemented through the multiplication triplet (BeaverTriple) protocol to obtain... The addition secret sharing mechanism involves: pre-generating or distributing a set of multiplication triples (A, B, C) that satisfy C = A·B, and storing them among the parties in the form of addition secret sharing. During the online phase, each party calculates the difference between its own fragment and the triple. The difference is broadcast in encrypted or secret form to ensure secure multiplication correction without exposing the original shared content. Afterwards, each participant calculates and shares the output according to the protocol. And keep the result as the secret of addition. In this process, all intermediate variables are processed within a secret shared domain, eliminating the need for plaintext multiplication or data recovery, thus ensuring the independent privacy of the exponent and mantissa is not compromised. Through this multiplication triplet mechanism, floating-point numbers can be efficiently obtained in a single secure multiplication operation. The secret of addition is shared, providing input for subsequent linear combination calculations.

[0011] The aforementioned exponential approximation refers to: the participants' secret sharing of floating-point numbers. Perform linear transformation , where: coefficient This linear transformation utilizes the exponential encoding characteristics of floating-point numbers to directly map the magnitude of the input value x to the bit pattern space of IEEE-754 format, thus simulating an exponential growth relationship with linear operations. During online execution, each participant only needs to call one secure multiplication and one secure addition to complete the combined calculation, without involving any branching, comparison, or table lookup operations. The obtained results... It remains an additive secret sharing form, corresponding to an approximation. The floating-point encoded value. In the implementation, a fixed or high-precision constant representation can be selected according to the system's accuracy requirements, and the numerical accuracy can be further optimized by fine-tuning the bias constant b. Since the core operation of this step is a linear operator, the communication and computational complexity remain at the constant level, which is significantly better than traditional polynomial approximation methods.

[0012] The aforementioned safety reinterpretation refers to: approximating the result of an exponential approximation. Considered a 32-bit encoded value in the IEEE-754 format, where the high 8 bits are the exponent field, the low 23 bits are the mantissa field, and the sign bit is fixed at 0. Specifically, each participant, without recovering the plaintext, uses a bit-level reconstruction protocol based on addition secret sharing to... The fragments are securely combined to form a secret shared representation of the corresponding floating-point number. If the result exceeds the representable range of a floating-point number, an overflow operation can be performed to restrict it to a valid range. Within a certain range to prevent exceptions caused by overflow or underflow. The final output floating-point secret is shared. That is, an exponential function The secure approximation can be directly used as input for subsequent secure operations (such as Sigmoid, Softmax, normalization, etc.). This step does not involve plaintext floating-point parsing or exposing the numerical information of the exponent or mantissa. The entire process is completed in a secret shared domain, ensuring security and composability.

[0013] Technical effect

[0014] This invention no longer treats the exponential function as a numerical function requiring polynomial approximation, piecewise table lookup, or iterative calculation. Instead, based on the characteristics of the IEEE-754 floating-point encoding structure, it reconstructs the calculation process of the exponential function into a linear construction process of the floating-point encoded bit pattern. In an MPC environment, the exponent and mantissa parts of the floating-point number are represented separately. By performing local exponentiation of the exponent part, secure conversion of the shared type, and single secure multiplication based on multiplication triples within a secret shared domain, the encoded representation of the corresponding floating-point number is directly constructed. This achieves an approximate implementation of the exponential function without introducing comparison operations, table lookup structures, or multiple iterations.

[0015] Compared to existing technologies, the exponential function result obtained by this invention in a secure multi-party computation (MPC) environment is itself a highly accurate approximation. Its numerical accuracy reaches or approaches the accuracy achieved by performing one round of Newton iterations using traditional methods in existing technologies. In obtaining this approximation, this invention eliminates the need for traditional exponential function implementations such as polynomial approximation, piecewise table lookup, or multiple rounds of iterative computation, significantly reducing the computational complexity and communication overhead required for exponential function calculations in an MPC environment. Based on this high-precision approximation characteristic, in application scenarios requiring further improvement in computational accuracy, this approximation result can also serve as the initial input for subsequent refinement algorithms such as Newton iterations, thereby effectively reducing the number of iterations and interaction overhead while maintaining the target accuracy. Attached Figure Description

[0016] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0017] like Figure 1 As shown, this embodiment relates to a method for approximating the calculation of an exponential function in an MPC environment. It employs a two-sided semi-honest model, with the exponential ring being... Fixed-point loop is (Q23-bit fixed-point representation), IEEE-754 single-precision semantics ( Using pre-distributed multiplication triples To support online secure multiplication and shared type conversion. Objective: Approximate computation. ,in The specific implementation steps include:

[0018] Step 1: Represent x in IEEE-754 form: . ,therefore Its fixed-point quantization result is: (binary: The secret to generating addition is shared below: ,satisfy The sum of the two is .

[0019] Step 2: Each party performs exponentiation on the exponent portion locally: PartyA calculates... PartyB calculation The shared multiplication secret held by both parties satisfies Then, through the multiplication → addition secret sharing conversion protocol (based on Beaver triples), the multiplication → addition is transformed... Turn to the secrets of addition .For example, ,satisfy .mantissa Keep it unchanged for the next product calculation.

[0020] Step 3: Call the safe multiplication protocol once to calculate. Using pre-distributed triples Performing safe multiplication: calculations by all parties After broadcasting the difference, follow the formula. The secret of addition is shared. The theoretical reconstruction result is: ,That Represented as (binary: ).

[0021] Step 4: Within the secret shared domain... Perform linear combination ,in , This linear transformation directly maps the input value x to the IEEE-754 bit pattern space, approximating the exponential growth relationship in a linear manner. The resulting... The result is shared by integers and represents an approximate value of the exponent in floating-point encoding.

[0022] Step 5: Convert the integer It is considered a 32-bit floating-point code in IEEE-754 format, where the high 8 bits are the exponent field, the low 23 bits are the mantissa field, and the sign bit is 0. Each participant completes secure bit concatenation without recovering the plaintext, outputting an approximate... Floating-point secret sharing The binary representation of the above result, when viewed in floating-point mode, is approximately... , and truth value Error in The magnitude of the error is determined by constant adjustment and mantissa truncation, and can be further reduced by bias fine-tuning.

[0023] To verify the technical effectiveness of this invention in practical applications, an experimental verification was conducted on the exponential function approximation calculation method in the MPC environment described in this invention under a typical privacy-preserving neural network inference scenario. The experiment was conducted in a semi-honest secure multi-party computation environment consisting of two parties, each deployed on a computing node with communication connections. Encoding was performed using the EzPC framework employed in BEACON, and a comparative experiment was conducted between this invention and the exponential function implementation method in the existing BEACON framework. The experiment was conducted under the same security model, floating-point precision settings, and communication conditions. The test object was the exponential function calculation process itself, where the exponential calculation is a core computational step in a neural network nonlinear operator (such as Softmax or Sigmoid).

[0024] In the control experiment, the existing BEACON framework uses its publicly disclosed exponential function implementation process to complete the exponential calculation; in this invention, only the exponential function approximation calculation process based on the floating-point encoding structure is executed, without introducing polynomial approximation or piecewise table lookup.

[0025] Experimental results show that, under the same input conditions, the overall running time for calculating an exponential function using the BEACON method is approximately 1670 ms, requiring 325 communication rounds; while using the present invention to calculate the same exponential function, the overall running time is approximately 1235 ms, requiring 274 communication rounds. Therefore, in the crucial step of exponential function calculation, the present invention outperforms existing technologies in both running time and the number of communication rounds.

[0026] Based on the aforementioned experimental results, it can be confirmed that this invention, by directly constructing an exponential function approximation with high accuracy, effectively reduces the computation and communication overhead of the exponential function in the MPC environment while avoiding complex approximation and iterative calculations, providing a more efficient exponential calculation implementation method for subsequent privacy-preserving neural network model calculations.

[0027] Compared to existing technologies, the performance improvement in the exponential function calculation stage of this invention mainly stems from the change in the implementation method of the exponential function. Existing technologies, such as the BEACON framework, require polynomial approximation or approximate initial values ​​and refinement steps like Newton iteration to obtain a calculation result that meets accuracy requirements when implementing exponential function calculations in an MPC environment. This introduces numerous security operations and interaction rounds. In contrast, this invention employs an exponential function approximation implementation based on a floating-point encoding structure. By splitting the exponent and mantissa parts and directly constructing a highly accurate exponential approximation result within a secret shared domain, it eliminates the need for subsequent Newton iteration steps while achieving usable accuracy. Therefore, in this crucial stage of exponential function calculation, this invention significantly reduces the required number of secure multiplications and interaction rounds.

[0028] The above-described specific implementations can be partially adjusted by those skilled in the art in different ways without departing from the principles and purpose of the present invention. The scope of protection of the present invention is defined by the claims and is not limited to the above-described specific implementations. All implementation schemes within the scope of the claims are bound by the present invention.

Claims

1. A method for implementing an exponential function in a privacy-preserving neural network model, characterized in that, By splitting the floating-point numbers involved in neural network computation into an exponent part and a mantissa part according to the IEEE-754 standard format in the MPC environment, and representing them separately among the participants using an addition secret sharing method, each participant performs an exponentiation operation on the exponent part locally, and then securely converts the result from multiplication secret sharing to addition secret sharing. Furthermore, by utilizing the multiplication triplet protocol, a secure multiplication operation is performed between the addition secret sharing of the exponentiation result and the addition secret sharing of the mantissa, thereby obtaining the addition secret sharing representation of the corresponding floating-point number.

2. The method for implementing the exponential function in a privacy-preserving neural network model according to claim 1, characterized in that, Within the addition secret sharing domain, the resulting floating-point number is approximated by an exponential function, and the calculation result is securely reinterpreted to obtain the corresponding floating-point secret sharing result, which is then used as an intermediate result in the neural network model calculation process to participate in subsequent nonlinear operator calculations.

3. The method for implementing the exponential function for a privacy-preserving neural network model according to claim 1 or 2, characterized in that, The multiplication slices are obtained as follows: During the protocol initialization phase, the input floating-point number to be calculated is... Decomposed into exponents according to IEEE-754 single-precision format and the last digit (The sign bit can be fixed at 0) After that, the participants share the secret through addition. and Each participant generates shards separately. Local holding and ,satisfy , Neither party can recover the plaintext value from a partial fragment.

4. The method for implementing the exponential function for a privacy-preserving neural network model according to claim 1 or 2, characterized in that, The aforementioned transformation of the result from multiplication secret sharing to addition secret sharing after performing the exponentiation operation specifically refers to: each participating party performing a secure exponentiation operation locally, and sharing the fragments of the addition secret. Mapped to the corresponding Sharing the secrets of multiplication that form exponent terms Then, the secrets of multiplication for the exponent part will be shared. A conversion protocol from multiplication secret sharing to addition secret sharing is adopted, and pre-distributed multiplication triples (BeaverTriples) are used to achieve secure transformation of the sharing type, resulting in addition secret sharing of exponents. .

5. The method for implementing an exponential function for a privacy-preserving neural network model according to claim 1 or 2, characterized in that, The aforementioned safe multiplication calculation refers to: in exponentiation... and the last digit After all the preparations are completed in the form of addition secret sharing, the floating-point reconstruction process is implemented through the multiplication triplet (BeaverTriple) protocol to obtain... The addition secret sharing mechanism is as follows: a set of multiplication triples (A, B, C) is pre-generated or distributed offline, satisfying C = A·B, and stored among the parties in the form of addition secret sharing; in the online phase, each party calculates the difference between its own fragment and the triple. The difference is broadcast in encrypted or secret form to ensure secure multiplication correction without exposing the original shared content. Afterwards, each participant calculates and shares the output according to the protocol. And keep the result as the secret of addition. .

6. The method for implementing the exponential function for a privacy-preserving neural network model according to claim 1 or 2, characterized in that, The aforementioned exponential approximation refers to: the participants' secret sharing of floating-point numbers. Perform linear transformation , where: coefficient This linear transformation utilizes the exponential encoding characteristics of floating-point numbers to directly map the magnitude of the input value x to the bit pattern space of the IEEE-754 format, thereby simulating an exponential growth relationship with linear operations.

7. The method for implementing an exponential function for a privacy-preserving neural network model according to claim 1 or 2, characterized in that, The aforementioned safety reinterpretation refers to: approximating the result of an exponential approximation. Considered a 32-bit encoded value in the IEEE-754 format, where the high 8 bits are the exponent field, the low 23 bits are the mantissa field, and the sign bit is fixed at 0. Specifically, each participant, without recovering the plaintext, uses a bit-level reconstruction protocol based on addition secret sharing to... The fragments are securely combined to form a secret shared representation of the corresponding floating-point number, and the final output is the floating-point secret shared representation. That is, the exponential function A safe approximation.