This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Optimizing Secure Decision Tree Inference Outsourcing

Yifeng Zheng, Cong Wang, Fellow, IEEE, Ruochen Wang, Huayi Duan, and Surya Nepal Y. Zheng is with the School of Comptuer Science and Technology, Harbin Institute of Technology, Shenzhen. E-mail: [email protected]. C. Wang is with the Department of Computer Science, City University of Hong Kong, Hong Kong. E-mail: [email protected]. R. Wang and H. Duan are with the Department of Computer Science, City University of Hong Kong, Hong Kong. E-mail: [email protected], [email protected]. S. Nepal is with Data61, CSIRO, Marsfield NSW 2122, Australia, and also with the Cyber Security Cooperative Research Centre (CRC), Joondalup WA 6027, Australia. Email: [email protected].
Abstract

Outsourcing decision tree inference services to the cloud is highly beneficial, yet raises critical privacy concerns on the proprietary decision tree of the model provider and the private input data of the client. In this paper, we design, implement, and evaluate a new system that allows highly efficient outsourcing of decision tree inference. Our system significantly improves upon the state-of-the-art in the overall online end-to-end secure inference service latency at the cloud as well as the local-side performance of the model provider. We first presents a new scheme which securely shifts most of the processing of the model provider to the cloud, resulting in a substantial reduction on the model provider’s performance complexities. We further devise a scheme which substantially optimizes the performance for encrypted decision tree inference at the cloud, particularly the communication round complexities. The synergy of these techniques allows our new system to achieve up to 8×8\times better overall online end-to-end secure inference latency at the cloud side over realistic WAN environment, as well as bring the model provider up to 19×19\times savings in communication and 18×18\times savings in computation.

Index Terms:
Privacy preservation, decision trees, cloud, inference service, secure outsourcing

1 Introduction

Machine learning inference services greatly benefit various kinds of application domains (e.g., healthcare [1, 2, 3], finance [4, 5], and intrusion detection [6, 7]), and its rapid development has been largely facilitated by cloud computing [8, 9, 10] in recent years. In this emerging machine learning based service paradigm, a model provider can deploy a trained model in the cloud, which can then provide inference services to the clients. Outsourcing such services to the cloud promises well-understood benefits for both the model provider (provider for short) and client, such as scalability, ubiquitous access, and economical cost.

Among others, decisions trees are one of the most popular machine learning models due to its ease of use and effectiveness, and have been shown to benefit real applications like medical diagnosis [1, 11] and credit-risk assessment [4]. Briefly, a decision tree is comprised of some internal nodes, which are called decision nodes, and some leaf nodes. Each decision node is used to compare a threshold with a certain feature in the feature vector, which is the input to decision tree evaluation, and decide the branch to be taken next. And each leaf node carries a prediction value indicating the inference result. Decision tree inference over an input feature vector is equivalent to tree traversal starting at the root node and terminating when a leaf node is reached.

While outsourcing the decision tree inference service to the cloud is quite beneficial, it also raises critical privacy concerns on the decision tree model and the input data. On the provider side, it is widely known that training a high quality model requires a significant amount of investment on datasets (possibly sensitive), resources, and specialized skills. It is thus important that the decision tree is not exposed in the service so that the intellectual property as well as the profitability and competitive advantage of the provider could be respected. On the client side, the input feature vector may contain sensitive information, e.g., data in medical applications or financial applications. Overcoming the privacy hurdles is thus of paramount importance to help the provider and client gain confidence in outsourced decision tree inference services. Towards this challenge, a recent research endeavor has been presented by Zheng et al. [12], which represents the state-of-the-art. Their design is based on the lightweight additive secret sharing technique and works under a compatible architecture where two cloud servers from independent cloud providers are employed to jointly conduct the decision tree inference in the ciphertext domain. As an initial endeavor, however, their design is not fully satisfactory and yet to be optimized in performance, as we detail below.

Firstly, the performance complexity of the provider is dependent on the size of the decision tree as well as the feature vector. Specifically, the provider needs to construct and encrypt a binary matrix of size scaling to the product of the number JJ of decision nodes and the dimension II of the feature vector, so as to support secure feature selection (more details in Section 4.2). Such multiplicative complexity O(JI)O(J\cdot I) leads to practically unfavorable overhead, which would be further aggravated when the provider needs to outsource multiple decision trees, either for different application domains, or for random forest (an ensemble of decision trees) evaluation.

Secondly, at the cloud side, the phase of secure decision node evaluation has communication rounds linear to the number of bits for value representation. This is unfavorable in the real-world scenario when the two cloud servers are situated in different geographic regions and communicate over WAN, which is a more reasonable setting than local networks given that the two cloud servers are assumed from different trust domains [13].

In light of the above observations, In this paper, we present a new highly efficient design for secure decision tree inference outsourcing which significantly improves upon the state-of-the-art. Our design follows the same architecture of [12], and also makes use of additive secret sharing, yet with significant optimizations to achieve largely boosted performance compared to the state-of-the-art work.

Firstly, we design a new scheme which makes the provider’s performance complexity independent of the feature vector and thus free of the above multiplicative complexity, through a new re-formulation of the secure feature selection problem. We make an observation that secure feature selection can indeed be treated as an oblivious array-entry read problem, where the encrypted feature vector could be treated as an encrypted array, and the encrypted index value is used to obliviously select an entry from the array. During the procedure, it is required that no information about the feature vector, index value, and selected feature be revealed. With this observation, we propose a new secure feature selection design where the provider only needs to construct and encrypt an indexing vector with size O(J)O(J), rather than a matrix of size O(JI)O(J\cdot I) as proposed in [12].

Secondly, we note that the linear communication round complexity of the prior work [12] in the secure decision node evaluation phase is due to the secure realization of a ripple carry adder for secret-shared comparison, which faces a delay problem due to sequential procedure of carry computation. Our observation from the field of digital circuit design is that the carry delay problem presented in the ripple carry adder can be solved via the advanced carry look-ahead adder [14]. With this observation, we craft a new design for secure decision node evaluation, through digging deep into the logic and computation of the carry look-ahead adder and appropriately organizing the computation in a secure and efficient manner. Our new design achieves a logarithmic communication complexity for secure decision node evaluation, gaining superior suitability for practical deployment in WAN environments. As a concrete example, we are able to significantly reduce the rounds of secure decision node evaluation at the cloud servers from 125125 to 77 (with the bit length for value representation being 6464), greatly reducing the network latency due to interaction rounds. We also provide concrete complexity analysis, showing that such significant gain does not sacrifice computational efficiency in terms of the number of secret-shared multiplications.

The synergy of the above optimization techniques lead to a new highly efficient cryptographic inference protocol which achieves a significant reduction on the overall online inference latency at the cloud, as well as a significant boost in the provider’s performance, as compared to the state-of-the-art. We provide formal security analysis of our design under the standard simulation based paradigm. We implement our system and make deployment on the Amazon cloud for performance evaluation over various decision trees with realistic sizes. Compared with the state-of-the-art prior work [12], the overall online end-to-end inference latency at the cloud servers over realistic WAN environment is up to 8×8\times better. In the meantime, our system offers the provider up to 19×19\times savings in communication and 18×18\times savings in computation.

Refer to caption

Figure 1: Decision tree illustration.

The rest of this paper is organized as follows. Section 2 introduces some preliminaries. Section 3 describes the system model and threat model. Section 4 gives the details of our design. Section 5 provides the security analysis. Section 6 shows the experiments. Section 7 discusses the related work. Section 8 concludes the whole paper.

2 Preliminaries

2.1 Decision Tree Inference

Fig. 1 illustrates a decision tree. As shown, each internal node (called decision node 𝒟j\mathcal{D}_{j}) is associated with a threshold yjy_{j}, while each leaf node z\mathcal{L}_{z} is associated with a prediction value uzu_{z} indicating the possible inference result. Hence, given a decision tree with JJ decision nodes and ZZ leaf nodes, a threshold vector 𝐲={y0,,yJ1}\mathbf{y}=\{y_{0},\cdots,y_{J-1}\} and a prediction value vector 𝐮={u0,,uZ1}\mathbf{u}=\{u_{0},\cdots,u_{Z-1}\} are derived. The input for decision tree inference is an II-dimensional feature vector, denoted by x={x0,,xI1}\textbf{x}=\{x_{0},\cdots,x_{I-1}\}. There is an associated input selection mapping σ:j{0,1,,J1}i{0,1,,I1}\sigma:j\in\{0,1,\cdots,J-1\}\rightarrow i\in\{0,1,\cdots,I-1\}. Decision tree inference with 𝐱\mathbf{x} as input works as follows. Firstly, the mapping σ\sigma is used to select a feature xix_{i} from 𝐱\mathbf{x} for each 𝒟j\mathcal{D}_{j}. Secondly, starting from the root node, the Boolean function f(xσ(j))=(xσ(j)<yj)f(x_{\sigma(j)})=(x_{\sigma(j)}<y_{j}) is evaluated at each 𝒟j\mathcal{D}_{j}. The evaluation result vjv_{j} decides whether to next take the left (vj=0v_{j}=0) or right (vj=1v_{j}=1) branch. Such evaluation terminates when a leaf node is reached. The depth dd is the length of the longest path between the root node and a leaf node. Table I provides a summary of the key notations. Without loss of generality and as the tree structure should be hidden, we will consider complete binary decision trees in our security design, which is also consistent with previous works [15, 16, 17, 18, 12]. It is noted that dummy nodes can be simply added to make non-complete decision trees complete [15].

TABLE I: Key Notations
Notation Description
𝐱\mathbf{x} Feature vector
𝐲\mathbf{y} Threshold vector
xix_{i} The ii-th feature in the feature vector
yjy_{j} The threshold at decision node 𝒟j\mathcal{D}_{j}
dd Depth of a decision tree
JJ Number of decision nodes
II Dimension of feature vector
ZZ Number of leaf nodes
ll Number of bits for value representation
vjv_{j} Evaluation result at decision node 𝒟j\mathcal{D}_{j}
uzu_{z} Prediction value of leaf node z\mathcal{L}_{z}

2.2 Additive Secret Sharing

Given a value α2l\alpha\in\mathbb{Z}_{2^{l}}, its 22-of-22 additive secret sharing is a pair ([α]0=αr([\alpha]_{0}=\alpha-r, [α]1=r)[\alpha]_{1}=r), where rr is a random value in 2l\mathbb{Z}_{2^{l}} and the subtraction is done in 2l\mathbb{Z}_{2^{l}} (i.e., result is modulo 2l2^{l}). Given either [α]0[\alpha]_{0} or [α]1[\alpha]_{1}, the value α\alpha is perfectly hidden. Suppose that two values α\alpha and β\beta are secret-shared among two parties 𝒫0\mathcal{P}_{0} and 𝒫1\mathcal{P}_{1}, i.e., 𝒫0\mathcal{P}_{0} holds [α]0[\alpha]_{0} and [β]0[\beta]_{0} while 𝒫1\mathcal{P}_{1} holds [α]1[\alpha]_{1} and [β]1[\beta]_{1}. The secret sharing [α+β][\alpha+\beta] (resp. [αβ][\alpha-\beta]) of α+β\alpha+\beta (resp. αβ\alpha-\beta) can be computed locally where each party 𝒫i\mathcal{P}_{i} (i{0,1}i\in\{0,1\}) directly computes [α+β]i=[α]i+[β]i[\alpha+\beta]_{i}=[\alpha]_{i}+[\beta]_{i} (resp. [αβ]i=[α]i[β]i[\alpha-\beta]_{i}=[\alpha]_{i}-[\beta]_{i}). Multiplication by a constant γ\gamma on the value α\alpha can also be done locally, i.e., [αγ]i=γ[α]i[\alpha\cdot\gamma]_{i}=\gamma\cdot[\alpha]_{i}. Multiplication over two secret sharings [α][\alpha] and [β][\beta] can be supported by using the Beaver’s multiplication triple [19, 20]. That is, given the secret sharing of a multiplication triple (t1,t2,t3)(t_{1},t_{2},t_{3}) where t3=t1t2t_{3}=t_{1}\cdot t_{2}, [αβ][\alpha\cdot\beta] can be obtained with one round of interaction between the two parties. In particular, each party 𝒫i\mathcal{P}_{i} first computes [e]i=[α]i[t1]i[e]_{i}=[\alpha]_{i}-[t_{1}]_{i} and [f]i=[β]i[t2]i[f]_{i}=[\beta]_{i}-[t_{2}]_{i}. Then, 𝒫i\mathcal{P}_{i} broadcasts [e]i[e]_{i} and [f]i[f]_{i}, and recovers ee and ff. Given this, each party PiP_{i} computes [αβ]i=ie×f+[t1]i×f+[t2]i×e+[t3]i[\alpha\cdot\beta]_{i}=i\cdot e\times f+[t_{1}]_{i}\times f+[t_{2}]_{i}\times e+[t_{3}]_{i}.

3 Problem Statement

3.1 System Model

Fig. 2 shows our system architecture, comprised of the provider, the client, and two cloud servers hosted by independent and geographically separated cloud services. Such architecture follows the state-of-the-art prior work [12]. The provider (e.g., a medical institution) owns a decision tree model and provides inference services to the client with the power of cloud computing, i.e., outsourcing the inference service to the cloud. Due to concerns on the proprietary decision tree, the provider would only provide an encrypted version. The client (e.g., a patient) holds a feature vector which may encode private information such as weight, height, heart rate, and blood pressure, and wants to use the intelligent inference service to obtain a prediction about, e.g., her health. As the feature vector is privacy-sensitive, the client is only willing to provide a ciphertext.

Refer to caption

Figure 2: The system architecture.

The power of the cloud is considered to be supplied by the two cloud servers 𝒞0\mathcal{C}_{0} and 𝒞1\mathcal{C}_{1}, which jointly provide the secure decision tree inference service. Such a two-server model not only appeared in the prior work [12] on secure outsourced decision tree inference, but has also been recently used to facilitate security designs in different applications [21, 22, 23, 13, 24], with tailored use according to problem specifics. The prominent advantage of such a two-server model is that it allows the provider and the client to go offline after supplying the encrypted inputs, and the secure inference computation is can be fully run at the cloud. Besides, it is compatible with the working paradigm of additive secret sharing, which is applied for the encryption of the decision tree and feature vector. Each cloud server receives shares of the decision tree and feature vector. They jointly do the processing and produce secret-shared inference result which can be retrieved by the client on demand to reconstruct the inference result.

It is noted that as the two cloud servers are assumed from different trust domains, a practical consideration on realistic deployment is that the two cloud servers be situated in different geographic regions and communicate over a WAN, which is a more reasonable setting compared to local networks. In this case, the latency due to interactions between the cloud servers should be taken into account as an important factor in the secure system design.

Input: Secret sharings [j][\mathcal{I}_{j}] and [𝐱][\mathbf{x}]. Output: Secret sharing [xj][x_{\mathcal{I}_{j}}]. 1: Each 𝒞m\mathcal{C}_{m} creates an array 𝐩m\mathbf{p}^{\prime}_{m} where the ii-th element is 𝐩m[i]=𝐩m[im]+rm\mathbf{p}^{\prime}_{m}[i]=\mathbf{p}_{m}[i^{*}_{m}]+r_{m}. Here, sm2ls_{m}\leftarrow\mathbb{Z}_{2^{l}} and rm2lr_{m}\leftarrow\mathbb{Z}_{2^{l}} are random values chosen by 𝒞m\mathcal{C}_{m}; and im=((i+sm)mod2l)modIi^{*}_{m}=((i+s_{m})\bmod 2^{l})\bmod I. 2: 𝒞0\mathcal{C}_{0} chooses a random value r2lr\leftarrow\mathbb{Z}_{2^{l}} and sends [j]0=[j]0+r[\mathcal{I}_{j}]_{0}^{\prime}=[\mathcal{I}_{j}]_{0}+r to 𝒞1\mathcal{C}_{1}. 3: 𝒞1\mathcal{C}_{1} computes [j]0+[j]1+s1=j+r+s1[\mathcal{I}_{j}]_{0}^{\prime}+[\mathcal{I}_{j}]_{1}+s_{1}=\mathcal{I}_{j}+r+s_{1} and sends it to 𝒞0\mathcal{C}_{0}. 4: 𝒞0\mathcal{C}_{0} removes rr and produces i1=((j+s1)mod2l)modIi_{1}^{\prime}=((\mathcal{I}_{j}+s_{1})\bmod 2^{l})\bmod I. 5: 𝒞0\mathcal{C}_{0}, with i1i_{1}^{\prime} as input, acts as the receiver to run an OT protocol with 𝒞1\mathcal{C}_{1} to obtain 𝐩1[i1]\mathbf{p}^{\prime}_{1}[i_{1}^{\prime}]. 6: 𝒞1\mathcal{C}_{1}, in a symmetric manner following Steps 2-5, obtains 𝐩0[i0]\mathbf{p}^{\prime}_{0}[i_{0}^{\prime}], where i0=((j+s0)mod2l)modIi_{0}^{\prime}=((\mathcal{I}_{j}+s_{0})\bmod 2^{l})\bmod I. 7: 𝒞1\mathcal{C}_{1} chooses a random value r2lr^{\prime}\leftarrow\mathbb{Z}_{2^{l}} and sends 𝐩0[i0]=𝐩0[i0]r1r\mathbf{p}^{*}_{0}[i^{\prime}_{0}]=\mathbf{p}^{\prime}_{0}[i^{\prime}_{0}]-r_{1}-r^{\prime} to 𝒞0\mathcal{C}_{0}. Also, 𝒞1\mathcal{C}_{1} sets rr^{\prime} as its share [xj]1[x_{\mathcal{I}_{j}}]_{1} for the expected feature xjx_{\mathcal{I}_{j}}. 8: 𝒞0\mathcal{C}_{0} computes 𝐩0[i0]+𝐩1[i1]r0=xjr\mathbf{p}^{*}_{0}[i^{\prime}_{0}]+\mathbf{p}^{\prime}_{1}[i^{\prime}_{1}]-r_{0}=x_{\mathcal{I}_{j}}-r^{\prime} and sets the result as its share [xj]0[x_{\mathcal{I}_{j}}]_{0} for xjx_{\mathcal{I}_{j}}.

Figure 3: Secure feature selection for a decision node 𝒟j\mathcal{D}_{j}.

3.2 Threat Model

Following prior work on secure outsourced decision tree inference as well as most of existing works on privacy-preserving machine learning [12, 23, 22], we consider a semi-honest adversary setting in our system. A semi-honest adversary would honestly follow our protocol, yet attempts to infer private information beyond its access rights. In our system, it is considered that each entity (cloud server, client, provider) might be corrupted by such adversary. For the cloud server entity, we follow previous works under the two-server model ([22, 12, 13, 23, 24, 21]) and assume they are non-colluding. Namely, the two cloud servers are not corrupted by an adversary at the same time.

Consistent with [12], we consider that the values in the client’s feature vector 𝐱\mathbf{x} as well as the inference result (i.e., the prediction value uu^{*} corresponding to 𝐱\mathbf{x}) should be kept private for the client. For the provider, there is a need to keep private the proprietary parameters/information of the decision tree model, including each decision node’s threshold yy, the mapping σ\sigma for feature selection, and the prediction value of each leaf node (except the inference result revealed to the client per inference). It is also required that the client learns no additional private information about the decision tree other than the prediction value corresponding to her feature vector. Following prior work [15, 12], we assume some generic meta-parameters as public, including the depth dd, the dimension II, and the number ll of bits for value representation. We deem dealing with adversarial machine learning attacks out of the scope.

4 Our Proposed Design

4.1 Overview

Our system is aimed at secure outsourcing of decision tree inference with high efficiency. Treating local efficiency as the first priority in our design philosophy, we first aim to shift as much processing as possible to the cloud, reducing the local performance complexities (particularly with respect to the provider in our system). On top of such consideration, we further aim to achieve high efficiency at the cloud through optimizing the processing. Our deign mainly relies on the delicate use of the lightweight additive secret sharing technique, rather than uses resource-intensive garbled circuits and homomorphic encryption.

At a high level, our design is comprised of four phases: secure input preparation, secure feature selection, secure decision node evaluation, and secure inference generation. The secure input preparation phase requires the provider (resp. the client) to encrypt the decision tree (resp. feature vector), and send the ciphertexts to the cloud servers. The secure feature selection phase is to securely select for each decision node a certain feature from the feature vector, in such a way that the cloud servers are oblivious to the mapping between decision nodes and features. The secure decision node evaluation phase securely evaluates the Boolean function at each decision node and output the ciphertext of the evaluation result. The secure inference generation phase is to leverage the ciphertexts of the evaluation results at decision nodes to generate the ciphertext of the ultimate decision tree inference result, which can then be retrieved by the client for recovery. Note that following the previous work [12], we assume that the data-independent multiplication triples are pre-generated and made available to the two cloud servers for use in our design, which can be efficiently achieved via a semi-honest third party [25, 12]. Our focus is on the latency-sensitive online inference procedure.

4.2 Secure Input Preparation

The client encrypts her feature vector 𝐱\mathbf{x} via additive secret sharing applied in an element-wise manner. In particular, the client generates two secret shares: [𝐱]0=𝐱𝐫[\mathbf{x}]_{0}=\mathbf{x}-\mathbf{r} and [𝐱]1=𝐫[\mathbf{x}]_{1}=\mathbf{r}. For the provider, he encrypts the decision tree as follows. Firstly, the vector 𝐲\mathbf{y} of thresholds at decision nodes and the vector 𝐮\mathbf{u} of prediction values at leaf nodes are encrypted through additive secret sharing, with the secret shares [𝐲]0[\mathbf{y}]_{0}, [𝐲]1[\mathbf{y}]_{1}, [𝐮]0[\mathbf{u}]_{0}, and [𝐮]1[\mathbf{u}]_{1} produced. Then, we need to consider how to properly encrypt the mapping σ\sigma which is used for feature selection.

We note that the prior work [12] constructs a binary matrix of size J×IJ\times I in such a manner that the jj-th row vector is a binary vector with II elements where all are 0 except for the one at position σ(j)\sigma(j) being set to 11. In this way, feature selection is then realized via matrix-vector multiplication between the binary matrix and the feature vector, which can be securely supported under additive secret sharing. Unfortunately, such an approach imposes on the provider multiplicative O(JI)O(J\cdot I) performance complexity which depends on the number JJ of decision nodes as well as the dimension II of the feature vector.

Differently, in order to minimize the costs of the provider, our new insight is to instead construct an index vector \mathcal{I} which is comprised of the selection index values for decision nodes and thus the complexity only depends on the number JJ of decision nodes, i.e., O(J)O(J). The selection index value for a decision node 𝒟j\mathcal{D}_{j} is represented as j[0,I1]\mathcal{I}_{j}\in[0,I-1]. The secure usage of this index vector will be described shortly in the phase of secure feature selection. The provider also encrypts this index vector via additive secret sharing and produces []0[\mathcal{I}]_{0} and []1[\mathcal{I}]_{1}. After the above processing, the provider sends the shares [𝐲]m[\mathbf{y}]_{m}, [𝐮]m[\mathbf{u}]_{m}, and []m[\mathcal{I}]_{m} to each cloud server 𝒞m\mathcal{C}_{m} (m{0,1}m\in\{0,1\}).

Refer to caption

Figure 4: Illustration of a ripple carry adder logic for MSB computation.
Refer to caption

(a)

Refer to caption

(b)

Figure 5: (a) Illustration of the defined binary operator; (b) Illustration of carry calculation over 88-bit inputs under the carry look-ahead adder.

4.3 Secure Feature Selection

Upon receiving the shares of the client’s feature vector and the provider’s decision tree, the cloud servers first perform secure feature selection which produces the secret sharing of a certain feature for each decision node, based on the encrypted index vector \mathcal{I}. Note that hereafter all arithmetic operations are conducted by default in the ring 2l\mathbb{Z}_{2^{l}}, unless otherwise stated.

We now describe how secure feature selection is achieved in our design. For each decision node 𝒟j\mathcal{D}_{j}, the processing of secure feature selection would require as input the shares of the client’ feature vector 𝐱\mathbf{x} and the shares of the corresponding index value j\mathcal{I}_{j} in the index vector \mathcal{I}. The output is the secret sharing of the selected feature xjx_{\mathcal{I}_{j}} for the decision node 𝒟j\mathcal{D}_{j}.

To accomplish this functionality for our secure outsourced decision tree services, we make an observation that this indeed can be treated as oblivious array-entry read, where the encrypted feature vector could be treated as an encrypted array, and the encrypted index value is used to obliviously select an entry from the array. We leverage this observation and identify that an approach from a very recent work [26] is suited for our scenario. Using this approach as a basis, we devise the scheme for secure feature selection, which is given in Fig. 3.

The intuition is as follows. For ease of notation, we let 𝐩0\mathbf{p}_{0} (resp. 𝐩1\mathbf{p}_{1}) denote the share of the feature vector [𝐱]0[\mathbf{x}]_{0} (resp. [𝐱]1[\mathbf{x}]_{1}) at the cloud server 𝒞0\mathcal{C}_{0} (resp. 𝒞1\mathcal{C}_{1}). Each cloud server 𝒞m\mathcal{C}_{m} (m{0,1}m\in\{0,1\}) first creates a new array 𝐩m\mathbf{p}^{\prime}_{m} which is derived from 𝐩m\mathbf{p}_{m} by shifting its indices and entries under fixed random values (per feature selection). Then, given the secret sharing of a target index value j\mathcal{I}_{j}, 𝒞0\mathcal{C}_{0} engages in an interaction with 𝒞1\mathcal{C}_{1} so as to receive the entry located at the shifted index ((j+s1)mod2l)modI((\mathcal{I}_{j}+s_{1})\bmod 2^{l})\bmod I in 𝐩1\mathbf{p}^{\prime}_{1} which corresponds to j\mathcal{I}_{j}. Since the random value s1s_{1} in the shifted index is only known to 𝒞1\mathcal{C}_{1} and the corresponding entry is masked by a random value r1r_{1}, 𝒞0\mathcal{C}_{0} is oblivious to the original index j\mathcal{I}_{j} as well as the share 𝐩1[j]\mathbf{p}_{1}[\mathcal{I}_{j}] held by 𝒞1\mathcal{C}_{1}. Similarly, 𝒞1\mathcal{C}_{1} obtains the entry located at the shifted index in 𝐩0\mathbf{p}^{\prime}_{0} which corresponds to j\mathcal{I}_{j}, while learning no information about the plain index j\mathcal{I}_{j} and the share of the corresponding entry value held by 𝒞0\mathcal{C}_{0}. Next, the two cloud servers engage in an interaction which essentially performs secret re-sharing so as to obtain the secret sharing of the selected feature xjx_{\mathcal{I}_{j}}.

4.4 Secure Decision Node Evaluation

With the secret sharings of the threshold yjy_{j} and selected feature xjx_{\mathcal{I}_{j}} at each decision node 𝒟j\mathcal{D}_{j}, the cloud servers now perform secure decision node evaluation. As this basically requires secure comparison of secret-shared values, the prior work [12] transforms the problem of secure decision node evaluation to a simplified bit extraction problem in the secret sharing domain. The key idea is to securely extract the most significant bit (MSB) of the subtraction result Δ=yjxj\Delta=y_{j}-x_{\mathcal{I}_{j}} as the evaluation result at decision node 𝒟j\mathcal{D}_{j}.

Input: Secret sharings [yj][y_{j}] and [xj][x_{\mathcal{I}_{j}}]. Output: Secret sharing vj\left\langle{v_{j}}\right\rangle. 1: 𝒞m\mathcal{C}_{m} computes [Δ]m=[yj]m[xj]m[\Delta]_{m}=[y_{j}]_{m}-[x_{\mathcal{I}_{j}}]_{m}.
// Secure MSB extraction (with l=64l=64 assumed; \left\langle{\cdot}\right\rangle denotes sharing over 2\mathbb{Z}_{2})
2: Let aa (resp. bb) represent the share [Δ]0[\Delta]_{0} (resp. [Δ]1[\Delta]_{1}), with the bit string being al1,,a0a_{l-1},\cdots,a_{0} (resp. bl1,,b0b_{l-1},\cdots,b_{0}). Let aq\left\langle{a_{q}}\right\rangle be defined as (aq0=aq,aq1=0)(\left\langle{a_{q}}\right\rangle_{0}=a_{q},\left\langle{a_{q}}\right\rangle_{1}=0) and bq\left\langle{b_{q}}\right\rangle as {bq0=0,bq1=bq}\{\left\langle{b_{q}}\right\rangle_{0}=0,\left\langle{b_{q}}\right\rangle_{1}=b_{q}\}, where q[0,l1]q\in[0,l-1]. Also, let wq\left\langle{w_{q}}\right\rangle be defined as {wq0=aq,wq1=bq}\{\left\langle{w_{q}}\right\rangle_{0}=a_{q},\left\langle{w_{q}}\right\rangle_{1}=b_{q}\}. // Setup round for secure carry computation (SCC): 3: Compute Gq=aqbq\left\langle{G_{q}}\right\rangle=\left\langle{a_{q}}\right\rangle\cdot\left\langle{b_{q}}\right\rangle, for q[0,l1]q\in[0,l-1] 4: Compute Pq=aq+bq\left\langle{P_{q}}\right\rangle=\left\langle{a_{q}}\right\rangle+\left\langle{b_{q}}\right\rangle, for q[0,l1]q\in[0,l-1] // SCC round 1 (with l=64l=64 as example): 5: Compute (G01,P01)=(G0,P0)(\left\langle{G^{1}_{0}}\right\rangle,\left\langle{P^{1}_{0}}\right\rangle)=(\left\langle{G_{0}}\right\rangle,\left\langle{P_{0}}\right\rangle) 6: For k{1,,31}k\in\{1,\cdots,31\} (a) Compute (Gk1,Pk1)=(G2k,P2k)~(G2k1,P2k1)(\left\langle{G^{1}_{k}}\right\rangle,\left\langle{P^{1}_{k}}\right\rangle)=(\left\langle{G_{2\cdot k}}\right\rangle,\left\langle{P_{2\cdot k}}\right\rangle)\tilde{\diamond}(\left\langle{G_{2\cdot k-1}}\right\rangle,\left\langle{P_{2\cdot k-1}}\right\rangle) // SCC round 2: 7: For k{0,,15}k\in\{0,\cdots,15\} (a) Compute (Gk2,Pk2)=(G2k+11,P2k+11)~(G2k1,P2k1)(\left\langle{G^{2}_{k}}\right\rangle,\left\langle{P^{2}_{k}}\right\rangle)=(\left\langle{G^{1}_{2\cdot k+1}}\right\rangle,\left\langle{P^{1}_{2\cdot k+1}}\right\rangle)\tilde{\diamond}(\left\langle{G^{1}_{2\cdot k}}\right\rangle,\left\langle{P^{1}_{2\cdot k}}\right\rangle) // SCC round 3: 8: For k{0,,7}k\in\{0,\cdots,7\} (a) Compute (Gk3,Pk3)=(G2k+12,P2k+12)~(G2k2,P2k2)(\left\langle{G^{3}_{k}}\right\rangle,\left\langle{P^{3}_{k}}\right\rangle)=(\left\langle{G^{2}_{2\cdot k+1}}\right\rangle,\left\langle{P^{2}_{2\cdot k+1}}\right\rangle)\tilde{\diamond}(\left\langle{G^{2}_{2\cdot k}}\right\rangle,\left\langle{P^{2}_{2\cdot k}}\right\rangle) // SCC round 4: 9: For k{0,,3}k\in\{0,\cdots,3\} (a) Compute (Gk4,Pk4)=(G2k+13,P2k+13)~(G2k3,P2k3)(\left\langle{G^{4}_{k}}\right\rangle,\left\langle{P^{4}_{k}}\right\rangle)=(\left\langle{G^{3}_{2\cdot k+1}}\right\rangle,\left\langle{P^{3}_{2\cdot k+1}}\right\rangle)\tilde{\diamond}(\left\langle{G^{3}_{2\cdot k}}\right\rangle,\left\langle{P^{3}_{2\cdot k}}\right\rangle) // SCC round 5: 10: For k{0,1}k\in\{0,1\} (a) Compute (Gk5,Pk5)=(G2k+14,P2k+14)~(G2k4,P2k4)(\left\langle{G^{5}_{k}}\right\rangle,\left\langle{P^{5}_{k}}\right\rangle)=(\left\langle{G^{4}_{2\cdot k+1}}\right\rangle,\left\langle{P^{4}_{2\cdot k+1}}\right\rangle)\tilde{\diamond}(\left\langle{G^{4}_{2\cdot k}}\right\rangle,\left\langle{P^{4}_{2\cdot k}}\right\rangle) // SCC round 6: 11: Compute G06=G15+G05P15=cl1\left\langle{G^{6}_{0}}\right\rangle=\left\langle{G^{5}_{1}}\right\rangle+\left\langle{G^{5}_{0}}\right\rangle\cdot\left\langle{P^{5}_{1}}\right\rangle=\left\langle{c_{l-1}}\right\rangle 12: Compute vj=wl1+cl1\left\langle{v_{j}}\right\rangle=\left\langle{w_{l-1}}\right\rangle+\left\langle{c_{l-1}}\right\rangle.

Figure 6: Secure evaluation of a decision node.

Despite the effectiveness, their solution is limited in that it poses linear O(l)O(l) round complexity. This would lead to high performance overhead in the realistic scenario where the two cloud servers are situated in different geographic regions and connected over WAN, which is a more reasonable setting than local networks given that the two cloud servers are assumed to be non-colluding [13]. The basic idea in [12] is to implement a ll-bit full adder logic in the secret sharing domain. Specifically, the shares of the difference value Δ\Delta at the two cloud servers are represented in bitwise form respectively. Then, a ll-bit full adder logic is applied to add in the secret sharing domain the two binary inputs in a bitwise manner, where carry bits are calculated and propagated, and finally produce the MSB of the difference value Δ\Delta. We note that the work [12] uses a classical and standard adder logic called ripple carry adder, as shown in Fig. 4.

In the ripple carry adder, for each full adder, the two bits that are to be added are available instantly. However, each full adder has to wait for the carry input to arrive from its previous adder. This means that the carry input for the full adder producing the MSB should wait after the carry has rippled through all previous full adders. Note that computing the carry output of each full adder in the secret sharing domain requires interactions between the two cloud servers, thus leading to O(l)O(l) round complexity.

Our design follows [12] in terms of the same strategy of secure MSB bit extraction for secure decision node evaluation, yet aims to reduce the round complexity. Through the design introduced below, we manage to reduce the round complexity from linear to logarithmic. Our observation is that the use of the more advanced carry look-ahead adder can solve the carry delay problem presented in the ripple carry adder [14]. At a high level, a carry look-ahead adder is able to calculate the carry in advance based on only the input bits. It works as follows. Firstly, two terms are defined for the carry look-ahead adder: the carry generate signal GiG_{i} and the carry propagate signal PiP_{i}, where Gi=aibiG_{i}=a_{i}\cdot b_{i} and Pi=ai+biP_{i}=a_{i}+b_{i}. Note that these two terms are only based on the input bits and can be computed instantly given the input bits. Then, the original carry calculation ci+1=aibi+(ai+bi)cic_{i+1}=a_{i}\cdot b_{i}+(a_{i}+b_{i})\cdot c_{i} as in the ripple carry adder can then be re-formulated as ci+1=Gi+Picic_{i+1}=G_{i}+P_{i}\cdot c_{i}. Such re-formulation allows a carry to be computed without waiting for the carry to ripple through all previous stages, as demonstrated by the following example (a 44-bit carry look-ahead adder):

  1. 1.

    c1=G0+P0c0=G0c_{1}=G_{0}+P_{0}\cdot c_{0}=G_{0};

  2. 2.

    c2=G1+P1c1=G1+P1G0c_{2}=G_{1}+P_{1}\cdot c_{1}=G_{1}+P_{1}\cdot G_{0};

  3. 3.

    c3=G2+P2c2=G2+P2(G1+P1G0)c_{3}=G_{2}+P_{2}\cdot c_{2}=G_{2}+P_{2}\cdot(G_{1}+P_{1}\cdot G_{0});

  4. 4.

    c4=G3+P3c3=G3+P3(G2+P2(G1+P1G0))c_{4}=G_{3}+P_{3}\cdot c_{3}=G_{3}+P_{3}\cdot(G_{2}+P_{2}\cdot(G_{1}+P_{1}\cdot G_{0})).

It can be seen that each carry can be computed without waiting for the calculation of all previous carries.

Input: Secret sharing vj\left\langle{v_{j}}\right\rangle for each decision node 𝒟j\mathcal{D}_{j} and [uz][u_{z}] for each leaf node z\mathcal{L}_{z}. Output: Inference result uu^{*} for the client. 1: For each vj\left\langle{v_{j}}\right\rangle, //Conversion from 2\mathbb{Z}_{2} to 2l\mathbb{Z}_{2^{l}}. (a) Let vj\left\langle{v_{j}}\right\rangle be defined as {vj0=t1,vj1=t2}\{\left\langle{v_{j}}\right\rangle_{0}=t_{1},\left\langle{v_{j}}\right\rangle_{1}=t_{2}\}. (b) Let [t1][t_{1}] over 2l\mathbb{Z}_{2^{l}} be defined as {[t1]0=t1,[t1]1=0}\{[t_{1}]_{0}=t_{1},[t_{1}]_{1}=0\} and [t2][t_{2}] as {[t2]0=0,[t2]1=t2}\{[t_{2}]_{0}=0,[t_{2}]_{1}=t_{2}\}. (c) 𝒞0\mathcal{C}_{0} and 𝒞1\mathcal{C}_{1} compute [vj]=[t1]+[t2]2[t1][t2][v_{j}]=[t_{1}]+[t_{2}]-2\cdot[t_{1}]\cdot[t_{2}] in 2l\mathbb{Z}_{2^{l}}. 2: For each decision node 𝒟j\mathcal{D}_{j}, (a) 𝒞0\mathcal{C}_{0} sets [EjL]0=1[vj]0[E^{L}_{j}]_{0}=1-[v_{j}]_{0} and 𝒞1\mathcal{C}_{1} sets [EjL]1=[vj]1[E^{L}_{j}]_{1}=[v_{j}]_{1}. This produces the secret-shared value of the left outgoing edge. (b) 𝒞m\mathcal{C}_{m} sets [EjR]m=[vj]m[E^{R}_{j}]_{m}=[v_{j}]_{m} as the secret-shared value of the right outgoing edge. 3: For each leaf node z\mathcal{L}_{z}, 𝒞0\mathcal{C}_{0} and 𝒞1\mathcal{C}_{1} compute a secret-shared polynomial term [gz][g_{z}] by multiplying the secret-shared values of all edges on its path. 4: 𝒞0\mathcal{C}_{0} and 𝒞1\mathcal{C}_{1} compute z[gz][uz]=[u]\sum\nolimits_{z}{[g_{z}]\cdot[u_{z}]}=[u^{*}], i.e., the secret sharing of the inference result uu^{*}. 5: Client can retrieve [u][u^{*}] and reconstruct uu^{*} as the inference result for the feature vector 𝐱\mathbf{x}.

Figure 7: Secure inference generation.

With the application of the carry look-ahead adder for MSB computation for secure decision node evaluation, we only need to focus on the calculation of the carry cl1c_{l-1} (e.g., c3c_{3} in the above example for 44-bit inputs). That is, after computing cl1c_{l-1}, the MSB can be derived via MSB=al1+bl1+cl1MSB=a_{l-1}+b_{l-1}+c_{l-1} . Note that cl1=Gl2+Pl2Gl3++Pl2P1G0c_{l-1}=G_{l-2}+P_{l-2}\cdot G_{l-3}+\cdots+P_{l-2}\cdots P_{1}\cdot G_{0}. We now need to consider how to properly organize the computation of the carry cl1c_{l-1} so that we could effectively achieve O(log2l)O(\log_{2}l) round complexity. Our observation is that such a computation can be supported by forming a binary tree over the carry generate terms, carry propagate terms, and a binary operator \diamond (illustrated in Fig. 5(a)) defined as: (G,P)=(G′′,P′′)(G,P)(G^{*},P^{*})=(G^{\prime\prime},P^{\prime\prime})\diamond(G^{\prime},P^{\prime}), where G=G′′+GP′′G^{*}=G^{\prime\prime}+G^{\prime}\cdot P^{\prime\prime} and P=P′′PP^{*}=P^{\prime\prime}\cdot P^{\prime}. For demonstration of this idea, we show in Fig. 5(b) an example on how the carry bit essential for MSB computation can be computed in a recursive manner based on a tree structure, in the case of 88-bit inputs. As shown, a pair of the carry generate and propagate terms is put as a leaf node of the tree. Then, the processing is done upwards attributing to each internal node the value corresponding to the application of the operator \diamond between its two children. Such processing leads to log2l\lceil{\log_{2}l}\rceil rounds in computing the essential carry cl1c_{l-1}.

For simplicity of illustration, we show here the details for the case of 44-bit inputs to concretely demonstrate the computation. In the first round, the following terms are computed: (G11,P11)=(G2,P2)(G1,P1)(G^{1}_{1},P^{1}_{1})=(G_{2},P_{2})\diamond(G_{1},P_{1}), (G01,P01)=(G0,P0)(G^{1}_{0},P^{1}_{0})=(G_{0},P_{0}). In the second round, the following term is computed: (G02,P02)=(G11,P11)(G01,P01)(G^{2}_{0},P^{2}_{0})=(G^{1}_{1},P^{1}_{1})\diamond(G^{1}_{0},P^{1}_{0}). Based on the definition of the binary operator \diamond, we first have G11=G2+G1P2,P11=P2P1G^{1}_{1}=G_{2}+G_{1}\cdot P_{2},P^{1}_{1}=P_{2}\cdot P_{1}. Then, we have G02=G11+G01P11=G2+G1P2+G0P2P1G^{2}_{0}=G^{1}_{1}+G^{1}_{0}\cdot P^{1}_{1}=G_{2}+G_{1}\cdot P_{2}+G_{0}\cdot P_{2}P_{1}, which corresponds to the carry c3c_{3}.

With all the above insights in mind, we now elaborate on how to support secure decision node evaluation by taking advantage of the carry look-ahead adder in the ciphertext domain. From the definition of the operator \diamond, it is noted that only addition and multiplication are required (in 2\mathbb{Z}_{2}). So it is easy to see this operator can be securely realized in the ciphertext domain via secret-shared addition and multiplication. We denote the secure realization of the operator as (G,P)=(G′′,P′′)~(G,P)(\left\langle{G^{*}}\right\rangle,\left\langle{P^{*}}\right\rangle)=(\left\langle{G^{\prime\prime}}\right\rangle,\left\langle{P^{\prime\prime}}\right\rangle)\tilde{\diamond}(\left\langle{G^{\prime}}\right\rangle,\left\langle{P^{\prime}}\right\rangle), where \left\langle{\cdot}\right\rangle denotes secret sharing in 2\mathbb{Z}_{2}. Note that each call of the operator needs 22 parallel secret-shared multiplications.

The details of secure decision node evaluation are provided in Fig. 6. It is noted that for simplicity and without loss of generality, we demonstrate the procedure assuming that l=64l=64, which is the practical parameter setting to be used in our experiments, and also consistent with the state-the-art work [12]. Also, to clearly show the computation that can be done in parallel in each round of secure carry computation, we intentionally avoid the use of nested loops. From the procedure shown in Fig. 6, we can see that for the practical setting l=64l=64, only 77 rounds are required through our design for obtaining the secret sharing v\left\langle{v}\right\rangle of the comparison result, in comparison with 125125 rounds in the state-of-the-art work [12].

We also point out that the improvement on communication rounds does not sacrifice the computation efficiency in terms of number of multiplications (in 2\mathbb{Z}_{2}). Through analysis, our new design requires 3l53l-5 (187187 for l=64l=64) multiplications while the prior work requires 3l53l-5 (187187 for l=64l=64) multiplications as well. We remark that although in principle the carry look-ahead adder has higher circuit complexity than the ripple carry adder when computing all carries is required, our design only needs the computation of the essential carry cl1c_{l-1}. This accounts for why our new design does not enlarge the computation cost in secure decision node evaluation compared with [12].

4.5 Secure Inference Generation

With the secret-shared evaluation results available at each decision node, we now describe how to leverage them to enable the two cloud servers to generate the encrypted inference result. We note that there are two approaches on how to use the decision node evaluation results [12]: a path cost-based approach and a polynomial-based approach. From the perspective of client cost, the main difference between these approaches is that the path cost-based approach imposes on the client high communication complexity exponentially scaling with the tree depth, while the polynomial-based approach only incurs constant O(1)O(1) and minimal communication cost (just two shares) for the client.

Given that high local efficiency is our first priority, our system makes use of the polynomial-based approach. This approach works as follows. Starting from the root node, the left outgoing edge of each decision node 𝒟j\mathcal{D}_{j} is assigned the value 1vj1-v_{j} (denoted as EjL=1vjE^{L}_{j}=1-v_{j}), while the right outgoing edge is assigned the value vjv_{j} (denoted as EjR=vjE^{R}_{j}=v_{j}). Then, a term gzg_{z} is computed for each path by multiplying the edge values of that path. As mentioned before, only the term for the path leading to the leaf node carrying the inference result will have the value 11, and all other terms are 0. Then, we can proceed by multiplying each term gzg_{z} with the prediction value uzu_{z} of each corresponding leaf node and computing the sum, i.e., u=zuzgzu^{*}=\sum\nolimits_{z}{u_{z}g_{z}}, which will lead to the expected inference result uu^{*}.

We use the decision tree in Fig. 1 as an example to concretely demonstrate the computation. Firstly, there are four terms {gz}z=14\{g_{z}\}^{4}_{z=1} given that the depth is 22 and thus four paths/leaf nodes. These terms are computed as follows: g1=(1v1)(1v2)g_{1}=(1-v_{1})\cdot(1-v_{2}), g2=(1v1)v2g_{2}=(1-v_{1})\cdot v_{2}, g3=v1(1v3)g_{3}=v_{1}\cdot(1-v_{3}), and g4=v1v3g_{4}=v_{1}\cdot v_{3}. Suppose that the feature vector is evaluated along the path of the leaf node 3\mathcal{L}_{3}. We have v1=1v_{1}=1 and v3=0v_{3}=0, and so we have g1=0(1v2)=0g_{1}=0\cdot(1-v_{2})=0, g2=0v2=0g_{2}=0\cdot v_{2}=0, g3=1(10)=1g_{3}=1\cdot(1-0)=1, and g4=10=0g_{4}=1\cdot 0=0. It can be seen that all the terms except the term g3g_{3} corresponding to 3\mathcal{L}_{3} has zero value. So we have z=14uzgz=u3\sum\nolimits^{4}_{z=1}{u_{z}g_{z}}=u_{3}, obtaining the expected inference result. The secure realization of this approach in our system for secure inference generation basically follows that of [12]. For completeness, we give the details of secure inference generation in Fig. 7, which realizes polynomial mechanism introduced above in the secret sharing domain.

5 Security Analysis

We define and prove the security of our protocol following the standard simulation-based paradigm. We start with defining the ideal functionality which captures the desired security properties for outsourced decision tree inference, with regard to the threat model mentioned above. We then give the formal security definition under the ideal functionality and show that our protocol securely realizes the ideal functionality. In what follows, we define the ideal functionality for the secure outsourced decision tree inference service targeted in this paper.

Definition 1.

The ideal functionality 𝖲𝖾𝖼𝖮𝖣𝖳\mathcal{F}_{\mathsf{SecODT}} of the outsourced decision tree inference service is formulated as follows.

  1. -

    Input. The input to the 𝖲𝖾𝖼𝖮𝖣𝖳\mathcal{F}_{\mathsf{SecODT}} consists of the decision tree 𝒯\mathcal{T} from the provider and the feature vector 𝐱\mathbf{x} from the client. The two cloud servers 𝒞0\mathcal{C}_{0} and 𝒞1\mathcal{C}_{1} provide no input to the 𝖲𝖾𝖼𝖮𝖣𝖳\mathcal{F}_{\mathsf{SecODT}}.

  2. -

    Computation. Upon receiving the above input, the 𝖲𝖾𝖼𝖮𝖣𝖳\mathcal{F}_{\mathsf{SecODT}} performs decision tree inference and produces the inference result denoted as 𝒯(𝐱)\mathcal{T}(\mathbf{x}).

  3. -

    Output. The 𝖲𝖾𝖼𝖮𝖣𝖳\mathcal{F}_{\mathsf{SecODT}} outputs the inference result 𝒯(𝐱)\mathcal{T}(\mathbf{x}) to the client, and outputs nothing to the provider and cloud servers.

Definition 2.

A protocol Π\Pi securely realizes the 𝖲𝖾𝖼𝖮𝖣𝖳\mathcal{F}_{\mathsf{SecODT}} in the semi-honest adversary setting with static corruption if the following guarantees are satisfied:

  1. -

    Corrupted provider. A corrupted and semi-honest provider learns nothing about the values in the client’s feature vector 𝐱\mathbf{x}. Formally, a probabilistic polynomial time (PPT) simulator 𝖲𝗂𝗆𝒫\mathsf{Sim}_{\mathcal{P}} should exist so that 𝖵𝗂𝖾𝗐𝒫Πc𝖲𝗂𝗆𝒫(𝒯)\mathsf{View}^{\Pi}_{\mathcal{P}}\mathop{\approx}\limits^{c}\mathsf{Sim}_{\mathcal{P}}(\mathcal{T}), where 𝒫\mathcal{P} denotes the provider and 𝖵𝗂𝖾𝗐𝒫Π\mathsf{View}^{\Pi}_{\mathcal{P}} refers to the view of 𝒫\mathcal{P} in the real-world execution of the protocol Π\Pi.

  2. -

    Corrupted cloud server. A corrupted and semi-honest cloud server 𝒞m\mathcal{C}_{m} (m{0,1}m\in\{0,1\}) learns no information about the client’s feature vector 𝐱\mathbf{x} and the provider’s decision tree 𝒯\mathcal{T}. Formally, a PPT simulator 𝖲𝗂𝗆𝒞i\mathsf{Sim}_{\mathcal{C}_{i}} should exist such that 𝖵𝗂𝖾𝗐𝒞mΠc𝖲𝗂𝗆𝒞m\mathsf{View}^{\Pi}_{\mathcal{C}_{m}}\mathop{\approx}\limits^{c}\mathsf{Sim}_{\mathcal{C}_{m}}, where 𝖵𝗂𝖾𝗐𝒞mΠ\mathsf{View}^{\Pi}_{\mathcal{C}_{m}} denotes the view of the cloud server 𝒞m\mathcal{C}_{m} in the real-world execution of the protocol Π\Pi. Note that the two cloud servers have no input and output according to the 𝖲𝖾𝖼𝖮𝖣𝖳\mathcal{F}_{\mathsf{SecODT}}. Since they are non-colluding, 𝒞0\mathcal{C}_{0} and 𝒞1\mathcal{C}_{1} cannot be corrupted by the adversary at the same time.

  3. -

    Corrupted client. A corrupted and semi-honest client learns no information about the provider’s decision tree other than generic meta-parameters as stated before. Formally, a PPT simulator 𝖲𝗂𝗆𝒰\mathsf{Sim}_{\mathcal{U}} should exist such that 𝖵𝗂𝖾𝗐𝒰Πc𝖲𝗂𝗆𝒰(𝐱,𝒯(𝐱))\mathsf{View}^{\Pi}_{\mathcal{U}}\mathop{\approx}\limits^{c}\mathsf{Sim}_{\mathcal{U}}(\mathbf{x},\mathcal{T}(\mathbf{x})), where 𝒰\mathcal{U} denotes the client, and 𝖵𝗂𝖾𝗐𝒰Π\mathsf{View}^{\Pi}_{\mathcal{U}} refers to the view of 𝒰\mathcal{U} in the real-world execution of the protocol Π\Pi.

Theorem 1.

Our protocol is a secure realization of the ideal functionality 𝖲𝖾𝖼𝖮𝖣𝖳\mathcal{F}_{\mathsf{SecODT}} according to Definition 2.

Proof.

As per the security definition, we show the existence of a simulator for different corrupted parties (the provider, the client, and either of the cloud servers).

  1. -

    Simulator for the corrupted provider: In the protocol Π\Pi, the provider only needs to supply the secret shares of the decision tree and receives no messages. So, the simulator for the corrupted provider can thus be constructed in a dummy way by just outputting the input of the provider. The output of 𝖲𝗂𝗆𝒫(𝒯)\mathsf{Sim}_{\mathcal{P}}(\mathcal{T}) is identically distributed to the view 𝖵𝗂𝖾𝗐𝒫Π\mathsf{View}^{\Pi}_{\mathcal{P}} of the corrupted provider.

  2. -

    Simulator for a corrupted cloud server: As two cloud servers have a symmetric role in our protocol Π\Pi, it suffices to show a simulator 𝖲𝗂𝗆𝒞0\mathsf{Sim}_{\mathcal{C}_{0}} for 𝒞0\mathcal{C}_{0}. It is noted that the input/output of 𝒞0\mathcal{C}_{0} in our protocol are just secret shares of some data. The security of additive secret sharing ensures that these secret shares are purely random and can be perfectly simulated by 𝖲𝗂𝗆𝒞0\mathsf{Sim}_{\mathcal{C}_{0}} using random values. For the interactions between the two cloud servers in different phases, they are in fact due to the calls of the oblivious array-entry read procedure (only used in the secure feature selection phase) and the secret-shared multiplication procedure based on Beaver’s triples. Let 𝖲𝗂𝗆𝒞0𝖮𝖱𝖾𝖺𝖽\mathsf{Sim}^{\mathsf{ORead}}_{\mathcal{C}_{0}} and 𝖲𝗂𝗆𝒞0𝖲𝖾𝖼𝖬𝗎𝗅\mathsf{Sim}^{\mathsf{SecMul}}_{\mathcal{C}_{0}} denote the corresponding simulators which can simulate a view indistinguishable from real view for 𝒞0\mathcal{C}_{0} in the oblivious array-entry read procedure and the secret-shared multiplication procedure respectively. It is noted that the existence of these two simulators has been proved in prior work. With the existence of these simulators, 𝖲𝗂𝗆𝒞0\mathsf{Sim}_{\mathcal{C}_{0}} first runs 𝖲𝗂𝗆𝒞0𝖮𝖱𝖾𝖺𝖽\mathsf{Sim}^{\mathsf{ORead}}_{\mathcal{C}_{0}} with random strings as input in the secure feature selection phase. Then, 𝖲𝗂𝗆𝒞0\mathsf{Sim}_{\mathcal{C}_{0}} sets the simulated output as the input to the subsequent phases. On each call of the secret-shared multiplication procedure, 𝖲𝗂𝗆𝒞0\mathsf{Sim}_{\mathcal{C}_{0}} runs 𝖲𝗂𝗆𝒞0𝖲𝖾𝖼𝖬𝗎𝗅\mathsf{Sim}^{\mathsf{SecMul}}_{\mathcal{C}_{0}} in order. Finally, 𝖲𝗂𝗆𝒞0\mathsf{Sim}_{\mathcal{C}_{0}} combines and outputs in order the simulated view by 𝖲𝗂𝗆𝒞0𝖮𝖱𝖾𝖺𝖽\mathsf{Sim}^{\mathsf{ORead}}_{\mathcal{C}_{0}} and 𝖲𝗂𝗆𝖡𝖬𝗎𝗅\mathsf{Sim}^{\mathsf{BMul}} on every secure multiplication as its output. This generates the final simulator 𝖲𝗂𝗆𝒞0\mathsf{Sim}_{\mathcal{C}_{0}} for the cloud server 𝒞0\mathcal{C}_{0}.

  3. -

    Simulator for the corrupted client: In the protocol Π\Pi, the client supplies secret shares of the feature vector 𝐱\mathbf{x} and only receives the two shares [u]0[u^{*}]_{0} and [u]1[u^{*}]_{1} of the inference result, from which the plaintext inference result uu^{*} is reconstructed as the output of the client. The simulator thus only needs to simulate the messages (two shares) received by the client given his output uu^{*}. It can set a random value rr as one of the shares, say [u]1[u^{*}]_{1}, and uru^{*}-r for the other share [u]0[u^{*}]_{0}. This is in fact just a direct application of additive secret sharing, the security of which ensures that [u]0[u^{*}]_{0} and [u]1[u^{*}]_{1} random values and indistinguishable from the shares received by the client. The combination of the two simulated shares also produces uu^{*}, which is the same as the output in the real protocol execution and thus guarantees correctness. So the output of 𝖲𝗂𝗆𝒰(𝐱,𝒯(𝐱))\mathsf{Sim}_{\mathcal{U}}(\mathbf{x},\mathcal{T}(\mathbf{x})) is identically distributed to the view 𝖵𝗂𝖾𝗐𝒰Π\mathsf{View}^{\Pi}_{\mathcal{U}} of the corrupted client. The proof of Theorem 1 is completed.

6 Experiments

6.1 Setup

Our protocol is implemented in C++. For the oblivious transfer primitive, we rely on the libOTe library [27] which provides implementation of the protocol in [28]. Cloud-side experiments are conducted over two AWS t3.xlarge instances equipped with Intel Xeon Platinum 8175M CPU (2.50GHz and 16GB RAM): one in Europe (London) and one in US East (N. Virginia). The average latency is 75.42275.422 ms and bandwidth is 161161 Mbits/s. These two instances are situated in different regions for simulating the real-world scenario that the cloud servers are in different trust domains. The provider and the client are evaluated on an AWS t2.xlarge instance possessing an Intel Xeon E5-2676 v3 processor (2.40GHz and 16GB RAM). We test with synthetic decision trees with realistic configurations, following prior works [15, 16, 12]. The tree depth dd varies from 33 to 1717, and the dimension II of the feature vector varies from 99 to 5757. We make comparison with the state-of-the-art prior work by Zheng et al. [12] (the ZDWWN protocol).

6.2 Local-side Performance Evaluation

Refer to caption

Figure 8: Communication performance of the provider.

Refer to caption

Figure 9: Computation performance of the provider.

We first evaluate the performance on the local side, i.e., the provider and the client. Fig. 8 and Fig. 9 show the communication and computation costs of the provider for varying decisions trees, along with comparison with the ZDWWN protocol. As the provider in our design just constructs an index vector of O(J)O(J) size rather than a matrix of size O(JI)O(J\cdot I) as in the ZDWWN protocol, he can enjoy significant cost savings. For different decision trees being tested, the communication cost of the provider ranges from 0.00030.0003 MB to 66 MB in our system, while it is from 0.00160.0016 MB to 118118 MB in the ZDWWN protocol. In terms of the provider’s running time, it varies from 0.010.01 ms to 33.84233.842 ms in our system, while it is from 0.0130.013 ms to 619.723619.723 ms in the ZDWWN protocol. Overall, our system can offer the provider up to 19×19\times savings (average of 7×7\times) in communication. In computation, our system can offer the provider up to 18×18\times savings (average of 5×5\times). In Table II, we give the communication cost and computation cost of the client respectively. It is noted that the client has minimal costs which only scales with the dimension of the feature vector. Recall that the client in our system has the same cost as in the ZDWWN protocol, given that the polynomial-based mechanism is used in the phase of secure inference generation which allows the client to only receive the two shares of the inference result.

TABLE II: Performace of the Client
dd II Computation (ms) Communication (KB)
3 13 0.0057 0.22
4 15 0.0060 0.25
8 9 0.0054 0.16
13 13 0.0056 0.22
17 57 0.0098 0.91

6.3 Cloud-side Performance Evaluation

We now examine the performance on the cloud side. Firstly, we show in Fig. 10 the amount of data transferred between the cloud servers in our system and make comparison with the ZDWWN protocol. Our design has relatively higher communication cost (average of 1.9×1.9\times) than the ZDWWN protocol, which is mainly due to the sue of OT in the secure feature selection phase and the secret-shared multiplications in the secure inference generation phase. We emphasize that such overhead in these two phases is the trade-off for the substantial efficiency improvement on the provider side, which is the first priority in our design philosophy.

Significantly reduced overall online cloud service latency. On another hand, it is noted that the overall end-to-end online inference latency in our system is still much less than the ZDWWN protocol, as shown in Fig. 11. This means that compared with the ZDWWN protocol, our system provides much better service experience for the client and fits much better into the practical realm due to the capability in giving faster response. In particular, our new design is up to 8×8\times (average of 5×5\times) faster than the ZDWWN protocol. Such efficiency is attributed to the significant optimization on the secure decision node evaluation phase, where the round complexity is largely reduced from linear (as in the ZDWWN protocol) to logarithmic. A breakdown of the overall cloud-side online inference latency is given in Table III.

Refer to caption

Figure 10: Communication performance at the cloud.

7 Related Work

There has been some work on secure decision tree inference [29, 15, 16, 18, 17, 30]. Most of prior works [29, 15, 16, 17, 18, 30] focus on the non-outsourcing setting where a customized protocol is designed for running between the provider and the client. For example, in [16], to achieve secure feature selection, the client sends to the provider the ciphertext of the feature vector under homomorphic encryption, and then the provider directly selects the ciphertext of each feature for each decision node based on his plaintext selection mapping. Whether these protocols can be effectively adapted to the outsourcing setting remains largely unclear, since the outsourced service requires operations to conducted over encrypted decision tree and feature vector from the very beginning and also raises more design considerations for security and functionality. Moreover, many protocols make use of heavy cryptographic tools (e.g., fully/partially homomorphic encryption, garbled circuits, and ORAM) in the latency-sensitive online interactions. Although the protocol in [18] uses secret sharing, it is yet designed to fully and inefficiently work on binary representations of the decision tree as well as the feature vector provided from the very beginning, with all the secure processing conducted at bitwise level. So their protocol is also not directly adaptable for efficient secure outsourcing.

Very recently, the work [12] presents the first design tailored for secure outsourcing of decision tree inference, which runs under the two-server model and only makes use of additive secret sharing to securely realize the various components for the online execution of the service. As an initial attempt, however, its performance is yet to be optimized. Our new highly efficient design presents significant optimizations which largely improves the overall online end-to-end latency of the secure inference service provided by the cloud, as well as the provider’s performance.

Refer to caption


Figure 11: Overall end-to-end online runtime performance at the cloud over realistic WAN.
TABLE III: Breakdown of Runtimes in Different Phases (in seconds) at the Cloud Servers, over WAN
Parameters Secure Feature Selection Secure Decision Node Evaluation Secure Inference Generation
dd II ZDWWN Ours ZDWWN Ours ZDWWN Ours
3 13 0.151 0.527 9.38 0.529 0.154 0.154
4 15 0.156 0.529 9.454 0.53 0.306 0.306
8 9 0.167 0.533 9.456 0.532 0.383 0.383
13 13 0.393 0.91 10.03 1.735 0.69 0.69
17 57 19.376 21.006 11.669 4.281 1.785 1.785

Our work is also related to the line of work (e.g., [29, 31, 32, 22, 33], to just list a few) on securely evaluating other machine learning models, such as hyperplane decision [29], Naïve Bayes [29], neural networks [31, 32, 22, 33]. The common blueprint therein is to build specializaedprotocols tailored for the specific computation required by different models through different cryptographic techniques. For example, the work of Liu et al. [31] supports secure neural network evaluation using secret sharing and garbled circuits; the work of Juvekar et al. [32] relies on highly customized use of homomorphic encryption and garbled circuits to support low latency in secure neural network evaluation. Most of these works operate under the non-outsourcing and aim to protect privacy for the model and client input. There are some works [22, 34] also operating under the two-server model as in this work, with the tailored support for secure evaluation of models such as linear regression, logistic regression, and neural networks. Some recent efforts have also been presented on secure machine learning under the three-server [35, 36]/four-server [37] model (for models other than decision trees), where three/four servers have to engage in the online interactions.

8 Conclusion

In this paper, we design, implement, and evaluate a new system that allows highly efficient secure outsourcing of decision tree inference. Through the synergy of several delicate optimizations which securely shift most workload of the provider to the cloud and reduce the communication round complexities between the cloud servers, our system significantly improves upon the state-of-the-art prior work. Extensive experiments demonstrated that compared with the state-of-the-art, our new system achieves up to 8×8\times better online end-to-end inference latency between the cloud servers over realistic WAN, as well as allows the provider to enjoy 19×19\times savings in communication cost and 18×18\times savings in computation cost.

References

  • [1] A. T. Azar and S. M. El-Metwally, “Decision tree classifiers for automated medical diagnosis,” Neural Computing and Applications, vol. 23, no. 7-8, pp. 2387–2403, 2013.
  • [2] M. W. Libbrecht and W. S. Noble, “Machine learning applications in genetics and genomics,” Nature Reviews Genetics, vol. 16, no. 6, pp. 321–332, 2015.
  • [3] F. Wang, H. Zhu, R. Lu, Y. Zheng, and H. Li, “Achieve efficient and privacy-preserving disease risk assessment over multi-outsourced vertical datasets,” IEEE Trans. Dependable Secure Comput., pp. 1–1, 2020.
  • [4] B. W. Yap, S. Ong, and N. H. M. Husain, “Using data mining to improve assessment of credit worthiness via credit scoring models,” Expert Syst. Appl., vol. 38, no. 10, pp. 13 274–13 283, 2011.
  • [5] D. Delen, C. Kuzey, and A. Uyar, “Measuring firm performance using financial ratios: A decision tree approach,” Expert Syst. Appl., vol. 40, no. 10, pp. 3970–3983, 2013.
  • [6] S. S. S. Sindhu, S. Geetha, and A. Kannan, “Decision tree based light weight intrusion detection using a wrapper approach,” Expert Syst. Appl., vol. 39, no. 1, pp. 129–141, 2012.
  • [7] N. B. Amor, S. Benferhat, and Z. Elouedi, “Naive bayes vs decision trees in intrusion detection systems,” in Proc. of ACM SAC, H. Haddad, A. Omicini, R. L. Wainwright, and L. M. Liebrock, Eds.
  • [8] Microsoft Azure, “Deploy models with Azure Machine Learning,” https://docs.microsoft.com/en-us/azure/machine-learning/service/how-to-deploy-and-where, 2019, [Online].
  • [9] Google Cloud, “Deploying your model,” https://cloud.google.com/vision/automl/object-detection/docs/deploy, 2019, [Online].
  • [10] AWS, “Deploy a Model on Amazon SageMaker Hosting Services ,” https://docs.aws.amazon.com/sagemaker/latest/dg/how-it-works-hosting.html, 2019, [Online].
  • [11] J. Liang, Z. Qin, S. Xiao, L. Ou, and X. Lin, “Efficient and secure decision tree classification for cloud-assisted online diagnosis services,” IEEE Trans. Dependable and Secure Computing, 2019, doi: 10.1109/TDSC.2019.2922958.
  • [12] Y. Zheng, H. Duan, C. Wang, R. Wang, and S. Nepal, “Securely and efficiently outsourcing decision tree inference,” IEEE Trans. Dependable Secure Comput., pp. 1–1, 2020.
  • [13] W. Chen and R. A. Popa, “Metal: A metadata-hiding file sharing system,” in Proc. of NDSS, 2020.
  • [14] D. Harris, “A taxonomy of parallel prefix networks,” in Proc. of Asilomar Conference on Signals, Systems & Computers, 2003.
  • [15] D. J. Wu, T. Feng, M. Naehrig, and K. E. Lauter, “Privately evaluating decision trees and random forests,” PoPETs, vol. 2016, no. 4, pp. 335–355, 2016.
  • [16] R. K. H. Tai, J. P. K. Ma, Y. Zhao, and S. S. M. Chow, “Privacy-preserving decision trees evaluation via linear functions,” in Proc. of ESORICS, 2017.
  • [17] A. Tueno, F. Kerschbaum, and S. Katzenbeisser, “Private evaluation of decision trees using sublinear cost,” PoPETs, vol. 2019, no. 1, pp. 266–286, 2019.
  • [18] M. D. Cock, R. Dowsley, C. Horst, R. Katti, A. Nascimento, W. Poon, and S. Truex, “Efficient and private scoring of decision trees, support vector machines and logistic regression models based on pre-computation,” IEEE Trans. Dependable Secure Comput., DOI: 10.1109/TDSC.2017.2679189, 2017.
  • [19] D. Beaver, “Efficient multiparty protocols using circuit randomization,” in Proc. of CRYPTO, 1991.
  • [20] H. Corrigan-Gibbs and D. Boneh, “Prio: Private, robust, and scalable computation of aggregate statistics,” in Poc. of USENIX NSDI, 2017, pp. 259–282.
  • [21] Q. Wang, J. Wang, S. Hu, Q. Zou, and K. Ren, “Sechog: Privacy-preserving outsourcing computation of histogram of oriented gradients in the cloud,” in Proc. of ACM AsiaCCS, 2016.
  • [22] P. Mohassel and Y. Zhang, “Secureml: A system for scalable privacy-preserving machine learning,” in Proc. of IEEE S&P, 2017.
  • [23] N. Agrawal, A. S. Shamsabadi, M. J. Kusner, and A. Gascón, “QUOTIENT: two-party secure neural network training and prediction,” in Proc. of ACM CCS, 2019.
  • [24] Y. Zheng, H. Duan, and C. Wang, “Learning the truth privately and confidently: Encrypted confidence-aware truth discovery in mobile crowdsensing,” IEEE Transactions on Information Forensics and Security, vol. 13, no. 10, pp. 2475–2489, 2018.
  • [25] M. S. Riazi, C. Weinert, O. Tkachenko, E. M. Songhori, T. Schneider, and F. Koushanfar, “Chameleon: A hybrid secure computation framework for machine learning applications,” in Proc. of AsiaCCS, 2018.
  • [26] M. Curran, X. Liang, H. Gupta, O. Pandey, and S. R. Das, “Procsa: Protecting privacy in crowdsourced spectrum allocation,” in Proc. of ESORICS, 2019.
  • [27] P. Rindal, “libOTe: an efficient, portable, and easy to use Oblivious Transfer Library,” https://github.com/osu-crypto/libOTe.
  • [28] V. Kolesnikov, R. Kumaresan, M. Rosulek, and N. Trieu, “Efficient batched oblivious PRF with applications to private set intersection,” in Proc. of ACM CCS, 2016.
  • [29] R. Bost, R. A. Popa, S. Tu, and S. Goldwasser, “Machine learning classification over encrypted data,” in Proc. of NDSS, 2015.
  • [30] A. Tueno, Y. Boev, and F. Kerschbaum, “Non-interactive private decision tree evaluation,” in Proc. of DBSec, A. Singhal and J. Vaidya, Eds., 2020.
  • [31] J. Liu, M. Juuti, Y. Lu, and N. Asokan, “Oblivious neural network predictions via minionn transformations,” in Proc. of ACM CCS, 2017.
  • [32] C. Juvekar, V. Vaikuntanathan, and A. Chandrakasan, “GAZELLE: A low latency framework for secure neural network inference,” in Proc. of USENIX Security Symposium, 2018.
  • [33] P. Mishra, R. Lehmkuhl, A. Srinivasan, W. Zheng, and R. A. Popa, “Delphi: A cryptographic inference service for neural networks,” in Proc. of USENIX Security Symposium, 2020.
  • [34] V. Nikolaenko, U. Weinsberg, S. Ioannidis, M. Joye, D. Boneh, and N. Taft, “Privacy-preserving ridge regression on hundreds of millions of records,” in Proc. of IEEE SP, 2013.
  • [35] P. Mohassel and P. Rindal, “Aby3{}^{\mbox{3}}: A mixed protocol framework for machine learning,” in Proc. of ACM CCS, 2018.
  • [36] S. Wagh, D. Gupta, and N. Chandran, “Securenn: 3-party secure computation for neural network training,” PoPETs, vol. 2019, no. 3, pp. 26–49, 2019.
  • [37] H. Chaudhari, R. Rachuri, and A. Suresh, “Trident: Efficient 4pc framework for privacy preserving machine learning,” in Proc. of NDSS, 2020.