Sigmoid activation function neuron ciphertext inference method based on fractional ring encryption

CN122717841APending Publication Date: 2026-09-08HAINAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610126366.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-29
Publication Date
2026-09-08

AI Technical Summary

Technical Problem

[0005]针对现有同态加密技术在神经元密文推理中存在的计算开销大、非线性激活函数计算难等问题,本发明提供一种基于分式环加密的Sigmoid激活函数神经元密文推理方法,在保障用户数据隐私性和计算精度的前提下,大幅提升密文推理效率,同时实现对任意输入数据的适配及多种非线性函数的扩展应用

Benefits of technology

[0013] (i) It pioneered the application of fractional field encryption in neuronal reasoning, breaking through the bottleneck of nonlinear activation function ciphertext calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122717841A_ABST
    Figure CN122717841A_ABST
Patent Text Reader

Abstract

The application discloses a Sigmoid activation function neuron ciphertext inference method based on a fractional ring encryption, and comprises the following steps: a system initialization step, a data and parameter encryption step, a trapdoor calculation step, a ciphertext inference calculation step, and a decryption step of an inference result. The application greatly reduces the calculation complexity and time cost, and realizes higher inference efficiency while maintaining the calculation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence security and encrypted computation technology, specifically to a ciphertext inference method for neurons based on fractional ring encryption and the Sigmoid activation function. Background Technology

[0002] With the rapid popularization of the Internet of Things (IoT), the data collection capabilities of edge nodes have been greatly improved, and the processing of massive amounts of data has spurred the rapid development of machine learning technology. However, the training and inference of machine learning models require massive storage space and powerful computing power. Ordinary user devices cannot independently complete the deployment and computation of complete models. For example, in the scenario of identifying malicious content in emails, it is impossible to deploy models individually on each user terminal for inference and judgment.

[0003] Existing solutions often employ cloud servers to handle heavy computing tasks. While cloud servers provide ample storage resources and computing power, this model requires transferring control of user data to the cloud. The semi-honest nature of cloud servers poses a risk of stealing user privacy data, leading to serious challenges to user data privacy and security. For example, in email malicious detection scenarios, when user email data is uploaded to the cloud for neural network inference, it cannot be guaranteed that data privacy will not be leaked.

[0004] To address privacy concerns in machine learning, existing technologies include homomorphic encryption, federated learning, secure multi-party computation, obfuscated circuits, trusted execution environments (TEAs), unintentional transmission, secret sharing, and differential privacy. Among these, homomorphic encryption is a widely used privacy-preserving computation technique, but its computational overhead in ciphertext is extremely high, especially when dealing with nonlinear activation functions like the sigmoid, requiring extensive intra-loop or intra-domain computations, leading to inefficiency. Federated learning requires frequent interactions between multiple parties to update the model, resulting in significant communication overhead. Obfuscated circuits and TEAs rely on dedicated hardware, leading to high costs. Unintentional transmission and secret sharing have limitations in their applicability. Differential privacy can reduce model training accuracy. Despite the existence of combined designs, the trade-off between privacy protection, computational accuracy, and efficiency remains unresolved. Summary of the Invention

[0005] To address the problems of high computational overhead and difficulty in calculating nonlinear activation functions in existing homomorphic encryption techniques for neuronal ciphertext inference, this invention provides a ciphertext inference method for neurons based on fractional ring encryption and the Sigmoid activation function. This method significantly improves ciphertext inference efficiency while ensuring user data privacy and computational accuracy, and also enables adaptation to arbitrary input data and extended applications of various nonlinear functions.

[0006] A ciphertext inference method for neurons based on fractional ring encryption using the Sigmoid activation function, applied to a system containing users and semi-honest cloud servers, comprises five steps:

[0007] The system initialization steps are as follows: Select security-related parameters and random numbers, and calculate the modular inverse of the random numbers;

[0008] The steps for data and parameter encryption are as follows: Based on the parameters obtained during system initialization, the output of the previous layer neuron, the weights and biases of the current neuron are encrypted to obtain the encrypted output of the previous layer neuron, encrypted weights and encrypted biases.

[0009] The steps of trapdoor calculation are as follows: a trapdoor is generated based on the system initialization parameters. This trapdoor is used to support the cloud server to complete the subsequent ciphertext accumulation and Sigmoid function operation without plaintext leakage.

[0010] The steps of ciphertext inference computation are as follows: The cloud server performs ciphertext weighting, accumulation and Sigmoid activation operations in sequence based on encrypted data, encryption parameters and trapdoors to obtain the ciphertext output of the neuron;

[0011] The steps for decrypting the inference result are as follows: The user receives the ciphertext of the neurons output by the cloud server, decrypts it, and finally obtains the neuron output value in plaintext form, thus completing the entire ciphertext inference process.

[0012] Compared with the prior art, the present invention has the following advantages:

[0013] (i) It pioneered the application of fractional field encryption in neuronal reasoning, breaking through the bottleneck of nonlinear activation function ciphertext calculation.

[0014] This paper introduces the concept of fractional domain into ciphertext computation in neural networks for the first time. By mapping continuous numerical values ​​to a discrete fractional domain and encrypting them, it solves the computational challenge of nonlinear activation functions such as the Sigmoid function in ciphertext. It overcomes the limitation of traditional homomorphic encryption, which requires a large number of intra-loop operations in nonlinear function computation, and achieves efficient ciphertext computation of nonlinear activation functions during neuronal inference.

[0015] (ii) Design a dedicated trapdoor structure to achieve a balance between encrypted reasoning function and privacy protection.

[0016] To address the characteristics of forward propagation computation in neurons, a dedicated trapdoor generation mechanism was designed for fractional addition and activation function calculation. This trapdoor structure enables the cloud server to perform complex fractional operations without knowing the plaintext, ensuring both the integrity of the computational function and preventing the leakage of original data and model parameters.

[0017] (iii) Construct a lightweight security model to provide end-to-end privacy protection.

[0018] A lightweight security model for encrypted inference of neurons was established, effectively resisting chosen-ciphertext attacks and transmission eavesdropping attacks through random number scrambling and fractional encryption techniques. Even if attackers obtain encrypted data, weight parameters, and trapdoor information, the privacy and security of input data, neuron parameters, and inference results can still be ensured.

[0019] (iv) Optimize the ciphertext calculation process to significantly improve reasoning efficiency.

[0020] A computational process specifically designed for fractional domain encryption was developed, optimizing the ciphertext operations for weighted summation and activation function calculation. Compared to traditional homomorphic encryption schemes, this significantly reduces computational complexity and time overhead, achieving higher inference efficiency while maintaining computational accuracy.

[0021] (v) Achieve full range of input data adaptation and enhance the practicality of the solution.

[0022] By extending the special processing logic for input data of 0, the boundary case problem in fraction calculation is solved. This enables the solution to adapt to input data of arbitrary values, improving its robustness and applicability in practical applications.

[0023] (vi) It has good scalability and supports a variety of nonlinear function applications.

[0024] The core architecture based on fractional-domain encryption has good versatility and is not limited to the Sigmoid function. The scheme can be extended to other types of nonlinear activation function computation scenarios, providing a technical foundation for more complex neural network ciphertext inference. Attached Figure Description

[0025] Figure 1 This is a logical schematic diagram of the present invention. Detailed Implementation

[0026] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0027] like Figure 1 As shown, the application system of this invention includes at least one user and a cloud server as two participants. The cloud server is a semi-honest participant, meaning it strictly follows the protocol to perform computational tasks but attempts to steal user data privacy and model privacy. The user is responsible for data encryption, trapdoor generation, and result decryption, while the cloud server is responsible for performing encrypted inference computation.

[0028] The above system implements a ciphertext inference method for neurons based on fractional ring encryption and the Sigmoid activation function. The specific steps are as follows:

[0029] Step 1: System Initialization

[0030] The user selects security parameters, chooses a large prime number based on the security parameters, and sets a system error; three additional sets of modulo inverse random numbers are selected for model parameter encryption, and the modulo inverse of the random numbers is calculated.

[0031] First, select the safety parameters. Select a large prime number based on safety parameters. Set system error .

[0032] Based on the calculations, supplement and complete the following three sets of modulo...

[0033] The inverse of the random number is used for encrypting model parameters:

[0034] Calculate the modular inverse:

[0035] in This is to generate a random number for the k-th input data molecule of the encrypted neuron. This is a random number generated for the denominator of the k-th input data of the encrypted neuron; , , is the random array required to encrypt the input data. , To reverse its model; Random array required for encrypting intermediate neuron parameters To reverse its model; The random numbers output by the encryption neurons are used to construct the trapdoor algorithm, while their simulated values ​​are the values ​​required for the algorithm's output. This indicates the number of inputs to the neuron.

[0036] Step Two: Data and Parameter Encryption

[0037] The user encrypts the output of the previous layer neuron, the weights and biases of the current neuron, respectively, to obtain the encrypted output of the previous layer neuron, encrypted weights and encrypted biases;

[0038] Encrypting the output of the previous layer of neurons specifically involves:

[0039] The output of the previous layer of neurons is also the input of the main neuron in this computation. ,in .

[0040] Encrypt it as follows:

[0041] The meaning is the sign of the kth input data of the neuron, with a value of (1, 0, -1). The meaning is the molecule of the k-th input data of the neuron. The meaning is the denominator of the k-th input data of the neuron. The ciphertext of the input data molecules, The ciphertext of the denominator of the input data. The symbol represents the ciphertext of the input a to the k-th neuron in ciphertext form.

[0042] The specific steps for encrypting neuron weights are as follows:

[0043] For weight The encryption calculation is as follows:

[0044] For the ciphertext of the weighted molecules, For the denominator ciphertext, The three values ​​together form the weighted ciphertext. The meaning refers to the sign of the k-th weight inside the neuron, with a value of (1, 0, -1). The meaning refers to the molecule with the k-th weight inside the neuron. The meaning refers to the denominator of the k-th weight within the neuron.

[0045] For bias The encryption is specifically as follows:

[0046] Molecules representing the internal bias of neurons. The denominator represents the internal bias of the neuron. The symbol represents the internal bias of the neuron, with values ​​(1, 0, -1). Molecular ciphertext representing the internal bias of neurons. The denominator ciphertext representing the internal bias of the neuron. Symbolic ciphertext representing the internal bias of neurons.

[0047] Step 3: Trap Door Calculation

[0048] In order for the encrypted data to maintain consistency with the learning patterns of the plaintext data, trapdoor information needs to be provided to the server to calculate the trapdoor required for forward propagation.

[0049] The intermediate value of the trapdoor required for fractional addition calculation: , These are intermediate values ​​required for subsequent trapdoor calculations.

[0050] Calculate the trapdoors required for the activation function based on the above values: , , , , This constitutes a unified combination (array) of trapdoor values.

[0051] Step 4: Ciphertext Reasoning and Calculation

[0052] The cloud server uses encrypted data, encrypted weights, and trapdoors to calculate the output value of each neuron. It calculates the weighted sum of the input data or the data from the previous layer: The ciphertext form representing the weighted sum of the input data. The symbolic ciphertext represents the result of multiplying the neuron input a by the weight w in ciphertext form, and takes the value (1, 0, -1). The molecular ciphertext represents the result of multiplying the neuron input a by the weight w in ciphertext form. This represents the denominator ciphertext of the result after multiplying the neuron input a by the weight w in ciphertext form. The symbol represents the ciphertext of the input a to the k-th neuron in ciphertext form.

[0053] The repeated addition described in this application refers to the repeated addition operation of fractional calculations, where fractional addition is... (This formula is a formal definition for expressing fractional addition; each variable represents a fraction, variable name...) (This is the English translation of "fraction") and then we get the result of the above formula. The result of fraction calculation is a fraction, which includes three parts: numerator, denominator and symbol.

[0054] For example: for fractions Sum of fractions The result of adding them together is... The calculation process is as follows:

[0055] Then, the fractional calculation rule is used to calculate. The fractional ciphertext value:

[0056] z is the final calculation result obtained by linear computation of the neuron. The intermediate value of the neuron's computation is obtained by weighting the neuron's inputs and then adding the bias. The overall ciphertext representing z, The ciphertext symbol representing the z-value of the result obtained from the linear computation of the neuron. The ciphertext molecule representing the z-value of the result obtained from linear computation by the neuron. The ciphertext denominator represents the z-value of the result obtained from the linear computation of the neuron.

[0057] The above process requires attention to the fact that it is only feasible in a narrow sense: the input data must not be 0, otherwise the trapdoor cannot be used.

[0058] Next, the activation function value under the ciphertext is calculated through the following steps: , , , Let represent the numerators of the first four terms of the Taylor polynomial fitted to the sigmoid function. Since the input to the sigmoid function is always greater than 0, to reduce unnecessary calculations and judgments, we directly assign values. .for Ultimately, the encrypted output of the neuron can be obtained. . The meaning of is that the symbol of the ciphertext of the neuron's output obtained by ciphertext computation is always equal to 1. The meaning refers to the ciphertext molecule from which the output of a neuron is obtained through ciphertext computation. The meaning refers to the denominator of the ciphertext used to calculate the output of a neuron. It serves as an intermediate quantity, used as the denominator in subsequent calculations.

[0059] Step 5: Decrypting the results of neuronal encrypted reasoning Results of ciphertext reasoning for neurons The following can be decrypted: It is the symbol of the ciphertext obtained from the output of the neuron through ciphertext computation. It is the molecule of the ciphertext that is calculated to obtain the output of the neuron. It is the denominator of the ciphertext used to calculate the output of the neuron.

[0060]

[0061] By analyzing the ciphertext array of the neuron's output Modulo inverse of a random array and Decrypted into plaintext neuron output fractional form Then, by converting fractions to floating-point numbers... This will give you the plaintext neuron output floating-point value. .

[0062] Preferably, the present invention further provides a method for calculating ciphertext in the special case where the input data is 0.

[0063] Step 1: Determine the input and output parameters The input parameter is the input array of the neuron. Weight array and bias parameters ,in This indicates the number of inputs to the neuron. Used to store the input data of neurons. These are the weight parameters of the neuron.

[0064] The output parameter is the encrypted output of the Sigmoid neuron. That is, the neuron computation results in encrypted form. .

[0065] Step 2: Initialize system parameters and random array The basic parameters of the entire fractional encryption system are initialized and the required random array is generated. The specific operation corresponds to the relevant operation in "Step 1: System Initialization" in the overall scheme description, which provides the basic conditions for subsequent input preprocessing, encryption calculation and other steps.

[0066] Step 3: Perform fractional preprocessing on each input parameter For the input array Each input element in (in The index of the input element, ranging from 1 to... The fractional transformation preprocessing is performed separately, and the specific preprocessing rules are as follows:

[0067] If the plaintext of the current input element Then the symbol corresponding to the input element will be identified. Assign a value of 0 and randomly generate a set of formula parameters, including molecules. and denominator This is used for adaptation in subsequent encryption calculations;

[0068] If the plaintext of the current input element Then, according to the preset rules, the input element is transformed into a standard fraction form, and the symbol corresponding to the input element is obtained after the transformation. Fractional molecule Sum of denominators That is, to be transformed The fractional structure, and the specific transformation method, correspond to the overall solution description. The conversion rules.

[0069] Step 4: Encrypt the relevant parameters and generate a trapdoor. According to the encryption rules preset in the overall scheme, the preprocessed input parameters, weight parameters, and bias parameters are encrypted to obtain the input ciphertext. Weighted encrypted text and offset ciphertext ;

[0070] At the same time, according to the trapdoor generation rules designed in the scheme, the trapdoor generation operation is completed to provide security support for subsequent ciphertext calculation. This trapdoor generation operation is completely consistent with the trapdoor generation process described in the overall scheme.

[0071] Step 5: Perform ciphertext fraction summation calculation

[0072] S5.1 first processes the weighted ciphertext accumulator. Perform initialization assignment and set This is used to store the cumulative result of subsequent ciphertext fractions;

[0073] S5.2 Traverse all input elements (i.e.) Values ​​range from 1 to For each input element's corresponding ciphertext, perform the following operations:

[0074] Calculate the fractional product of the current input ciphertext and the corresponding weighted ciphertext. The calculation rule is as follows That is, weighted ciphertext and input ciphertext Perform fractional multiplication in encrypted form to obtain the product term. ; It is an encryption function;

[0075] If the symbol identifier corresponding to the current input element (That is, the plaintext of the input element is 0), then the accumulator Perform the "accumulation-cancellation" operation, specifically as follows: By first accumulating the product term and then subtracting it, we ensure that the ciphertext calculation corresponding to 0 input does not affect the overall accumulation result, thus adapting to the calculation logic of fractional encryption.

[0076] If the symbol identifier corresponding to the current input element (That is, the plaintext of the input element is not 0), then the calculated product term will be... Accumulate to accumulator In the middle, the specific calculation rules are as follows: Complete the normal ciphertext fraction accumulation;

[0077] After the S5.3 traversal is complete, the biased ciphertext will be... With accumulator The result is then subjected to ciphertext fractional addition to obtain the preliminary ciphertext output. The formula is as follows: .

[0078] Step 6: Calculate the ciphertext Sigmoid function The Taylor series expansion method in ciphertext form is used to output the preliminary ciphertext obtained in step 5. The Sigmoid function is executed, and this calculation process corresponds to the ciphertext designed in the overall scheme. The complete calculation process ensures that the Sigmoid function is calculated within the ciphertext domain, thus guaranteeing data security.

[0079] Step 7: Output the final result Returns the final ciphertext output of the Sigmoid neuron. The output is the ciphertext format mentioned in the overall scheme. It can be directly used for subsequent neuron-level calculations or result decryption operations.

[0080] This invention constructs a ciphertext computation scheme based on neuronal inference computation using the concept of fractional domains. The scheme transforms user data and neuron parameters into fractional domains, and randomly perturbs the numerator and denominator within finite domains. A trapdoor-assisted operation is then used to process the final ciphertext activation function, making ciphertext computation feasible. The trapdoor generation scheme of this invention does not leak related random numbers. This scheme not only ensures data security but also the security of neuron parameters and computation results. Under the same parameter settings, this scheme achieves the accuracy advantage over existing mainstream homomorphic encryption schemes while maintaining the lowest computational overhead at each stage compared to similar schemes, thus increasing the practical advantages of this invention.

Claims

1. A ciphertext inference method for neurons based on fractional ring encryption using the Sigmoid activation function, characterized in that, Applied to a system containing a semi-honest cloud server and at least one user, the method comprises five steps: The system initialization steps are as follows: Select security-related parameters and random numbers, and calculate the modular inverse of the random numbers; The steps for data and parameter encryption are as follows: Based on the parameters obtained during system initialization, the output of the previous layer neuron, the weights and biases of the current neuron are encrypted to obtain the encrypted output of the previous layer neuron, encrypted weights and encrypted biases. The steps of trapdoor calculation are as follows: a trapdoor is generated based on the system initialization parameters. This trapdoor is used to support the cloud server to complete the subsequent ciphertext accumulation and Sigmoid function operation without plaintext leakage. The steps of ciphertext inference computation are as follows: The cloud server performs ciphertext weighting, accumulation and Sigmoid activation operations in sequence based on encrypted data, encryption parameters and trapdoors to obtain the ciphertext output of the neuron; The steps for decrypting the inference result are as follows: The user receives the ciphertext of the neuron output from the cloud server, decrypts it, and finally obtains the neuron output value in plaintext form.

2. The ciphertext inference method for Sigmoid activation function neurons based on fractional ring encryption as described in claim 1, characterized in that, The specific steps for system initialization are as follows: The user first selects security parameters. Select a large prime number based on safety parameters. Set system error Based on the calculations, supplement and complete the following three sets of modulo... The inverse of the random number is used for encrypting model parameters: ; Calculate the modular inverse: ; in It is a random number generated to encrypt the k-th input data molecule of the neuron; It is a random number generated to encrypt the denominator of the k-th input data of the neuron; , , is the random array required to encrypt the input data. , To reverse its model; The random array required to encrypt the parameters of the intermediate neurons. To reverse its model; To generate the random number required for the encryption neuron output, This indicates the number of input data points for the neuron.

3. The ciphertext inference method for Sigmoid activation function neurons based on fractional ring encryption as described in claim 2, characterized in that, In the steps of data and parameter encryption: Encrypting the output of the previous layer of neurons specifically involves: Assuming the output of the previous layer of neurons ,in ; Encrypt it as follows: ; Let (1, 0, -1) be the symbol of the k-th input data of the neuron. The meaning is the molecule of the k-th input data of the neuron. The meaning is the denominator of the kth input data of the neuron; The ciphertext of the input data molecules, The ciphertext of the denominator of the input data. The symbol represents the ciphertext of the input a to the k-th neuron in ciphertext form.

4. The ciphertext inference method for Sigmoid activation function neurons based on fractional ring encryption as described in claim 3, characterized in that, In the steps of data and parameter encryption: The specific steps for encrypting neuron weights are as follows: For weight The encryption calculation is as follows: For the ciphertext of the weighted molecules, For the denominator ciphertext, For symbolic ciphertext, the three values ​​together construct the ciphertext group of weights; The meaning refers to the sign (1, 0, -1) of the k-th weight inside the neuron. The meaning refers to the molecule with the k-th weight inside the neuron. The meaning refers to the denominator of the k-th weight within the neuron.

5. The ciphertext inference method for Sigmoid activation function neurons based on fractional ring encryption as described in claim 4, characterized in that, In the steps of data and parameter encryption: For bias The encryption is specifically as follows: Molecules representing the internal bias of neurons. The denominator represents the internal bias of the neuron. The symbol represents the internal bias of the neuron, with values ​​(1, 0, -1). Molecular ciphertext representing the internal bias of neurons. The denominator ciphertext representing the internal bias of the neuron. Symbolic ciphertext representing the internal bias of neurons.

6. The ciphertext inference method for Sigmoid activation function neurons based on fractional ring encryption as described in claim 5, characterized in that, The trapdoor calculation is as follows: The intermediate value of the trapdoor required for fractional addition calculation: , These are intermediate values ​​needed for subsequent calculations of the trapdoor operation; Based on the above values, the trapdoor required for calculating the activation function using the Sigmoid function is: , , , , This constitutes a trapdoor value combination.

7. The ciphertext inference method for Sigmoid activation function neurons based on fractional ring encryption as described in claim 6, characterized in that, In the ciphertext reasoning calculation steps, the specific method for ciphertext weighting is as follows: Assume the neuron input is represented as The cloud server uses encrypted data, encrypted weights, and trapdoors to calculate the output value of each neuron and the weighted sum of the input data or the data from the previous layer. The ciphertext form representing the weighted sum of the input data. The symbolic ciphertext represents the result of multiplying the neuron input a by the weight w in ciphertext form, and takes the value (1, 0, -1). The molecular ciphertext represents the result of multiplying the neuron input a by the weight w in ciphertext form. This represents the denominator ciphertext of the result after multiplying the neuron input a by the weight w in ciphertext form. The symbol representing the ciphertext of the input 'a' to the k-th neuron in ciphertext form; Then, the fractional calculation rule is used to calculate. The fractional ciphertext value: Let z represent a fraction, where z is the final result obtained by the linear computation of the neuron. The intermediate value of the neuron's computation is obtained by weighting the neuron's inputs and then adding the bias. The overall ciphertext representing z, The ciphertext symbol representing the z-value obtained from the linear computation of the neuron. The ciphertext molecule representing the z-value obtained from the linear computation of the neuron. The ciphertext denominator represents the z-value of the result obtained from the linear computation of the neuron.

8. The ciphertext inference method for Sigmoid activation function neurons based on fractional ring encryption as described in claim 1, characterized in that, In the ciphertext inference calculation step, the method for calculating the activation function value under the ciphertext is as follows: , , , Let represent the numerators of the first four terms of the Taylor polynomial fitted to the sigmoid function. As an intermediate quantity, It refers to the symbol of the ciphertext obtained from the output of a neuron through ciphertext computation. The ciphertext molecule that yields the output of a neuron through ciphertext computation. The denominator of the ciphertext used to calculate the output of a neuron is the ciphertext. It is always equal to 1.

9. The ciphertext inference method for Sigmoid activation function neurons based on fractional ring encryption as described in claim 8, characterized in that, The specific steps for decrypting the inference result are as follows: For the ciphertext inference result of the neurons... The following can be decrypted: It is the symbol of the ciphertext obtained from the output of the neuron through ciphertext computation. It is the molecule of the ciphertext that is calculated to obtain the output of the neuron. It is the denominator of the ciphertext used to calculate the output of the neuron; By analyzing the ciphertext array of the neuron's output Modulo inverse of a random array and Decrypted into plaintext neuron output fractional form Then, by converting fractions to floating-point numbers... This will give you the plaintext neuron output floating-point value. .

10. The ciphertext inference method for Sigmoid activation function neurons based on fractional ring encryption as described in claim 8, characterized in that, In the encrypted inference computation step, it is assumed that the input parameters are the input array of the neuron. If there is an input element , Values ​​range from 1 to Then the symbol corresponding to the input element will be identified. Assign a value of 0 and randomly generate a set of formula parameters, including molecules. and denominator The preprocessed input parameters, weight parameters, and bias parameters are encrypted to obtain the input ciphertext. Weighted encrypted text and offset ciphertext The encrypted reasoning steps include: S5.1 first processes the weighted ciphertext accumulator. Perform initialization assignment and set This is used to store the cumulative result of subsequent ciphertext fractions; S5.2 Iterate through all input elements and, for each input element's corresponding ciphertext, perform the following operations: Calculate the fractional product of the current input ciphertext and the corresponding weighted ciphertext. The calculation rule is as follows That is, weighted ciphertext and input ciphertext Perform fractional multiplication in encrypted form to obtain the product term. ; It is an encryption function; If the symbol identifier corresponding to the current input element Then for the accumulator Perform the "accumulation-cancellation" operation, specifically as follows: By first accumulating the product term and then subtracting it, we ensure that the ciphertext calculation corresponding to 0 input does not affect the overall accumulation result, thus adapting to the calculation logic of fractional encryption. If the symbol identifier corresponding to the current input element Then the calculated product term Accumulate to accumulator In the middle, the specific calculation rules are as follows: Complete the normal ciphertext fraction accumulation; After the S5.3 traversal is complete, the biased ciphertext will be... With accumulator The result is then subjected to ciphertext fractional addition to obtain the preliminary ciphertext output. The formula is as follows: .