# US 2024/0202316 A1 · Method, device and computer program product for generating neural network model

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0202316 A1
- Document ID: US20240202316A1
- Status: Published application
- Kind: A1
- Application number: 18/108,931
- Filed: 2023-02-13
- Published: 2024-06-20
- Earliest claimed: 2022-12-15
- Assignees: Dell Products L.P.
- Applicants: Dell Products L.P.
- Inventors: Tianxiang Chen; Jinpeng Liu; Anzhou Hou; Zhen Jia
- Web page: https://patentgrep.com/patent/US20240202316A1

## CPC

- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06N 3/02: Neural networks
- G06F 2221/2105: Dual mode as a secondary aspect
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Illustrative embodiments relate to a method, a device, and a computer program product for generating a neural network model. The method includes dividing the neural network model into multiple parts, wherein the multiple parts include a first part for processing an input to the neural network model and a second part for receiving an output from the first part. The method further includes converting, based on syntax for a trusted execution environment, a first part of code in source code of the neural network model and corresponding to the first part. The method further includes compiling the converted first part of code and a second part of code in the source code and corresponding to the second part; and arranging the compiled first part of code and the compiled second part of code respectively in the trusted execution environment and an untrusted execution environment for generating the neural network model.

## Claims

### Claim 1

A method for generating a neural network model, comprising:
dividing the neural network model into multiple parts, wherein the multiple parts comprise a first part for processing an input to the neural network model and a second part for receiving an output from the first part;
converting, based on syntax for a trusted execution environment, a first part of code in source code of the neural network model and corresponding to the first part;
compiling the converted first part of code and a second part of code in the source code and corresponding to the second part; and
arranging the compiled first part of code and the compiled second part of code respectively in the trusted execution environment and an untrusted execution environment for generating the neural network model.

### Claim 2 (depends on 1)

The method according to claim 1, wherein dividing the neural network model into multiple parts comprises:
determining a computational graph of the neural network model, wherein the computational graph comprises multiple operators; and
dividing the multiple operators into two sets of operators based on security of the input, wherein the two set of operators respectively correspond to the first part and the second part.

### Claim 3 (depends on 2)

The method according to claim 2, further comprising:
acquiring, from the source code, the first part of code corresponding to a first set of operators in the two sets of operators.

### Claim 4 (depends on 1)

The method according to claim 1, wherein converting the first part of code comprises:
converting the first part of code based on a hard coding rule.

### Claim 5 (depends on 1)

The method according to claim 1, wherein compiling the converted first part of code and the second part of code comprises:
generating, in the first part of code and the second part of code, an interface capable of communicating between the trusted execution environment and the untrusted execution environment.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising:
arranging, based on a programming language of the neural network model, a runtime environment in the trusted execution environment.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising:
acquiring configuration information of a multi-party computation frame for the trusted execution environment, wherein the configuration information comprises at least one of the following: multiple parties participating in computation of the neural network model; a runtime environment of the neural network model; an input address where the multi-party computation frame acquires an input from one of the multiple parties; or an output address where the multi-party computation frame returns a computation result to one of the multiple parties.

### Claim 8 (depends on 7)

The method according to claim 7, further comprising:
determining whether the trusted execution environment passes verification by each of the multiple parties; and
establishing, in response to that the trusted execution environment passes verification by each of the multiple parties, a secure communication channel between each of the multiple parties and the trusted execution environment.

### Claim 9 (depends on 7)

The method according to claim 7, further comprising:
acquiring encrypted data from the input address;
decrypting the encrypted data;
inputting the decrypted data into the first part of the neural network model to obtain an intermediate result; and
transmitting the intermediate result to the second part so as to train the neural network model.

### Claim 10 (depends on 9)

The method according to claim 9, further comprising:
returning, based on the configuration information, model parameters for the first part to the output address as the computation result.

### Claim 11

An electronic device, comprising:
at least one processor; and
a memory coupled to the at least one processor and having instructions stored therein, wherein the instructions, when executed by the at least one processor, cause the electronic device to execute actions comprising:
dividing a neural network model into multiple parts, wherein the multiple parts comprise a first part for processing an input to the neural network model and a second part for receiving an output from the first part;
converting, based on syntax for a trusted execution environment, a first part of code in source code of the neural network model and corresponding to the first part;
compiling the converted first part of code and a second part of code in the source code and corresponding to the second part; and
arranging the compiled first part of code and the compiled second part of code respectively in the trusted execution environment and an untrusted execution environment for generating the neural network model.

### Claim 12 (depends on 11)

The electronic device according to claim 11, wherein dividing the neural network model into multiple parts comprises:
determining a computational graph of the neural network model, wherein the computational graph comprises multiple operators; and
dividing the multiple operators into two sets of operators based on security of the input, wherein the two set of operators respectively correspond to the first part and the second part.

### Claim 13 (depends on 12)

The electronic device according to claim 12, wherein the actions further comprise:
acquiring, from the source code, the first part of code corresponding to a first set of operators in the two sets of operators.

### Claim 14 (depends on 11)

The electronic device according to claim 11, wherein converting the first part of code comprises:
converting the first part of code based on a hard coding rule.

### Claim 15 (depends on 11)

The electronic device according to claim 11, wherein compiling the converted first part of code and the second part of code comprises:
generating, in the first part of code and the second part of code, an interface capable of communicating between the trusted execution environment and the untrusted execution environment.

### Claim 16 (depends on 11)

The electronic device according to claim 11, wherein the actions further comprise:
arranging, based on a programming language of the neural network model, a runtime environment in the trusted execution environment.

### Claim 17 (depends on 11)

The electronic device according to claim 11, wherein the actions further comprise:
acquiring configuration information of a multi-party computation frame for the trusted execution environment, wherein the configuration information comprises at least one of the following: multiple parties participating in computation of the neural network model; a runtime environment of the neural network model; an input address where the multi-party computation frame acquires an input from one of the multiple parties; or an output address where the multi-party computation frame returns a computation result to one of the multiple parties.

### Claim 18 (depends on 17)

The electronic device according to claim 17, wherein the actions further comprise:
determining whether the trusted execution environment passes verification by each of the multiple parties; and
establishing, in response to that the trusted execution environment passes verification by each of the multiple parties, a secure communication channel between each of the multiple parties and the trusted execution environment.

### Claim 19 (depends on 17)

The electronic device according to claim 17, wherein the actions further comprise:
acquiring encrypted data from the input address;
decrypting the encrypted data;
inputting the decrypted data into the first part of the neural network model to obtain an intermediate result; and
transmitting the intermediate result to the second part so as to train the neural network model.

### Claim 20

A computer program product that is tangibly stored on a non-transitory computer-readable medium and comprises machine-executable instructions, wherein the machine-executable instructions, when executed by a machine, cause the machine to execute the following:
dividing a neural network model into multiple parts, wherein the multiple parts comprise a first part for processing an input to the neural network model and a second part for receiving an output from the first part;
converting, based on syntax for a trusted execution environment, a first part of code in source code of the neural network model and corresponding to the first part;
compiling the converted first part of code and a second part of code in the source code and corresponding to the second part; and
arranging the compiled first part of code and the compiled second part of code respectively in the trusted execution environment and an untrusted execution environment for generating the neural network model.
