Next Article in Journal
Properties of Green Tea Waste as Cosmetics Ingredients and Rheology Enhancers
Previous Article in Journal
Effect of Primary Spruce Lamella Aging on the Bending Characteristics of Glulam Beams
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Privacy-Preserving Outsourced Artificial Neural Network Training for Secure Image Classification

1
School of Computer Science and Information Security, Guilin University of Electronic Technology, Guilin 541004, China
2
School of Mathematics and Computing Science, Guangxi Colleges and Universities Key Laboratory of Data Analysis and Computation, Guilin University of Electronic Technology, Guilin 541004, China
3
Center for Applied Mathematics of Guangxi (GUET), Guilin 541002, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2022, 12(24), 12873; https://doi.org/10.3390/app122412873
Submission received: 11 November 2022 / Revised: 7 December 2022 / Accepted: 12 December 2022 / Published: 14 December 2022
(This article belongs to the Section Computing and Artificial Intelligence)

Abstract

:
Artificial neural network (ANN) is powerful in the artificial intelligence field and has been successfully applied to interpret complex image data in the real world. Since the majority of images are commonly known as private with the information intended to be used by the owner, such as handwritten characters and face, the private constraints form a major obstacle in developing high-precision image classifiers which require access to a large amount of image data belonging to multiple users. State-of-the-art privacy-preserving ANN schemes often use full homomorphic encryption which result in a substantial overhead of computation and data traffic for the data owners, and are restricted to approximation models by low-degree polynomials which lead to a large accuracy loss of the trained model compared to the original ANN model in the plain domain. Consequently, it is still a huge challenge to train an ANN model in the encrypted-domain. To mitigate this problem, we propose a privacy-preserving ANN system for secure constructing image classifiers, named IPPNN, where the server is able to train an ANN-based classifier on the combined image data of all data owners without being able to observe any images using primitives, such as randomization and functional encryption. Our system achieves faster training time and supports lossless training. Moreover, IPPNN removes the need for multiple communications among data owners and servers. We analyze the security of the protocol and perform experiments on a large scale image recognition task. The results show that the IPPNN is feasible to use in practice while achieving high accuracy.

1. Introduction

Artificial Neural Network (ANN) learning is well-suited to tackle problems in which the training samples correspond to complex image data, such as inputs from video cameras and mobile phones [1]. In recent work, ANN has proven successful in text and image classification and is observed to achieve high accuracy in these tasks. Consequently, image classifier based on ANN has been widely used in many real-life fields [2,3,4]. Conceptually, ANN-based solutions rely on elaborate algorithms, but even more on large-scale training data. As the volume of data owned by a single user is insufficient to train reliable classifiers, aggregation of data is a solution to address the local limitations.
However, images are private mediums with the message intended to be used only by the owner. Due to the sensitive nature of the information content, there might be confidentiality and security constraints against sharing and using image data. These constraints form formidable obstacles in many image applications, including image classification [5], image synthesis [6], image retrieval [7,8], image sharing [9], and protection of location privacy in camera data of auto-driving vehicles [10]. As a consequence, the construction of privacy-preserving image classifiers is worth researching.
Existing approaches to train machine learning models in privacy-preserving settings mainly rely on secure multi-party computation [11], fully or partially homomorphic encryption [12,13,14,15] and secret sharing [16,17]. Most of these approaches have several limitations: (i) First, in traditional privacy-preserving machine learning schemes, the non-linear functions are hard to support using common cryptographic techniques, such as homomorphic encryption and boolean circuit. Hence, prior work proposes to approximate the non-linear function using polynomial or piecewise linear function [12,15,16,17,18]. It can be shown that approximation using a high-degree polynomial is able to provide a higher accuracy. While—to the best of our knowledge—for efficiency reasons, the degree of the approximation polynomial is limited to 5 or less, which results in a large accuracy loss of the trained model. (ii) Secondly, the majority of prior work requires multi-round communications between data users and servers [19,20,21,22,23,24,25,26], making a substantial overhead of computation and transmission cost. Furthermore, in practice, most of the users are unlikely to participate in the whole training process online. Consequently, the classifier needs to be learned only on encrypted image data without the help of users. Moreover, non-interactive setting is easy to extend to dynamical participation or dropping during the training phase.
The first known privacy-preserving scheme for neural network with non-interactive and lossless features simultaneously presented by [11], named NPMML. This method uses hybrid cryptographic techniques, including Paillier cryptosystem, RSA, and random mask to preserve data. Since the implementation of the NPMML utilizes multiple cryptosystems, the two servers need to interact several rounds for updating the parameters to accommodate the transformation of different masked techniques.
Towards this, we propose a solution that enables multiple users to share their private data to achieve a high-precision image classifier without violating privacy laws and communicating with the servers frequently. Specifically, we present a non-interactive and privacy-preserving image classifier based on an ANN model, named IPPNN. This scheme (i) substantially reduces the amount of communication required to train ANN model, which requires only one transmission for users; and (ii) does not require any approximation for non-linear functions and can support lossless training. To achieve these benefits, IPPNN orchestrates mask matrix and functional encryption for inner-product (FEIP) [27].
To summarize, our contributions are:
  • Non-Interactive. We propose IPPNN, a non-interactive and privacy-preserving image classifier based on ANN over distributed image data, which only requires communication between the users and the servers as a one-way interaction. Compared to interactive privacy-preserving ANN systems, our approach introduces less computation and communication overheads for the users.
  • High-Precision.IPPNN enables the building of high-precision image classification as it does not require the use of polynomials or linear piecewise function approximations to handle out the non-linear functions. IPPNN supports lossless classifier construction which does not alter any of the computation of the original ANN training algorithm.
  • Efficiency. We have implemented and evaluated the performance of IPPNN. For two popular MNIST datasets with a large amount of image data and high dimensionality, the experiments validate that IPPNN is several orders of magnitude faster than the state-of-the-art privacy-preserving ANN schemes without compromising the accuracy of classifiers.
The rest of paper is organized as follows. We review the related work in Section 2. In Section 3, we introduce ANN model and cryptographic primitive (functional encryption for inner-product). We overview the proposed privacy-preserving framework of IPPNN in the first part of Section 4, and the core idea and construction details of IPPNN is described in the latter part of Section 4. The security analysis and evaluation are presented in Section 5. The conclusion of our paper are presented in Section 6.

2. Related Work

Image processing is a well established field and has been researched extensively [4,28]. As the artificial intelligence (AI) and big data develop by leaps and bounds, the image-processing technology, such as image recognition [29], image classification [30], face recognition system [31], smart agriculture [3], lung cancer classification and prediction [2], surface defect detection system [32], are also renewing, people lead a more convenient and have a higher quality of life.
However, the application of AI techniques can cause privacy leakage and security risks since solutions based on AI are reliant on a large number of training samples commonly belonging to different users. To make effective and safe use of data distributed in different locations while satisfying privacy requirements, some approaches have incorporated privacy-preserving techniques into image processing [5,6,7,8,9,14,33]. For example, Fagbohungbe et al. [5] proposed a secure intelligent computing framework for image classification based on deep learning and edge computing. Yang et al. [6] presented a lightweight secure GAN framework for image synthesis based on secret sharing. Shen et al. [7] proposed a privacy-preserving medical image retrieval system based on blockchain.
Multiple privacy-preserving machine learning approaches have been presented for classification tasks. Prior work [19,20,21,22,23,24,25,26] proposed schemes with an interactive fashion which requires users to communicate with servers multiple rounds. The online computation resources constraints form an obstacle in developing based-AI classification systems. Although non-interactive approaches have been proposed in the last few years, most of fall into fully homomorphic encryption (FHE) [12,15] or secret sharing (SS) [16,17] algorithms. Protocols based-FHE are hardly to be applied in the real world due to a very considerable computation costs. Methods based on SS still have higher requirements for the network since the two servers need to communicate frequently. Our proposed privacy-preserving method for constructing image classifiers realizes non-interactive between users and servers. Moreover, the protocol is feasible and efficient to use in practice using functional encryption cryptographic scheme.
Due to the limitation of FHE and SS cryptographic primitive, some privacy computation schemes are forced to use polynomials or piecewise linear functions to appropriate original non-linear functions [15,16,17,18,26,34]. For support vector machines and logistic regression, the obtained model precision is acceptable. However, for neural network or deep learning, such approximation methods will cause a loss of precision, which is not comparable to the original model and can not be applied in production and life. Our method removes the need for the approximation functions. That is, the private training protocol does not alter the original ANN model and result in a loss of accuracy.
The closest approach to our IPPNN is the NPMML method [11], which is a non-interactive privacy-preserving multi-party neural network framework with a dual server architecture. The protocol is complicated for the reason that NPMML employs multiple cryptographic technologies to preserve data. The benefit of non-interactive and lossless features (quite similar to ours) comes with a substantial overhead of computation and communication costs. The detailed comparison of the IPPNN and the NPMML are covered in Section 5.6 and Section 5.7.

3. Preliminaries

3.1. Artificial Neural Network

Artificial neural network [35] provides a general method for learning non-linear functions and constructing prediction model from training samples. The most common architecture of ANN is composed of the input layer, multiple hidden layers, and the output layer. ANN models have proven successful in many practical problems, such as learning to recognize handwritten characters. Figure 1 shows an ANN model for image recognition.
Notation. Here, we suppose that the input data x = ( x 1 ; ; x a ) R a × 1 has a different features and each sample belongs to one of the c classes denoted by a label y = ( y 1 , , y c ) , the hidden layer has b neurons.
We represent the hidden layer weight matrix as W ( h ) R b × a . Each row of W ( h ) is a list of real numbers, which identifies a vector w j ( h ) = ( w j 1 ( h ) , , w j a ( h ) ) R 1 × a , j = 1 , , b . Similarly, we denote the matrix W ( o ) R c × b as an output layer weight matrix. Each row of W ( o ) identifies a vector w i ( o ) = ( w i 1 ( o ) , , w i b ( o ) ) R 1 × b , i = 1 , , c .
We call the last layer as the output layer
o = ( o 1 ; ; o c ) = g W ( o ) h R c × 1 ,
where h = ( h 1 ; ; h b ) = f ( W ( h ) x ) R b × 1 consists of all outputs of hidden layer. In specific, f ( w ( h ) x ) R is a sigmoid function f ( z ) = 1 1 + e z , where w ( h ) is a hidden layer weight vector. The function g in ANN can be a softmax function: g z k = e z k / i e z i . Note that in our privacy-preserving image classifier construction scheme based on ANN any activation function can substitute sigmoid function f or softmax function g.
Gradient descent algorithm. Considering cross entropy as the loss function,
E ( w ) = i = 1 c y i ln ( o i ) ,
where y i is the class label, o i is the output of prediction function, w denotes the model parameter.
Gradient descent search aims to determine a weight w * that minimizes E ( w ) by starting with an arbitrary initial weight. Then, the weight is altered in the direction that produces the steepest descent. The training rule for gradient descent is
w t + 1 w t η E ( w t )
where η is the learning rate, and E ( w t ) is the gradient computed at the tth iteration. This process continues until the global minimum is reached.
Derivation of the gradient descent rule. By selecting a mini-batch sample set S randomly from the whole database DB = { ( x ( 1 ) , y ( 1 ) ) , , ( x ( m ) , y ( m ) ) } , the gradient with respect to the output layer weight w i , j ( o ) in a 3-layer-perception becomes
E S w i , j ( o ) = 1 S l S ( o i ( l ) y i ( l ) ) h j ( l ) ,
where i = 1 , , c , j = 1 , , b .
Similarly, we update the hidden layer weight w j , k ( h ) via the formula as follows
E S w j , k ( h ) = 1 S l S h j ( l ) ( 1 h j ( l ) ) i = 1 c [ ( y i ( l ) o i ( l ) ) w i , j ( o ) ] x k ( l ) ,
where j = 1 , , b , k = 1 , , a .

3.2. Functional Encryption for Inner-Product (FEIP)

Functional encryption (FE) is a new paradigm of the public key that allows one party P 1 to learn a function of ciphertext encrypted by another party P 2 . In this paper, we employ a functional encryption for inner product (FEIP) scheme [27], which allows P 1 to compute the inner product between vectors x and y , where x is encrypted by P 2 and y is a plaintext vector given by P 1 . A FEIP scheme consists of five algorithms. More specific details of FEIP scheme refers to [27].
  • Setup: The setup algorithm takes a security parameter as input and generates a mathematical group.
  • Master key generation: The key generation algorithm creates a public key p k F E I P together with a master secret key m s k F E I P .
  • Functional key derivation: The functional key derivation algorithm takes the master secret m s k F E I P and the vector y as input to generate a functionally derived key d k y .
  • Encryption: The encryption algorithm applies to message vector x and obtains a ciphertext c t x by using the public key p k F E I P .
  • Decryption: Given the ciphertext c t x of a message x , the holder of the key d k y is able to compute the value of x , y using the decryption algorithm.
Consider the ANN training scenarios. The computation of inner product of weight vector w and training sample x is a formidable step during the ANN training in the encrypted domain. A user wants to keep his sample x private but lets a server be able to compute the inner product w , x . During the Setup phase, a trusted third-party authority ( TPA ) provides the public key to the user. Then, the user encrypts x and transfers the ciphertext to the server. In order to acquire w , x for the server, the TPA generates a functionally derived key that depends on the weight w . The server decrypts the ciphertext using the functionally derived key and obtains the result w , x . In this way, the server is able to perform the inner product operation while maintaining the privacy of the user.

4. The Framework and Construction for Privacy-Preserving Image Classifier

We first introduce the framework of our proposed scheme, IPPNN, which is shown in Figure 2. The goal is to build a high-precision image classifier using neural network model without revealing training samples belonging to the users. Additionally, IPPNN enables cooperative learning without a need for any peer-to-peer communication among users and servers.

4.1. System Model

IPPNN has four types of entities: a group of users, a neural network training server ( S NN ), an auxiliary server ( S AU ) which does not collude with S NN , and a trusted third-party authority ( TPA ) to enable functional encryption.
  • Users: Each user owns a dataset which contains multiple training samples and is willing to contribute his samples in a privacy-preserving way. In our system, the responsibility of a user is only to provide his data in well-designed encrypted version to the servers S AU and S NN .
  • S NN : A neural network training server to collaboratively build a global neural network model for image classification without model parameters information leakage. The server S NN orchestrates the private training process with the help of the server S AU . Finally, S NN is the owner of the image classifier.
  • S AU : An auxiliary server to help the trainer server S NN to complete a privacy-preserving neural network training. It does not possess any model updates parameters or optimized model weights.
  • TPA : A trusted third-party authority TPA is responsible for building the underlying cryptosystem, delivering the public key to each user and providing private key service to the server S AU .

4.2. Security Requirement

The main goal of IPPNN is to build an image classifier by training a neural network model: (i) without being able to observe any information belonging to the users; and (ii) without leaking the model parameters trained by the server S NN .
  • Honest-but-curious S NN : We assume that the server S NN correctly follows the IPPNN protocol, but may try to learn private information belonging to users from the processed information provided by S AU .
  • Honest-but-curious S AU : We assume that the server S AU correctly follows the IPPNN protocol, but may try to learn private training samples from the encrypted information provided by data owners, and try to learn the trained model parameters.
  • Trusted TPA : We assume that the TPA is an independent entity trusted by the users and the servers S NN and S AU .
We now present our privacy-preserving scheme for achieving an image classifier. We first introduce the idea of IPPNN model. Then, the data encryption algorithm and a detailed secure training process are presented.

4.3. Core Idea of the IPPNN

The main challenge in privacy-preserving machine learning is to compute the non-linear functions without at the expense of user privacy, which is hard to support using the existing cryptographic technologies, including homomorphic encryption, Boolean circuit, and secret sharing. Hence, prior work proposes to replace the non-linear functions by approximation polynomials or piece-wise linear functions. These substitutions can be computed using secure computation techniques efficiently.
Our IPPNN removes the need for the use of polynomial approximation by using FEIP scheme, and removes the multi-round communications between the users and servers by using mask matrix. Consequently, the private training protocol does not alter any of the computation of the original ANN training algorithm and, therefore, result in the same output, i.e., there is no accuracy loss in the secure version. In addition, our scheme ensures that any user can go offline after uploading the encrypted local data to the server.
In the IPPNN scheme, a user needs to encrypt his training data in two ways: (i) by the random matrix; and (ii) by the public key generated by the TPA .
Specifically, in the first encryption way, the encrypted data are deliberately defined a tuple ( A x , A 1 ) , where A is a random matrix chosen by the user. The pair ( A x , A 1 ) is split into two parts and sent to S AU and S NN , respectively. By exploiting the mask matrix A the server S AU will obtain the inner-product w · x . Combining the linear transformation w · x and non-linear activation function f ( · ) together, the output of neuron f ( w · x ) is sent to S NN by S AU . The operations for obtaining the gradient E S / w i , j ( o ) can be executed by the server S NN independently because the remainder computations only depend on model weights w and the provided label.
In the second encryption way, we observe that for obtaining the gradient E S / w j , k ( h ) the feature dimension secure aggregation are required. From the computation process of the gradient E S / w i , j ( o ) , we can obtain the coefficient u k ( l ) of the attribute x k ( l ) in the update rule (4), where u k ( l ) is defined by (7). In order to compute the gradient E S / w j , k ( h ) , the user encrypt his samples using the FEIP cryptosystem with the public key. With the functional-derived key depending on the vector consisting of the coefficients u k ( l ) , the server S NN is able to decrypt the ciphertext and acquire the gradient E S / w j , k ( h ) .

4.4. Description of Proposed Scheme

We construct a scheme for the 3-layer perception which includes three phases: system initialization, user data encryption, and privacy-preserving training. In the system initialization phase, TPA generates a master secret key and public key based on a given security parameter; in the data encryption phase, the user sends his samples blinded by a random mask matrix A to the S AU and the inverse of the matrix A 1 to the S NN , respectively, and transfer his encrypted sample attributes by the public key to the server S NN ; in the privacy-preserving training phase, the servers S AU and S NN coordinate the neural network training. More specific details of each stage are described as follows.

4.4.1. System Initialization

The TPA takes a security parameter λ as input and generates a group ( G , p , g ) and a master secret key m s k F E I P = s = ( s 1 , . . . , s l ) Z p l , where p is the order of group G generated by g G , p is a λ -bit prime number and must be chosen, such that p 1 has at least one large prime factor [36], l = | S | is the size of a mini-batch. The master key generation algorithm creates a public key p k F E I P = ( h i = g s i ) i [ l ] corresponding to s . Then, TPA distributes the public keys p k F E I P to the users, and provides private key service to the server S NN during the training phase.

4.4.2. Data Encryption

To preserve the data privacy, the user needs to encrypt each sample of his local dataset D. In the following, according to the main idea mentioned in Section 4.3 we present a customized method for protecting users data, adapting to create privacy-preserving ANN model by the S NN with the cooperation of the S AU .
Assume that dataset D includes m samples. We first choose a mask matrix A to generate a two-part ciphertext A 1 and A x where the two parts are utilized by the S NN and S AU , respectively. Specifically, the user selects a random non-singular matrix A Z a × a , then computes its inverse matrix A 1 Z a × a and the blinded data x ˜ = A x using A, and then finally sends the encrypted version x ˜ to the S AU , the matrix A 1 and labels { y ( 1 ) , , y ( m ) } to the S NN . Then, we divide the dataset D into m / l groups. For each group, we use the public key p k F E I P to encrypt the vector formed by the ith ( i = 1 , 2 , , a ) feature of all of the l samples. The obtained ciphertexts are sent to the server S NN .
The user data encryption approach is specified in Algorithm 1. The user sends A x ( i ) to the server S AU . Meanwhile, the user transfers A 1 with labels y to the the S NN . For IPPNN model, we require the user to share labels to the S NN in plaintext. Note that the single label vector y ( i ) is without violating privacy laws since y ( i ) does not contain any substantial information.
Algorithm 1 User data encryption and uploading.
Input: user dataset D = { ( x ( 1 ) , y ( 1 ) ) , , ( x ( m ) , y ( m ) ) } , batch size l, public key p k F E I P = ( h i = g s i ) i [ l ] .
Output: the blinded sample x ˜ ( i ) , i = 1 , 2 , , m , the encrypted vector for sample features.
  1:
Choose a random non-singular matrix A Z a × a and compute its inverse matrix A 1 Z a × a ;
  2:
for   i = 1 , 2 , , m   do
  3:
    Compute x ˜ ( i ) = A x ( i ) using the mask matrix A.
  4:
end for
  5:
Divide D into m / l groups. Each group contains l samples.
  6:
Add l ( m mod d ) random samples uniformly picked from D to the last group if m is not divisible by l.
  7:
for   i = 1 , 2 , , m / l do
  8:
    for  j = 1 , 2 , , a  do
  9:
         r Z p
10:
        Encrypt data sample features as
C t j ( i ) = E n c p k F E I P ( x j ( ( i 1 ) l + 1 ) , , x j ( i l ) )
= ( g r , h 1 r g x j ( ( i 1 ) l + 1 ) , , h l r g x j ( i l ) )
11:
    end for
12:
end for
13:
Send the encrypted data x ˜ ( i ) to the S AU .
14:
Send the matrix A 1 , ciphertexts C t j ( i ) and labels { y ( 1 ) , , y ( m ) } to the S NN .

4.4.3. Privacy-Preserving Training

We now show the procedure of lossless ANN training for image classification by FEIP scheme and mask matrix support without interacting with users. The server S NN initiates the protocol with a uniform W ( h ) and W ( o ) and sets the gradient update step λ . Through executing the IPPNN protocol, the server S NN can update its weight matrices iteratively on the encrypted data with the help of the server S AU , and finally obtain a well-trained model. We describe training process of per iteration in the IPPNN protocol below.
The Secure Computation of E S / w i , j ( o ) . The update rule (3) with a random sample x can be described as
E { x } w i , j ( o ) = g k = 1 b w i k ( o ) f w k ( h ) · x y i f ( w j ( h ) · x )
where i = 1 , , c , j = 1 , , b .
From (5), we find that the update rule requires S NN to compute the gradients of the loss function (2) which involve inner-product w k ( h ) · x , sigmoid function f ( · ) , and softmax function g ( · ) and cannot be completed using only homomorphic additions and multiplications. We first deal with the formidable obstacle f ( w k ( h ) · x ) . Recall the server S NN owns the model parameters w i , k ( o ) , with the inner product f ( w k ( h ) · x ) and provided label y i , the S NN can obtain the output of hidden layer neurons. Then the computation of ( o i y i ) h j takes place in plaintext. We provide details of how f ( w k ( h ) · x ) are computed by mask matrix structure.
1.
The S NN first computes
W ˜ ( h ) = ( w ˜ 1 ( h ) , , w ˜ b ( h ) ) = W ( h ) A 1 = ( w 1 ( h ) A 1 , , w b ( h ) A 1 ) .
After that, the S NN sends W ˜ ( h ) to the S AU .
2.
Then the S AU takes W ˜ ( h ) and x ˜ as input, and return the inner-products w ˜ 1 ( h ) · x ˜ , , w ˜ b ( h ) · x ˜ , that is w 1 ( h ) · x , , w b ( h ) · x . This is because that
w ˜ j ( h ) · x ˜ = w j ( h ) A 1 A x = w j ( h ) · x .
After that, an execution process of activation function takes place. This results in the S AU having all outputs of hidden layer neurons
h = ( h 1 , , h b ) = ( f ( w 1 ( h ) · x ) , , f ( w b ( h ) · x ) )
Then, the S AU sends h to the S NN .
Once the server S NN receives the outputs of hidden layer neurons, it prepares w i k ( o ) and y i to perform the computation of ( g ( k = 1 b w i k ( o ) h k ) y i ) h j and obtains the gradient E { x } / w i , j ( o ) . The gradient E S / w i , j ( o ) in a mini-batch setting can be computed easily from a group of values E { x ( l ) } / w i , j ( o ) , l = 1 , . . . , | S | .
The secure computation of  E S / w j , k ( h ) . The server S AU follows the FEIP in the process of obtaining E S / w i , j ( o ) . As a result, the S AU has the outputs of hidden layer neurons h = ( h 1 , h 2 , , h b ) . The server S NN can exploit the results of E S / w i , j ( o ) and encrypted feature x k of data sample to obtain the gradient E S / w j , k ( h ) .
Take the kth feature vector ( x k ( 1 ) , , x k ( l ) ) of the first group samples as an example, with the help of FEIP, the server S NN is able to acquire the gradient
E S w j , k ( h ) = 1 S l S u k ( l ) x k ( l )
where
u k ( l ) = i = 1 c [ ( y i ( l ) g ( n = 1 b w i n ( o ) h n ( l ) ) ) w i , j ( o ) ] h j ( l ) ( h j ( l ) 1 ) ,
j = 1 , , b , k = 1 , , a .
Note that the terms h n ( l ) ( n = 1 , 2 , , b ) have already obtained from the computation of E S / w i , j ( o ) . With the provided w i k ( o ) and labels y i ( l ) , the S NN is able to acquire the value u k ( l ) . The S NN takes the ciphertexts of vector ( x k ( 1 ) , , x k ( l ) ) , the public key p k F E I P and functional key for the vector u k = ( u k ( 1 ) , , u k ( l ) ) as input, and returns the inner-product l S u k ( l ) x k ( l ) . We provide the following steps towards this purpose.
1.
The TPA takes the master private key m s k F E I P = s and the plaintext vector u k = ( u k ( 1 ) , , u k ( l ) ) sent by the S NN as input, and generates a functionally derived key d k u k = u k , s as output.
2.
The S NN takes the ciphertexts
C t k ( 1 ) = E n c p k F E I P ( x k ( 1 ) , , x k ( l ) )
= ( g r , h 1 r g x k ( 1 ) , , h l r g x k ( l ) )
received from the user, the public key p k F E I P and functionally derived key d k u k as input, and return the inner-product l S u k ( l ) x k ( l ) .
In specific,
g l S u k ( l ) x k ( l ) = i [ l ] h i r g x k ( i ) u k ( i ) / g r d k u k
In order to recover the final inner-product value l S u k ( l ) x k ( l ) a discrete logarithm computation is implemented.
Correctness. Given the public key p k F E I P = ( h i = g s i ) i [ l ] , we have
i [ l ] h i r g x k ( i ) u k ( i ) / g r d k u k = i [ l ] ( g s i r + x k ( i ) ) u k ( i ) / g r ( i [ l ] u k ( i ) s i ) = g i [ l ] u k ( i ) s i r + i [ l ] u k ( i ) x k ( i ) r ( i [ l ] u k ( i ) s i ) = g i [ l ] u k ( i ) x k ( i )

5. Analysis and Evaluation

In this section, we first analyze the security of IPPNN under the threat model described in Section 4.2. Recall that the TPA is trusted to generate the public key and master secret key, enabling the FEIP feasible, the servers S AU and S NN are non-colluding and could be honest-but-curious, the external adversary is malicious. We aim to verify if IPPNN can train an ANN model without revealing any information of users, meanwhile, hiding parameters trained by the server S NN from other entities.
Our IPPNN scheme should protect the data privacy against Class-I (honest-but-curious S AU ) and Class-II (honest-but-curious S NN ), and model privacy against Class-I.

5.1. Data Privacy

The primary privacy constraint is that the servers S AU and S NN should not be able to observe the user data and similarly, the external adversary should not be able to observe data belonging to users.

5.1.1. Class-I

In Algorithm 1, the user utilizes the random matrix A to mask his samples x ( i ) , and then sends A x ( i ) to the S AU . In this way, the S AU never gets to know any sample included in the training set since A is randomly selected by the user. In the privacy-preserving training process, although the S AU can obtain the inner-product w 1 ( h ) · x , , w b ( h ) · x , but it cannot infer the user data without knowing the weight vectors w 1 ( h ) , , w b ( h ) .

5.1.2. Class-II

In the computation of gradient E S / w i , j ( o ) of output layer, the S NN receives all outputs of hidden layer neurons h . Due to the non-linear property of sigmoid function f, the S NN can not solve the system { f ( w 1 ( h ) · x ) , , f ( w b ( h ) · x ) } . In the computation of gradient E S / w j , k ( h ) of hidden layer, the S NN receives the ciphertext C t j ( i ) , i = 1 , 2 , , m / l , j = 1 , 2 , , a (executed by step 10 of Algorithm 1). Under the DDH assumption, the encrypted scheme is against chosen-plaintext attacks.

5.1.3. External Adversary

In our threat model, we do not assume there exists an external adversary who can monitor network and try to infer users’ private samples and model parameters. If so, the solution is straightforward. The S NN can generate a pair of a public key and a secret key by any public key cryptosystem. The user encrypts the matrix A 1 by the public key, and the S NN uses his secret key to decrypt the mask matrix. Even if the external adversary can obtain the information of A x , he can not deduce the data x .

5.2. Model Privacy

5.2.1. Class-I

The secondary privacy constraint is to protect the model privacy trained by the S NN . We should make sure that the privacy of W ( h ) and W ( o ) should be preserved against the S AU . Similar to the analysis of data privacy in Section 5.1.1, finding the solutions of system { w 1 ( h ) · x , , w b ( h ) · x } is impossible. The reason is that the S AU can establish a linear system with b equations and ( b + 1 ) a unknowns only.

5.2.2. External Adversary

The external adversary can eavesdrop network channel to obtain the information of W ˜ ( h ) . He can not deduce the model parameters W ( h ) since he has no information of A 1 .
From the above analysis, our scheme satisfies the security requirements defined in Section 4.2.

5.3. The Goal of Experiments

To evaluate the performance of our proposed scheme, we compare IPPNN with the Baseline and NPMML [11] algorithms.
(i) Precision measurement: To measure the model precision of our method and the influence of using Taylor approximation in neural network model, an experiment with IPPNN and Baseline (a centralized version, non-privacy-preserving setting) and Baseline_app (with Taylor polynomial approximation) is designed to compare the classification accuracy.
(ii) Efficiency measurement: For the purpose of evaluating he efficiency of our method, we compare the execution time of IPPNN and NPMML training different image datasets. We use the NPMML proposed in [11] as the comparative object because it is the closest state-of-the-art approach to ours. In NPMML, the neural network model is built using the combination of Paillier cryptosystem and a CCA-2 secure public-key encryption scheme.

5.4. Experimental Setup

We conduct all experiments on a service platform (ECS) with ecs.n4.xlarge machines with 4-Core vCPU and 8GB RAM running on Linux system. We implement the neural network training on two image datasets digits-MNIST [37] and Fashion-MNIST [38]. Both of them contain 60,000 training samples (28 × 28) and 10,000 test samples. Each image is transformed into a vector with dimension 784 as the input of the neural network.
For all experiments, we construct a fully connected multi-layer perception with one hidden layer (with sigmoid function) and a output layer (with softmax function). For IPPNN, we use the function encryption proposed in [27] as the basic cryptographic technology. For NPMML, we use Python-RSA [39] and Python-Paillier [40] to implement the underlying encryption primitives.
The parameter setting is: learning rate η = 0.01 , scaling factor = 10 6 (for the purpose of extending the original encryption function to real numbers), epoch = 20 .

5.5. Evaluation of Accuracy

Our IPPNN removes the need for approximating neural network model by using Taylor series. As shown in Figure 3, the classification accuracy of IPPNN is comparable to that of the Baseline in the same environment. The difference in classification accuracy between the two methods is less than 0.5%, which is caused by extending the encryption function for inner product to real numbers by scaling factor. These results suggest that the IPPNN approach supports lossless image classifiers construction.
For the same network architecture with the same dataset, the accuracy obtained by the approximation model is much lower than the IPPNN. We observe that the errors in identifying the image classification by approximation models Baseline_app are not negligible. It is also noted that ANN model with a higher-degree polynomial can not cause precision improvement, which is not feasible to be used directly with training protocols using polynomial approximation.

5.6. Comparison of Execution Time

For the purpose of evaluating the efficiency of privacy-preserving image classifiers based on neural network algorithms, we compare the execution time of IPPNN and NPMML training different datasets and different network architecture under different size of security parameters, respectively. The training time of the two executing algorithms IPPNN and NPMML, respectively, is shown in Table 1.
These experiments illustrate that the running time of NPMML is roughly 25 times longer than that of IPPNN. To summarize the results: (i) the training time will more than double if the number of neurons in hidden layer become a double while other settings remain fixed. (ii) the training time will slightly less than double if the bits of security parameter become a double while other settings remain fixed. The above experimental results manifest that the IPPNN is more suitable for training large-volume image data sets with higher bits of security parameter and more neurons.

5.7. Comparison of Feature

For the purpose of measuring the properties of state-of-the-art privacy-preserving neural network algorithms, we compare the properties of current work in the literature in terms of lossless training, non-interactivity between users and cloud servers and techniques employed by the algorithms. From the Table 2, we can find most of schemes can not have non-interactive and lossless features simultaneously.
One of the main novelties of the IPPNN method is to remove the need for multiple communications between the users and the servers. In other words, the IPPNN is a non-interactive scheme which only requires communication between the users and the servers as a one-way transmission. The key point is that the encrypted data are specific-designed through two folds: (i) by the public key of function encryption and (ii) by the random mask matrix. The server S AU will obtain the information of inner w · x , by exploiting the blinded data x and mask matrix A. After computing the outputs of all neurons and sending them to the server S NN , the tasks of the S AU are completed. The rest of the work can be completed by the server S NN alone by using the encrypted data by the public key. To summarize, the two servers are able to utilize the encrypted data to train the image classifier by cooperation without the help of the users. Once the users upload the encrypted data to the servers, they can be offline.
Although NPMML method has both of the characters with non-interactive and lossless, its efficiency is lower than ours. A few factors contribute to the IPPNN outperforms the NPMML. (i) Cryptographic primitive employed—reducing computation overhead. The running time gap between NPMML and IPPNN lies in the cryptographic techniques employed by these two algorithms. In NPMML, the neural network model is built using the combination of Paillier cryptosystem and a CCA-2 secure public-key encryption scheme, such as RSA, while the IPPNN employs the only one cryptographic technique, i.e., function encryption for inner product. Consequently, the NPMML has more complex implementation than ours. (ii) Well-designed encryption method—reducing communication overhead. At each iteration, the NPMML needs two-way transmission between the servers, while the IPPNN only needs one time to transfer the information.

6. Conclusions

We developed a non-interactive protocol for lossless training an ANN-based image classifier over images belonging to multiple users while preserving the privacy constraints. Meanwhile, we presented a theoretic analysis of the security of the protocol. We also experimented with an implementation of the protocol in the real machines on two large scale image datasets and demonstrate that our protocol is able to achieve high-precision performance in a feasible amount of execution time. The future direction of this work includes applying our method to image classifiers based on ANN over vertically partitioned data. We also plan to extend our protocol to use appropriate dimensionality reduction techniques to further increase the speed.

Author Contributions

G.D. contributed to conceptualization, methodology and writing—original draft preparation. M.T. contributed to formal analysis, writing—review and editing. Y.Z. contributed to software. Y.H. contributed to visualization. X.D. contributed to project administration, supervision and writing—review and editing. All authors have read and agreed to the published version of the manuscript.

Funding

This work is supported in part by the National Natural Science Foundation of China under Grant 12201149 (X.D.), in part by the Guangxi Science and Technology Project under Grant Guike AD18281024 (M.T.).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors wish to thank the referee for his or her very helpful comments and useful suggestions.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Mitchell, T. Machine Learning; McGraw-Hill Education: New York, NY, USA, 1997. [Google Scholar]
  2. Nageswaran, S.; Arunkumar, G.; Bisht, A.K.; Mewada, S.; Kumar, J.N.V.R.; Jawarneh, M.; Asenso, E. Lung cancer classification and prediction using machine learning and image processing. Biomed. Res. Int. 2022, 2022, 1755460. [Google Scholar] [CrossRef] [PubMed]
  3. Sharma, A.; Georgi, M.; Tregubenko, M. Enabling smart agriculture by implementing artificial intelligence and embedded sensing. Comput. Ind. Eng. 2022, 165, 107936. [Google Scholar] [CrossRef]
  4. Joshi, K.D.; Chauhan, V.; Surgenor, B. A flexible machine vision system for small part inspection based on a hybrid SVM/ANN approach. J. Intell. Manuf. 2020, 31, 103–125. [Google Scholar] [CrossRef]
  5. Fagbohungbe, O.; Reza, S.R.; Dong, X.; Qian, L. Efficient privacy preserving edge intelligent computing framework for image classification in IoT. IEEE Trans. Emerg. Top. Comput. Intell. 2022, 6, 941–956. [Google Scholar] [CrossRef]
  6. Yang, Y.; Mu, K.; Deng, R.H. Lightweight privacy-preserving GAN framework for model training and image synthesis. IEEE T. Inf. Foren. Sec. 2022, 17, 1083–1098. [Google Scholar] [CrossRef]
  7. Shen, M.; Deng, Y. Privacy-preserving image retrieval for medical IoT systems: A blockchain-based approach. IEEE Netw. 2019, 33, 27–33. [Google Scholar] [CrossRef]
  8. Xia, Z.; Xiong, N.; Vasilakos, A.V. EPCBIR: An efficient and privacy-preserving content-based image retrieval scheme in cloud computing. Inf. Sci. 2017, 387, 195–204. [Google Scholar] [CrossRef]
  9. Yu, J.; Zhang, B.; Kuang, Z. iPrivacy: Image privacy protection by identifying sensitive objects via deep multi-task learning. IEEE T. Inf. Foren. Sec. 2017, 12, 1005–1016. [Google Scholar] [CrossRef]
  10. Xiong, Z.; Cai, Z.; Han, Q. ADGAN: Protect your location privacy in camera data of auto-driving vehicles. IEEE Trans. Ind. Inform. 2020, 17, 6200–6210. [Google Scholar] [CrossRef]
  11. Li, T.; Li, J.; Chen, X.; Liu, Z.; Lou, W.; Hou, Y.T. NPMML: A Framework for non-Interactive privacy-preserving multi-party machine learning. IEEE Trans. Dependable Secur. Comput. 2021, 18, 2969–2982. [Google Scholar] [CrossRef]
  12. Li, P.; Li, J.; Huang, Z. Multi-key privacy-preserving deep learning in cloud computing. Future Gener. Comput. Syst. 2017, 74, 76–85. [Google Scholar] [CrossRef]
  13. Ma, X.; Zhang, F.; Chen, X. Privacy preserving multi-party computation delegation for deep learning in cloud computing. Inf. Sci. 2018, 459, 103–116. [Google Scholar] [CrossRef]
  14. Popescu, A.B.; Taca, I.A.; Nita, C.I. Privacy preserving classification of EEG data using machine learning and homomorphic encryption. Appl. Sci. 2021, 11, 7360. [Google Scholar] [CrossRef]
  15. Fan, Y.; Bai, J.; Lei, X.; Zhang, Y.; Zhang, B.; Li, K.C.; Tan, G. Privacy preserving based logistic regression on big data. J. Netw. Comput. Appl. 2020, 171, 102769. [Google Scholar] [CrossRef]
  16. Mohassel, P.; Zhang, Y. SecureML: A system for scalable privacy-preserving machine learning. Proc. IEEE Symp. Secur. Privacy (SP) 2017, 19–38. [Google Scholar]
  17. De Cock, M.; Dowsley, R.; Nascimento, A.C.; Railsback, D.; Shen, J.; Todoki, A. High performance logistic regression for privacy-preserving genome analysis. BMC Med. Genom. 2021, 14, 1–18. [Google Scholar] [CrossRef]
  18. Deng, G.; Tang, M.; Xi, Y.; Zhang, M. Privacy-Preserving Online Medical Prediagnosis Training Model Based on Soft-Margin SVM. IEEE Trans. Serv. Comput. 2022, 1–14. [Google Scholar] [CrossRef]
  19. Xu, R.; Baracaldo, N.; Zhou, Y.; Anwar, A.; Joshi, J.; Ludwig, H. FedV: Privacy-preserving federated learning over vertically partitioned data. Proc. ACM Workshop Artif. Intell. Secur. 2021, 18, 181–192. [Google Scholar]
  20. Li, Y.; Zhou, Y.; Jolfaei, A.; Yu, D.; Xu, G.; Zheng, X. Privacy preserving federated learning framework based on chained secure multiparty computing. IEEE Internet Things J. 2021, 8, 6178–6186. [Google Scholar] [CrossRef]
  21. Xie, B.; Xiang, T.; Liao, X.; Wu, J. Achieving privacy-preserving online diagnosis with outsourced SVM in internet of medical things environment. IEEE Trans. Dependable Secure Comput. 2021, 19, 4113–4126. [Google Scholar] [CrossRef]
  22. Mandal, K.; Gong, G. PrivFL: Practical privacy-preserving federated regressions on high-dimensional data over mobile networks. Proc. CCSW 2019, 57–68. [Google Scholar]
  23. Du, W.; Li, A.; Li, Q. Privacy-preserving multiparty learning for logistic regression. Proc. Secure Comm. 2018, 549–568. [Google Scholar]
  24. Shokri, R.; Shmatikov, V. Privacy-preserving deep learning. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, Denver, CO, USA, 12–16 October 2015; pp. 1310–1321. [Google Scholar]
  25. Abadi, M. Deep learning with differential privacy. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, 24–28 October 2016; pp. 308–318. [Google Scholar]
  26. Jiang, Y.; Hamer, J.; Wang, C.; Jiang, X.; Kim, M.; Song, Y.; Xia, Y.; Mohammed, N.; Sadat, M.N.; Wang, S. SecureLR: Secure logistic regression model via a hybrid cryptographic protocol. IEEE/ACM Trans. Comput. Biol. Bioinf. 2019, 16, 113–123. [Google Scholar] [CrossRef] [PubMed]
  27. Abdalla, M.; Bourse, F.; Caro, A.D.; Pointcheval, D. Simple functional encryption schemes for inner products. IACR Cryptol. ePrint Arch. 2015, 17, 733–751. [Google Scholar]
  28. Mennel, L.; Symonowicz, J.; Wachter, S. Ultrafast machine vision with 2D material neural network image sensors. Nature 2020, 579, 62–66. [Google Scholar] [CrossRef]
  29. Lu, W.; Du, R.; Niu, P. Soybean yield preharvest prediction based on bean pods and leaves image recognition using deep learning neural network combined with GRNN. Front. Plant. Sci. 2022, 12, 791256. [Google Scholar] [CrossRef]
  30. Sultana, F.; Sufian, A.; Dutta, P. Advancements in image classification using convolutional neural network. In Proceedings of the 2018 Fourth International Conference on Research in Computational Intelligence and Communication Networks (ICRCICN), Kolkata, India, 22–23 November 2018; pp. 122–129. [Google Scholar]
  31. Zeng, J.; Qiu, X.; Shi, S. Image processing effects on the deep face recognition system. Math. Biosci. Eng. 2021, 18, 1187–1200. [Google Scholar] [CrossRef]
  32. Pham, Q.T.; Liou, N.S. The development of on-line surface defect detection system for jujubes based on hyperspectral images. Comput. Electron. Agr. 2022, 194, 106743. [Google Scholar] [CrossRef]
  33. Sirichotedumrong, W.; Maekawa, T.; Kinoshita, Y. Privacy-preserving deep neural networks with pixel-based image encryption considering data augmentation in the encrypted domain. In Proceedings of the 2019 IEEE International Conference on Image Processing (ICIP), Taipei, Taiwan, 22–25 September 2019; pp. 674–678. [Google Scholar]
  34. Wang, F.; Zhu, H.; Lu, R.; Zheng, Y.; Li, H. A privacy-preserving and non-interactive federated learning scheme for regression training with gradient descent. Inf. Sci. 2021, 552, 183–200. [Google Scholar] [CrossRef]
  35. Boehmke, B.; Greenwell, B. Hands-on Machine Learning With R; Chapman and Hall: London, UK; CRC: Portsmouth, UK, 2019. [Google Scholar]
  36. ElGamal, T. A public key cryptosystem and a signature scheme based on discrete logarithms. IEEE. T. Inform. Theory 1985, 31, 469–472. [Google Scholar] [CrossRef]
  37. LeCun, Y.; Cortes, C.; Christopher, J.C.B. MNIST Handwritten Digit Database. Available online: http://yann.lecun.com/exdb/mnist/ (accessed on 7 November 2022).
  38. Xiao, H.; Rasul, K.; Vollgraf, R. Fashion-MNIST: A Novel Image Dataset for Benchmarking Machine Learning Algorithms. arXiv 2017, arXiv:1708.07747. [Google Scholar]
  39. Sybren, A. Stuvel. Python-RSA, GitHub Repository. Available online: https://github.com/sybrenstuvel/python-rsa (accessed on 7 November 2022).
  40. CSIRO’s Data61. Python Paillier Library, GitHub Repositorys. Available online: https://github.com/data61/python-paillier (accessed on 7 November 2022).
Figure 1. Image recognition by ANN model.
Figure 1. Image recognition by ANN model.
Applsci 12 12873 g001
Figure 2. System model.
Figure 2. System model.
Applsci 12 12873 g002
Figure 3. Comparison between IPPNN and Baseline with Taylor approximation in model accuracy (batchsize = 60). (a) Accuracy on digits-MNIST (b = 256). (b) Accuracy on digits-MNIST (b = 128). (c) Accuracy on fashion-MNIST (b = 256). (d) Accuracy on fashion-MNIST (b = 128).
Figure 3. Comparison between IPPNN and Baseline with Taylor approximation in model accuracy (batchsize = 60). (a) Accuracy on digits-MNIST (b = 256). (b) Accuracy on digits-MNIST (b = 128). (c) Accuracy on fashion-MNIST (b = 256). (d) Accuracy on fashion-MNIST (b = 128).
Applsci 12 12873 g003
Table 1. Comparison of time cost for training one mini-batch (60 samples).
Table 1. Comparison of time cost for training one mini-batch (60 samples).
Network Architecture Datasets Bits of Security ParameterTraining Time (s)
IPPNNNPMML
784 ↦ 256 ↦ 10digits-MNIST1024131531,054
784 ↦ 128 ↦ 10digits-MNIST102453213,583
784 ↦ 256 ↦ 10Fashion-MNIST1024135531,154
784 ↦ 128 ↦ 10Fashion-MNIST102455213,267
784 ↦ 256 ↦ 10digits-MNIST2048210252,590
784 ↦ 128 ↦ 10digits-MNIST204890324,587
784 ↦ 256 ↦ 10Fashion-MNIST2048223852,990
784 ↦ 128 ↦ 10Fashion-MNIST204893123,183
Training time: execution time for training one mini-batch (60 samples). Network architecture: No. neurons in input layer ↦ No. neurons in hidden layer ↦ No. neurons in output layer.
Table 2. Feature comparison of several superior schemes.
Table 2. Feature comparison of several superior schemes.
OursNPMML [11]FedV [19]MK-FHE [12]Chain-PPFL [20]SecureML [16]Ma et al. [13]
Non-interactive
Lossless
TechniqueFEPaillier&RSAFEFHEFLSSFL
FE: function encryption. Paillier: Paillier cryptosystem. RSA: RSA cryptosystem. FHE: fully homomorphic encryption. SS: secret sharing. FL: federal learning. The symbol ✔ denotes the scheme has the feature of the corresponding row, while the symbol ✘ has not.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Deng, G.; Tang, M.; Zhang, Y.; Huang, Y.; Duan, X. Privacy-Preserving Outsourced Artificial Neural Network Training for Secure Image Classification. Appl. Sci. 2022, 12, 12873. https://doi.org/10.3390/app122412873

AMA Style

Deng G, Tang M, Zhang Y, Huang Y, Duan X. Privacy-Preserving Outsourced Artificial Neural Network Training for Secure Image Classification. Applied Sciences. 2022; 12(24):12873. https://doi.org/10.3390/app122412873

Chicago/Turabian Style

Deng, Guoqiang, Min Tang, Yuhao Zhang, Ying Huang, and Xuefeng Duan. 2022. "Privacy-Preserving Outsourced Artificial Neural Network Training for Secure Image Classification" Applied Sciences 12, no. 24: 12873. https://doi.org/10.3390/app122412873

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop