Quantitative neural network security reasoning method and device based on trusted execution environment
By fine-tuning and segmenting the model in cloud servers and edge devices, and combining quantization and encryption processing, the integer overflow problem and model theft risk in quantitative neural networks are solved, and efficient and secure inference result transmission and model protection are achieved.
Patent Information
- Application Number
- CN202410955183.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-15
AI Technical Summary
The existing security inference method introduces serious integer overflow problems in quantitative neural networks, resulting in a significant decline in model accuracy, unable to compatible with the low-bit computing requirements of edge devices, and faces the risk of model theft and tampering with inference results.
Using a quantitative neural network security reasoning method based on a trusted execution environment, combining fingerprint challenge values and OTP by fine-tuning private models in cloud servers, splitting and segmenting model operators and parameters, and quantizing and encrypting them in edge devices. Algorithm to ensure the integrity and confidentiality of inference data.
Protect quantitative model inference in low latency, high accuracy and high security, prevent model theft and tamper with inference results, improve service quality and reduce the accuracy of model theft attacks.
Smart Images

Figure CN118966352A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of secure reasoning technology, and in particular to a quantized neural network secure reasoning method and device based on a trusted execution environment. Background Art
[0002] Quantization Neural Network (QNN) achieves hardware inference acceleration by converting full-precision calculations into efficient low-bit calculations, which can effectively save computing resources and improve inference speed. Due to its advantages such as low resource requirements, low power consumption, and high inference efficiency, it is widely deployed to provide services in resource-constrained edge devices. At present, a large number of neural network inference frameworks support 8-bit QNN inference, and many hardware facilities have also been optimized for 8-bit calculations. QNN has become one of the mainstream routes for model deployment.
[0003] In addition, since edge devices are untrustworthy, the deployed models are at risk of theft and inference results being tampered with. In response to the above risks, secure inference based on Trusted Execution Environment (TEE) has received widespread attention in recent years. With the data confidentiality and program integrity provided by TEE, secure inference aims to ensure that the model provides high-quality inference services while ensuring the confidentiality of model parameters and inference integrity, thereby avoiding the theft of high-value model assets or damage to service quality.
[0004] However, existing security reasoning methods introduce serious integer overflow problems in QNN, resulting in a significant decrease in model accuracy. Current advanced security mechanisms map reasoning calculations to large finite fields (such as Z p ,p=2 24 -3) and confuse model parameters or intermediate results to ensure the confidentiality of the model. However, this contradicts the core principle of QNNs, which is to accelerate inference by leveraging low-bit operations. Applying obfuscation in a low-bit constrained space can easily lead to integer overflow, which is catastrophic for parameter-sensitive neural networks and can seriously damage model accuracy. Existing methods such as Magnitude, Shadownet, TEESlice, and SOTER can cause model accuracy to drop to the level of random guessing. Although current methods perform well in expensive data types, they are compatible with QNNs that are widely adopted at the edge. In addition, due to the limited data space, the model confidentiality and reasoning integrity of QNNs are at greater risk.
[0005] In summary, the integer overflow errors caused by existing security inference methods greatly affect the accuracy of quantized neural network models and need to be solved urgently. Summary of the invention
[0006] The present application provides a quantized neural network security reasoning method and device based on a trusted execution environment to solve the problems such as integer overflow errors caused by existing security reasoning methods, which greatly affect the accuracy of the quantized neural network model.
[0007] The first aspect of the present application provides a quantized neural network security reasoning method based on a trusted execution environment, which is applied to the offline deployment stage and includes the following steps: in a cloud server of a preset model provider, fine-tuning a preset private model according to a preset parameter de-similarity strategy to generate a protected private model; extracting the protected private model in the cloud server through a preset edge TEE, and splitting multiple target operators and multiple target parameters in the protected private model; performing pre-calculation operations on the multiple target operators and the multiple target parameters to obtain the main operator of the protected private model, so as to divide the main operator into a preset edge REE for protection according to a preset partitioning strategy.
[0008] Optionally, in one embodiment of the present application, the preset private model is fine-tuned according to the preset parameter de-similarity strategy to generate a protected private model, including: determining the self-information entropy and mutual information optimization objective function of the preset private model based on the preset information bottleneck theory and the overall optimization objective function; determining the alternative optimization objective function of the preset private model according to the self-information entropy and mutual information optimization objective function and a preset reverse optimization strategy, and calculating the mutual information between the preset private model and the preset public model through the alternative optimization objective function; iteratively optimizing the alternative optimization objective function until the mutual information meets the preset optimization similarity requirements to generate the protected private model.
[0009] Optionally, in one embodiment of the present application, the protected private model in the cloud server is extracted through a preset edge TEE, and multiple target operators and multiple target parameters in the protected private model are split, including: determining the multiple target operators, the multiple target parameters and the target range parameters of the protected private model; splitting the multiple target operators and the multiple target parameters according to the target range parameters.
[0010] The second aspect of the present application provides a quantized neural network security reasoning method based on a trusted execution environment, which is applied to the online reasoning stage, and includes the following steps: submitting target reasoning data to a preset edge TEE batch, and adding a preset fingerprint challenge value to the target reasoning data to obtain mixed reasoning data; performing an arrangement order obfuscation operation on the mixed reasoning data to generate obfuscated reasoning data, and quantizing and requantizing the obfuscated reasoning data through the quantization parameters preset in the edge TEE to obtain quantized reasoning data, encrypting the quantized reasoning data according to a preset OTP algorithm, and based on a preset edge REE, accelerating reasoning processing on the encrypted quantized reasoning data, and using the edge TEE to perform dequantization and deobfuscation operations on the encrypted reasoning data after accelerated reasoning processing to generate an reasoning result; judging whether the reasoning result meets the preset reasoning integrity requirement, and if the reasoning result meets the preset reasoning integrity requirement, feeding back the reasoning result to the target user through the edge TEE.
[0011] Optionally, in one embodiment of the present application, adding a preset fingerprint challenge value to the target reasoning data to obtain mixed reasoning data includes: randomly sampling multiple basic fingerprints within a preset sampling interval, and determining a fingerprint challenge value that meets a preset distribution requirement based on the multiple basic fingerprints; inserting the fingerprint challenge value into the target reasoning data to generate the mixed reasoning data.
[0012] Optionally, in one embodiment of the present application, the encrypted quantized reasoning data is accelerated based on the preset edge REE, and the edge TEE is used to perform dequantization and deobfuscation operations on the encrypted reasoning data after accelerated reasoning processing to generate an reasoning result, including: performing intensive matrix multiplication operations on the encrypted quantized reasoning data in the edge REE to obtain an accelerated reasoning result; determining two target deobfuscation keys, and restoring the accelerated reasoning result using the two target deobfuscation keys in the edge TEE, and generating the reasoning result based on the restored accelerated reasoning result and a preset activation function.
[0013] Optionally, in one embodiment of the present application, the mathematical expression of the preset reasoning integrity requirement is:
[0014]
[0015] Among them, FP new represents the fingerprint challenge value; T represents the number of basic fingerprints; RR i Represents the response value of the fingerprint challenge value; OP x Represents the operator with sequence number x.
[0016] The third aspect of the present application provides a quantized neural network security reasoning device based on a trusted execution environment, which is applied to the offline deployment stage, including: a fine-tuning module, which is used to fine-tune a preset private model in a preset model provider's cloud server according to a preset parameter de-similarity strategy to generate a protected private model; a splitting module, which is used to extract the protected private model in the cloud server through a preset edge TEE, and split multiple target operators and multiple target parameters in the protected private model; a splitting module, which is used to perform pre-calculation operations on the multiple target operators and the multiple target parameters to obtain the main operator of the protected private model, so as to split the main operator into a preset edge REE for protection according to a preset partitioning strategy.
[0017] Optionally, in one embodiment of the present application, the fine-tuning module includes: a first determination unit, used to determine the self-information entropy and mutual information optimization objective function of the preset private model based on a preset information bottleneck theory and an overall optimization objective function; a calculation unit, used to determine the alternative optimization objective function of the preset private model according to the self-information entropy and mutual information optimization objective function and a preset reverse optimization strategy, and calculate the mutual information between the preset private model and the preset public model through the alternative optimization objective function; an optimization unit, used to iteratively optimize the alternative optimization objective function until the mutual information meets the preset optimization similarity requirements to generate the protected private model.
[0018] Optionally, in one embodiment of the present application, the splitting module includes: a second determination unit, used to determine the multiple target operators, the multiple target parameters and the target range parameters of the protected private model; and a decomposition unit, used to split the multiple target operators and the multiple target parameters according to the target range parameters.
[0019] The fourth aspect of the present application provides a quantized neural network security reasoning device based on a trusted execution environment, which is applied to the online reasoning stage, including: an adding module, which is used to submit target reasoning data to a preset edge TEE batch, and add a preset fingerprint challenge value to the target reasoning data to obtain mixed reasoning data; a reasoning module, which is used to perform an arrangement order obfuscation operation on the mixed reasoning data to generate obfuscated reasoning data, and quantize and requantize the obfuscated reasoning data through the quantization parameters preset in the edge TEE to obtain quantized reasoning data, encrypt the quantized reasoning data according to a preset OTP algorithm, and based on the preset edge REE, accelerate the reasoning processing of the encrypted quantized reasoning data, and use the edge TEE to perform dequantization and deobfuscation operations on the encrypted reasoning data after the accelerated reasoning processing to generate an reasoning result; an integrity verification module, which is used to determine whether the reasoning result meets the preset reasoning integrity requirements, and if the reasoning result meets the preset reasoning integrity requirements, the reasoning result is fed back to the target user through the edge TEE.
[0020] Optionally, in one embodiment of the present application, the adding module includes: a sampling unit, used to randomly sample multiple basic fingerprints within a preset sampling interval, and determine a fingerprint challenge value that meets a preset distribution requirement based on the multiple basic fingerprints; an insertion unit, used to insert the fingerprint challenge value into the target reasoning data to generate the mixed reasoning data.
[0021] Optionally, in one embodiment of the present application, the reasoning module includes: an accelerated reasoning unit, used to perform intensive matrix multiplication operations on the encrypted quantized reasoning data in the edge REE to obtain an accelerated reasoning result; a recovery unit, used to determine two target deobfuscation keys, and use the two target deobfuscation keys in the edge TEE to perform a recovery operation on the accelerated reasoning result, and generate the reasoning result based on the recovered accelerated reasoning result and a preset activation function.
[0022] Optionally, in one embodiment of the present application, the mathematical expression of the preset reasoning integrity requirement is:
[0023]
[0024] Among them, FP new represents the fingerprint challenge value; T represents the number of basic fingerprints; RR i Represents the response value of the fingerprint challenge value; OP x Represents the operator with sequence number x.
[0025] Therefore, the embodiments of the present application have the following beneficial effects:
[0026] The embodiment of the present application can submit the target reasoning data to the preset edge TEE batch, and add the preset fingerprint challenge value to the target reasoning data to obtain the mixed reasoning data; perform the arrangement order obfuscation operation on the mixed reasoning data to generate the obfuscated reasoning data, and quantize and re-quantize the obfuscated reasoning data through the quantization parameters preset in the edge TEE to obtain the quantized reasoning data, encrypt the quantized reasoning data according to the preset OTP algorithm, and based on the preset edge REE, accelerate the reasoning processing of the encrypted quantized reasoning data, and use the edge TEE to perform the dequantization and de-obfuscation operations on the encrypted reasoning data after the accelerated reasoning processing to generate the reasoning result; judge whether the reasoning result meets the preset reasoning integrity requirements, and if the reasoning result meets the preset reasoning integrity requirements, the reasoning result is fed back to the target user through the edge TEE, thereby protecting the quantitative model reasoning under the condition of low latency, high precision and high security, preventing the adversary from stealing the model or tampering with the reasoning result, protecting the precious intellectual property rights of the model provider and improving the service quality. Thus, the integer overflow error caused by the existing security reasoning method is solved, which greatly affects the accuracy of the quantitative neural network model.
[0027] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0029] Figure 1 A flowchart of a quantized neural network security reasoning method based on a trusted execution environment applied to an offline deployment stage according to an embodiment of the present application;
[0030] Figure 2 A schematic diagram of the logical architecture of a quantized neural network security reasoning method based on a trusted execution environment provided for one embodiment of the present application;
[0031] Figure 3 A schematic diagram of comparing the accuracy of the present application and the existing security reasoning anti-model theft provided for an embodiment of the present application;
[0032] Figure 4 A schematic diagram of comparing the accuracy of the present application with that of an existing security reasoning solution provided for an embodiment of the present application;
[0033] Figure 5 A flowchart of a quantized neural network security reasoning method based on a trusted execution environment applied to an online reasoning stage according to an embodiment of the present application;
[0034] Figure 6 A schematic diagram of fingerprint concealment comparison between the present application and the existing solution provided for an embodiment of the present application;
[0035] Figure 7 A schematic diagram of a secure quantitative reasoning process provided for an embodiment of the present application;
[0036] Figure 8 A schematic diagram of the comparison of the inference delay between the present application and the existing solution provided for an embodiment of the present application;
[0037] Fig. 9 A schematic diagram of comparing the accuracy of the present application with that of an existing security reasoning solution provided for an embodiment of the present application;
[0038] Fig.10 This is an example diagram of a quantized neural network security reasoning device based on a trusted execution environment applied to an offline deployment stage according to an embodiment of the present application;
[0039] Fig.11 This is an example diagram of a quantized neural network security reasoning device based on a trusted execution environment applied to an online reasoning stage according to an embodiment of the present application;
[0040] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0041] Among them, 10-a quantized neural network security reasoning device based on a trusted execution environment applied in the offline deployment stage, 20-a quantized neural network security reasoning device based on a trusted execution environment applied in the online reasoning stage; 101-fine-tuning module, 102-splitting module, 103-segmentation module; 201-adding module, 202-reasoning module, 203-integrity verification module; 1201-memory, 1202-processor, 1203-communication interface. DETAILED DESCRIPTION
[0042] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0043] The following describes the quantized neural network security reasoning method and device based on a trusted execution environment according to an embodiment of the present application with reference to the accompanying drawings. The existing security reasoning method mentioned in the above background technology is only designed for the full-precision floating-point model, and does not consider the compatibility with the quantized neural network, resulting in serious integer overflow problems in the reasoning process. The accuracy of the quantized neural network is degraded to the level of random guessing, which completely destroys the model availability; in addition, due to the limited data representation space, the model confidentiality and reasoning integrity are also facing huge threats. The present application provides a quantized neural network security reasoning method based on a trusted execution environment. In this method, the target reasoning data is submitted to a preset edge TEE batch, and a preset fingerprint challenge value is added to the target reasoning data to obtain mixed reasoning data; the mixed reasoning data is subjected to an arrangement order obfuscation operation to generate obfuscated reasoning data, and the mixed reasoning data is obtained through the edge The quantization parameters preset in the TEE quantize and re-quantize the obfuscated reasoning data to obtain the quantized reasoning data, encrypt the quantized reasoning data according to the preset OTP algorithm, and accelerate the reasoning processing of the encrypted quantized reasoning data based on the preset edge REE, and use the edge TEE to perform dequantization and de-obfuscation operations on the encrypted reasoning data after accelerated reasoning processing to generate the reasoning result; judge whether the reasoning result meets the preset reasoning integrity requirements, and if the reasoning result meets the preset reasoning integrity requirements, the reasoning result is fed back to the target user through the edge TEE, thereby protecting the quantitative model reasoning under low latency, high precision and high security, preventing the adversary from stealing the model or tampering with the reasoning results, protecting the precious intellectual property rights of the model provider and improving the service quality. In this way, the integer overflow error caused by the existing security reasoning method is solved, which greatly affects the accuracy of the quantitative neural network model.
[0044] Specifically, Figure 1 A flowchart of a quantized neural network security reasoning method based on a trusted execution environment applied in an offline deployment phase provided in an embodiment of the present application.
[0045] like Figure 1 As shown, the quantized neural network security reasoning method based on a trusted execution environment includes the following steps:
[0046] In step S101, in a cloud server of a preset model provider, a preset private model is fine-tuned according to a preset parameter similarity strategy to generate a protected private model.
[0047] In the offline deployment stage, the embodiments of the present application can firstly use the preset parameter similarity function module in the cloud server of the model provider to fine-tune the private model, such as Figure 2 As shown, a protected private model is obtained.
[0048] Therefore, the embodiments of the present application introduce a parameter dissimilarity module in the training process to utilize the information bottleneck theory to reduce the mutual information between the private model and the publicly available model, thereby reducing the similarity of the parameter distribution between the two, thereby resisting powerful model stealing attacks and preventing the model from being stolen by the adversary.
[0049] Optionally, in one embodiment of the present application, the preset private model is fine-tuned according to a preset parameter desimilarity strategy to generate a protected private model, including: determining the self-information entropy and mutual information optimization objective function of the preset private model based on the preset information bottleneck theory and the overall optimization objective function; determining the alternative optimization objective function of the preset private model according to the self-information entropy and mutual information optimization objective function and a preset reverse optimization strategy, and calculating the mutual information between the preset private model and the preset public model through the alternative optimization objective function; iteratively optimizing the alternative optimization objective function until the mutual information meets the preset optimization similarity requirements to generate a protected private model.
[0050] It should be understood by those skilled in the art that due to the private model M vic Too many public models are included in M pub The information between the two is the mutual information I(M vic ,M pub ) is too high, it is easy to generate a model stealing attack with high attack accuracy based on the parameter similarity between the private model and the public model.
[0051] In order to resist model stealing attacks, the embodiment of the present application can reduce the mutual information between the two based on the information bottleneck theory, and the overall optimization objective function is as follows:
[0052]
[0053] Among them, X and y GT represents the training data and its labels, λ1 and λ2 are Lagrangian operators.
[0054] It should be noted that the first two items of the above overall optimization objective function can be completed through conventional training. The difficulty of removing similarity lies in optimizing I(M vic ,M pub ). According to the mutual information definition, the embodiment of the present application can expand the third term into the following form:
[0055] I(M vic ,M pub )=H(M vic )-H(M bic ∣M pub ),
[0056] Among them, H represents information entropy.
[0057] From the above formula, we can see that minimizing mutual information should make the private model self-information entropy H(M vic ) is as large as possible, the conditional entropy H(M vic ∣M pub ) is as small as possible, and the private model self-information entropy can be expanded as follows:
[0058]
[0059] Here, p(·) represents the distribution of specific parameters.
[0060] Since the neural network parameters approximately follow Gaussian distribution, the embodiment of the present application can define the mean and variance of the parameter distribution of each layer as and Then we have:
[0061]
[0062] It can be seen that the model self-information entropy is proportional to the variance of its distribution. Usually, the mean of the model parameters is close to 0, so the optimization goal of its self-information entropy is:
[0063]
[0064]
[0065] Therefore, the embodiment of the present application may use L2 regularization as an alternative optimization target for self-information entropy. The embodiment of the present application may use a reverse optimization strategy, that is, use the Euclidean distance to increase the difference in parameter distribution between the private model and the public model. The final optimization objective function is as follows:
[0066]
[0067] By iteratively optimizing the above formula, the similarity between the private model and the public model parameters can be greatly reduced, such as Figure 3 As shown, this can resist model stealing attacks.
[0068] Therefore, the embodiment of the present application resists the most advanced model stealing attack through the parameter dissimilarity module, and the parameter dissimilarity module hardly reduces the model accuracy, and can reduce the mutual information between the private model and the public model based on the information bottleneck theory, thereby reducing the relative accuracy of the model stealing attack from 4.0× to 1.29×.
[0069] In step S102, the protection private model in the cloud server is extracted through the preset edge TEE, and multiple target operators and multiple target parameters in the protection private model are split.
[0070] In step S103, a pre-calculation operation is performed on multiple target operators and multiple target parameters to obtain a main operator for protecting a private model, so as to partition the main operator into a preset edge REE for protection according to a preset partitioning strategy.
[0071] Furthermore, the embodiments of the present application can extract the protected private model issued by the cloud server through the edge TEE, and split its operators and parameters; thereafter, the embodiments of the present application can use the edge TEE to perform necessary pre-computation operations for the reasoning integrity verification module and the security quantization reasoning module, thereby preparing for the online reasoning stage, and finally, through the edge TEE, the main operator is divided into the edge REE for protection according to the partitioning strategy formulated by the model provider.
[0072] Optionally, in one embodiment of the present application, a protection private model in a cloud server is extracted through a preset edge TEE, and multiple target operators and multiple target parameters in the protection private model are split, including: determining multiple target operators, multiple target parameters, and target range parameters of the protection private model; splitting multiple target operators and multiple target parameters according to the target range parameters.
[0073] It should be noted that, in the above-mentioned parameter de-similarity protection process, confusion space is reserved for the secure quantization reasoning module. Therefore, the embodiment of the present application can improve the adaptive range clipping training to compensate for the accuracy loss caused by range clipping.
[0074] Specifically, the embodiment of the present application may first define the quantization intermediate results and parameters, as shown in the following formula:
[0075]
[0076]
[0077] Among them, x represents the intermediate result, w represents the model parameter, Q x (x) and Q w (w) represent the intermediate results and parameters after dequantization respectively.
[0078] In order to reserve space for the security quantization reasoning module, the embodiment of the present application innovatively sets the range parameter to Since there is no parameter confusion involved, the parameter quantization space can be a full 8-bit, that is: On this basis, a single forward reasoning can be expressed as follows:
[0079]
[0080] By evaluating the reverse gradient of the forward reasoning based on the gradient pass-through and performing iterative optimization, a highly accurate protected model can be obtained. Figure 4 As shown in Figure 2, the distribution of the protected model changes dramatically compared to the unprotected model; the protected model can reduce the accuracy of model stealing attacks from 6.55× to 1.29×, as shown in Figure 2. Figure 3 As shown, the existing method is only as low as 3.30×, which fully demonstrates the effectiveness of the embodiment of the present application in protecting the confidentiality of the model.
[0081] According to the quantized neural network security reasoning method based on a trusted execution environment applied to the offline deployment stage proposed in the embodiment of the present application, the preset private model is fine-tuned in the cloud server of the preset model provider according to the preset parameter desimilarity strategy to generate a protected private model; the protected private model in the cloud server is extracted through the preset edge TEE, and multiple target operators and multiple target parameters in the protected private model are split; pre-calculation operations are performed on the multiple target operators and multiple target parameters to obtain the main operator of the protected private model, so as to partition the main operator into the preset edge REE for protection according to the preset partitioning strategy, thereby protecting the quantized model reasoning with low latency, high precision and high security, preventing the adversary from stealing the model or tampering with the reasoning results, protecting the precious intellectual property rights of the model provider and improving the service quality.
[0082] Figure 5 A flowchart of a quantized neural network security reasoning method based on a trusted execution environment applied to an online reasoning stage provided in an embodiment of the present application.
[0083] like Figure 5 As shown, the quantized neural network security reasoning method based on a trusted execution environment includes the following steps:
[0084] In step S501, target inference data is submitted to a preset edge TEE batch, and a preset fingerprint challenge value is added to the target inference data to obtain hybrid inference data.
[0085] In the online reasoning stage, the embodiment of the present application can first obtain hybrid reasoning data by allowing the user to submit reasoning data in batches to the edge TEE, and the reasoning integrity verification module adds a fingerprint challenge value to the batch reasoning data.
[0086] Optionally, in one embodiment of the present application, a preset fingerprint challenge value is added to the target reasoning data to obtain mixed reasoning data, including: randomly sampling multiple basic fingerprints within a preset sampling interval, and determining a fingerprint challenge value that meets a preset distribution requirement based on the multiple basic fingerprints; inserting the fingerprint challenge value into the target reasoning data to generate mixed reasoning data.
[0087] In the actual execution process, the embodiment of the present application can firstly perform reasoning on normal data and calculate the mean μ(IR) and variance σ(IR) of the intermediate result distribution. 2 , and obtain the result distribution after the statistical data converges:
[0088] Afterwards, the inference integrity detection module randomly generates several basic fingerprints. Randomly sample from the TEE and infer the response set {OP x (FP1)=RR1,…,OP x (FP N )=RR N}.
[0089] In the inference phase, randomly select T basic fingerprints, and then generate a new fingerprint (i.e. fingerprint challenge value) as shown below: new :
[0090]
[0091] According to the reproducibility of the normal distribution, FP new It also obeys Gaussian distribution, and its mean and variance are as follows:
[0092]
[0093]
[0094] Right now
[0095] Therefore, the fingerprint challenge value generated by the embodiment of the present application has a consistent distribution with the intermediate result, such as Figure 6 As shown, it is unrecognizable to the attacker. Based on the reproducibility of the normal distribution, the inference integrity detection module implements detection by generating fingerprints that are indistinguishable to the adversary, which can achieve accurate integrity violation detection and prevent the adversary from changing the parameters in the REE and thus leading to QNN decision errors.
[0096] In step S502, an arrangement order obfuscation operation is performed on the mixed reasoning data to generate obfuscated reasoning data, and the obfuscated reasoning data is quantized and re-quantized using the quantization parameters preset in the edge TEE to obtain quantized reasoning data, the quantized reasoning data is encrypted according to the preset OTP algorithm, and based on the preset edge REE, the encrypted quantized reasoning data is accelerated for reasoning processing, and the edge TEE is used to perform dequantization and de-obfuscation operations on the encrypted reasoning data after the accelerated reasoning processing to generate an reasoning result.
[0097] Furthermore, the embodiments of the present application also need to perform an arrangement order obfuscation operation on the mixed reasoning data to generate obfuscated reasoning data; secondly, the embodiments of the present application can use the Taoge secure quantization reasoning module to quantize and re-quantize the obfuscated reasoning data (i.e., the intermediate result) using the quantization parameters protected in the TEE, and encrypt the intermediate result using the OTP encryption algorithm and transmit it to the edge REE for accelerated reasoning. After the reasoning is completed, the result of the accelerated reasoning is dequantized and deobfuscated in the edge TEE to generate the reasoning result.
[0098] It should be noted that the embodiment of the present application creates space for the intermediate result obfuscation security mechanism of the secure quantization reasoning module by narrowing the quantization range, thereby preventing 8-bit reasoning overflow and effectively avoiding the decline in accuracy; the embodiment of the present application designs a quantization manager to protect the confidentiality of the model during the reasoning stage. The module protects key re-quantization scale parameters in the TEE, and offloads complex reasoning operations to the rich execution environment for acceleration; in addition, the intermediate results of the embodiment of the present application can be encrypted using a one-time pad (OTP) for secure transmission to protect the re-quantization scale parameters from analytical attacks. In this case, the adversary cannot perform precise reasoning outside the TEE, nor can it derive the plaintext model parameters, thereby effectively improving the QNN reasoning speed while ensuring security.
[0099] Optionally, in one embodiment of the present application, based on a preset edge REE, accelerated reasoning processing is performed on the encrypted quantized reasoning data, and the edge TEE is used to perform dequantization and deobfuscation operations on the encrypted reasoning data after accelerated reasoning processing to generate an reasoning result, including: performing intensive matrix multiplication operations on the encrypted quantized reasoning data in the edge REE to obtain an accelerated reasoning result; determining two target deobfuscation keys, and restoring the accelerated reasoning result using the two target deobfuscation keys in the edge TEE, and generating an reasoning result based on the restored accelerated reasoning result and a preset activation function.
[0100] Specifically, the embodiments of the present application can manage the calculation and transmission of data flow during the reasoning process through the secure quantization reasoning module, and the reasoning process of a single OP is as follows: Figure 7 shown.
[0101] When receiving batch data x When performing inference, it is quantized to x q , then, OTP is applied to the batch data for protection, and its mathematical expression is as follows:
[0102] x′ q =x q +r,
[0103] Among them, r is the OTP that has been prepared during pre-calculation, and its data range is limited to 7-bit to avoid overflow. At this time, x q The data range is also limited to 7-bit, so x′ q The range will not exceed 8-bit and will not cause overflow.
[0104] To ensure security, any OTP is used only once. In this embodiment of the application, two deobfuscation keys may be defined as follows:
[0105] s q =s x S w ,
[0106]
[0107] The security quantification reasoning process is described as follows:
[0108]
[0109] Among them, the edge REE accelerates the execution of computationally intensive matrix multiplication, and the edge TEE uses the deobfuscation key s q With b q Perform lightweight inference result recovery, and process the recovered results with activation functions such as ReLU as needed to obtain accurate results of security inference at the current layer, such as Figure 8 As shown, the reasoning speed of the embodiment of the present application is the lowest compared with the existing security reasoning scheme, which fully demonstrates the timeliness of the reasoning of the embodiment of the present application.
[0110] Therefore, the embodiment of the present application uses a secure quantization reasoning module to achieve model confidentiality of the quantized neural network while accelerating reasoning with the help of a rich execution environment; in addition, the quantization reasoning module effectively solves the overflow problem based on quantization range compression, thereby maintaining the high accuracy of the model. Compared with reasoning completely in a trusted execution environment, the reasoning speed of the embodiment of the present application is increased by more than 8 times.
[0111] In step S503, it is determined whether the inference result meets the preset inference integrity requirement, and if the inference result meets the preset inference integrity requirement, the inference result is fed back to the target user through the edge TEE.
[0112] Furthermore, the embodiment of the present application verifies the reasoning integrity through the reasoning integrity verification module, and when the reasoning result passes the reasoning integrity verification, the reasoning result is fed back to the user through the edge TEE.
[0113] Optionally, in one embodiment of the present application, the mathematical expression of the preset reasoning integrity requirement is:
[0114]
[0115] Among them, FP new represents the fingerprint challenge value; T represents the number of basic fingerprints; RR i Indicates the response value of the fingerprint challenge value; OP x Represents the operator with sequence number x.
[0116] It should be noted that the mathematical expression required for reasoning integrity is:
[0117]
[0118] Among them, FP new represents the fingerprint challenge value; T represents the number of basic fingerprints; RR i Indicates the response value of the fingerprint challenge value; OP x Represents the operator with sequence number x.
[0119] If the inference result satisfies the above formula, it can be considered that the integrity of the batch of inference data is not damaged. Otherwise, it is considered that the integrity of the inference is damaged, so a warning is issued and further processing is performed.
[0120] Therefore, the embodiments of the present application detect the inference integrity in real time based on the indiscernible fingerprint matching scheme through the inference integrity detection module, thereby achieving 100% integrity violation detection with extremely low computational overhead, and the adversary cannot bypass the detection.
[0121] In summary, the embodiments of the present application innovatively design a secure quantization inference module to solve the integer overflow error caused by the existing method, protect the model security inference under high precision, and use the number removal similarity module to resist powerful model stealing attacks. At the same time, a reasoning integrity verification module is designed to verify the integrity of the reasoning result in real time. Fig. 9 As shown, compared with the accuracy of traditional models, the security reasoning method of the embodiment of the present application is compatible with QNN and will not introduce excessive model accuracy degradation.
[0122] According to the quantized neural network security reasoning method based on a trusted execution environment applied to the online reasoning stage proposed in the embodiment of the present application, the target reasoning data is submitted to a preset edge TEE batch, and a preset fingerprint challenge value is added to the target reasoning data to obtain mixed reasoning data; an arrangement order obfuscation operation is performed on the mixed reasoning data to generate obfuscated reasoning data, and the obfuscated reasoning data is quantized and re-quantized by the quantization parameters preset in the edge TEE to obtain quantized reasoning data, the quantized reasoning data is encrypted according to the preset OTP algorithm, and based on the preset edge REE, the encrypted quantized reasoning data is accelerated reasoning processing, and the edge TEE is used to perform dequantization and deobfuscation operations on the encrypted reasoning data after the accelerated reasoning processing to generate an reasoning result; it is determined whether the reasoning result meets the preset reasoning integrity requirements, and if the reasoning result meets the preset reasoning integrity requirements, the reasoning result is fed back to the target user through the edge TEE, thereby protecting the quantitative model reasoning with low latency, high precision, and high security, preventing the adversary from stealing the model or tampering with the reasoning result, protecting the precious intellectual property rights of the model provider, and improving the service quality.
[0123] Secondly, the quantized neural network security reasoning device based on a trusted execution environment proposed according to the embodiment of the present application is described with reference to the accompanying drawings.
[0124] Fig.10 It is a block diagram of a quantized neural network security reasoning device based on a trusted execution environment applied to an offline deployment stage of an embodiment of the present application.
[0125] like Fig.10 As shown, the quantized neural network security reasoning device 10 based on a trusted execution environment includes: a fine-tuning module 101, a splitting module 102 and a segmentation module 103.
[0126] The fine-tuning module 101 is used to fine-tune the preset private model in the cloud server of the preset model provider according to the preset parameter similarity strategy to generate a protected private model.
[0127] The splitting module 102 is used to extract the protection private model in the cloud server through the preset edge TEE, and split the multiple target operators and multiple target parameters in the protection private model.
[0128] The segmentation module 103 is used to perform pre-calculation operations on multiple target operators and multiple target parameters to obtain main operators for protecting private models, so as to segment the main operators into preset edge REEs for protection according to a preset partitioning strategy.
[0129] Optionally, in one embodiment of the present application, the fine-tuning module 101 includes: a first determining unit, a calculating unit and an optimizing unit.
[0130] Among them, the first determination unit is used to determine the self-information entropy and mutual information optimization objective function of the preset private model based on the preset information bottleneck theory and the overall optimization objective function.
[0131] A calculation unit is used to determine a substitute optimization objective function of a preset private model according to the self-information entropy and mutual information optimization objective function and a preset reverse optimization strategy, and calculate the mutual information between the preset private model and the preset public model through the substitute optimization objective function.
[0132] The optimization unit is used for iteratively optimizing the alternative optimization objective function until the mutual information meets the preset optimization similarity requirement to generate a protected private model.
[0133] Optionally, in one embodiment of the present application, the splitting module 102 includes: a second determining unit and a decomposing unit.
[0134] The second determination unit is used to determine multiple target operators, multiple target parameters and target range parameters for protecting the private model.
[0135] A decomposition unit is used to split a plurality of target operators and a plurality of target parameters according to a target range parameter.
[0136] According to the embodiment of the present application, a quantized neural network security reasoning device based on a trusted execution environment for offline deployment stage is proposed, including a fine-tuning module, which is used to fine-tune the preset private model in the cloud server of the preset model provider according to the preset parameter de-similarity strategy to generate a protected private model; a splitting module, which is used to extract the protected private model in the cloud server through the preset edge TEE, and split multiple target operators and multiple target parameters in the protected private model; a segmentation module, which is used to perform pre-calculation operations on multiple target operators and multiple target parameters to obtain the main operator of the protected private model, so as to partition the main operator into the preset edge REE for protection according to the preset partitioning strategy, thereby protecting the quantized model reasoning with low latency, high precision and high security, preventing the adversary from stealing the model or tampering with the reasoning results, protecting the precious intellectual property rights of the model provider and improving the service quality.
[0137] Fig.11 It is a block diagram of a quantized neural network security reasoning device based on a trusted execution environment applied to an online pre-stage according to an embodiment of the present application.
[0138] like Fig.11 As shown, the quantized neural network security reasoning device 20 based on a trusted execution environment applied to the online reasoning stage includes: an adding module 201, a reasoning module 202 and an integrity verification module 203.
[0139] Among them, the adding module 201 is used to submit the target reasoning data to the preset edge TEE batch, and add the preset fingerprint challenge value to the target reasoning data to obtain mixed reasoning data.
[0140] The reasoning module 202 is used to perform an arrangement order obfuscation operation on the mixed reasoning data to generate obfuscated reasoning data, and quantize and re-quantize the obfuscated reasoning data through the quantization parameters preset in the edge TEE to obtain quantized reasoning data, encrypt the quantized reasoning data according to the preset OTP algorithm, and based on the preset edge REE, accelerate the reasoning processing of the encrypted quantized reasoning data, and use the edge TEE to perform dequantization and de-obfuscation operations on the encrypted reasoning data after the accelerated reasoning processing to generate an reasoning result.
[0141] The integrity verification module 203 is used to determine whether the inference result meets the preset inference integrity requirement, and if the inference result meets the preset inference integrity requirement, the inference result is fed back to the target user through the edge TEE.
[0142] Optionally, in one embodiment of the present application, the adding module 201 includes: a sampling unit and an inserting unit.
[0143] The sampling unit is used to randomly sample multiple basic fingerprints within a preset sampling interval, and determine a fingerprint challenge value that meets a preset distribution requirement based on the multiple basic fingerprints.
[0144] The inserting unit is used to insert the fingerprint challenge value into the target inference data to generate hybrid inference data.
[0145] Optionally, in one embodiment of the present application, the reasoning module 202 includes: an accelerated reasoning unit and a recovery unit.
[0146] Among them, the accelerated inference unit is used to perform intensive matrix multiplication operations on the encrypted quantized inference data in the edge REE to obtain accelerated inference results.
[0147] The recovery unit is used to determine two target deobfuscation keys, and use the two target deobfuscation keys to recover the accelerated reasoning results in the edge TEE, and generate the reasoning results based on the recovered accelerated reasoning results and the preset activation function.
[0148] Optionally, in one embodiment of the present application, the mathematical expression of the preset reasoning integrity requirement is:
[0149]
[0150] Among them, FP new represents the fingerprint challenge value; T represents the number of basic fingerprints; RR iIndicates the response value of the fingerprint challenge value; OP x Represents the operator with sequence number x.
[0151] It should be noted that the aforementioned explanation of the embodiment of the quantized neural network security reasoning method based on a trusted execution environment is also applicable to the quantized neural network security reasoning device based on a trusted execution environment of this embodiment, and will not be repeated here.
[0152] According to the embodiment of the present application, a quantized neural network security reasoning device based on a trusted execution environment applied to the online reasoning stage includes an adding module for submitting target reasoning data to a preset edge TEE batch, and adding a preset fingerprint challenge value to the target reasoning data to obtain mixed reasoning data; a reasoning module for performing an arrangement order obfuscation operation on the mixed reasoning data to generate obfuscated reasoning data, and quantizing and requantizing the obfuscated reasoning data through a quantization parameter preset in the edge TEE to obtain quantized reasoning data, encrypting the quantized reasoning data according to a preset OTP algorithm, and accelerating the reasoning processing of the encrypted quantized reasoning data based on a preset edge REE, and using the edge TEE to perform dequantization and deobfuscation operations on the encrypted reasoning data after the accelerated reasoning processing to generate a reasoning result; an integrity verification module for determining whether the reasoning result meets the preset reasoning integrity requirement, and when the reasoning result meets the preset reasoning integrity requirement, the reasoning result is fed back to the target user through the edge TEE, thereby protecting the quantitative model reasoning under low latency, high precision, and high security conditions, preventing the adversary from stealing the model or tampering with the reasoning result, protecting the precious intellectual property rights of the model provider, and improving the service quality.
[0153] Fig.12 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0154] A memory 1201 , a processor 1202 , and a computer program stored in the memory 1201 and executable on the processor 1202 .
[0155] When the processor 1202 executes the program, the quantized neural network security reasoning method based on the trusted execution environment provided in the above embodiment is implemented.
[0156] Furthermore, the electronic device further comprises:
[0157] The communication interface 1203 is used for communication between the memory 1201 and the processor 1202 .
[0158] The memory 1201 is used to store computer programs that can be executed on the processor 1202 .
[0159] The memory 1201 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0160] If the memory 1201, the processor 1202 and the communication interface 1203 are implemented independently, the communication interface 1203, the memory 1201 and the processor 1202 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0161] Optionally, in a specific implementation, if the memory 1201, the processor 1202 and the communication interface 1203 are integrated on a chip, the memory 1201, the processor 1202 and the communication interface 1203 can communicate with each other through an internal interface.
[0162] The processor 1202 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0163] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned quantized neural network security reasoning method based on a trusted execution environment.
[0164] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0165] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0166] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0167] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.
[0168] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0169] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0170] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0171] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A quantized neural network security reasoning method based on a trusted execution environment, characterized in that: Applied to the offline deployment stage, including the following steps: In a cloud server of a preset model provider, fine-tune the preset private model according to a preset parameter de-similarity strategy to generate a protected private model; Extracting the protection private model in the cloud server through a preset edge TEE, and splitting multiple target operators and multiple target parameters in the protection private model; A pre-calculation operation is performed on the multiple target operators and the multiple target parameters to obtain the main operators of the protected private model, so as to partition the main operators into preset edge REEs for protection according to a preset partitioning strategy.
2. The method according to claim 1, characterized in that The method of fine-tuning the preset private model according to the preset parameter similarity removal strategy to generate a protected private model includes: Based on the preset information bottleneck theory and the overall optimization objective function, determine the self-information entropy and mutual information optimization objective function of the preset private model; Determine a substitute optimization objective function of the preset private model according to the self-information entropy and mutual information optimization objective function and a preset reverse optimization strategy, and calculate the mutual information between the preset private model and the preset public model through the substitute optimization objective function; The alternative optimization objective function is iteratively optimized until the mutual information meets a preset optimization similarity requirement to generate the protected private model.
3. The method according to claim 2, characterized in that The extracting the protection private model in the cloud server through the preset edge TEE, and splitting the multiple target operators and multiple target parameters in the protection private model, includes: Determining the plurality of target operators, the plurality of target parameters and a target range parameter of the protection private model; The plurality of target operators and the plurality of target parameters are split according to the target range parameter.
4. A quantized neural network security reasoning method based on a trusted execution environment, characterized in that: Applied to the online reasoning stage, it includes the following steps: Submitting target reasoning data to a preset edge TEE batch, and adding a preset fingerprint challenge value to the target reasoning data to obtain hybrid reasoning data; Performing an arrangement order obfuscation operation on the mixed reasoning data to generate obfuscated reasoning data, and quantizing and requantizing the obfuscated reasoning data using a quantization parameter preset in the edge TEE to obtain quantized reasoning data, encrypting the quantized reasoning data according to a preset OTP algorithm, and performing accelerated reasoning processing on the encrypted quantized reasoning data based on a preset edge REE, and using the edge TEE to perform dequantization and deobfuscation operations on the encrypted reasoning data after the accelerated reasoning processing to generate a reasoning result; Determine whether the reasoning result meets the preset reasoning integrity requirement, and if the reasoning result meets the preset reasoning integrity requirement, feed back the reasoning result to the target user through the edge TEE.
5. The method according to claim 4, characterized in that The step of adding a preset fingerprint challenge value to the target reasoning data to obtain mixed reasoning data includes: Randomly sampling multiple basic fingerprints within a preset sampling interval, and determining a fingerprint challenge value that meets a preset distribution requirement based on the multiple basic fingerprints; The fingerprint challenge value is inserted into the target inference data to generate the hybrid inference data.
6. The method according to claim 4, characterized in that The method includes: performing accelerated reasoning processing on the encrypted quantized reasoning data based on the preset edge REE, and using the edge TEE to perform dequantization and deobfuscation operations on the encrypted reasoning data after the accelerated reasoning processing to generate a reasoning result, including: Performing a dense matrix multiplication operation on the encrypted quantized inference data in the edge REE to obtain an accelerated inference result; Two target deobfuscation keys are determined, and the accelerated reasoning result is restored in the edge TEE using the two target deobfuscation keys, and the reasoning result is generated based on the restored accelerated reasoning result and a preset activation function.
7. The method according to claim 4, characterized in that The mathematical expression of the preset reasoning integrity requirement is: Among them, FP new represents the fingerprint challenge value; T represents the number of basic fingerprints; RR i Represents the response value of the fingerprint challenge value; OP x Represents the operator with sequence number x.
8. A quantized neural network security reasoning device based on a trusted execution environment, characterized in that: Applicable to the offline deployment stage, including: A fine-tuning module, used to fine-tune the preset private model in a cloud server of a preset model provider according to a preset parameter de-similarity strategy to generate a protected private model; A splitting module, used to extract the protected private model in the cloud server through a preset edge TEE, and split multiple target operators and multiple target parameters in the protected private model; The segmentation module is used to perform pre-calculation operations on the multiple target operators and the multiple target parameters to obtain the main operators of the protected private model, so as to segment the main operators into preset edge REEs for protection according to a preset partitioning strategy.
9. A quantized neural network security reasoning device based on a trusted execution environment, characterized in that: Applied to the online reasoning stage, including: Add a module for submitting target reasoning data to a preset edge TEE batch and adding a preset fingerprint challenge value to the target reasoning data to obtain hybrid reasoning data; An inference module, configured to perform an arrangement order obfuscation operation on the mixed inference data to generate obfuscated inference data, and quantize and requantize the obfuscated inference data using a quantization parameter preset in the edge TEE to obtain quantized inference data, encrypt the quantized inference data according to a preset OTP algorithm, and perform accelerated inference processing on the encrypted quantized inference data based on a preset edge REE, and use the edge TEE to perform dequantization and deobfuscation operations on the encrypted inference data after the accelerated inference processing to generate an inference result; The integrity verification module is used to determine whether the inference result meets the preset inference integrity requirement, and if the inference result meets the preset inference integrity requirement, the inference result is fed back to the target user through the edge TEE.
10. The device according to claim 9, characterized in that The adding module comprises: A sampling unit, configured to randomly sample a plurality of basic fingerprints within a preset sampling interval, and determine a fingerprint challenge value that meets a preset distribution requirement according to the plurality of basic fingerprints; An inserting unit is used to insert the fingerprint challenge value into the target reasoning data to generate the mixed reasoning data.
Citation Information
Patent Citations
Calculation resource usage amount quantification method and device
CN111221629A
Information retrieval robustness method and system based on information bottleneck
CN117874175A
Method and device for realizing reasoning of neural network model
CN118194346A
Safety reasoning method, medium and device based on trusted execution environment
CN118246546A
Class agnostic repetition counting in video(s) utilizing a temporal self-similarity matrix
US20230274548A1
Cited By
Convolutional neural network reasoning method, device and equipment based on equipment-side trusted execution environment
CN119990310A
Privacy enhancement semantic communication method based on trusted execution environment security reasoning
CN120456003A
