Homomorphic encryption maximum value calculation method based on multivariate symmetric polynomial approximation
By introducing moment variables and low-depth reconstruction, the multiplication depth and number of operations in the Max-pooling layer of convolutional neural networks are reduced in homomorphic encryption environments, solving the problem of high computational complexity and improving inference efficiency and accuracy. This approach is suitable for homomorphic encryption computation in fields such as medicine and finance.
Patent Information
- Application Number
- CN202511720821.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-17
AI Technical Summary
In homomorphic encryption environments, the maximum value function of the max-pooling layer of convolutional neural networks has high computational complexity and large multiplication depth, resulting in low inference efficiency and reduced accuracy.
By defining moment variables as fitting bases, constructing polynomials, and introducing low-depth reconstruction and intermediate variable caching, the multiplication depth and number of ciphertext computations are reduced. A multivariate symmetric polynomial approximation method is adopted to reconstruct terms with excessive multiplication depth into a layer-aligned tree structure.
It significantly reduces the multiplication depth and number of operations in encrypted computation, improves inference efficiency and throughput, and meets the immediacy and security requirements of fields such as healthcare and finance.
Smart Images

Figure CN121547162A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for calculating the maximum value of homomorphic encryption based on a multivariate symmetric polynomial approximation, belonging to the field of information security, and is particularly applicable to the calculation of the maximum value of homomorphic encryption based on a multivariate symmetric polynomial approximation. Background Technology
[0002] With the rise of privacy computing and federated learning, model inference based on homomorphic encryption (HE) has been widely used in fields such as medicine and finance. The typical approach is to perform machine learning inference on user private data in the ciphertext domain, and the service provider completes the operation and returns the ciphertext result without decryption. Among them, the CKKS scheme provides an engineering foundation for numerical inference with its excellent encoding and noise management techniques [1].
[0003] System-level work has shown that compile-time coordination of multiplication depth and order can significantly improve the inference efficiency of homomorphic neural networks. For example, the CHET compiler automatically controls network depth and computational cost through graph-level optimization, parameter selection and operator placement, treating "depth" as a system-level resource [2]. On the other hand, regarding the complexity of the network structure itself, some studies have replaced complex nonlinear operations with more user-friendly polynomial or discrete structures (such as homomorphic evaluation of binary networks), further highlighting that "controlling polynomial depth is crucial" [3]. When the depth budget is insufficient, bootstrapping can be used to refresh the ciphertext, but bootstrapping is costly, and optimizing the network structure and fitting low-order polynomials are still the most efficient means.
[0004] Unlike plaintext inference, multiplication in HE is an expensive operation that consumes a large depth budget: each ciphertext multiplication introduces noise growth, triggers relinearization and rescaling, and consumes a modular chain level. When the multiplication depth exceeds the budget, a bootstrap refresh is required, which significantly increases latency and energy consumption[4]. Therefore, in HE inference, both multiplication depth and number of operations are valuable resources and need to be carefully managed. Excessive depth and redundant multiplication not only reduce throughput and response speed, but also reduce numerical accuracy and prediction accuracy due to noise accumulation and quantization errors caused by multiple rescalings[1].
[0005] In encrypted inference of convolutional neural networks (CNNs), convolution and weighted summation can be implemented using linear operations, but activation and pooling stages need to be implemented using low-order polynomials or structural substitutions. Early representative work CryptoNets demonstrated a practical path to replace activation with polynomials under HE and to approximate Max-pooling with homomorphic operations, and emphasized the importance of low-order polynomials for efficiency [1]. However, there is still a lack of efficient and accurate encrypted operations for Max-pooling fitting functions for encrypted inference of high-dimensional data.
[0006] [1] R. Gilad-Bachrach et al., CryptoNets: Applying Neural Networks toEncrypted Data with High Throughput and Accuracy, ICML 2016.
[0007] [2] JH Cheon et al., Homomorphic Encryption for ApproximateArithmetic, ASIACRYPT 2017.
[0008] [3] R. Dathathri et al., CHET: An Optimizing Compiler for Fully-Homomorphic Neural Network Inferencing, PLDI 2019.
[0009] [4] F. Bourse et al., Fast Homomorphic Evaluation of Deep DiscretizedNeural Networks, CRYPTO 2018.
[0010] [5] JH Cheon et al., Bootstrapping for Approximate HomomorphicEncryption, EUROCRYPT 2018; S. Cheon et al., DaCapo: Automatic BootstrappingManagement for FHE, USENIX Security 2024. Summary of the Invention
[0011] In view of this, we need to calculate the maximum value function corresponding to the Max-pooling layer of a convolutional neural network under homomorphic encryption environment. To address the issues of high computational complexity and large multiplication depth, this invention provides a method for calculating the maximum value of homomorphic encryption using multivariate symmetric polynomial approximation. By defining moment variables as bases to replace the original variables and approximating the maximum value, and introducing low-depth reconstruction and intermediate variable caching, this method aims to reduce the multiplication depth and number of multiplications required for ciphertext computation, thereby improving inference efficiency and deployability. For variables.
[0012] To achieve the above objectives, the present invention provides the following technical solution:
[0013] A method for calculating the maximum value of homomorphic encryption using multivariate symmetric polynomial approximation includes the following steps:
[0014] S1. Parameter Setting: Based on the accuracy requirements of the ciphertext computation task and the total multiplication depth estimate, set the function used to fit the maximum value. The highest degree of a polynomial Its corresponding multiplication depth budget is ;
[0015] S2, Moment Variable Construction: Constructing the input variable set Mapped to a finite-dimensional set of moment variables Each moment variable is defined as ;
[0016] S3. Polynomial Fitting: Based on the original dataset, a numerical optimization method is used to train a polynomial with moment variables as input. To make it fit function;
[0017] S4. Expression Analysis and Boundary Check: (This section appears to be incomplete and requires further context.) Rearrange the monomials, calculate the level of each term, and determine if the level exceeds the limit.
[0018] S5, Out-of-bounds item reconstruction: For Rewrite the monomial of the China-Vietnam border to ensure that its multiplication depth does not exceed ;
[0019] S6. Intermediate Variable Generation and Caching: Scan Matrix Variable Set The reconstructed polynomial The power form that exists in Defined as an intermediate variable and cached for direct access, where , , , ;
[0020] S7. Final Expression Update: Replace the polynomial with the intermediate variables cached in step S6. The higher-order power terms of the corresponding moment variables are used to generate the final terms that can be used for homomorphic encryption computation. Low-depth polynomial expressions.
[0021] Furthermore, the encryption schemes involved in the ciphertext calculation are homomorphic encryption schemes, including but not limited to CKKS, BGV, and BFV schemes.
[0022] Furthermore, after steps S1 to S7 are completed using offline symbolic computation, they participate online in the assignment and invocation of the maximum value function in the neural network.
[0023] Furthermore, for the polynomial Step S4 for each monomial in the equation is specifically as follows:
[0024] S401: Rearrange the moment variables in the monomial from left to right in ascending order of their subscripts;
[0025] S402: Calculate each moment variable in the monomial. The number of multiplication layers is ;
[0026] S403: Set a calculation pointer, scan the moment variables one by one from left to right, treat the product of all processed moment variables to the left of the pointer as a temporary moment variable, and dynamically calculate the cumulative multiplication level after multiplying this temporary moment variable with the moment variable pointed to by the current pointer. ;
[0027] S404: Calculate the cumulative multiplication layer number obtained in the previous step. Compare with the number of layers of the next moment variable next to the pointer, if If it is larger, shift the current temporary moment variable to the right until... If the number of multiplication layers is less than or equal to the number of a moment variable on the right, move it to the end and return to step S403 to recalculate the cumulative number of multiplication layers starting from the leftmost position. ;
[0028] S405: Repeat steps S403 to S404 until all moment variables in the monomial have been processed, and output the reordered monomial.
[0029] S406: Determine if the monomial is out of bounds: If If it is, then it is marked as an out-of-bounds item.
[0030] Furthermore, the reconstruction process described in step S5 for each out-of-bounds monomial is as follows:
[0031] S501: Yes The reordered monomials that cross the boundary will change the moment variables. Back-substitution as a set of variables The power sum form, for any monomial Expand it equivalently as Monomial combinations, i.e. Among them, satisfying , ;
[0032] S502: For each monomial combination... Subterms in product form Construct a tree-like multiplication structure to ensure that its multiplication depth does not exceed ;
[0033] S503: Substitute the reconstructed expression back into the original polynomial. And without increasing the multiplication depth, common factors are extracted to form an updated polynomial expression.
[0034] Furthermore, step S502 specifically includes:
[0035] S5021: Each Treat them as leaf nodes and determine their index. Determine the number of times it needs to appear in the multiplication tree;
[0036] S5022: Following the principle of pairwise multiplication, a balanced binary tree structure is recursively constructed from bottom to top: operands are paired and multiplied, and the product is used as a new operand for the next level. This process is repeated until the final result is obtained.
[0037] S5023: This tree-structured multiplication method ensures that the multiplication depth of this sub-item is strictly limited. Within.
[0038] An electronic device includes at least one processor; and a memory communicatively connected to said at least one processor; wherein,
[0039] The memory stores a computer program that is executed by the at least one processor, which enables the at least one processor to perform the above-described method for calculating the maximum value of a homomorphic encryption using a multivariate symmetric polynomial approximation.
[0040] Finally, the present invention also discloses a computer-readable storage medium storing computer instructions for causing a processor to execute the above-described method for calculating the maximum value of homomorphic encryption using a multivariate symmetric polynomial approximation.
[0041] The beneficial effects of this invention are as follows: This invention provides a method for calculating the maximum value of homomorphic encryption using multivariate symmetric polynomial approximation. By introducing moment variables as fitting bases, the dimension of the polynomial variables is decoupled from the input scale, fundamentally avoiding the combinatorial explosion problem that occurs with the increase of the number of inputs in traditional methods. Furthermore, by combining low-depth rewriting and intermediate variable reuse techniques, under the premise of strictly limiting the multiplication depth, the out-of-bounds terms that originally required high-depth calculation are reconstructed into a layer-aligned tree structure, which significantly reduces the multiplication depth and number of multiplications under ciphertext. Thus, efficient and low-latency maximum value approximation calculation is achieved in mainstream homomorphic encryption schemes such as CKKS, BGV, and BFV, effectively improving the throughput and deployability of ciphertext inference. Attached Figure Description
[0042] To illustrate the objectives and technical solutions of this invention, the following figures are provided:
[0043] Figure 1 This is a flowchart of the method of the present invention;
[0044] Figure 2 The monomial of Embodiment 1 of the present invention A schematic diagram of a tree-like multiplication structure;
[0045] Figure 3 This is a graph showing the experimental absolute error results of Embodiment 1 of the present invention; where the vertical axis represents the absolute error and the horizontal axis represents the sample.
[0046] Figure 4 This is a graph showing the relative error results of the experiment in Embodiment 1 of the present invention; where the vertical axis represents the relative error (unit: %) and the horizontal axis represents the sample.
[0047] Figure 5 This is a schematic diagram of the electronic device in Embodiment 3 of the present invention. Detailed Implementation
[0048] Example 1: Now, according to user application requirements, it is necessary to calculate on CKKS encrypted ciphertext. ,in It is the ciphertext output of the convolutional layer of a neural network, and a fit is required. Since the polynomial multiplication depth of the function does not exceed 4, this invention provides "a method for calculating the maximum value of homomorphic encryption using multivariate symmetric polynomial approximation".
[0049] Combination Figure 1 The method specifically includes the following steps:
[0050] Step 1: Parameter Settings
[0051] Based on the output characteristics and accuracy requirements of the convolutional layer, a fitting polynomial is set. The highest number Its corresponding multiplication depth budget is .
[0052] Step 2, Moment Variable Construction:
[0053] Based on input variable set Construct the set of moment variables up to the 4th order. ,in:
[0054] .
[0055] Step 3: Polynomial Fitting
[0056] Input 200 sets of raw data, use the least squares method, and fit the data using the symbolic computation software Maple 20 to obtain a polynomial:
[0057] Among them, the coefficient These are the specific values obtained from the fitting. Specifically:
[0058] , ,
[0059] , ,
[0060] , ,
[0061] , ,
[0062] , ,
[0063] , .
[0064] Step 4: Identifying out-of-bounds items:
[0065] S401 (Rearranged Single Item): Scan monomials in , , Ensure that lower-order moment variables come first.
[0066] S402 (Number of layers of moment variables in a monomial): Calculate the number of layers of moment variables based on their subscripts. The number of layers is , The number of layers is , The number of layers is .
[0067] S403 (Calculate monomials) , , (Number of layers): Calculate the number of layers in the product from left to right, first calculating... The number of floors, and Multiply, the number of layers is .because number of layers and The number of layers is 1, so It will not move backward. Further... The number of layers is 2. Then calculate... The number of floors, because The number of layers is 0. The number of layers is 2, so The number of layers is 3. Similarly, it is easy to obtain The number of layers is 2.
[0068] S404 (Judging monomials) , , (Whether it exceeds the boundary): Based on the result of step S403, determine... Crossing the boundary.
[0069] Step 5: Refactoring out-of-bounds items:
[0070] Backward expansion: Use initial variables Power and substitution moment variables , get , unfold into
[0071] .
[0072] Structural optimization: Direct replacement ,have For intersecting terms, such as , combined Figure 2 Construct it into a tree-like multiplication structure Ensure that its computational depth is 2.
[0073] Expression update: Substitute the reconstructed expression back into the polynomial And extract common factors locally without increasing depth; otherwise, do not extract common factors, thus obtaining the updated result.
[0074] .
[0075] Step Six: Intermediate Variable Caching
[0076] Scan the set of moment variables and reconstruct the polynomial. The power form that exists in Define it as an intermediate variable and cache it.
[0077] Step 7: Final Expression Generation
[0078] Use intermediate variables replace All of them Terms, forming a low-depth polynomial that can ultimately be used for homomorphic computation.
[0079] .
[0080] To better demonstrate the beneficial effects of the method of the present invention, this embodiment was implemented on the Maple 2022 platform, and 200 sets of three-dimensional sample inputs were randomly generated. Each set of samples is used as the input polynomial for the fitting set. The polynomial coefficients were solved using the least squares method, and the fitting accuracy was systematically evaluated.
[0081] Calculate the true value for each sample. with fitted value The absolute error between them, experimental results are as follows Figure 3 As shown, the absolute error of all samples is within the range of 0 to 0.64, with the vast majority of samples having an absolute error below 0.4, and only a very few reaching a maximum error of approximately 0.6. This is because the true maximum value of the input samples... The range is relatively small (mainly concentrated in 0~0.1), the absolute error is relatively more stable, and there is no amplification effect in the relative error.
[0082] Calculate the true value for each sample. with fitted value The relative error between them, the experimental results are as follows Figure 4 As shown, the relative error of the vast majority of samples is within the range of 0 to 0.1, and the overall fitting error is relatively stable. Only a small number of samples show larger error points (mainly because the true value is close to 0, which amplifies the relative error). Among these 200 samples, the maximum relative error is 1.510351, the average relative error is 0.070009, and the proportion of samples with a relative error <10% is 88%.
[0083] Overall, the method of this invention can provide prediction results that are close to the true maximum function on most samples. The absolute error remains within a reasonable range, while the larger relative error mainly comes from samples where the true value is close to zero, which does not affect the model's fitting ability on a general input range.
[0084] Example 2: A hospital has a patient's bladder CT image, and the outpatient doctor needs to use a medical model of bladder cancer for auxiliary diagnosis. This medical model is a convolutional neural network deployed on an Amazon cloud server. After testing on similar plaintext datasets, to achieve the ideal judgment result while meeting the timeliness requirement, the sliding window size of the convolutional layer is 3, and the fitted Max-pooling layer polynomial cannot exceed order 7. Therefore, this invention provides "a method for calculating the maximum value of homomorphic encryption using multivariate symmetric polynomial approximation." The implementation process is as follows:
[0085] Step 1: Parameter Setting: Based on the accuracy requirements of the ciphertext computation task and the estimated total multiplication depth, set the function used to fit the maximum value. The highest degree of a polynomial Its corresponding multiplication depth budget is ;
[0086] Step 2, Moment Variable Construction: Constructing the input variable set Mapped to a finite-dimensional set of moment variables Each moment variable is defined as ;
[0087] Step 3: Polynomial Fitting: Based on the medical image dataset, a numerical optimization method is used to train a polynomial with moment variables as input. To make it fit function;
[0088] Step 4: Expression Analysis and Boundary Check: For Rearrange the monomials, calculate the level of each term, and determine if the level exceeds the limit.
[0089] Step 5, Restructuring Out-of-Bounds Items: [This step involves...] Rewrite the monomial of the China-Vietnam border to ensure that its multiplication depth does not exceed ;
[0090] Step Six: Intermediate Variable Generation and Caching: Scan Matrix Variable Set The reconstructed polynomial The power form that exists in Defined as an intermediate variable and cached for direct access, where , , , ;
[0091] Step 7: Final Expression Update: Replace the polynomial with the intermediate variables cached in Step S6. The higher-order power terms of the corresponding moment variables are used to generate the final terms that can be used for homomorphic encryption computation. Low-depth polynomial expressions.
[0092] Furthermore, the encryption schemes involved in the ciphertext calculation are homomorphic encryption schemes, including but not limited to CKKS, BGV, and BFV schemes.
[0093] Furthermore, after steps S1 to S7 are completed using offline symbolic computation, they participate online in the assignment and invocation of the maximum value function in the neural network.
[0094] This embodiment successfully transforms complex max-pooling operations into low-complexity polynomials that conform to depth budgeting, thus meeting the timeliness and security requirements of encrypted reasoning in medical scenarios.
[0095] Example 3: For the scenario of Example 1 or Example 2, Figure 5 A schematic diagram of an electronic device (90) that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers.
[0096] Electronic devices can also refer to various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the invention described and / or claimed herein.
[0097] like Figure 5 As shown, the electronic device (90) includes at least one processor (91) and a memory, such as a read-only memory (ROM) (92) or a random access memory (RAM) (93), which is communicatively connected to the at least one processor (91). The memory stores computer programs executable by the at least one processor. The processor (91) can perform various appropriate actions and processes based on the computer programs stored in the ROM (92) or loaded from storage units (98) into the RAM (93). The RAM (43) may also store various programs and data required for the operation of the electronic device (90). The processor (91), ROM (42), and RAM (43) are interconnected via a bus (94). An input / output (I / O) interface (95) is also connected to the bus (94).
[0098] Multiple components in the electronic device (90) are connected to the I / O interface (95), including: input units (96), such as keyboards, mice, etc.; output units (97), such as various types of displays, speakers, etc.; storage units (98), such as disks, optical disks, etc.; and communication units (99), such as network cards, modems, wireless transceivers, etc. The communication unit (99) allows the electronic device (90) to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0099] The processor (91) can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processors (91) include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor (91) performs the various methods and processes described above, such as a homomorphic encryption maximum value calculation method based on multivariate symmetric polynomial approximation.
[0100] In some embodiments, a method for calculating the maximum value of a homomorphic encryption using a multivariate symmetric polynomial approximation can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as a storage unit (98). In some embodiments, part or all of the computer program can be loaded and / or installed on an electronic device (90) via a ROM (92) and / or a communication unit (99). When the computer program is loaded into RAM (93) and executed by a processor (91), one or more steps of the method for calculating the maximum value of a homomorphic encryption using a multivariate symmetric polynomial approximation described above can be performed. Alternatively, in other embodiments, the processor (91) can be configured by any other suitable means (e.g., by means of firmware) to perform a method for calculating the maximum value of a homomorphic encryption using a multivariate symmetric polynomial approximation.
[0101] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0102] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0103] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0104] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0105] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0106] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0107] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made to it in form and detail without departing from the scope defined by the claims of the present invention.
Claims
1. A method for homomorphic encryption maximum value computation using multivariate symmetric polynomial approximation, comprising: The method comprises the following steps: S1. Parameter Setting: Based on the accuracy requirements of the ciphertext computation task and the total multiplication depth estimate, set the function used to fit the maximum value. The highest degree of a polynomial Its corresponding multiplication depth budget is ; S2, moment construction: map the input variable set to a finite-dimensional moment variable set where each moment variable is defined as ; S3, Polynomial fitting: based on the original dataset, train a polynomial with the matrix variable as input using numerical optimization methods to fit the function; S4, expression analysis and out-of-bound judgment: rearrange the monomials of the expression, calculate the layer number of each monomial, and judge whether the layer number is out-of-bound; S5, Out-of-bounds item reconstruction: For Rewrite the monomial of the China-Vietnam border to ensure that its multiplication depth does not exceed ; S6, Intermediate variable generation and caching: scan the set of monomial variables , the restructured polynomial , the power form present in the , defined as an intermediate variable and cached for direct invocation, where , , , ; S7, Final expression update: using the intermediate variables cached in step S6, replace the polynomial corresponding to the high order power term of the intermediate variable, generate a low-depth polynomial expression of that can be used for homomorphic encryption computation.
2. The homomorphic encryption maximum value computation method of a multivariate symmetric polynomial approximation according to claim 1, characterized in that, For each of the polynomials Step S4 is in particular: S401: reordering the metric variables in the monomial from left to right according to the ascending order of the indices; S402: Calculate each matrix variable in the monomial The multiplication layer number is ; S403: set a calculation pointer, scan the moment variables one by one from left to right, take the product of all the processed moment variables on the left side of the pointer as a temporary moment variable, and dynamically calculate the cumulative multiplication layer number after multiplying the temporary moment variable with the moment variable pointed to by the current pointer ; S404: compare the accumulated multiplication layer number calculated in the last step with the multiplication layer number of the next momentary variable on the right If the accumulated multiplication layer number is greater than the multiplication layer number of the next momentary variable on the right, the current momentary variable is right shifted until the accumulated multiplication layer number is less than or equal to the multiplication layer number of the next momentary variable on the right or the end is reached, and the step S403 is returned to calculate the accumulated multiplication layer number from the leftmost side again ; and If the accumulated multiplication layer number is less than or equal to the multiplication layer number of the next momentary variable on the right, the step S405 is executed. S405: repeating steps S403 to S404 until all metric variables in the monomial are processed, and outputting the reordered monomial; S406: judge whether the monomial is out of bound: if then mark it as an out of bound monomial.
3. The homomorphic encryption maximum value computation method of a multivariate symmetric polynomial approximation according to claim 1, characterized in that, The reconstruction process of each out-of-bound monomial described in step S5 is specifically as follows: S501: To reorder the monomials across the boundaries, the matrix variable is substituted into the set of variables and the power-sum form is obtained for any monomial , which is equivalent to expand it into a combination of monomials of , i.e. ; where , ; S502: For each subterm of the product form in the monomial combination , construct a tree multiplication structure ensuring that its multiplication depth does not exceed ; S503: Substitute the reconstructed expression back into the original polynomial and extract common factors without increasing the multiplication depth, forming an updated polynomial expression.
4. The homomorphic encryption maximum value computation method of a multivariate symmetric polynomial approximation according to claim 3, characterized in that, The step S502 is specifically as follows: S5021: For each considered as a leaf node and according to its index determines the number of times it needs to appear in the multiplication tree; S5022: constructing a balanced binary tree structure recursively from bottom to top according to the principle of multiplying two by two: multiplying the operation number pairs, and taking the product as the new operation number of the upper layer, repeating the process until the final result is obtained; S5023: With such a tree-multiplication structure, it is ensured that the multiplication computation depth of the sub-item is strictly limited within .
5. The homomorphic encryption maximum value computation method of a multivariate symmetric polynomial approximation according to claim 1, characterized in that, The encryption scheme involved in the ciphertext calculation is a homomorphic encryption scheme, including but not limited to CKKS, BGV, and BFV schemes.
6. The homomorphic encryption maximum value computation method of a multivariate symmetric polynomial approximation according to claim 1, characterized in that, After the steps S1 to S7 are completed in the offline symbol calculation mode, the online participation in the assignment of the maximum value function in the neural network is completed.
7. An electronic device, comprising: The electronic device comprises at least one processor, and a memory connected with the at least one processor in communication; wherein the memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the homomorphic encryption maximum value calculation method of the multi-element symmetric polynomial approximation according to any one of claims 2 to 6.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for enabling the processor to execute the homomorphic encryption maximum value calculation method of the multi-element symmetric polynomial approximation according to any one of claims 2 to 6.