CKKS three-branch decision dynamic hierarchical encryption neural network training method and system
By adopting the CKKS three-branch decision dynamic hierarchical encrypted neural network training method, the problems of high computational overhead, poor data adaptability and insufficient cross-layer gradient collaboration in homomorphic encrypted training are solved, realizing efficient and secure deep neural network training, which is suitable for highly sensitive scenarios such as financial risk control and medical data analysis.
Patent Information
- Application Number
- CN202511327289.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-09-17
AI Technical Summary
Existing technologies suffer from high computational overhead, poor data adaptability, and insufficient cross-layer gradient collaboration when training complex deep neural networks within a homomorphic encryption framework, resulting in low training efficiency. This is especially true when dealing with sparse data, where computational redundancy is severe, and existing methods cannot adapt to the dynamic feature distribution of data in different scenarios.
The CKKS three-branch decision dynamic hierarchical encryption neural network training method is adopted. By encoding the original input data and adding noise terms to generate ciphertext, and combining alternating row and column encryption matrix multiplication, EncryptedPolyReLU activation function and three-branch decision processing, combined with encryption residual sum of squares loss calculation and Nesterov momentum accelerated gradient update, hierarchical noise-aware guided operation is realized to optimize encryption model parameters.
It achieves end-to-end data confidentiality, reduces computational complexity, improves training efficiency, ensures model convergence speed, adapts to data feature distributions in different scenarios, and provides a secure and efficient solution.
Smart Images

Figure CN120834906B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine learning, in particular to a CKKS three-branch decision dynamic hierarchical encrypted neural network training method and system. BACKGROUND
[0002] The increasingly severe data privacy problem is driving the urgent need for new deep learning methods that must be able to handle sensitive information while strictly protecting data confidentiality. Once such data is misused, it will cause serious economic losses and social trust crises. Therefore, efficient and accurate sensitive data training technology has become a core requirement to protect data security, which is of great significance to maintaining personal privacy, enterprise compliance and national security.
[0003] Among the many privacy-enhanced technologies, homomorphic encryption stands out due to its unique advantages: it not only provides encryption security in the post-quantum era, but also enables end-to-end data protection, ensuring the security of original data even during the calculation process. Although deep neural networks have been applied to encrypted inference in the homomorphic encryption environment, their application in the more critical model training phase has been severely limited.
[0004] Existing research on encrypted training mostly focuses on relatively simple logistic regression models or relies on multi-party computation techniques to achieve limited model fine-tuning. The root cause of this limitation is that:
[0005] Performing complex deep neural network training under the homomorphic encryption framework results in unaffordable huge computational overhead and extremely high algorithm complexity. At the same time, existing methods usually statically choose repeated encoding or expanded encoding for input data preprocessing, which cannot adapt to the dynamic feature distribution of data in different scenarios, resulting in a large amount of information loss after encryption and severely restricting the usability of encrypted data.
[0006] At the computational level, most schemes only support single matrix multiplication mode in row encryption or column encryption, which easily produces a large number of invalid calculation operations when processing sparse data such as medical time series, and the serious computational redundancy problem severely limits the training efficiency.
[0007] More critically, existing technologies use a local error propagation mechanism, with each hidden layer independently calculating the loss and updating the parameters, lacking cross-layer information interaction channels, which significantly reduces the model convergence speed and makes it difficult to meet the training needs of deep neural networks. SUMMARY
[0008] The present application provides a CKKS three-branch decision dynamic hierarchical encrypted neural network training method and system, which can solve the technical problems of large homomorphic encryption training computational overhead, poor data adaptability, and insufficient cross-layer gradient coordination in existing technologies.
[0009] In a first aspect, this application provides a training method for a CKKS three-branch decision dynamic hierarchical encrypted neural network, comprising the following steps:
[0010] Step S1: Encode the original input data, encrypt it into a polynomial, and add a noise term to generate ciphertext;
[0011] Step S2: Perform homomorphic computation on the ciphertext by alternating row and column encryption matrix multiplication, and combine the EncryptedPolyReLU activation function and the intermediate features of the three-branch decision processing to obtain the encrypted features after hierarchical screening;
[0012] Step S3: Process the encrypted features by calculating the encrypted residual sum of squares loss and updating the gradient with Nesterov momentum acceleration, and combine the hierarchical noise-aware guided operation to obtain the optimized encrypted model parameters that support deep network training.
[0013] CKKS is a fully homomorphic encryption scheme, short for Cheon-Kim-Kim-Song.
[0014] Further, step S1: encoding the original input data, encrypting it into a polynomial, and adding a noise term to generate ciphertext, specifically includes the following steps:
[0015] Step S11: Receive raw input data;
[0016] Step S12A: If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison results of the variance and the preset threshold, different encoding vector processing strategies are executed to obtain the input matrix.
[0017] Step S12B: If the original input data is a two-dimensional matrix, the intelligent matrix encoding mechanism based on the ring dimension parameter generates the input matrix by adjusting the fill factor through dynamic zero-padding operation;
[0018] Step S13: After transforming the input matrix into a polynomial form based on the ring homomorphic mapping, controllable noise is added for encryption processing, and the final output is ciphertext that satisfies the noise budget constraint.
[0019] Further, step S12A: If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison result between the variance and a preset threshold, different encoding vector processing strategies are executed to obtain the input matrix. Specifically, this includes the following steps:
[0020] If the original input data is a one-dimensional vector, vectorization processing is performed on the original input data according to the preset floating-point encoding standard, and the unit norm encoded vector is output through L2 norm normalization operation, and the variance of the encoded vector is calculated in real time.
[0021] The variance of the encoded vector is calculated in real time. When the variance exceeds a preset threshold, a cyclic encryption local loss block copying mechanism is activated to process the encoded vector and generate a repeating encoded matrix with row and column alignment characteristics.
[0022] When the variance of the encoded vector is determined to be lower than a preset threshold, the system automatically switches to the dimension expansion mode and uses the Kronecker product algorithm to increase the dimension of the encoded vector, outputting an expanded encoded matrix with multiplicative properties.
[0023] Further, step S12B: after transforming the input matrix into polynomial form based on the ring homomorphic mapping, adding controllable noise for encryption processing, and finally outputting ciphertext that satisfies the noise budget constraint, specifically includes the following steps:
[0024] The input matrix is converted into a polynomial by a normalized embedding mapping.
[0025] Gaussian distribution is used to generate encryption noise, which is then combined with a private key to probabilistically encrypt the polynomial, generating ciphertext.
[0026] Perform noise budget verification on the generated ciphertext and output the ciphertext that satisfies the noise budget constraint.
[0027] Further, step S13: after transforming the input matrix into polynomial form based on the ring homomorphic mapping, adding controllable noise for encryption processing, and finally outputting ciphertext that satisfies the noise budget constraint, specifically includes the following steps:
[0028] Perform a normalized embedding mapping transformation on the input matrix to obtain the polynomial;
[0029] Gaussian distribution is used to generate encryption noise, which is then combined with a private key to probabilistically encrypt the polynomial, generating ciphertext.
[0030] Perform noise budget verification on the generated ciphertext and output the ciphertext that satisfies the noise budget constraint.
[0031] Further, step S2: performing homomorphic computation on the ciphertext through alternating row and column encryption matrix multiplication, and combining the EncryptedPolyReLU activation function and the intermediate features of the three-branch decision processing to obtain the hierarchically filtered encryption features, specifically includes the following steps:
[0032] Step S21: Divide the fully connected layers of the multilayer perceptron into odd-numbered layer groups and even-numbered layer groups based on the parity of the layer index;
[0033] Step S22: Perform alternating row and column calculations on the odd-numbered and even-numbered layer groups to generate encryption features;
[0034] Step S23: Apply the EncryptedPolyReLU activation function to perform nonlinear transformation on the encryption features and output the optimized encryption features;
[0035] Step S24: Evaluate the prediction quality of the optimized encryption features by calculating the sum of squares of each element in the prediction vector to obtain the sample confidence level at the current processing stage.
[0036] Step S25: Perform a three-way decision on the confidence level based on the preset upper and lower thresholds, and obtain the decision result of the three-way decision;
[0037] Step S26: Perform the corresponding operation based on the decision results of the three-way decision and output the encrypted features.
[0038] Further, step S3: The encrypted features are processed by calculating the encrypted residual sum of squares loss and updating the gradient using Nesterov momentum acceleration, combined with a hierarchical noise-aware guided operation, to obtain the optimized encrypted model parameters that support deep network training. This specifically includes the following steps:
[0039] Step S31: Perform homomorphic subtraction on the encrypted prediction result and the encrypted label, generate the residual squared term by element-wise multiplication, and construct the encrypted local loss function;
[0040] Step S32: Based on the constructed encrypted local loss function, the current layer loss and the next layer cross-entropy loss are weighted and fused, and a penalty term is added for the undecided decision samples to obtain the total loss function;
[0041] Step S33: Based on the obtained total loss function, perform gradient update in the ciphertext space using the improved Nesterov algorithm to obtain the updated encryption weights and momentum;
[0042] Step S34: Perform guided refresh operations on the updated encrypted weights and momentum respectively, and output the optimized encrypted model parameters that support deep network training.
[0043] Secondly, this application provides a CKKS three-branch decision dynamic hierarchical encrypted neural network training system, comprising:
[0044] The encrypted ciphertext acquisition module is used to encode the original input data, encrypt it into a polynomial, and add a noise term to generate ciphertext.
[0045] The encryption feature acquisition module is communicatively connected to the encryption ciphertext acquisition module. It is used to perform homomorphic computation on the ciphertext by alternating row and column encryption matrix multiplication, and combine the EncryptedPolyReLU activation function and the intermediate features of the three-branch decision processing to obtain the encryption features after hierarchical screening.
[0046] The encrypted model parameter acquisition module is communicatively connected to the encrypted feature acquisition module. It is used to process the encrypted features through encrypted residual sum of squares loss calculation and Nesterov momentum-accelerated gradient update, and combined with hierarchical noise-aware guided operation, to obtain optimized encrypted model parameters that support deep network training.
[0047] Furthermore, the encrypted ciphertext acquisition module includes:
[0048] The raw input data acquisition unit is used to receive raw input data;
[0049] The dynamic encoding vector processing unit is communicatively connected to the original input data acquisition unit. If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison result between the variance and the preset threshold, different encoding vector processing strategies are executed to obtain the input matrix.
[0050] The intelligent matrix encoding processing unit is communicatively connected to the original input data acquisition unit. It is used to generate an input matrix by adjusting the fill factor through dynamic zero-padding operation based on the intelligent matrix encoding mechanism of the ring dimension parameter if the original input data is a two-dimensional matrix.
[0051] The ciphertext acquisition unit is communicatively connected to the intelligent matrix encoding processing unit. It is used to add controllable noise for encryption processing after transforming the input matrix into a polynomial form based on the ring homomorphic mapping, and finally outputs ciphertext that satisfies the noise budget constraint.
[0052] Thirdly, this application provides a computer-readable storage medium storing a CKKS three-branch decision dynamic hierarchical encrypted neural network training program, wherein when the CKKS three-branch decision dynamic hierarchical encrypted neural network training program is executed by a processor, it implements the steps of the CKKS three-branch decision dynamic hierarchical encrypted neural network training method as described above.
[0053] The beneficial effects of the technical solutions provided in this application include at least the following:
[0054] The end-to-end dynamic encryption scheme and dynamic noise management mechanism ensure the confidentiality of data throughout the training process. The hierarchical guidance technology effectively controls noise accumulation to support deep network training. The innovative row-column alternating encryption architecture significantly reduces computational complexity. Combined with intelligent data filtering, it reduces redundant operations. The momentum acceleration algorithm improves gradient update efficiency. The adaptive encoding mechanism optimizes feature information retention. The cross-layer error propagation network accelerates model convergence. It achieves excellent encrypted training accuracy in standard tests, providing a secure and efficient solution for highly sensitive scenarios such as financial risk control and medical data analysis. Attached Figure Description
[0055] Figure 1 A flowchart illustrating the three-branch decision-guided CKKS hierarchical encrypted deep learning method provided in this application embodiment;
[0056] Figure 2 Another flowchart of the three-branch decision-guided CKKS hierarchical encrypted deep learning method provided in the embodiments of this application;
[0057] Figure 3 This is a diagram of a three-branch decision filter architecture provided in an embodiment of this application. Detailed Implementation
[0058] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0059] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to such process, method, product, or apparatus. The terms "first," "second," and "third," etc., are used to distinguish different objects, etc., and do not indicate a sequence, nor do they limit "first," "second," and "third" to different types.
[0060] In the description of the embodiments in this application, terms such as "exemplary," "for example," or "for instance" are used as examples, illustrations, or explanations. Any embodiment or design described as "exemplary," "for example," or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplary," "for example," or "for instance" is intended to present the relevant concepts in a specific manner.
[0061] In the description of the embodiments of this application, unless otherwise stated, " / " means "or". For example, A / B can mean A or B. The "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0062] In some processes described in the embodiments of this application, multiple operations or steps are included in a specific order. However, it should be understood that these operations or steps may not be executed in the order they appear in the embodiments of this application, or they may be executed in parallel. The sequence number of the operation is only used to distinguish different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed sequentially or in parallel, and these operations or steps may be combined.
[0063] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0064] Firstly, such as Figure 1 As shown, this application provides a training method for a CKKS three-branch decision dynamic hierarchical encrypted neural network, including the following steps:
[0065] Step S1: Encode the original input data, encrypt it into a polynomial, and add a noise term to generate ciphertext;
[0066] Step S2: Perform homomorphic computation on the ciphertext by alternating row and column encryption matrix multiplication, and combine the EncryptedPolyReLU activation function and the intermediate features of the three-branch decision processing to obtain the encrypted features after hierarchical screening;
[0067] Step S3: Process the encrypted features by calculating the encrypted residual sum of squares loss and updating the gradient with Nesterov momentum acceleration, and combine the hierarchical noise-aware guided operation to obtain the optimized encrypted model parameters that support deep network training.
[0068] This application ensures data confidentiality throughout the training process through an end-to-end dynamic encryption scheme and dynamic noise management mechanism. It adopts a hierarchical guidance technology to effectively control noise accumulation to support deep network training. The innovative row-column alternating encryption architecture significantly reduces computational complexity. Combined with intelligent data filtering, it reduces redundant operations. The momentum acceleration algorithm improves gradient update efficiency. The adaptive encoding mechanism optimizes feature information retention. The cross-layer error propagation network accelerates model convergence. It achieves excellent encrypted training accuracy in standard tests, providing a secure and efficient solution for highly sensitive scenarios such as financial risk control and medical data analysis.
[0069] In one embodiment, step S1: encoding the original input data, encrypting it into a polynomial, and adding a noise term to generate ciphertext, specifically includes the following steps:
[0070] Step S11: Receive the raw input data; specifically, the raw input data is a one-dimensional vector. or two-dimensional matrix ,in, for The circumferential dimension of the solution Indicates a containing A linear array of n real numbers, Represent a A 3D real matrix;
[0071] Step S12A: If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison results of the variance and the preset threshold, different encoding vector processing strategies are executed to obtain the input matrix.
[0072] Step S12B: If the original input data is a two-dimensional matrix, the intelligent matrix encoding mechanism based on the ring dimension parameter generates the input matrix by adjusting the fill factor through dynamic zero-padding operation;
[0073] Step S13: After transforming the input matrix into a polynomial form based on the ring homomorphic mapping, controllable noise is added for encryption processing, and the final output is ciphertext that satisfies the noise budget constraint.
[0074] This embodiment employs an intelligent data preprocessing mechanism to automatically identify the dimensional characteristics of the input data and select appropriate encoding strategies. For one-dimensional vectors, a dynamic variance determination method is used to achieve adaptive normalization, ensuring the rationality of data distribution. For two-dimensional matrices, intelligent filling technology is used to maintain structural integrity. Subsequently, the standardized data is converted into a polynomial form and controlled noise is incorporated to complete encryption. While ensuring security, the impact of noise is effectively controlled, and the final output is a ciphertext result that meets confidentiality requirements. This achieves a seamless conversion of data from its original form to its encrypted form, balancing processing efficiency and security.
[0075] In one embodiment, step S12A: If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison result between the variance and a preset threshold, different encoding vector processing strategies are executed to obtain the input matrix. Specifically, this includes the following steps:
[0076] If the original input data is a one-dimensional vector, the original input data is vectorized according to the preset floating-point encoding standard, and the unit norm encoding vector is output through L2 norm normalization operation. The variance Var(a) of the encoding vector is calculated in real time.
[0077] Based on the comparison results between the variance and the preset variance threshold, the encoding mode is adaptively selected, as shown in the following formula:
[0078]
[0079] A: When the variance exceeds a preset threshold, a cyclic encryption local loss block copying mechanism is activated to process the encoded vector, generating a repeating encoded matrix with row and column alignment characteristics. The input matrix is shown in the following equation:
[0080]
[0081] Each row is a copy of 'a', and the column fill length 'c' is dynamically calculated using the following formula:
[0082]
[0083] In the formula, This represents the generated repeating encoding matrix, with dimensions of . 'a' represents the original one-dimensional input vector. A copy, where d is the dimension. This indicates the noise budget that has been added.
[0084] B: When the variance of the encoded vector is determined to be lower than a preset threshold, the system automatically switches to dimensionality expansion mode, uses the Kronecker product algorithm to increase the dimensionality of the encoded vector, and outputs an expanded encoded matrix with doubling properties. The input matrix is shown in the following equation:
[0085]
[0086] The formula for dynamically calculating the row fill length r is as follows:
[0087] .
[0088] In the formula, The generated extended encoding matrix is hereinafter referred to as... , dimension Its structure is as follows: each row consists of an input vector. The corresponding elements are repeated (e.g., the first row is all a1, the second row is all a2, and so on), and zeros are added to fill any insufficient number of columns; The row fill length is indicated by the formula. Calculated dynamically This indicates the original vector dimension Round up to the nearest power of 2 to ensure the row count meets alignment requirements; d represents the original input vector. Dimensions.
[0089] This embodiment intelligently adjusts the encoding strategy of one-dimensional vectors through a dynamic variance determination mechanism, ensuring the flexibility and adaptability of data processing. After normalization, the degree of data fluctuation is monitored in real time, and differentiated processing methods are adopted for different variance situations: when the data fluctuation is large, a cyclic replication method is used to generate a normalized matrix to ensure data stability; when the data fluctuation is small, a dimensionality-upgrading algorithm is used to enhance the feature representation capability and improve the efficiency of subsequent calculations. This achieves adaptive matrix transformation of vector data, which not only preserves the key features of the original information but also optimizes the data structure, providing a high-quality input foundation for subsequent encryption processing.
[0090] In one embodiment, step S12B: If the original input data is a two-dimensional matrix, the intelligent matrix encoding mechanism based on the ring dimension parameter generates the input matrix by dynamically padding zeros to adjust the fill factor, specifically including the following steps:
[0091] If the original input data is a two-dimensional matrix, perform the following on the two-dimensional matrix: Zero-padding generates an input matrix that conforms to the dimension standard. The specific implementation is as follows:
[0092] line coding The format is:
[0093]
[0094] Column encoding The format is:
[0095]
[0096] Represents a matrix Transpose, New lines and The column is zero-padded to obtain... or hereinafter referred to as .
[0097] This embodiment achieves secure conversion by mapping matrix data to a polynomial form and combining it with probabilistic encryption methods. During encryption, the system automatically generates random noise conforming to a Gaussian distribution, which works in conjunction with the private key to obfuscate the data and ensure ciphertext security. Simultaneously, a noise budget verification mechanism is employed to strictly control noise interference during encryption, maintaining computational accuracy while ensuring data confidentiality. The final output is an encrypted result that meets both security requirements and is operable, achieving a secure and reliable conversion of data from plaintext to ciphertext, laying the foundation for subsequent homomorphic computation.
[0098] In one embodiment, step S13, which involves transforming the input matrix into a polynomial form based on a ring homomorphic mapping and then adding controllable noise for encryption, ultimately outputting ciphertext that satisfies the noise budget constraint, specifically includes the following steps:
[0099] For the input matrix or The canonical embedding mapping is transformed into a polynomial, as shown in the following equation:
[0100]
[0101] In the formula, This represents a canonical embedding mapping function used to convert an input matrix into polynomial form. express A complex vector space, where Let N be the set of complex numbers, and let N be the ring dimension. Represents the objective polynomial ring, Represents the set of polynomials with integer coefficients. This represents a cycloid polynomial, which serves as a reduction polynomial for modular operations, ensuring that the polynomial ring structure supports homomorphic encryption operations.
[0102] Encryption noise is generated using a Gaussian distribution, and the polynomial is probabilistically encrypted using the private key to generate ciphertext, as shown in the following equation:
[0103]
[0104] In the formula, The encrypted ciphertext polynomial is formed by processing the input data through a canonical embedding map, adding Gaussian noise, and using the private key. The encrypted final result belongs to a polynomial ring. Elements in; Indicates based on private key encryption algorithm, The plaintext, representing the polynomial form after mapping, is derived from the input matrix. or Through standard embedding mapping We obtain that it belongs to the polynomial ring. Elements in; This represents the polynomial ring containing the ciphertext.
[0105] Perform noise budget verification on the generated ciphertext and output the ciphertext that satisfies the noise budget constraint, as shown in the following formula:
[0106]
[0107] In the formula, For the initial noise budget, This is the noise growth factor, ensuring that the encrypted ciphertext can still support subsequent calculations. This represents the noise budget of the input ciphertext; This represents the column dimension of the encoded matrix, i.e., the number of columns in the matrix. This represents the row dimension of the encoded matrix, i.e., the number of rows in the matrix.
[0108] This embodiment transforms the input matrix into a polynomial form through a normalized mathematical mapping, laying the foundation for subsequent encryption processing. During the encryption phase, the system combines statistically consistent random noise with the private key to achieve secure and reliable probabilistic encryption, ensuring data confidentiality. Simultaneously, a noise budget verification mechanism is introduced to precisely control the degree of interference introduced during encryption, maintaining data availability while ensuring security. The final output is high-quality ciphertext that meets both confidentiality requirements and computational feasibility, achieving a secure conversion of data from its original form to its encrypted form and providing reliable protection for homomorphic operations.
[0109] In one embodiment, step S2: performing homomorphic computation on the ciphertext through alternating row and column encryption matrix multiplication, and combining the EncryptedPolyReLU activation function and the intermediate features of the three-branch decision processing to obtain the encrypted features after hierarchical filtering, specifically includes the following steps:
[0110] Step S21: Divide the H fully connected layers of the multilayer perceptron into odd-numbered layer groups and even-numbered layer groups according to the parity of the layer index;
[0111] Step S22: Perform alternating row and column calculations on the odd-numbered and even-numbered layer groups to generate encryption features; specifically including the following steps:
[0112] For odd-numbered layers, RE-FC layers are used for construction, employing row-encrypted matrix multiplication. The formula is:
[0113]
[0114] in, This represents element-wise multiplication of homomorphisms. and These are the encrypted activation vector and pre-activation vector in extended and repetitive formats, respectively. "rep" is an abbreviation for expansion, and "rep" is an abbreviation for repetition. It is an encrypted weight matrix; row-wise encrypted matrix multiplication is a row-wise summation operation with a multiplication depth of 1, and the calculation also involves... Addition and rotation operations;
[0115] For even-numbered layers, a CE-FC layer is used for construction, employing column-encrypted matrix multiplication. The formula is:
[0116]
[0117] in, This represents element-wise multiplication of homomorphisms. and These are the encrypted activation vector and pre-activation vector in extended and repetitive formats, respectively. "rep" is an abbreviation for expansion, and "rep" is an abbreviation for repetition. It is an encrypted weight matrix; the column encryption matrix multiplication operation is a row-wise summation, with a multiplication depth of 2, and the calculation also involves... Addition and rotation operations;
[0118] Step S23: Apply the following EncryptedPolyReLU activation function to perform nonlinear transformation encryption activation calculation on the encryption feature, and output the optimized encryption feature:
[0119]
[0120] in, and These represent homomorphic element-wise addition and multiplication, respectively. This activation function has a multiplication depth of 1, involves only element-wise operations, and does not change the encoding structure of the encryption vector. This represents the encrypted pre-activation input; for odd-numbered layers, it is... For even-numbered layers, it is , This indicates the activation output for encryption. "rep" is an abbreviation for "expansion" and "repetition".
[0121] in, The activation function is used As The second-order polynomial approximation of a function;
[0122] Step S24: Evaluate the prediction quality of the optimized encryption features by calculating the sum of squares of each element in the prediction vector to obtain the sample confidence level at the current processing stage; for example... Figure 2 The diagram shown is a flowchart of the CKKS dynamic hierarchical encrypted neural network training method that integrates three-way decision-making, as provided in an embodiment of this application. The method specifically includes the following steps:
[0123] To construct encrypted local loss blocks, specifically, to reduce the multiplication depth and guided operation frequency required for encrypted training, this method divides the MLP into multiple encrypted local loss blocks, each encrypted fully connected layer... Related to it Plus a size of Local classifier Together they form a cryptographic local loss block. ;
[0124] Calculate the confidence level of the information in each encrypted local loss block. At the output end, data is filtered through three decision modules to calculate the prediction vector. The confidence level, i.e., the sample confidence level at the current processing stage. As shown in the following formula:
[0125]
[0126] in, Represents the prediction vector The length, i.e., the number of categories, This represents the summation index, used to iterate through each element of the prediction vector;
[0127] Step S25: Perform a three-way decision on the confidence level based on preset upper and lower thresholds, and obtain the decision results of the three-way decision, including... , and , representing the three decision scenarios: accept, reject, and delay; the three decision rules are as follows:
[0128]
[0129] Among them, the threshold values for the three decision-making steps are agreed upon. Lower threshold (0< The upper threshold is and lower threshold Set these as learnable parameters and optimize the decision boundary by updating them using gradients:
[0130]
[0131] in, The threshold learning rate, To count the current batch The proportion of decision-making Expected acceptance rate, representing the long-term average proportion of Accept decisions ultimately reached by the entire model across all data.
[0132] Step S26: Execute the corresponding operation based on the decision results of the three-way decision and output the encrypted features; specifically implemented as follows:
[0133] , When the value is Accept, the current prediction is output directly and the propagation process is terminated, entering the loss calculation and gradient update stage.
[0134] , If the result is "Reject", the sample will be discarded and marked as a "difficult sample".
[0135] When a Defer decision occurs, the activation vector will be encrypted. Passed to subsequent encrypted local loss blocks Continue processing.
[0136] This embodiment optimizes the processing flow of encrypted data through a hierarchical alternating computation strategy, improving computational efficiency while maintaining homomorphic properties. The system employs an odd-even hierarchical mechanism combined with an alternating row and column computation method, effectively reducing computational complexity and enhancing feature representation capabilities. By introducing a nonlinear activation function to optimize and transform encrypted features, and utilizing a three-way decision mechanism to dynamically evaluate and filter the processing results, the system intelligently selects subsequent operation paths based on confidence levels, ensuring high-quality preservation of key features. The entire process achieves efficient computation and intelligent filtering of encrypted data, improving the accuracy and reliability of feature extraction while ensuring security.
[0137] In one embodiment, step S2 can be performed as follows: Figure 3 The implementation of the three decision filters shown follows the following process:
[0138] The process begins with "high-dimensional features," first calculating the confidence level of the sample;
[0139] Subsequently, the system makes three types of decisions based on the calculated sample confidence values:
[0140] Accept region: If the confidence level is higher than α, the sample enters this region. The current result is retained and input into the next layer for further processing;
[0141] Rejection region: If the confidence level is less than or equal to β, the sample enters this region. This sample is discarded and marked as "hard data".
[0142] Delay / Defer Decision Region: If the confidence level is between β and α (i.e., not meeting the acceptance criterion but not low enough to be rejected), the sample enters this region. The current result is discarded, but the sample leaves the current layer and is input into the next layer for further processing.
[0143] Finally, output the filtered results.
[0144] In one embodiment, step S3: The encrypted features are processed by calculating the encrypted residual sum of squares loss and updating the gradient with Nesterov momentum acceleration, combined with a hierarchical noise-aware guided operation, to obtain the optimized encrypted model parameters that support deep network training. This specifically includes the following steps:
[0145] Step S31: Perform homomorphic subtraction on the encrypted prediction result and the encrypted label, generate the residual squared term through element-wise multiplication, and construct the encrypted local loss function. As shown in the following formula:
[0146]
[0147] in, It is the encrypted prediction result output by the local classifier. It is an encrypted one-hot tag; This represents element-wise subtraction of a homomorphism. This represents element-wise multiplication of homomorphisms. "rep" is an abbreviation for expansion, and "rep" is an abbreviation for repetition. A small classifier for the encrypted fully connected layer of layer h.
[0148] Step S32: Based on the constructed encrypted local loss function, the current layer loss and the next layer cross-entropy loss are weighted and fused, and a penalty term is added for the undecided decision samples to obtain the total loss function, as shown in the following formula:
[0149]
[0150] in, The total loss for layer h is... For loss weighting coefficients, For delayed decision indication function, Denotes the squared L2 norm of the encrypted activation vector. The cross-layer attenuation coefficient, The cross-entropy loss for the next layer is given by h, which represents the h-th encrypted fully connected layer.
[0151] Step S33: Based on the obtained total loss function, perform gradient update in the ciphertext space using the improved Nesterov algorithm to obtain the updated encryption weights and momentum; specifically, given the encryption gradient... Weight decay rate The momentum μ and learning rate γ are combined with the Nesterov gradient algorithm to update the weights and momentum, as shown in the following equation:
[0152]
[0153] in, The encryption gradient is calculated after the t-th iteration. It is a filler constant. The plaintext matrix is used to match the dimension of the encrypted weight gradient. This represents element-wise addition of homomorphisms. This represents plaintext-ciphertext element-wise multiplication.
[0154] In the first iteration, i.e., t=1, the momentum is initialized as follows:
[0155]
[0156] in, This represents the cryptographic momentum of the second iteration. This represents the encryption gradient calculated after the first iteration.
[0157] During the iteration process, the first The cryptographic momentum of the next iteration It is used to accumulate gradient information, acting as a momentum term, making updates smoother and accelerating convergence.
[0158] Meanwhile, the encryption weight is updated as shown in the following formula:
[0159]
[0160] in, and It is a plaintext matrix filled with the corresponding constants. This represents the amount of cryptographic weight that needs to be updated in the first iteration. This represents the encrypted gradient calculated after the first iteration. It is the gradient value calculated in the ciphertext space, reflecting the direction and original magnitude of the weights that need to be adjusted.
[0161] Momentum is updated iteratively, specifically for subsequent iterations. The encrypted momentum is updated as follows:
[0162]
[0163] in, For the first Encryption momentum of the next iteration For the first The encryption momentum of the next iteration The plaintext matrix is of dimension r×c and is filled with momentum parameter μ. It is used to match the dimension of the encrypted momentum so that the plaintext parameter can be used to perform operations with the encrypted momentum.
[0164] At the same time, the encryption weight is updated to:
[0165]
[0166]
[0167] in, This represents the amount of encryption weight update in the t-th iteration. This represents the plaintext matrix of the learning rate constant. This represents element-wise plaintext-ciphertext multiplication. This represents a plaintext matrix of constants, expressed as learning rate × momentum coefficient. This represents element-wise subtraction of a homomorphism;
[0168] Step S34: Perform guided refresh operations on the updated encrypted weights and momentum respectively to obtain the optimized encrypted model parameters that support deep network training. The specific implementation is as follows:
[0169] For RE-FC layer And CE-FC local classifier The relevant weights and velocities are encrypted and subjected to two approximate bootstrapping operations:
[0170]
[0171]
[0172] in, This represents the encryption weight of the h-th RE-FC layer after the (t+1)-th iteration, stored row-wise. Let represent the cryptographic momentum after the (t+1)th iteration of the row-wise storage of the h-th RE-FC layer. Indicates the first The encryption weights of each CE-FC office after the (t+1)th iteration, stored column-wise. Indicates the first The encrypted momentum of each CE-FC office after the (t+1)th iteration, stored in column-wise format; This indicates the guided refresh operation process, which takes one or more ciphertexts as input, refreshes them with noise, and returns a new ciphertext with the same plaintext value but a lower noise level; row indicates row-by-row expansion, meaning the parameter is stored in a "row-by-row" format and subsequently participates in row encryption matrix multiplication; col indicates column-by-column expansion, meaning the parameter is stored in a "column-by-column" format and subsequently participates in column encryption matrix multiplication.
[0173] This embodiment achieves efficient updating of encrypted model parameters by combining encrypted residual calculation with dynamic gradient optimization. The system employs homomorphic operations to construct a multi-level loss evaluation system, accurately calculating prediction bias and fusing cross-entropy information in the encrypted state, while introducing a decision sample penalty mechanism to enhance the model's discriminative ability. An improved momentum acceleration algorithm is used to perform parameter updates in the encrypted space, effectively improving convergence speed and avoiding local optima. A hierarchical noise awareness mechanism intelligently adjusts the updated weights, ensuring the stability and security of the training process. While guaranteeing data privacy, it achieves precise optimization of encrypted model parameters, providing a reliable encrypted learning scheme for deep network training.
[0174] Secondly, this application provides a CKKS three-branch decision dynamic hierarchical encrypted neural network training system, comprising:
[0175] The encrypted ciphertext acquisition module is used to encode the original input data, encrypt it into a polynomial, and add a noise term to generate ciphertext.
[0176] The encryption feature acquisition module is communicatively connected to the encryption ciphertext acquisition module. It is used to perform homomorphic computation on the ciphertext by alternating row and column encryption matrix multiplication, and combine the EncryptedPolyReLU activation function and the intermediate features of the three-branch decision processing to obtain the encryption features after hierarchical screening.
[0177] The encrypted model parameter acquisition module is communicatively connected to the encrypted feature acquisition module. It is used to process the encrypted features through encrypted residual sum of squares loss calculation and Nesterov momentum-accelerated gradient update, and combined with hierarchical noise-aware guided operation, to obtain optimized encrypted model parameters that support deep network training.
[0178] In one embodiment, the encrypted ciphertext acquisition module includes:
[0179] The raw input data acquisition unit is used to receive raw input data;
[0180] The dynamic encoding vector processing unit is communicatively connected to the original input data acquisition unit. If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison result between the variance and the preset threshold, different encoding vector processing strategies are executed to obtain the input matrix.
[0181] The intelligent matrix encoding processing unit is communicatively connected to the original input data acquisition unit. It is used to generate an input matrix by adjusting the fill factor through dynamic zero-padding operation based on the intelligent matrix encoding mechanism of the ring dimension parameter if the original input data is a two-dimensional matrix.
[0182] The encrypted ciphertext acquisition unit is communicatively connected to the intelligent matrix encoding processing unit. It is used to add controllable noise for encryption processing after transforming the input matrix into a polynomial form based on the ring homomorphic mapping, and finally outputs ciphertext that satisfies the noise budget constraint.
[0183] Secondly, this application provides a CKKS three-branch decision dynamic hierarchical encrypted neural network training system, comprising:
[0184] The encrypted ciphertext acquisition module is used to encode the original input data, encrypt it into a polynomial, and add a noise term to generate ciphertext.
[0185] The encryption feature acquisition module is communicatively connected to the encryption ciphertext acquisition module. It is used to perform homomorphic computation on the ciphertext by alternating row and column encryption matrix multiplication, and combine the EncryptedPolyReLU activation function and the intermediate features of the three-branch decision processing to obtain the encryption features after hierarchical screening.
[0186] The encrypted model parameter acquisition module is communicatively connected to the encrypted feature acquisition module. It is used to process the encrypted features through encrypted residual sum of squares loss calculation and Nesterov momentum-accelerated gradient update, and combined with hierarchical noise-aware guided operation, to obtain optimized encrypted model parameters that support deep network training.
[0187] In one embodiment, the encrypted ciphertext acquisition module includes:
[0188] The raw input data acquisition unit is used to receive raw input data;
[0189] The dynamic encoding vector processing unit is communicatively connected to the original input data acquisition unit. If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison result between the variance and the preset threshold, different encoding vector processing strategies are executed to obtain the input matrix.
[0190] The intelligent matrix encoding processing unit is communicatively connected to the original input data acquisition unit. It is used to generate an input matrix by adjusting the fill factor through dynamic zero-padding operation based on the intelligent matrix encoding mechanism of the ring dimension parameter if the original input data is a two-dimensional matrix.
[0191] The ciphertext acquisition unit is communicatively connected to the intelligent matrix encoding processing unit. It is used to add controllable noise for encryption processing after transforming the input matrix into a polynomial form based on the ring homomorphic mapping, and finally outputs ciphertext that satisfies the noise budget constraint.
[0192] The functions of each module in the above-mentioned CKKS three-branch decision dynamic hierarchical encrypted neural network training system correspond to the steps in the above-mentioned CKKS three-branch decision dynamic hierarchical encrypted neural network training method embodiment, and their functions and implementation processes will not be described in detail here.
[0193] Thirdly, this application provides a CKKS three-branch decision dynamic hierarchical encrypted neural network training device. The CKKS three-branch decision dynamic hierarchical encrypted neural network training device can be a personal computer (PC), laptop computer, server or other device with data processing capabilities.
[0194] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces for interconnecting devices within the CKKS three-branch decision dynamic hierarchical encrypted neural network training device, as well as interfaces for interconnecting the CKKS three-branch decision dynamic hierarchical encrypted neural network training device with other devices (such as other computing devices or user equipment). Physical interfaces can be Ethernet interfaces, fiber optic interfaces, ATM interfaces, etc.; user equipment can be displays, keyboards, etc.
[0195] Memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0196] The processor can be a general-purpose processor, which can call the CKKS three-branch decision dynamic hierarchical encrypted neural network training program stored in memory and execute the CKKS three-branch decision dynamic hierarchical encrypted neural network training method provided in the embodiments of this application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed when the CKKS three-branch decision dynamic hierarchical encrypted neural network training program is called can refer to the various embodiments of the CKKS three-branch decision dynamic hierarchical encrypted neural network training method of this application, and will not be repeated here.
[0197] Fourthly, embodiments of this application also provide a readable storage medium.
[0198] The present application stores a CKKS three-branch decision dynamic hierarchical encrypted neural network training program on a readable storage medium, wherein when the CKKS three-branch decision dynamic hierarchical encrypted neural network training program is executed by a processor, it implements the steps of the CKKS three-branch decision dynamic hierarchical encrypted neural network training method as described above.
[0199] The method implemented when the CKKS three-branch decision dynamic hierarchical encrypted neural network training program is executed can be referred to in various embodiments of the CKKS three-branch decision dynamic hierarchical encrypted neural network training method of this application, and will not be repeated here.
[0200] It should be noted that the sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0201] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device to execute the methods described in the various embodiments of this application.
[0202] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A training method for a CKKS three-branch decision dynamic hierarchical encrypted neural network, characterized in that, Includes the following steps: Step S1: Encode the original input data using CKKS encryption, converting it to a polynomial and adding a noise term to generate ciphertext. The original input data includes labels. Specifically, this includes the following steps: Step S11: Receive raw input data; Step S12A: If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison results of the variance and the preset threshold, different encoding vector processing strategies are executed to obtain the input matrix. Step S12B: If the original input data is a two-dimensional matrix, the intelligent matrix encoding mechanism based on the ring dimension parameter generates the input matrix by adjusting the fill factor through dynamic zero-padding operation; Step S13: After transforming the input matrix into polynomial form based on the ring homomorphic mapping, add controllable noise for CKKS encryption processing, and finally output ciphertext that satisfies the noise budget constraint; Step S2: Perform homomorphic computation on the ciphertext using alternating row and column encryption matrix multiplication, combine the EncryptedPolyReLU activation function and the intermediate features of the three-branch decision processing to obtain encryption features, and finally output the encryption prediction result, specifically including: Step S21: Divide the fully connected layers of the multilayer perceptron into odd-numbered layer groups and even-numbered layer groups based on the parity of the layer index; Step S22: Perform alternating row and column calculations on the odd-numbered and even-numbered layers to generate encryption features; Step S23: Apply the EncryptedPolyReLU activation function to perform nonlinear transformation on the encryption features and output the optimized encryption features; Step S24: Evaluate the prediction quality of the optimized encryption features by calculating the sum of squares of each element in the prediction vector to obtain the sample confidence level at the current processing stage. Step S25: Perform a three-branch decision on the confidence level based on the preset upper and lower thresholds, and obtain the decision result of the three-branch decision, which includes the decision to accept, reject, and delay. Step S26: Perform the corresponding operation based on the judgment results of the three decisions and output the encrypted prediction result; Step S3: Calculate the gradient using the encrypted residual sum of squares loss function and accelerate the gradient update using the Nesterov momentum method to process the encrypted prediction results. Based on this, combine the hierarchical noise-aware guidance mechanism to optimize the encrypted model parameters and finally obtain the optimized encrypted model parameters that support deep network training.
2. The CKKS three-branch decision dynamic hierarchical encrypted neural network training method as described in claim 1, characterized in that, Step S12A: If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison result between the variance and the preset threshold, different encoding vector processing strategies are executed to obtain the input matrix. Specifically, this includes the following steps: If the original input data is a one-dimensional vector, vectorization processing is performed on the original input data according to the preset floating-point encoding standard, and the unit norm encoded vector is output through L2 norm normalization operation, and the variance of the encoded vector is calculated in real time. When the variance of the encoded vector exceeds a preset threshold, a cyclic encryption local loss block copying mechanism is activated to process the encoded vector and generate a repeating encoded matrix with row and column alignment characteristics. When the variance of the encoded vector is determined to be lower than a preset threshold, the system automatically switches to the dimension expansion mode and uses the Kronecker product algorithm to increase the dimension of the encoded vector, outputting an expanded encoded matrix with multiplicative properties.
3. The CKKS three-branch decision dynamic hierarchical encrypted neural network training method as described in claim 1, characterized in that, Step S13: After transforming the input matrix into polynomial form based on the ring homomorphic mapping, controllable noise is added for CKKS encryption processing, and the final output is ciphertext that satisfies the noise budget constraint. Specifically, it includes the following steps: Perform a normalized embedding mapping transformation on the input matrix to obtain the polynomial; Gaussian distribution is used to generate encryption noise, which is then combined with a private key to probabilistically encrypt the polynomial, generating ciphertext. Perform noise budget verification on the generated ciphertext and output the ciphertext that satisfies the noise budget constraint.
4. The CKKS three-branch decision dynamic hierarchical encrypted neural network training method as described in claim 1, characterized in that, Step S3: Calculate the gradient using the encrypted residual sum of squares loss function, and accelerate gradient updates using the Nesterov momentum method to process the encrypted prediction results. Based on this, combine a hierarchical noise-aware guidance mechanism to optimize the encrypted model parameters, ultimately obtaining optimized encrypted model parameters that support deep network training. This specifically includes the following steps: Step S31: Perform homomorphic subtraction on the encrypted prediction result and the label, generate the residual squared term by element-wise multiplication, and construct the encrypted local loss function; Step S32: Based on the constructed encrypted local loss function, the current layer loss and the next layer cross-entropy loss are weighted and fused, and a penalty term is added for the undecided decision samples to obtain the total loss function; Step S33: Based on the obtained total loss function, perform gradient update in the ciphertext space using the improved Nesterov algorithm to obtain the updated encryption weights and momentum; Step S34: Perform hierarchical noise-aware guidance operations on the updated encryption weights and momentum respectively, and output optimized encryption model parameters that support deep network training.
5. A CKKS three-branch decision dynamic hierarchical encrypted neural network training system, characterized in that, include: The ciphertext acquisition module is used to encode the original input data, encrypt it into a polynomial using CKKS, and add a noise term to generate the ciphertext. The ciphertext acquisition module includes: The raw input data acquisition unit is used to receive raw input data; The dynamic encoding vector processing unit is communicatively connected to the original input data acquisition unit. If the original input data is a one-dimensional vector, the adaptive vector encoding mechanism based on dynamic variance determination processes the original vector through L2 normalization and monitors the variance in real time. Based on the comparison result between the variance and the preset threshold, different encoding vector processing strategies are executed to obtain the input matrix. The intelligent matrix encoding processing unit is communicatively connected to the original input data acquisition unit. It is used to generate an input matrix by adjusting the fill factor through dynamic zero-padding operation based on the intelligent matrix encoding mechanism of the ring dimension parameter if the original input data is a two-dimensional matrix. The ciphertext acquisition unit is communicatively connected to the intelligent matrix encoding processing unit. It is used to add controllable noise for CKKS encryption after transforming the input matrix into a polynomial form based on the ring homomorphic mapping, and finally outputs ciphertext that satisfies the noise budget constraint. The encryption prediction result acquisition module, communicatively connected to the ciphertext acquisition module, is used to perform homomorphic computation on the ciphertext through alternating row and column encryption matrix multiplication, combine the EncryptedPolyReLU activation function and the intermediate features of the three-branch decision processing to obtain encryption features, and finally output the encryption prediction result, specifically including: Based on the parity of the layer index, the fully connected layers of the multilayer perceptron are divided into odd-numbered layer groups and even-numbered layer groups; An alternating row and column calculation method is applied to both odd-numbered and even-numbered layers to generate encryption features; The EncryptedPolyReLU activation function is used to perform a non-linear transformation on the encryption features, and the optimized encryption features are output. The optimized encryption features are evaluated for prediction quality. The confidence level of the samples at the current processing stage is obtained by calculating the sum of squares of each element of the prediction vector. The confidence level is determined by a three-branch decision based on a preset upper and lower threshold, and the result of the three-branch decision is obtained. The three-branch decision includes acceptance, rejection and delay. Based on the decision results of the three decisions, perform the corresponding operations and output the encrypted prediction results; The encrypted model parameter acquisition module is communicatively connected to the encrypted prediction result acquisition module. It is used to calculate the gradient through the encrypted residual sum of squares loss function and accelerate the gradient update using the Nesterov momentum method to process the encrypted prediction results. Based on this, combined with the hierarchical noise perception guidance mechanism, the encrypted model parameters are optimized, and finally the optimized encrypted model parameters supporting deep network training are obtained.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a CKKS three-branch decision dynamic hierarchical encrypted neural network training program, wherein when the CKKS three-branch decision dynamic hierarchical encrypted neural network training program is executed by a processor, it implements the steps of the CKKS three-branch decision dynamic hierarchical encrypted neural network training method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Hierarchical face recognition method based on homomorphic encryption
CN117831102A
Linear regression model federated learning training method based on homomorphic encryption
CN118966382A