plaintext and a ciphertext. At the same time, HE mul-
tiplications between encrypted data (ciphertexts) in-
crease significantly the accumulative level of noise and
they limit the applicability of the HE schemes. Thus,
they must be avoided when possible.
Building on this observation, we introduce the no-
tion of partially oblivious (PO) inference. In a PO in-
ference system, the ML model owner decides to leak
some of the model’s weights in order to improve the
efficiency of the inference process. PO inference can
be seen as a generalization of oblivious inference that
offers a trade-off between security and efficiency. The
PO inference systems lie between the two extreme use
cases, the most secure but the less efficient in which
all the ML model weights are encrypted and the less
secure and the most efficient in which all the weights
are revealed. The optimal point of equilibrium between
efficiency and security depends on the use case.
Our work is summarized as follows:
1. We introduce the notion of Partially Oblivious in-
ference for ML models.
2. We provide a security definition for the evaluation
of the information leakage impact. In our analysis,
the attacker is passive (”honest-but-curious”) and
she aims to compute a model that simulates the
protected one as accurately as possible. We use
accuracy improvement as our security metric.
3. As a proof-of-concept use case, we apply the no-
tion of PO inference to protect Convolutional Neu-
ral Networks (CNN) inference.
4. We experimentally measure the security and per-
formance trade-off. We use two models trained
with the MINST [15] and CIFAR-10 datasets [14],
respectively. For the PO inference implementa-
tion, Gazelle-like [12] approach is used. Impres-
sively, it is shown that in some scenarios, leakage
of more than 80% of the model weight’s can be
acceptable.
The paper is organized as follows. In Section 2, the
necessary background is provided. In Section 3, we an-
alyze our motivation, we introduce the security attack
model and the security definition for PO inference and
we demonstrate the application of the PO inference to
CNN models. Finally, in Section 4, we implement and
evaluate the two CNN models and in Section 5, we
conclude the paper.
1.1 Related work
There are several lines of work for PPML systems that
leverage advanced cryptographic tools, like MPC and
HE. The most promising solutions are hybrid, and they
are using HE to protect the linear and MPC to protect
the non-linear layers.
CryptoNet ([10]) is the first scheme that deploys the
HE primitive for PPML on the MNIST benchmark. In
the same research line, CHET [9], SEALion [22] and
Faster Cryptonets [7] use HE and retrained networks.
There are HE based schemes that use pre-trained net-
works, like Chimera [4] and Pegasus [16]. In the pre-
trained PPML category, we can find several propos-
als that use only MPC schemes, like ABY3 [18], and
XONN [20].
The most promising type of PPML systems are hy-
brid, i.e. the proposals that use both MPC and the HE
schemes. Hybrid HE-MPC schemes provide an elegant
solution for pre-trained networks. The MPC is respon-
sible for the non-linear part (activation function) and
HE for the linear transformations (FC and convolu-
tional layers). Gazelle [12] is a state-of-the-art hybrid
scheme for CNN prediction and several works have fol-
lowed, like Delphi [17], nGraph-HE [3], nGraph-HE2
[2], and PlaindML-HE [5]. All these schemes assume
that either the model owner runs the models locally or
that the ML model is publicly known.
There are several open source HE libraries that im-
plement the operations of a HE schemes and offer
higher-level API [23] and there is an ongoing effort to
standardize APIs for HE schemes [1]. However, deal-
ing directly with HE-libraries and operations is still
a very challenging task for the developers. In order
to facilitate developers work, HE compilers have been
proposed to offer a high-level abstraction. There is a
nice overview of existing HE-compilers in [23].
2 Background
2.1 Homomorphic Encryption
In the last decade, the performance of HE schemes has
impressively improved up to several orders of magni-
tude thanks to advances in the theory and to more
efficient implementations. However, it is still signifi-
cantly slower than plaintext computations, while real-
izing HE-based computations is complex for the non-
expert.
Modern HE schemes belong into one of two main cat-
egories. The schemes that compute logical gates and
thus, they are most efficient for generic applications,
and the schemes that operate nicely on arithmetic or
p-ary circuits and thus, they are used for the evalu-
ation of polynomial functions. The CKKS [6] scheme
belongs in the second category. As it operates to arith-
metic circuits on complex and real approximate num-
bers, CKKS is suitable for machine learning applica-
tions. We are going to use it in our experiments.
Following the last version of the HE Standard [1], all
the schemes must support the following types of oper-
ations: key and parameters management, encryption
and decryption operation, HE evaluation of additions
and multiplications, and noise management.
2.2 HE evaluation operations cost
Practically, all the modern HE schemes are based on
the hardness of the Learning With Errors (LWE) prob-
lem [19] and its polynomial ring variant. Depending on
the scheme the plaintext, the keys, and the ciphertexts
are elements of Zn
qor Zq[X]/(Xn+ 1), i.e. they are
2