IP Library › Granted Patent US 11,886,554
Granted Patent B1
US 11,886,554 · App. 18/115,257 · Granted Jan 30, 2024

Method for protecting deep learning model based on confidential computing

Inventors: Lei Zhang (Jiaxing, CN); Wensheng Tian (Jiaxing, CN)
Assignee: Nanhu Laboratory
G06F21/121G06F21/602G06N3/08G06F21/1015
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,886,554
App. No.
18/115,257
Granted
Jan 30, 2024
Kind
B1
Abstract

The present invention discloses a method for protecting a deep learning model based on confidential computing. In this solution, a use process of a deep learning model is divided into two stages: Data preprocessing and inference. At the data preprocessing stage, a data preprocessing model is mainly used to process inference data of an authorized user. The data preprocessing model is a lightweight processing module, which occupies less computing resources, and the data preprocessing model is deployed in a confidential computing environment. At the inference stage, an inference model is used to perform inference on preprocessed data, and the inference model is deployed in a common computing environment. In the entire process, copyright attestation of the deep learning model can be implemented without affecting inference accuracy of the model, and the infringement of the model copyright can be effectively resisted through model forgery, transfer learning, knowledge distillation, and the like.

Claims (30)

1. A method for protecting a deep learning model based on confidential computing, wherein a preprocessing module having a data preprocessing model and an inference module having an inference model are comprised, the data preprocessing model is encrypted and deployed into a confidential computing environment; and

the method comprises:

S1: starting the preprocessing module in the confidential computing environment, and sending attestation information of the confidential computing environment to a model copyright owner server;

S2: receiving a attestation result returned by the model copyright owner server, and obtaining a decryption key for decrypting the data preprocessing model if the attestation result is correct, or exiting running if the attestation result is incorrect;

S3: decrypting the data preprocessing model by using the obtained decryption key, wherein the preprocessing module loads the decrypted data preprocessing model;

S4: preprocessing, by the data preprocessing model, to-be-inferred data submitted by an authorized user, and sending the preprocessed data to the inference model; and

S5: performing, by the inference model, inference on the preprocessed data, and then sending an inference result to the authorized user;

wherein the preprocessing module and the inference module are distributed to the authorized user in advance and are deployed on an authorized user end, and the preprocessing module and the inference module are distributed to the authorized user in the following manners:

encrypting a trained data preprocessing model by using an encryption algorithm;

packaging the encrypted data preprocessing model and preprocessing code as the preprocessing module;

packaging a trained inference model and inference code as the inference module;

distributing the preprocessing module and the inference module to the authorized user; and

deploying, by the authorized user, the preprocessing module to the confidential computing environment and deploying the inference module to a common computing environment; and

wherein a training method of the data preprocessing model comprises:

running the data preprocessing model and a pretraining model, randomizing parameter information in the models, and combining loss functions of the data preprocessing model and the pretraining model;

processing a data set by using the data preprocessing model, and sending preprocessed data to the pretraining model;

sending unprocessed original data to the pre-training model; and

training the pretraining model by using the original data and the preprocessed data, and selecting a combination of the data preprocessing model and the pretraining model with highest prediction accuracy.

2. The method for protecting a deep learning model based on confidential computing according to claim 1 , wherein in step S5, before the inference model is used, a model parameter is first loaded and the model is initialized; and

the preprocessing module comprises a confidential computing environment initialization module, and in step S1, the confidential computing environment initialization module is started in the confidential computing environment, and the confidential computing environment initialization module sends the attestation information of the confidential computing environment to the model copyright owner server; and in step S3, the confidential computing environment initialization module loads the decrypted data preprocessing model.

3. The method for protecting a deep learning model based on confidential computing according to claim 1 , wherein the inference model is deployed in a common computing environment.

4. The method for protecting a deep learning model based on confidential computing according to claim 1 , wherein in step S1 and step S2, the model copyright owner server verifies security of the confidential computing environment and integrity of the preprocessing module for the authorized user based on a remote attestation mechanism of the confidential computing environment, if a attestation result is safety and complete, the attestation result comprising the decryption key is returned to the confidential computing environment, and the attestation result is correct in this case; otherwise, the attestation result comprising no decryption key is returned, and the attestation result is incorrect in this case.

5. The method for protecting a deep learning model based on confidential computing according to claim 1 , wherein a training method of the inference model comprises:

running the trained data preprocessing model and the pretraining model, and fixing model parameter information;

running the inference model and setting an optimizer;

processing the data set by using the data preprocessing model;

sending the preprocessed data to the pretraining model and the inference model respectively, and sending the unprocessed original data to the inference model; and

training the inference model by using the original data and the preprocessed data, and optimizing a parameter of the inference model by using a prediction result of the pretraining model.

6. The method for protecting a deep learning model based on confidential computing according to claim 1 , wherein the data preprocessing model and the pretraining model share one loss function during training.

7. The method for protecting a deep learning model based on confidential computing according to claim 5 , wherein the inference model and the pretraining model have a same network structure.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 28, 2023
From: ZHANG, LEI; TIAN, WENSHENG
To: NANHU LABORATORY
Reel/Frame 062827/0821 →
Priority Claims (1)
CN 202211076002.X · Sep 5, 2022 · national
Cited By (2)
US 12,200,104 US 12,348,619