Neural Network Model Encryption via Code Generation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Neural network models deployed on User Equipment (UE) face security issues as model information can be easily accessed, leading to potential exposure and poor security performance, especially when using existing encryption methods that require key storage and have efficiency limitations.
Innovation Solution
A method and device for encrypting neural network models by acquiring an encrypted model file through encryption of model information using a hash function, generating model program code, and creating a model library file, which is then sent to UE as an installation package, allowing secure execution without storing the original model file, thus enhancing security and efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the neural network model is deployed on User Equipment (UE), then the model can be executed locally, but model information can be easily accessed leading to poor security performance
Solution Approach 1:
The patent segments the model information into multiple encrypted parts and stores them in separate data structures within the code. The model weights are divided into multiple arrays (e.g., array1, array2, array3) that are encrypted separately and cannot be easily reconstructed, thus maintaining security while enabling local execution.
Solution Approach 2:
The patent introduces an intermediary encryption layer between the original model and the deployed code. A encryption module transforms the original model weights into encrypted form using a predetermined algorithm, creating an intermediate representation that can be executed but not easily reverse-engineered.
2Reliability
If existing encryption methods are used to encrypt the model file, then security is improved, but key storage is required and execution efficiency is reduced
Solution Approach 1:
The patent extracts the encryption keys from the deployment package and hardcodes them directly into the application source code during compilation. This eliminates the need for separate key storage files or external key management systems, reducing device complexity while maintaining security.
Solution Approach 2:
The encryption and compilation process is performed in advance during the build phase. The model is encrypted and the encryption keys are embedded into the code before deployment, so that at runtime no additional key management or decryption steps are required, improving execution efficiency.
3Ease of operation
If the original model file is stored on UE, then the model can be accessed, but storage space is consumed and security is compromised
Solution Approach 1:
The patent creates a transformed copy of the model where the weights are encrypted and embedded directly into the code structure. Instead of storing and accessing the original model file, the system uses this encrypted copy that is integrated into the executable, maintaining accessibility while improving security.
4Reliability
If the model file is encrypted using traditional methods, then security is improved, but decryption is required for execution reducing efficiency
Solution Approach 1:
The model encryption and key embedding are performed as preliminary actions during the compilation phase. The encrypted model weights are baked into the code structure beforehand, eliminating the need for runtime decryption operations and ensuring efficient execution while maintaining security.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
An encrypted model file is acquired (S101) by encrypting at least a part of model information in an original model file. The original model file describes a target neural network model. A model program code is generated (S102) according to the encrypted model file. The model program code describes the target neural network model. An installation package for installing an application (APP) is sent (S103) to a User Equipment (UE) based on a request sent by the UE. The installation package includes the model program code.